Added CARGO_CRATE

Added a new object called CARGO_CRATE
This commit is contained in:
FlightControl_Master
2017-10-12 11:02:56 +02:00
parent d5c7d0028b
commit 0cc36b5ee2
7 changed files with 448 additions and 319 deletions

View File

@@ -159,6 +159,24 @@ function UNIT:GetDCSObject()
return nil
end
--- Destroys the UNIT.
-- @param #UNIT self
-- @return #nil The DCS Unit is not existing or alive.
function UNIT:Destroy()
self:F2( self.ObjectName )
local DCSObject = self:GetDCSObject()
if DCSObject then
USERFLAG:New( self:GetGroup():GetName() ):Set( 100 )
--BASE:CreateEventCrash( timer.getTime(), DCSObject )
DCSObject:destroy()
end
return nil
end
--- Respawn the @{Unit} using a (tweaked) template of the parent Group.
--
-- This function will: