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

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

Discussion in 'Skript' started by Vane2k16, Nov 8, 2019.

  1. Vane2k16

    Vane2k16 Member

    Joined:
    Feb 17, 2018
    Messages:
    8
    Likes Received:
    0
    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 (Text):
    1. loop {oneline.arena::*}:
    2.     if {oneline.arena::%loop-index%} is "ready":
    3.         set {oneline.playing::%player%} to true
    4.         set {oneline.playing::%clicked entity%} to true
    5.         wait 1 tick
    6.         send "{@gameprefix} &7Das Spiel beginnt!" to player
    7.         send "{@gameprefix} &7Das Spiel beginnt!" to clicked entity
    8.         teleport player to {oneline.spawn1::%loop-index%}
    9.         teleport clicked entity to {oneline.spawn2::%loop-index%}
    10.         set {oneline.arena::%loop-index%} to "ingame"
    11.         wait 15 seconds
    12.         set {oneline.arena::%loop-index%} to "ready"
    13.         stop trigger
    14.     if {oneline.arena::%loop-index%} is "ingame":
    15.         send "{@gameprefix} &cMomentan ist keine Map verfügbar" to player
    16.         send "{@gameprefix} &cMomentan ist keine Map verfügbar" to clicked entity
    17.         stop trigger

    https://pastebin.com/zgwbLLCD

    Addons using (including versions):
    [​IMG]

    Troubleshooting:

    Have you tried searching the docs? Yes
    Have you tried searching the forums? No
     
    #1 Vane2k16, Nov 8, 2019
    Last edited: Nov 8, 2019
  2. RunaYoutube

    RunaYoutube Member

    Joined:
    Nov 10, 2019
    Messages:
    16
    Likes Received:
    0
    Hello there, to me there looks like there is no possible solution to this.
     
  3. Vane2k16

    Vane2k16 Member

    Joined:
    Feb 17, 2018
    Messages:
    8
    Likes Received:
    0
    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.
     
Loading...