How to make a boost button with a cooldown?

don’t shove a guide in my face.
I want it so that while it’s in it’s cooldown, the overlay shows something else, indicating you have to wait.
it has a cool down of 3 seconds.

1 Like

so you will need 2 overlays, 1 property, 1 trigger, and 1 wire repeater
so first you get the first overlay, and make it a button:
these channels
Screen Shot 2024-05-18 at 10.28.09 PM
make sure the scope is “player”

now get another overlay, text, not visible on game start:
Screen Shot 2024-05-18 at 10.29.05 PM

Make a property:
name: overlay time
type: number
default value: 3
scope: player

now in the second overlay go to blocks and do this:

now get a trigger (1-second delay) with these channels:
Screen Shot 2024-05-18 at 10.32.09 PM
Screen Shot 2024-05-18 at 10.31.53 PM

finally, get a wire repeater and use it to connect the first overlay to the trigger:
(note: the wire repeater has 1-second delay)

overlay 1, wire repeater: button pressed —> send wire pulse
wire repeater, trigger: received wire pulse —> trigger

and you are done

I don’t need 2 overlays

I could just change what the text says

but then people could press it and get the upgrade again…

Well yeah, you can use a trigger clock → counter-linked property and use block code to give the player the reward if the timer is over but at that point, it’s probably better to use another overlay for simplicity and memory efficiency

wait, don’t we need speed mods?

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.