- Edited
Hi,
small question. I have an object in all of my levels that has a reference to the next level, so I know where to warp to, when the level is finished
export (PackedScene) var next_world: PackedScene
This way I can easily link everything up. The same for my starting scene which links to the first level and the last level that links to the game ended screen.
Now I have one special case: If the player dies, I have to send him to the game over screen. Right now I have a singleton autoloaded that knows about this
SignalBus.emit_signal("request_change_scene", "res://GameOver.tscn")
First of all this is hardcoded and second of all it is incompatible with my other way of requesting a scene switch by linking a packed scene. But I also don't want to put that in every scene and wire it up.
Is there a way to export variables on autoloaded scripts or which other way would you recommend me to choose?