#There's no player in a periodical event

1 messages · Page 1 of 1 (latest)

stable bough
#

Greetings, everyone. My task is to make it so that after the timer expires all players in the minigame teleported to a certain place. However, skript writes that there is an error: There's no player in a periodical event. What do I need to do to make skript understand which players should be teleported?

every 1 second: if {gamestart_timer} > -1: subtract 1 from {gamestart_timer} if {gamestart_timer} = 10: loop 10 times: broadcast "game starts in %11 - loop-number%" wait a second if {gamestart_timer} = 0: teleport player to {spawn}

#

I guess I need to somehow create a variable with a list of players or something like that, who can help with this or direct me to some material to study?

hollow cradle
#

you gotta loop all players

#

and then use loop-player

#

or yes you could set {_players::*} to all players
and then loop that

stable bough
# hollow cradle and then use loop-player

Thanks, I almost solved my problem! However, I need to make it so that only players who have entered the minigame are teleported. Accordingly, I need to come up with some action that will add the player's nickname to the list, and will also remove it from there if he has left the game. Do you have any ideas?

hollow cradle
#

commands/region enters/item clicking

#

many things

stable bough
hollow cradle
#

you can create your own commands id suggest reading docs

stable bough
hollow cradle
#

add X to {list::*}

stable bough
# hollow cradle add X to {list::*}

Yes, that's what I need, I've almost got it figured out!!!! However, I still have to figure out how to subtract from this list the player who left the minigame?
I tried add -player to {arenalist::*}, but it didn't work 😆

stable bough