BlzGetLocalUnitZ
- Parameters
-
whichUnit unit
- comment
Return unit's (altitude) Z map coordinate (Cartesian System). Unit may be alive or dead.
Returns 0.0 if unit was removed or is null.
Retrieving Z is desync prone, this version might cause desyncs, but (unconfirmed) should be faster than
BlzGetUnitZ
, hence why both exist. In case that you are doing a single player map (campaign), you might decide to use this one instead ofBlzGetUnitZ
.- note
Terrain height is not synced between clients in multiplayer.
- note
Since unit extends from widget, you can use widget-related functions too. See:
BlzGetUnitZ
,GetUnitX
,GetUnitY
,GetWidgetX
,GetWidgetY
.- async
- This function is asynchronous. The values it returns are not guaranteed to be the same for each player. If you attempt to use it in an synchronous manner it may cause a desync.
- patch
1.29.2.9231
- Source
- common.j
- return type
real
- Source code
native BlzGetLocalUnitZ takes unit whichUnit returns real