So, I'm working a spell for me to play and from what I know, the spell doesn't work on the first time, and work on the second time.. here's the trigger
-
Lightning Strike
-

Events
-


Unit - A unit Begins casting an ability
-
-

Conditions
-


(Ability being cast) Equal to Lightning Strike
-
-

Actions
-


-------- -------------------------------------------------------------------------------- --------
-


-------- Let's start with the variable first --------
-


-------- -------------------------------------------------------------------------------- --------
-


Set Lightning_Caster = (Casting unit)
-


Set Lightning_Target = (Target unit of ability being cast)
-


Set Lightning_Point = (Position of Lightning_Caster)
-


Set Lightning_Repoint = (Last created hashtable)
-


-------- -------------------------------------------------------------------------------- --------
-


-------- The variable below is the damage for your lightning strike, you can change the damage to your likes. --------
-


-------- -------------------------------------------------------------------------------- --------
-


Set LightningDamage = 700.00
-


-------- -------------------------------------------------------------------------------- --------
-


-------- Variable is done. --------
-


-------- Hashtable can save your data. --------
-


-------- -------------------------------------------------------------------------------- --------
-


Hashtable - Create a hashtable
-


Hashtable - Save Handle OfLightning_Point as 1 of 1 in Lightning_Repoint
-


-------- -------------------------------------------------------------------------------- --------
-


-------- Here's the trigger, sound is optional --------
-


-------- -------------------------------------------------------------------------------- --------
-


Special Effect - Create a special effect at (Position of Lightning_Caster) using Abilities\Weapons\ChimaeraLightningMissile\ChimaeraLightningMissile.mdl
-


Special Effect - Destroy (Last created special effect)
-


Unit - Move Lightning_Caster instantly to (Position of Lightning_Target)
-


Sound - Play PurgeTarget1 <gen> at 100.00% volume, attached to Lightning_Target
-


Special Effect - Create a special effect attached to the origin of Lightning_Target using Abilities\Spells\Orc\Purge\PurgeBuffTarget.mdl
-


Unit - Cause Lightning_Caster to damage Lightning_Target, dealing LightningDamage damage of attack type Pierce and damage type Lightning
-


Special Effect - Destroy (Last created special effect)
-


Special Effect - Create a special effect at (Position of Lightning_Caster) using Abilities\Weapons\ChimaeraLightningMissile\ChimaeraLightningMissile.mdl
-


Trigger - Turn on Lightning Strike Countdown <gen>
-
-
-
Lightning Strike Countdown
-

Events
-


Time - Every 0.15 seconds of game time
-
-

Conditions
-

Actions
-


Set Counter = (Counter + 0.15)
-


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



If - Conditions
-




Counter Greater than or equal to 0.75
-
-



Then - Actions
-




Unit - Move Lightning_Caster instantly to (Load 1 of 1 in Lightning_Repoint)
-




-------- ------------------------------- --------
-




Special Effect - Destroy (Last created special effect)
-




Sound - Destroy PurgeTarget1 <gen>
-




Custom script: call RemoveLocation(udg_Lightning_Point)
-




Trigger - Turn off (This trigger)
-
-



Else - Actions
-
-
-
