Discord Thread I need help with cooldowns.

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.
with variables yes

code_language.skript:
on left click:
    if name of player's tool is "&6Super Bow":
        if {cooldown.%player%} is false:
            make the player shoot a arrow at speed 4
        if {cooldown.%player%} is true:
            send "&cWait (x) seconds to do this action!" to player
            wait (x) seconds/ticks/minutes
            set {cooldown.%player%} to false

command /cooldownvariable:
  trigger:
    set {cooldown.%player%} to true
i haven't done this in a long time but the snippet above should work

Posted by: foreverably from the skUnity Discord.
 
not his
on walk on gold block:
set {_waited} to difference between {cooldown::%player's uuid%} and now
if {_waited} is less than 10 seconds:
send "Try again in %difference between 10 seconds and {_waited}%"
stop
else:
push the player upward at speed 0.6
push the player horizontal forward at speed 3
set {cooldown::%player's uuid%} to now
but this

Posted by: ᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼ from the skUnity Discord.
 
code_language.skript:
{goldBlockCooldown::%player%} <:Blob_no:1091885797499752552> 
{cooldown::%player%::goldBlock}
<:Blob_yes:1091885591743975534>
<@690693987396354101

Posted by: eult from the skUnity Discord.
 
code_language.skript:
on walk on gold block:
    set {_waited} to difference between {goldBlockCooldown::%player%} and now
    if {_waited} is less than 10 seconds:
        send "Try again in %difference between 10 seconds and {_waited}%"
        stop
    else:
        push the player upward at speed 0.6
        push the player horizontal forward at speed 3
        set {cooldown::%player%::goldBlock} to now
so this?

Posted by: ᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼ from the skUnity Discord.
 
Status
Not open for further replies.