Static and Delay

This commit is contained in:
Frank
2019-04-11 21:46:48 +02:00
parent eb62810911
commit 208761fa46
7 changed files with 250 additions and 44 deletions

View File

@@ -817,16 +817,22 @@ 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)
local DCSUnit = self:GetDCSObject()
if DCSUnit then
-- 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
return self
return nil
end
-- Is functions