Lightning Effect using triggers

Level 3
Joined
Jul 10, 2008
Messages
36
Can anyone tell me that can Lightning Effect created by trigger be attached on a units, for example that when the unit changes heights, the lightning will also be going upwards. The lighting that I created using triggers usually attached to the ground. If there is a way to change the lightning's heights plz teach me how!! Credits will be given!!
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
  • Custom script: call MoveLightningEx(udg_Temp_Lightning_1 , true, GetLocationX(udg_Temp_Loc_1), GetLocationY(udg_Temp_Loc_1), GetLocationZ(udg_Temp_Loc_1) + 100, GetLocationX(udg_Temp_Loc_2), GetLocationY(udg_Temp_Loc_2), GetLocationZ(udg_Temp_Loc_2) + 40)
Temp_Loc_1 is the beginning point of the lightning, Temp_Loc_2 is the end point. Those +100 and +40 are just height offsets, you can use GetUnitFlyingHeight() to get the height offset.

And instead of GetLocationX(), you can use GetUnitX().
 
Top