#set var to false to loop-player
1 messages · Page 1 of 1 (latest)
I would also loop players where ["%region at input%" contains "test ..."]: to filter out extraneous players
and whats the .%loop-player% for? you already linked the var to the player via the uuid, and lists are always better
it is for players cant leave a region during a game
wait 0.1 seconds
if "%region at player%" contains "test in world world":
set {test::%player's uuid%} to true
broadcast "%{test::%player's uuid%}%"```
```on region exit:
if "%region at player%" contains "test in world world":
if {test::%player's uuid%} is true:
cancel event
broadcast "%{test::%player's uuid%}%"```
it works, they cant leave
im having issues only with the var
well i mean. You are setting a different variable
and instead of setting it to false, delete it
ok so how do i make it? to set {test::%player's uuid%} to false for all looped players in that region
or in that case, how to delete that var for all players in that loop?
i mean your code looks functional, its just mainly ,
look this is the full code
yes
wait 1m
when minigame finishes, console executes this command:
executable by: console
trigger:
if arg 1 is "ffa":
loop all players:
if "%region at loop-player%" contains "test in world world":
set {test::%player's uuid%.%loop-player%} to false
make console execute command "back %loop-player%"```
```on region enter:
wait 0.1 seconds
if "%region at player%" contains "test in world world":
set {test::%player's uuid%} to true```
```on region exit:
if "%region at player%" contains "test in world world":
if {test::%player's uuid%} is true:
cancel event```
the region exit is because when they die, enters in spectator mode. And i tried to set variables for when the console executes "back %player%"
so will it be
if "%region at player%" contains "test in world world":
if {test::%player's uuid%.%loop-player%} is true:
cancel event```
?
for the reasons I said earlier
i tried
executable by: console
trigger:
if arg 1 is "ffa":
loop players where ["%region at input%" contains "test in world world"]:
set {test::%player's uuid%} to false
wait 0.2 seconds
make console execute command "spawn %loop-player%"```
but it is not saving to false the var, cause it sends me to spawn but it teleports me to the same region (because the var is still on true)
and how do i set to all players in that region?
that's because i tried .%loop-player%, i don't know how to do it xD