
I've been having a problem fow a while now with making a trigger so that when my unit dies it respawns in a random location. I know how to make them spawn randomly an here is how I do it.
| Trigger |
| Description: |
| Randomize switches |
|
| Players: |
| ¤ Player 1 |
| Conditions: |
| ¤ always |
| Actions: |
¤ Randomize switch spawn1
|
¤ Randomize switch spawn2
|
| ¤ Randomize switch spawn3 |
I do this to randomize the 3 switches that will decide which out of the six locations my unit may spawn at.
Here is how I make my unit spawn
| Trigger |
| Description: |
| unit spawn 1 |
|
| Conditions: |
¤ Player commands exactly 0 men
|
¤ Spawn1 is set
|
¤ Spawn2 is set
|
| ¤ Spawn3 is set |
| Actions: |
| ¤ Create 1 unit at location SPAWN 1 |
| Trigger |
| Description: |
| unit spawn 2 |
|
| Conditions: |
¤ Player commands exactly 0 men
|
¤ Spawn1 is cleared
|
¤ Spawn2 is set
|
| ¤ Spawn3 is set |
| Actions: |
| ¤ Create 1 unit at location SPAWN 2 |
| Trigger |
| Description: |
| unit spawn 3 |
|
| Conditions: |
¤ Player commands exactly 0 men
|
¤ Spawn1 is set
|
¤ Spawn2 is cleared
|
| ¤ Spawn3 is set |
| Actions: |
| ¤ Create 1 unit at location SPAWN 3 |
| Trigger |
| Description: |
| unit spawn 4 |
|
| Conditions: |
¤ Player commands exactly 0 men
|
¤ Spawn1 is set
|
¤ Spawn2 is set
|
| ¤ Spawn3 is cleared |
| Actions: |
| ¤ Create 1 unit at location SPAWN 4 |
Ok i think you under stand how those work

so im not including all the trigs
Now the problem is that when 1 of my units dies it somtimes creates more than 1 unit. Usually around 2 or 3. I think this happens becasue all the triggers accur at the same time. and Yes I tried Hyper Triggers. I also tried putting a 'wait' before randomizing the switches but that didnt work either.
I hope you understand my problem and thankyou for your help.

Ohyeah, Special thanks to Oo.Skillz.oO for showing me how to make random trigs
