Uszi
New Member
- Reaction score
- 5
Hey guys.
I want my players to spawn in 1 of 9 zones randomly. However, since there are 6 players and 9 zones, and they all spawn at the same time, the odds of 2 or more players spawning together in the same region is pretty easy.
I want to prevent this. I'm trying to design a trigger that would check whether a zone is vacant or not before spawning the unit there.
Right now I have:
All of the methods I have tried so far wind up being too complicated, or having some sort of bug somewhere that I couldn't find.
This is the unaltered, first version of my spawn trigger: where should I go from here?
Thanks for the help!
I want my players to spawn in 1 of 9 zones randomly. However, since there are 6 players and 9 zones, and they all spawn at the same time, the odds of 2 or more players spawning together in the same region is pretty easy.
I want to prevent this. I'm trying to design a trigger that would check whether a zone is vacant or not before spawning the unit there.
Right now I have:
Code:
Spawn Players
Events
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked player) slot status) Equal to Is playing
((Picked player) controller) Equal to User
Then - Actions
Unit - Create 1 Unit for (Picked player) at (Center of GameStartSpawnZone[(Random integer number between 1 and 9)]) facing Default building facing degrees
Camera - Pan camera for (Picked player) to (Position of (Last created unit)) over 0.00 seconds
Else - Actions
Do nothing
All of the methods I have tried so far wind up being too complicated, or having some sort of bug somewhere that I couldn't find.
This is the unaltered, first version of my spawn trigger: where should I go from here?
Thanks for the help!