How do I make a shield with a cooldown? Specifically, I want it to work like this:
When the user presses a button on the game overlay, they get a 50 shield. For the 1 second after the user gets their shield, they move more slowly at 0.5 movement speed. After that their speed returns back to normal. The user can only use the button for the shield 2 seconds after their shield is destroyed by an enemy player.
To do this, make the overlay a button, and then make it so when pressed, it sends a signal to an item granter which could give them a shield can. Then, a counter could start decrementing by one with a second delay from a wire repeater (I can’t explain exactly how to do the counter in detail right now), then when the counter hits zero, use a speed modifier to set them back to 1. The speed modifier was also triggered by the overlay channel to set them to 0.5 speed. I’m not sure how to do the shield, or why you can use it 2 seconds after your shield goes away.
Thanks again. The user is supposed to use it 2 seconds after their shield goes away to prevent them from spamming it, becoming too overpowered since my game is PVP.
Is it possible to make this shield with a cooldown if there is a cooldown of 10 seconds after the user uses the button (it doesn’t matter if it is destroyed or not)?
Yes!
The button should wire to a trigger. That trigger can be deactivated after triggering and wire to a wire repeater with a delay of 10 seconds, and then reactivate the trigger.
Does that make sense?