These triggers, which are extremely simple and easy to follow, have nothing to do with the center of the map. Yet when they run, the lightning effect is first created at the center of the map and then placed where it is supposed to go.
Variable:
Caster1 - Casting unit of the spell, variable is set to that in a different trigger (no need to post it)
GrappleHook - A dummy unit created in another trigger, created at the position of Caster1 (Has nothing to do with this [I think])
CasterPos2 & GrappleHookLoc - Stated in the second trigger.
Code:
Lightning
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Grapple
Actions
Lightning - Create a Drain lightning effect from source (Position of Caster1) to target (Position of Caster1)
Wait until (((Playable map area) contains GrappleHook) Equal to True), checking every 0.10 seconds
Trigger - Turn on MoveIt <gen>
Code:
MoveIt
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
Set CasterPos2 = (Position of Caster1)
Set GrappleHookLoc = (Position of GrappleHook)
Lightning - Move (Last created lightning effect) to source CasterPos2 and target GrappleHookLoc
Variable:
Caster1 - Casting unit of the spell, variable is set to that in a different trigger (no need to post it)
GrappleHook - A dummy unit created in another trigger, created at the position of Caster1 (Has nothing to do with this [I think])
CasterPos2 & GrappleHookLoc - Stated in the second trigger.