W edytorze, tak jak pisał Poko, chyba rzeczywiście się nie da.
Celem określenia wysokość obiektu AGL używałem w skrypcie lua funkcji getPosition oraz land.getHeight.
Przykładowe wykorzystanie w/w funkcji poniżej.
function eoon.checkInZones(_unitName)
local _flagName, _flagValue, _pos, _height
local _unit = Unit.getByName(_unitName)
if _unit and _unit:getPlayerName() then
timer.scheduleFunction(eoon.checkInZones, _unitName, timer.getTime() + 2)
for _groupName, _ in pairs(eoon.DBsPolygonZoneGroupName) do
_flagName = _unit:getPlayerName() .. _groupName
_flagValue = trigger.misc.getUserFlag(_flagName)
_pos = _unit:getPosition().p
if mist.pointInPolygon(_pos, mist.getGroupPoints(_groupName)) then
local _msg = eoon.Msg:new()
_height = _pos.y - land.getHeight({x = _pos.x, y = _pos.z})
if _height < 50 then
if _flagValue < 1 then
_msg.txt = string.format("Player '%s' ENTER zone '%s' (in unit type '%s').", _unit:getPlayerName(), string.sub(_groupName, 7), _unit:getTypeName())
_msg:out("ALL", 30)
trigger.action.setUserFlag(_flagName, timer.getTime())
end
else
if _flagValue > 0 then
_msg.txt = string.format("Player '%s' LEAVE (altitude > max. AGL) zone '%s' (in unit type '%s').", _unit:getPlayerName(), string.sub(_groupName, 7), _unit:getTypeName())
_msg.txt = _msg.txt .. string.format(" Time in zone: %d sec.", timer.getTime() - _flagValue)
_msg:out("ALL", 30)
trigger.action.setUserFlag(_flagName, 0)
end
end
else
if _flagValue > 0 then
local _msg = eoon.Msg:new()
_msg.txt = string.format("Player '%s' LEAVE zone '%s' (in unit type '%s').", _unit:getPlayerName(), string.sub(_groupName, 7), _unit:getTypeName())
_msg.txt = _msg.txt .. string.format(" Time in zone: %d sec.", timer.getTime() - _flagValue)
_msg:out("ALL", 30)
trigger.action.setUserFlag(_flagName, 0)
end
end
end
end
end