mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'master' into develop
This commit is contained in:
commit
0af68cd780
@ -320,6 +320,23 @@ function UNIT:IsActive()
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Returns if the unit is exists in the mission.
|
||||||
|
-- If not even the DCS unit object does exist, `nil` is returned.
|
||||||
|
-- If the unit object exists, the value of the DCS API function [isExist](https://wiki.hoggitworld.com/view/DCS_func_isExist) is returned.
|
||||||
|
-- @param #UNIT self
|
||||||
|
-- @return #boolean Returns `true` if unit exists in the mission.
|
||||||
|
function UNIT:IsExist()
|
||||||
|
|
||||||
|
local DCSUnit = self:GetDCSObject() -- DCS#Unit
|
||||||
|
|
||||||
|
if DCSUnit then
|
||||||
|
local exists = DCSUnit:isExist()
|
||||||
|
return exists
|
||||||
|
end
|
||||||
|
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
--- Returns if the Unit is alive.
|
--- Returns if the Unit is alive.
|
||||||
-- If the Unit is not alive, nil is returned.
|
-- If the Unit is not alive, nil is returned.
|
||||||
-- If the Unit is alive and active, true is returned.
|
-- If the Unit is alive and active, true is returned.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user