I want the mutator zone to not take into account a player entering the zone when it’s already occupied , i managed to do it to a certain point
imagine i got a teleporter that tp’s a certain team
p1 enter zone 1 ( team changed )
p2 enter zone 1 ( nothing happens since p1 is in zone and didnt leave
p2 leaves zone 1
p2 re enter zone 1 ( team changed !!!) ← it shouldn’t do that since p1 is still in zone :[
Mutant.AgentEntersEvent.Subscribe(OnPlayerEnter)
Mutant.AgentExitsEvent.Subscribe(OnPlayerExit)
i set set some variables :
var P1isInZone : logic = false
OnPlayerEnter(Agent : agent) : void =
if (P1isInZone = false):
Print(“PlayerEnter: Agent entered the zone”)
…rest of code
OnPlayerExit(Agent : agent) : void =
Print("PlayerExit: Agent exited the zone")
set P1isInZone = false
... rest of code