How do I create 4 buttons that the player needs to dash in between?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Paul Wetzel

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…

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.

SweetPie | 2022-09-26 01:32