- Joined
- Jul 31, 2012
- Messages
- 2,217
Here are my triggers for my spell, the problem is that in the last one (Lightning Field move - initially off) the dummies don't move
can someone tell me what's wrong
can someone tell me what's wrong
-
Lightning Field first
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Lightning Field
-
-

Actions
-


Set Lightning_Field_Caster = (Triggering unit)
-


Set Lightning_Field_Target = (Target point of ability being cast)
-


Set Lightning_Field_AngleSpeed = 0.50
-


Set y = ((Distance between (Position of Lightning_Field_Caster) and Lightning_Field_Target) / 3000.00)
-


Wait y seconds
-


Unit - Create 1 Lightning Field dummy for (Owner of Lightning_Field_Caster) at Lightning_Field_Target facing Default building facing degrees
-


Set Lightning_Field_dummy[1] = (Last created unit)
-


Wait 1.50 seconds
-


Trigger - Run Lightning Field second <gen> (ignoring conditions)
-
-
-
Lightning Field second
-

Events
-

Conditions
-

Actions
-


For each (Integer x) from 1 to 5, do (Actions)
-



Loop - Actions
-




Set temp_location = (Lightning_Field_Target offset by 550.00 towards ((360.00 / 5.00) x (Real(x))) degrees)
-




Unit - Create 1 Lightning Field dummy for (Owner of Lightning_Field_Caster) at temp_location facing Default building facing degrees
-




Set Lightning_Field_dummy[(x + 1)] = (Last created unit)
-




Set Lightning_Field_Angle[x] = ((360.00 / 5.00) x (Real(x)))
-




Custom script: call RemoveLocation(udg_temp_location)
-
-
-


Unit - Create 1 Lightning Field dummy high for (Owner of Lightning_Field_Caster) at Lightning_Field_Target facing Default building facing degrees
-


Set Lightning_Field_dummy[7] = (Last created unit)
-


Trigger - Run Lightning Field third <gen> (ignoring conditions)
-
-
-
Lightning Field third
-

Events
-

Conditions
-

Actions
-


For each (Integer x) from 2 to 5, do (Actions)
-



Loop - Actions
-




Lightning - Create a Forked Lightning lightning effect from source (Position of Lightning_Field_dummy[x]) to target (Position of Lightning_Field_dummy[(x + 1)])
-




Set Lightning_Field_lightning[(x - 1)] = (Last created lightning effect)
-
-
-


Lightning - Create a Forked Lightning lightning effect from source (Position of Lightning_Field_dummy[2]) to target (Position of Lightning_Field_dummy[6])
-


Set Lightning_Field_lightning[5] = (Last created lightning effect)
-


Wait 1.00 seconds
-


For each (Integer x) from 1 to 6, do (Actions)
-



Loop - Actions
-




Unit - Order Lightning_Field_dummy[7] to Special Archimonde - Finger Of Death Lightning_Field_dummy[x]
-
-
-


Wait 0.50 seconds
-


Trigger - Turn on Lightning Field move <gen>
-
-
-
Lightning Field move
-

Events
-


Time - Every 0.01 seconds of game time
-
-

Conditions
-

Actions
-


For each (Integer x) from 1 to 5, do (Actions)
-



Loop - Actions
-




Set Lightning_Field_Angle[x] = (Lightning_Field_Angle[x] + Lightning_Field_AngleSpeed)
-




Set temp_location = (Lightning_Field_Target offset by 550.00 towards Lightning_Field_Angle[x] degrees)
-




Unit - Move Lightning_Field_dummy[(x + 1)] instantly to temp_location
-




Lightning - Move Lightning_Field_lightning[x] to source (Position of Lightning_Field_dummy[(x + 1)]) and target (Position of Lightning_Field_dummy[(x + 2)])
-




Custom script: call RemoveLocation(udg_temp_location)
-
-
-


Lightning - Move Lightning_Field_lightning[5] to source (Position of Lightning_Field_dummy[2]) and target (Position of Lightning_Field_dummy[6])
-


Set Lightning_Field_AngleSpeed = (Lightning_Field_AngleSpeed + 0.03)
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




Lightning_Field_AngleSpeed Greater than or equal to 15.00
-
-



Then - Actions
-




For each (Integer x) from 1 to 7, do (Actions)
-





Loop - Actions
-






Unit - Remove Lightning_Field_dummy[x] from the game
-






Lightning - Destroy Lightning_Field_lightning[x]
-
-
-
-



Else - Actions
-
-
-
Last edited:







I'm not good at custom scripts, so I usually save them in my test map for later easy find... but I've must have accidentally delete the trigger it was in since I can't find it :/
no worry
change Z offset of a point for lightning effect