Is there a way to make a sprint button with a cooldown?

I’m working on a game that requires a sprint, but I don’t want people to spam it or it to be only useable for a limited amount of time. If anyone has a solution, thanks!

Of course! Hold on a sec…
(also one that counts down is a different story…)

1 Like

So game overlay --> trigger loop when triggered --> counter with target of your desired cooldown "when target value reached"--> wire repeater --> "reset counter" --> show overlay make sure everything is player- scoped and the trigger loop hides the overlay and also when the counter reaches the target value make it deactivate the trigger loop and when the game overlay is pressed it activates the triggers

this took a while

Also add the speed modifiers
(If this does not work or does not make sense tell me)

2 Likes
  1. Place down a game overlay with these settings
    image
    image

  2. Place down two speed modifiers
    image

  3. Set one speed modifier to 1.00 speed
    image

  4. Set the other speed modifier to 1.50 speed
    image

  5. Place down a trigger
    image

  6. Set visible in game and trigger by player collision to no
    image
    image

  7. Place down another game overlay with these settings
    image
    image

  8. Wire the button game overlay to the text game overlay

  9. Wire the button game overlay to the trigger

  10. Wire the button game overlay to the 1.50 speed modifier

  11. Wire the trigger to the 1.00 speed modifier

  12. Wire the trigger to the text game overlay

  13. Wire the trigger to the button game overlay

  14. Set the trigger delay to how long your cooldown is
    image

  15. Here is how it should look


    Mark a solution if you have found your answer!

If you have any questions be sure to ask!

Wow I should make this a guide!

3 Likes

Thanks!
(sorry it took so long, was testing)

2 Likes

I just tested yours, it works well!
(me and @TheCentaursHoof are working together)

2 Likes

Oh cool thanks!
(It took me a while to write that!)

1 Like

I get that
(this is kinda getting off topic)

1 Like

You should really post this as a guide, @Jobozo1875

2 Likes

I was just saying thanks for acknowledging that you tested it after @TheCentaursHoof marked Cellofive 's post as the solution (not trying to be mean)

Ok we’ll get back on topic now

1 Like

Yeah it’s not that

it was basically for 20 character limit

Oh ha!

Btw you can “cheat” the limit by going like this:

  1. <
  2. <hello
  3. <hello‎>
1 Like

Yes, you can

1 Like

yeah i tried it but it didn’t work…

Anyways this is really off topic, we should stop

1 Like

Hmm I don’t know (about the limit)

But yes lets get back on topic

1 Like

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