Rising a Lightning Effect?

Status
Not open for further replies.
Level 5
Joined
Oct 24, 2007
Messages
90
Hello, I was curious if there is any way of making a lightning effect such as
  • Lightning - Create a Mana Burn lightning effect from source (Position of C'Thun 0162 <gen>) to target (Position of Energy Crystal 0181 <gen>)
float above the ground? It looks wierd stuck to the ground. The "Energy Crystal" unit I'm using has the Eye of Sargeras model; it floats. Therefore, I also need a floating lightning effect. Any help is appreciated ^^
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
set x = x value of unit
set y = y value of unit
set z = current height of unit

set x2 = x value of other unit
set y2 = y value of other unit
set z2 = current height of other unit
call Movelightning (x, x2, y, y2, z, z2)

Something like that, you can look for Dark Gandalfs lightning system in the spell section
 
Level 14
Joined
Jun 3, 2005
Messages
209
Just for the record, one needs to factor in terrain height too (lightnings show through terrain, so even though it's visible, they will still be far below the units and look wrong if you move the camera). GetLocationZ is the only way to get the terrain height. Also, adding 60 to the z is helpful if you want to hit the middle of the unit, not just the origin.

So in the end, z should equal something like
JASS:
GetUnitHeight(u) + GetLocationZ(n) + 60
 
Last edited:
Status
Not open for further replies.
Top