+2 votes

Hi,

I want to add some time functions to my game. Like the speed options in games like Project Highrise and Oxygen Not Included:

PAUSE (SpaceBar)
Slow Speed (key 1)
Normal Speed (key 2)
Fast Speed (key 3)

The only way I can think of to speed up and slow down all the animations and maybe the timers is add a global variable that changes all the delta codes like:

"delta * Global.current_speed"

I'm not too satisfied with this way because I have to go back to all the code I did and bugs might appear. Any ideas?

Also how can I add a pause function?

Thanks!

in Engine by (61 points)

1 Answer

+3 votes
Best answer
by (52 points)
selected by
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 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 webmaster@godotengine.org with your username.