| 11-19-2005, 02:30 PM | #1 |
I have a trigger that spawns zombies each 30sec and orders them to attack at a random location on the map borders. Here's my trigger: Code:
Spawn
Events
Time - Every 30.00 seconds of game time
Conditions
Actions
Special Effect - Create a special effect at (Center of Spawn <gen>) using AbilitiesSpellsUndeadRaiseSkeletonWarriorRaiseSkeleton.mdl
Unit - Create 1 Zombie for Neutral Hostile at (Center of Spawn <gen>) facing (Random angle) degrees
Wait 0.50 game-time seconds
Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Unit - Order (Picked unit) to Attack-Move To ((Center of (Playable map area)) offset by 10000.00 towards (Random angle) degrees)) |
| 11-19-2005, 03:11 PM | #2 |
change the gameplay constants "Creep - Guard Return Distance" and "Creep - Guard Return Time" to very big values |
| 11-19-2005, 03:20 PM | #3 |
Thanks! Another question : Is it possible to make an event to fire when a zombie stops (has no more orders)? That way I would change "Unit Group - Pick every unit in region" action to only work with "Last created unit" and when a zombie would reach his destination he would immediately go to another one. |
| 11-19-2005, 03:44 PM | #4 |
There may be a way to catch units that are "idle" but I've never tried... it would probably be a boolean condition. |
| 11-19-2005, 04:35 PM | #5 |
Here's what I tried: Code:
Idle Zombies Check
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (If (((Picked unit) is paused) Equal to True) then do (Unit - Order (Picked unit) to Attack-Move To ((Center of (Playable map area)) offset by 10000.00 towards (Random angle) degrees)) else do (Do nothing)) ... |
| 11-19-2005, 06:40 PM | #6 |
For the record that trigger will cause a huge increment in memory usage over time and eventually lag. It will lag instantly if there are a lot of units. And "Unit is paused" how is that related to unit is idle? Paused is a state you set with triggers. To know if a unit is idle just check its current order id, if it is 0 , OrderId("stop") or some other order you would consider idle then it is an idle unit |
| 11-19-2005, 08:31 PM | #7 |
Could you make an example with OrderId? I do not understand how it works... |
