I would like to know how to make a trigger so that when your one unit dies it would automatically respawn at one of the 8 Spawn location's but only randomly. When I try it, it dosen't seem to work. I'd like an answer and a trigger if possible.
Current Player Commands 0 men (or whatever your conditions are): Randomize switches 1-3, Set switch 4.
Switch 1 is clear, 2 is clear, 3 is clear, 4 is set: Create 1 unit at location (1)
Switch 1 is clear, 2 is clear, 3 is set, 4 is set: Create 1 unit at location (2)
Switch 1 is clear, 2 is set, 3 is clear, 4 is set: Create 1 unit at location (3)
Switch 1 is clear, 2 is set, 3 is set, 4 is set: Create 1 unit at location (4)
Switch 1 is set, 2 is clear, 3 is clear, 4 is set: Create 1 unit at location (5)
Switch 1 is set, 2 is clear, 3 is set, 4 is set: Create 1 unit at location (6)
Switch 1 is set, 2 is set, 3 is clear, 4 is set: Create 1 unit at location (7)
Switch 1 is set, 2 is set, 3 is set, 4 is set: Create 1 unit at location (8)
I didn't copy it 8 times, but make an action in each trigger to Clear switch 4.
And yes I know that the setting switch 4 part isn't 100% necessary if you use the proper trigger order and the conditions are simple, such as just commanding 0 men, but that's just one of those instances where it's less to think about if you just use another switch in my opinion.
Perfect, that's the exact condition I wanted to use. Thank you.
ADDITION:
Is it possible to make it so that they never spawn at the same place as another person does? For example they still spawn randomly, only now say two people die at once they don't spawn in one place...
QUOTE
Is it possible to make it so that they never spawn at the same place as another person does?
Indirectly, yes. For example, you spawn for one player, then as the next player is spawning it checks each time and if there's someone else's unit there it removes your unit. The drawback to this is that it might take several trigger cycles before your unit is placed, but it will work.
QUOTE(Velendesril @ Nov 27 2006, 08:46 PM)
Do I do that for all the triggers I make or just one time?
That condition tells the game that spawn triggers need to go on, and should only be used in the trigger that sets Switch 4 (or whatever switch means "unit needs to spawn now").
Having All Players bring 0 men to all the spawn locations prevents spawning there if the space is occupied, and should be used in each trigger spawning a unit in a specific location.