0 votes

Hello! In my Gamemode, the player presses buttons that are scattered across the arena. The player has 5 seconds to get to the next button. If they manage to do so, the timer resets to 5. If not, the player gets a game over.

I wanted to start of simple by displaying the time on screen and killing the player when the timer reaches 0, but I´m not really sure where to start with this...Does anybody maybe know what I have to do?

Godot version 3.5
in Engine by (19 points)

1 Answer

0 votes

Use a Timer node to achieve this. Connect its timeout signal to a function that will kill the player, and call start() on the timer when the sequence begins. Set the Timer's time_left to 5 every time a switch is pressed.

by (12,649 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.