hey im trying to make eclipse, which is a slam spell which then calls down a lucent beem (basicaly dmg and a .1 second stun) to a random nearby enemy unit. It calls down 8 beams with about .5 seconds between each beam. the caster can run around for a few seconds and the beams will only be called down to hit the units it is by, ie the beams do not just hit random units at the location of casting. so here is my trigger (trying to stay in GUI). it doesnt seem to be multi-insticable and it doesnt always seem to hit 8 times.
-
eclipse
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to eclipse (Neutral Hostile 1)
-
Actions
- Custom script: local unit udg_unit
- Set unit = (Triggering unit)
-
For each (Integer A) from 1 to 8, do (Actions)
-
Loop - Actions
- Wait 0.50 seconds
- Set point = (Position of unit)
- Set group = (Units within 400.00 of point)
-
Unit Group - Pick every unit in group and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
- (Unit-type of (Picked unit)) Not equal to dummy
- (Unit-type of (Picked unit)) Not equal to scatter shot dum
- (Unit-type of (Picked unit)) Not equal to chilling armor dum
- (Unit-type of (Picked unit)) Not equal to tinker bomb dum
- (Unit-type of (Picked unit)) Not equal to web
- (Unit-type of (Picked unit)) Not equal to web dum
- (Unit-type of (Picked unit)) Not equal to march of the machines dum
- (Unit-type of (Picked unit)) Not equal to machine def lvl 1 dum
-
Then - Actions
- Unit Group - Add (Picked unit) to group2
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Unit - Create 1 dummy for (Owner of (Triggering unit)) at point facing Default building facing degrees
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Unit - Add eclipse dum to (Last created unit)
- Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Random unit from group2)
-
Loop - Actions
- Custom script: call RemoveLocation(udg_point)
- Custom script: call DestroyGroup(udg_group2)
- Custom script: call DestroyGroup(udg_group)
-
Events