Solved Delay of loop {variables}: send

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

  • 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.

MeHow

Active Member
Feb 6, 2017
140
13
18
Lithuania
code_language.skript:
                    loop {sw.arena.%arg-2%.players::*}:
                        send "{@prefix} %arg-2% will start in 15 seconds" to loop-value
                        set loop-value's level to 15
                        clear loop-value's inventory
                        wait a second
                        set the loop-value's level to 14
                        wait a second
                        set the loop-value's level to 13
                        wait a second
                        set the loop-value's level to 12
                        wait a second
                        set the loop-value's level to 11
                        wait a second
                        set the loop-value's level to 10
                        play sound "ENTITY_EXPERIENCE_ORB_PICKUP" to loop-value with volume 1 and pitch 2                       
                        wait a second
                        set the loop-value's level to 9
                        wait a second
                        set the loop-value's level to 8
                        wait a second
                        set the loop-value's level to 7
                        wait a second
                        set the loop-value's level to 6
                        wait a second
                        set the loop-value's level to 5
                        play sound "ENTITY_EXPERIENCE_ORB_PICKUP" to loop-value with volume 1 and pitch 2                           
                        wait a second
                        set the loop-value's level to 4
                        play sound "UI_BUTTON_CLICK" to loop-value with volume 1 and pitch 2                           
                        wait a second
                        set the loop-value's level to 3
                        play sound "UI_BUTTON_CLICK" to loop-value with volume 1 and pitch 2                           
                        wait a second
                        set the loop-value's level to 2
                        play sound "UI_BUTTON_CLICK" to loop-value with volume 1 and pitch 2                           
                        wait a second
                        set the loop-value's level to 1
                        play sound "UI_BUTTON_CLICK" to loop-value with volume 1 and pitch 2   
                        wait a second
                        set the loop-value's level to 0
                        set loop-value's gamemode to survival


And i have delay with this code, it's send just for one player of all variables.
Thx for help!
 
You don't need to have a loop here. Most of Skript's effects and expressions accept multiple players as arguments. You can remove the loop and replace every instance of loop-value with {sw.arena.%arg-2%.players::*}.
 
Can you help me on my thread? I was on here before Him!
 
Status
Not open for further replies.