Tawnttoo
New Member
- Reaction score
- 36
I would need to get the Z-axis of a point (basically unit flying height) so I can create a lightning effect from ground unit to flying and vice versa. I suppose there's some JASS line to do it?
It's [ljass]GetLocationZ(whichLocation)[/ljass], returning the height of the terrain at that location. Add that to the flying height of a unit, and you will have what you need*.
*Note that it is impossible to accurately determine the actual game Z position of a unit with Fly movement type if it is near a cliff, over trees, or ver a building, because flying units automatically adjust their height smoothly near these obstacles but their flying height value does not change to reflect that. Only WC3 abilities can accurately target a unit's true coordinates, eg. Finger of Death could let you create a lightning from a dummy unit to the accurate 3D position of the target.
This part:Where's the problem with Current flying height?
I never acctually USED it, but it sounds pretty much like whats the flying height of that unit this very moment...
because flying units automatically adjust their height smoothly near these obstacles but their flying height value does not change to reflect that.