An artist's depiction of an Extended Unit Death
Hmm... I'm not quite following you on how you want them to spawn exactly... But in any case, I would use death counters.
Trigger1:
C:
Player 8 has suffered at least 1 deaths of khalis crystal. (Deaths)
A:
Modify deaths for player 8: subtract 1 for khalis crystal. (Set Deaths)
Preserve Trigger
Trigger2:
C:
'computer player' brings at most 0 'men' to 'anywhere' (Bring)
Player 8 has suffered exactly 0 deaths of khaydarin crystal. (Deaths)
A:
Wait for 6000 milliseconds. (Wait)
Modify deaths for player 8: set to 1 for khaydarin crystal. (Set Deaths)
Modify deaths for player 8: set to 200 for khalis crystal. (Set Deaths)
Trigger3:
C:
Player 8 has suffered exactly 1 deaths of khaydarin crystal. (Deaths)
Player 8 has suffered at least 1 deaths of khalis crystal. (Deaths)
A:
Create 1 hydralisk at 'location1' for 'computer player' (Create Units)
Create 1 hydralisk at 'location2' for 'computer player' (Create Units)
Create 1 hydralisk at 'location3' for 'computer player' (Create Units)
Create 1 hydralisk at 'location4' for 'computer player' (Create Units)
Wait for 2000 milliseconds. (Wait)
Preserve Trigger
Explanation:
The first trigger acts like a timer. It constantly subtracts 1 value.
The second trigger does two things. First, it sets 1 death of a khaydarin crystal. This represents "Level 1," and causes the third trigger to execute. The second part is setting a lot of deaths for the khalis crystal, because it's the timer. The higher you set the khalis crystal to, the longer it will take before the spawning stops. Once the khalis crystals hit 0, the conditions to the third trigger will no longer be met and thus the third trigger will stop.
The third trigger spawns a unit every 2 seconds. Pretty basic.
I didn't see your 'randomly assign units' question answered, so here you go. (Note: if you follow this simple method, you CANNOT have any units owned by player 12 [Neutral] in your "mall" area or anywhere else on the map.)
P:
Force 1
C:
Neutral brings at least 1 men to anywhere. (Bring)
A:
Give 1 men owned by Neutral to Current Player (Give Units)
Preserve Trigger
Note: This is assuming that your players are in force 1.
Post has been edited 1 time(s), last time on Mar 23 2008, 9:14 pm by Roy.