• 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 comminuty!

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

SrGer

Member
Sep 18, 2021
1
0
1
23
Hello, I need help to make shooting with the bow to be used again in 2 seconds
 
Code:
on shoot:
    if {bow.cooldown} is not set:
        set {bow.cooldown} to true
        wait 2 seconds
        set {bow.cooldown} to false
    else if {bow.cooldown} is false:
        set {bow.cooldown} to true
        wait 2 seconds
        set {bow.cooldown} to false
    else:
        cancel event
        send "&cBows have a 2 second cooldown, please wait!"

I'm positive this will work.
If you want, you can change the message or variable, but it doesn't get more complicated than this
 
Code:
on shoot:
    if {bow.cooldown} is not set:
        set {bow.cooldown} to true
        wait 2 seconds
        set {bow.cooldown} to false
    else if {bow.cooldown} is false:
        set {bow.cooldown} to true
        wait 2 seconds
        set {bow.cooldown} to false
    else:
        cancel event
        send "&cBows have a 2 second cooldown, please wait!"

I'm positive this will work.
If you want, you can change the message or variable, but it doesn't get more complicated than this
DO NOT USE COOLDOWNS LIKE THIS. And this is horribly wrong, here are the reasons:
1. The variable is not a list variable
2. The variable is not player specific
3. And in general the system is just horrible, if the server crashes it's ruined
 
Status
Not open for further replies.