1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cooldown for loops

Discussion in 'Skript' started by Turtlord, Feb 11, 2021.

Tags:
Thread Status:
Not open for further replies.
  1. Turtlord

    Turtlord Member

    Joined:
    Feb 11, 2021
    Messages:
    12
    Likes Received:
    0
    Hi, I need help. :/
    I don't understand how to add a cooldown to a loop.
    This is the code:
    Code (Text):
    1. loop 5 times at cooldown of 0.01 seconds:
    2.     make player shoot an arrow at velocity 0.75
    (its not working)
     
  2. Jakkeren

    Supporter

    Joined:
    Mar 23, 2017
    Messages:
    63
    Likes Received:
    3
    Well you could always do it like this:

    Code (Text):
    1. loop 5 times:
    2.      //do something
    3.      wait x seconds
     
  3. Turtlord

    Turtlord Member

    Joined:
    Feb 11, 2021
    Messages:
    12
    Likes Received:
    0
  4. TehCheetah

    TehCheetah Member

    Joined:
    Feb 7, 2021
    Messages:
    49
    Likes Received:
    1
    Question:

    Would "every x seconds" then the code work? I know this doesn't really have anything to do with me but I am curious!
     
Thread Status:
Not open for further replies.

Share This Page

Loading...