How do I make cooldowns?

Ive been trying to make cooldowns for my game for a long while now, so I came here. does anyone know how

3 Likes

Can you share your code? Usually the way I do cooldowns is with a variable that gets set and then set back after a time, but that timer happens in its own forever loop. Here’s some code:
On overlap…(
If cooldown = 0, run code, set cooldown = 1
)
Forever (
If (cooldown = 1), pause 2000, cooldown = 0
)

2 Likes

You would want to use the “Timers” extension, specifically the


Block.

Just have whatever you want to happen inside the block and use the number parameter as the cooldown length in milliseconds.

To find the “Timers” extension, click “Extensions” then scroll down or search “Timers” at the search bar, then click the “Timers” box to get the blocks.

1 Like

Timers extension! Find it here:

After you download it, use this block!

2 Likes

Timer extension. its in the regular ones. also if you want to visualize it, you could also add status bars.

2 Likes

it worked, tysm!!