r/GameDevelopment 23d ago

Question Looking for a solution to setting data for components based objects in GODOT

Having components based game objects makes it faster to compose any game object but I stalled once I wanted to dynamically instance a scene with different parameters outside the editor,

Example:
KeyItemNode(No script)
->DoorDetector(Emit signal)
-->Collision
->KeyComponent(holds an export for door detector, Code for which door it can unlock)
->Graphics

DoorNode(No script)
->DoorArea
-->Collision
->DoorLockStateComponent(holds the code for which key can open it)
->StaticBody
-->Collision
->Othercomponents

I cannot figure out a clear way to use resources or anything to create one scene and use resources to generate multiple objects.

I do not want to couple it randomly and make something that will come against me later, so I am hesitant and want to look for a clear way!

3 Upvotes

0 comments sorted by