Get the whole scene tree except one Timer

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By LurreAllire

See title!

I want to let a timer run to wait for a scene change, but the problem is that when i pause the whole tree it simply just completely freezes everything and nothing works.
I expect the timer to be the reason, because he is also in the tree.

:bust_in_silhouette: Reply From: Zylann

By default, the pause mode of nodes is set to inherit, so all nodes mimick the same pause mode as the root, which is Stop (they will stop processing). You can override it by changing this mode in the inspector.

To force your timer to always tick, change its pause mode to Process.

Any way to do this when the timer is created in a script?

LurreAllire | 2020-04-17 19:28

Set its property like this:

$Path/To/Timer.pause_mode = Node.PAUSE_MODE_PROCESS

Or, if you have it in a variable:

timer.pause_mode = Node.PAUSE_MODE_PROCESS

Zylann | 2020-04-17 19:29

I did it in my script, but it still seems to not work.

if == "Player":
			var t =
			get_tree().paused = true
			yield(t, "timeout")
			get_tree().paused = false

LurreAllire | 2020-04-17 19:33

I fixed it now, but now my stuff doesn’t unfreeze.

LurreAllire | 2020-04-17 19:37


That line does nothing. It should be:

t.pause_mode = Node.PAUSE_MODE_PROCESS

Zylann | 2020-04-17 19:52