The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

Or any other way to do code after some time other than doing

var Time = 0

func _fixed_process(delta):
   Time += delta
in Engine by (1,118 points)

3 Answers

+4 votes
Best answer
by (209 points)
selected by

Nice! But this get_tree().create_timer() will create a Timer node and leave it in the scene tree?

Edit: Just saw this create_timer() function is only for 2.2. Why.

Edit2: I just remembered Godot is a open source engine, allowing me to download the sources and compile 2.2 now. Thanks Godot.

+1 vote

There's a Timer node. Put him to your scene, use set_wait_time, start() and signal timeout.

by (836 points)

I know there is, but that's even more impractical than the way I said above. If you need to timer two things simultaneously, then you need two Timer nodes. No, thanks. But thank you :p

+3 votes

Reduz state on FB group that it is possible in last git branch

# Wait 5 seconds, then resume execution (Godot 2.2+)
yield( get_tree().create_timer(5.0), "timeout" )
by (98 points)
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.