- Joined
- Aug 24, 2010
- Messages
- 133
I've been trying to make a spell that creates n number of illusions in a circle.
I found that last created unit doesn't count illusions so I've made another trigger.
When I run this it displays the numbers: 2,1,1,2,1,2,1,1,1,3,3,3
Can someone please explain how triggers are added to the stack and how they are executed.
Seeing how 2 only appeared 3 out of 6 times and 3 appeared at all considering the group should be empty until at least 1 run through of the trigger.
I found that last created unit doesn't count illusions so I've made another trigger.
When I run this it displays the numbers: 2,1,1,2,1,2,1,1,1,3,3,3
Can someone please explain how triggers are added to the stack and how they are executed.
Seeing how 2 only appeared 3 out of 6 times and 3 appeared at all considering the group should be empty until at least 1 run through of the trigger.
-
omnislash
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Summon Illusion
-
-
Actions
-
For each (Integer A) from 1 to ((Level of Summon Illusion for (Triggering unit)) + 5), do (Actions)
-
Loop - Actions
-
Unit - Create 1 blank dummy dummy for (Triggering player) at (Position of (Triggering Unit)) facing Default building facing degrees
-
Unit - Add illusion regular for dummy to (Last created unit)
-
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
-
Trigger - Turn on illusion <gen>
-
Custom script: call IssueTargetOrderById(GetLastCreatedUnit(), 852274, GetTriggerUnit())
-
Trigger - Turn off illusion <gen>
-
Game - Display to (All players) the text: 1
-
-
-
Unit Group - Pick every unit in illusgroup and do (Actions)
-
Loop - Actions
-
Unit - Add bonus damage skill to (Picked unit)
-
Unit - Set level of bonus damage skill for (Picked unit) to (Level of Damage Bonus hero for (Triggering unit))
-
Game - Display to (All players) the text: 3
-
-
-
-
-
illusion
-
Events
-
Unit - A unit Spawns a summoned unit
-
-
Conditions
-
Actions
-
Unit Group - Add (Summoned unit) to illusgroup
-
Game - Display to (All players) the text: 2
-
-