If one variable is set to "ingame" how can i use the other?

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

Vane2k16

Member
Feb 17, 2018
10
1
0
21
Hello, and thanks for reading what I'm writing :emoji_slight_smile:.
I have 2 maps (both in one world) and everything works but if one map is set to ingame you can only get back into the other one if the timer sets it to "ready" again.

I want if {oneline.arena::%loop-index%} is "ingame" that the players go in the second one, because the second is "ready"

thanks in advance for your time and help

Layout:

Skript Version: Skript 2.2
Skript Author: Bensku
Minecraft Version: 1.8.x
---
Full Code:

Code:
loop {oneline.arena::*}:
    if {oneline.arena::%loop-index%} is "ready":
        set {oneline.playing::%player%} to true
        set {oneline.playing::%clicked entity%} to true
        wait 1 tick
        send "{@gameprefix} &7Das Spiel beginnt!" to player
        send "{@gameprefix} &7Das Spiel beginnt!" to clicked entity
        teleport player to {oneline.spawn1::%loop-index%}
        teleport clicked entity to {oneline.spawn2::%loop-index%}
        set {oneline.arena::%loop-index%} to "ingame"
        wait 15 seconds
        set {oneline.arena::%loop-index%} to "ready"
        stop trigger
    if {oneline.arena::%loop-index%} is "ingame":
        send "{@gameprefix} &cMomentan ist keine Map verfügbar" to player
        send "{@gameprefix} &cMomentan ist keine Map verfügbar" to clicked entity
        stop trigger


https://pastebin.com/zgwbLLCD

Addons using (including versions):
Screenshot-6.png


Troubleshooting:

Have you tried searching the docs? Yes
Have you tried searching the forums? No
 
Last edited:
Thanks for your reply.
But i can read out the variable.

with %loop-index%
it says sandstone and stone and this are the 2 maps.
and one is ingame and the other is set to ready
and if one is set to ingame the other one should be use.

and there's really no solution, too bad.
 
Status
Not open for further replies.