BlzGetLocalUnitZ

Parameters
whichUnit unit
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.
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 of BlzGetUnitZ.

note

Since unit extends from widget, you can use widget-related functions too. See: BlzGetUnitZ, GetUnitX, GetUnitY, GetWidgetX, GetWidgetY.

note

Terrain height is not synced between clients in multiplayer.

patch

1.29

return type
real
Source code
native BlzGetLocalUnitZ                            takes unit whichUnit returns real   
Source
unit.j
wc3modding.com
BlzGetLocalUnitZ