This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+1 vote

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.

in Engine by (25 points)

1 Answer

0 votes

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.

by (29,510 points)

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

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

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

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


That line does nothing. It should be:

t.pause_mode = Node.PAUSE_MODE_PROCESS
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.