globals
LocationZ = Location(0.0, 0.0)
endglobals
function GetUnitZ takes unit u returns real
call MoveLocation( LocationZ ,GetUnitX(u),GetUnitY(u) )
return GetLocationZ(LocationZ) + GetUnitFlyHeight(u)
endfunction
function SetUnitZ takes unit u,real z returns nothing
// UnitAddAbility(u, 'Amrf')
call MoveLocation( LocationZ ,GetUnitX(u),GetUnitY(u) )
call SetUnitFlyHeight(u,z-GetLocationZ(LocationZ),0)
// UnitRemoveAbility(u, 'Amrf')
endfunction