#set var to false to loop-player

1 messages · Page 1 of 1 (latest)

wet smelt
#

"i tried"
Okay, and what were the results? any errors? Did you debug so you know where it failed?

#

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

turbid willow
wet smelt
#

you cant cancel that event

#

best option would be to teleport/push them back in

turbid willow
#

im having issues only with the var

wet smelt
#

and instead of setting it to false, delete it

turbid willow
turbid willow
wet smelt
turbid willow
#

look this is the full code

wet smelt
#

yes

turbid willow
#

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%"
wet smelt
#

i keep telling you

#

those are different variables

turbid willow
wet smelt
#

no

#

dont use .%loop-player%

wet smelt
turbid willow
# wet smelt 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)
wet smelt
#

you are setting the variable for the executor

#

not the loop-player

turbid willow
#

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

wet smelt
turbid willow
#

{test::%loop-player's uuid%}

#

like that?

#

thanks