- Joined
- Apr 6, 2009
- Messages
- 10
Hi!
Lets say that I wanted to make a cool spwan effect trigger for my map and it would looks like this:
Events:
Time - Every 20.00 seconds of game time
Conditions:
None
Actions:
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
If ((Unit-type of (Picked unit)) Equal to Footman) then do (Unit - Create 1 Footman for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Default building facing degrees) else do (Do nothing)
If ((Unit-type of (Picked unit)) Equal to Flying Machine) then do (Unit - Create 1 Flying Machine for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Default building facing degrees) else do (Do nothing)
Set Spawned_unit = (Last created unit)
Unit - Create 1 Effect dummy for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Default building facing degrees
Unit - Order (Last created unit) to Orc Spirit Walker - Spirit Link Spawned_unit
Now my question is do I have to limit the loop or will it just do one loop for every unit in the map and then stop by itself?
I just wounder cuz I think I read once that if you dont limit the loops they will go on forever.
Lets say that I wanted to make a cool spwan effect trigger for my map and it would looks like this:
Events:
Time - Every 20.00 seconds of game time
Conditions:
None
Actions:
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
If ((Unit-type of (Picked unit)) Equal to Footman) then do (Unit - Create 1 Footman for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Default building facing degrees) else do (Do nothing)
If ((Unit-type of (Picked unit)) Equal to Flying Machine) then do (Unit - Create 1 Flying Machine for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Default building facing degrees) else do (Do nothing)
Set Spawned_unit = (Last created unit)
Unit - Create 1 Effect dummy for (Owner of (Picked unit)) at (Position of (Picked unit)) facing Default building facing degrees
Unit - Order (Last created unit) to Orc Spirit Walker - Spirit Link Spawned_unit
Now my question is do I have to limit the loop or will it just do one loop for every unit in the map and then stop by itself?
I just wounder cuz I think I read once that if you dont limit the loops they will go on forever.