ZorxCue Posted June 13, 2022 Share Posted June 13, 2022 (edited) on step on pressure plate: set {_cooldown} to difference between {cooldown::%player%} and now if {_cooldown} is less than 10 seconds: message "Cooldown You gotta wait: &f%Difference between {_cooldown} and 10 seconds%" wait 10 seconds else: make console execute "effect give %player% regeneration 5 2" set {cooldown::%player%} to now message "no cooldown" I don't know what I did wrong, when go on a pressure plate, it'll just give me regeneration effect instantly every second, instead of waiting till cooldown is done Best regards: Zorx Edited June 13, 2022 by ZorxCue Link to comment Share on other sites More sharing options...
Lamborghini26 Posted June 13, 2022 Share Posted June 13, 2022 you needed a cancel event because then the event would just keep going on step on pressure plate: set {_cooldown} to difference between {cooldown::%player%} and now if {_cooldown} is less than 10 seconds: cancel event message "Cooldown You gotta wait: &f%Difference between {_cooldown} and 10 seconds%" wait 10 seconds else: make console execute "effect give %player% regeneration 5 2" set {cooldown::%player%} to now message "no cooldown" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now