Saving enemy type for instancing in another scene

Godot Version

Godot 4.0

Question

I’m having a lot of trouble calling nodes from other scenes in a script, and I’m not sure if there is a simple way to do so. Now, I am trying to create a system that will save an enemy type when a player collides with them (this enemy type is saved to a separate global AutoLoad script). Then, our player is transferred to another ‘battle’ scene where this saved enemy type will be loaded. However, I am not sure how to transfer this enemy across scenes efficiently and store smaller snippets of data globally rather than making entire scripts global

is it probably better to add the battle scene over the current scene, then disable the ‘main game’ via process_mode = Node.PROCESS_MODE_DISABLED until the battle is finished. This keeps the main game data intact and setting battle-specific data transferring much easier.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.