- 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.
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
Terrain height is not synced between clients in multiplayer.
Since unit extends from widget, you can use widget-related functions too. See:
- return type
- Source code
native BlzGetLocalUnitZ takes unit whichUnit returns real