Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Zachaya |
Hey there,
I am a beginner so I don’t have much knowledge when it comes to coding and godot. Currently I am working on my first 2D game.
At the moment I am stuggling with unpausing the game after the scene changed.
For your understanding: While the dialog is playing the game is paused, after the dialog ends the game unpauses with this code:
enter code here func _input(event): if get_node_or_null('DialogNode') == null: if event.is_action_pressed("ui_accept") and active: get_tree().paused = true var dialog = Dialogic.start('Dialog_Avi_Little_BlueBlob') dialog.pause_mode = Node.PAUSE_MODE_PROCESS dialog.connect('timeline_end', self, 'unpause') add_child(dialog)
func unpause(timeline_name): get_tree().paused = false
This is working so far. Now I wanted the scene to change after the dialog ends. I added a “change scene” event at the end of the dialog in Dialogic.
The scene also changes but the game is still paused, so the process that it unpauses never happens.
I guess I have to unpause the game again manually in code in the new scene with get_tree().paused = false
, but I can’t figur out how the code exactly has to look like (Do I need a specific func or signal,etc.) and in what script I have to put it.
I really hope I could describe my problem in an understandable way and you guys can help me.