0 votes

Hey there! In my gamemode, the player races back and forth between 4 buttons and has "x" amount of seconds to get from one button to the next.

I wanted to start by making 4 buttons, 1 being lit up at a time. When the player touches the button that is lit up, one of the other three should start glowing and the button that has been pressed should not glow anymore.

Does anybody know how I can make this happen in Godot? Complete beginner here...

Godot version 3.5
in Engine by (19 points)

So for the player you'll want to use a KinematicBody2D (unless you want it to be affected by physics in which case the player will be a RigidBody2D)
The 4 buttons will probably be Area2Ds. You will use the "body_entered" signal to determine when the player has pressed the button. You should use a generic button scene, and the 4 buttons will be instances of that scene. This way, if you want to change the way buttons are, you only have to do it once on the generic button, rather than having to do it individually for each button.
For the time, you'll use a timer node. Each time the player touches the button that is lit up, call the start method (something like "$Timer.start(x)" with x being the amount of seconds.

Please log in or register to answer this question.

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.