AIBOSS v0.9.0

SPAWN: Added delay for respawn on landing.
RAT v2.3.5: Fixed bug for Vmax cruise.
RECOVERYTANKER v1.0.3
RESCUEHELO v1.0.2
POSITIONABLE: Added GetOffsetCoordinate function
UNIT: Added Explode function.
This commit is contained in:
Frank
2019-01-20 02:02:22 +01:00
parent 6b85141a39
commit dd15da28b2
7 changed files with 2255 additions and 861 deletions

View File

@@ -783,6 +783,27 @@ function UNIT:GetThreatLevel()
end
--- Triggers an explosion at the coordinates of the unit.
-- @param #UNIT self
-- @param #number power Power of the explosion in kg TNT. Default 100 kg TNT.
-- @param #number delay (Optional) Delay of explosion in seconds.
-- @return #UNIT self
function UNIT:Explode(power, delay)
-- Default.
power=power or 100
-- Check if delay or not.
if delay and delay>0 then
-- Delayed call.
SCHEDULER:New(nil, self.Explode, {self, power}, delay)
else
-- Create an explotion at the coordinate of the unit.
self:GetCoordinate():Explosion(power)
end
return self
end
-- Is functions