Solved how do i make loop player to gamemode

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

OHOHOHO

Member
Feb 10, 2017
34
0
0
30
so i build a mini game like hunger games but i want that the last 2 player will teleport to death match so i want to loop all player in the mini game world and than i want to make the loop player only to the player that have survival mode

every seconds:
if {gamestart} is true:
if {players} is 2:
loop all players in world "forest":
set loop player to player with game mode survival ###### that command doesn't work
 
You can use this:
code_language.skript:
set loop-player's gamemode to survival
I would also advise fixing the trigger, "every seconds" isn't a valid one.
 
You can use this:
code_language.skript:
set loop-player's gamemode to survival
I would also advise fixing the trigger, "every seconds" isn't a valid one.
"every seconds" is valid on is work fine
[doublepost=1489351006,1489350952][/doublepost]
You can use this:
code_language.skript:
set loop-player's gamemode to survival
I would also advise fixing the trigger, "every seconds" isn't a valid one.
but i dont want to set all the player to game mode survival i want to make a loop when all the player in game mode survival add to this loop
[doublepost=1489351048][/doublepost]
You can use this:
code_language.skript:
set loop-player's gamemode to survival
I would also advise fixing the trigger, "every seconds" isn't a valid one.
also how did you type the skript code in the lines
 
"every seconds" is valid on is work fine
[doublepost=1489351006,1489350952][/doublepost]
but i dont want to set all the player to game mode survival i want to make a loop when all the player in game mode survival add to this loop
[doublepost=1489351048][/doublepost]
also how did you type the skript code in the lines

1. So you want something like this?

code_language.skript:
loop all players:
    if loop-player's gamemode is survival:
        #put what you want here

2. In the toolbar when typing a post, click the + which is the 4th to last icon, then select code.
 
so i build a mini game like hunger games but i want that the last 2 player will teleport to death match so i want to loop all player in the mini game world and than i want to make the loop player only to the player that have survival mode

every seconds:
if {gamestart} is true:
if {players} is 2:
loop all players in world "forest":
set loop player to player with game mode survival ###### that command doesn't work

code_language.skript:
every 1 second:
    if {gamestart} is true:
        if {players} is 2:
            loop all players in world "forest":
                if loop-player's gamemode is survival:
#STUFF HERE

Or maybe
code_language.skript:
every 1 second:
    if {gamestart} is true:
        if {players} is 2:
            loop all players in world "forest":
                set loop-player's gamemode to survival
 
code_language.skript:
every 1 second:
    if {gamestart} is true:
        if {players} is 2:
            loop all players in world "forest":
                if loop-player's gamemode is survival:
#STUFF HERE

Or maybe
code_language.skript:
every 1 second:
    if {gamestart} is true:
        if {players} is 2:
            loop all players in world "forest":
                set loop-player's gamemode to survival
first on your second skript it not what ן meant in the first skript are you sure that the loop player will be only for the player with game mode survival because it can be also checked if one of the player in world forest is in survival mode and then the loop will be Exist and the loop will be to all the players in world forest
 
first on your second skript it not what ן meant in the first skript are you sure that the loop player will be only for the player with game mode survival because it can be also checked if one of the player in world forest is in survival mode and then the loop will be Exist and the loop will be to all the players in world forest

All the effects that your put below that:
code_language.skript:
if loop-player's gamemode is survival:
will be only for loop-players with survival gamemode.
 
Status
Not open for further replies.