LaseCoordinate
Alarm state ships
zonRadius in task fire at point.
This commit is contained in:
Frank
2019-06-24 13:38:01 +02:00
parent 2a485ef85a
commit c88f7bede5
3 changed files with 107 additions and 5 deletions
@@ -1388,7 +1388,7 @@ function CONTROLLABLE:TaskFireAtPoint( Vec2, Radius, AmmoCount, WeaponType )
DCSTask = { id = 'FireAtPoint',
params = {
point = Vec2,
radius = Radius,
zoneRadius = Radius,
expendQty = 100, -- dummy value
expendQtyEnabled = false,
}
@@ -3165,7 +3165,8 @@ function CONTROLLABLE:OptionAlarmStateAuto()
if self:IsGround() then
Controller:setOption(AI.Option.Ground.id.ALARM_STATE, AI.Option.Ground.val.ALARM_STATE.AUTO)
elseif self:IsShip() then
Controller:setOption(AI.Option.Naval.id.ALARM_STATE, AI.Option.Naval.val.ALARM_STATE.AUTO)
--Controller:setOption(AI.Option.Naval.id.ALARM_STATE, AI.Option.Naval.val.ALARM_STATE.AUTO)
Controller:setOption(9, 0)
end
return self
@@ -3189,6 +3190,7 @@ function CONTROLLABLE:OptionAlarmStateGreen()
elseif self:IsShip() then
-- AI.Option.Naval.id.ALARM_STATE does not seem to exist!
--Controller:setOption( AI.Option.Naval.id.ALARM_STATE, AI.Option.Naval.val.ALARM_STATE.GREEN )
Controller:setOption(9, 1)
end
return self
@@ -3210,7 +3212,8 @@ function CONTROLLABLE:OptionAlarmStateRed()
if self:IsGround() then
Controller:setOption(AI.Option.Ground.id.ALARM_STATE, AI.Option.Ground.val.ALARM_STATE.RED)
elseif self:IsShip() then
Controller:setOption(AI.Option.Naval.id.ALARM_STATE, AI.Option.Naval.val.ALARM_STATE.RED)
--Controller:setOption(AI.Option.Naval.id.ALARM_STATE, AI.Option.Naval.val.ALARM_STATE.RED)
Controller:setOption(9, 2)
end
return self
@@ -1184,6 +1184,24 @@ function POSITIONABLE:LaseUnit( Target, LaserCode, Duration ) --R2.1
end
--- Start Lasing a COORDINATE.
-- @param #POSITIONABLE self
-- @param Core.Point#COORDIUNATE Coordinate The coordinate where the lase is pointing at.
-- @param #number LaserCode Laser code or random number in [1000, 9999].
-- @param #number Duration Duration of lasing in seconds.
-- @return Core.Spot#SPOT
function POSITIONABLE:LaseCoordinate(Coordinate, LaserCode, Duration)
self:F2()
LaserCode = LaserCode or math.random(1000, 9999)
self.Spot = SPOT:New(self) -- Core.Spot#SPOT
self.Spot:LaseOnCoordinate(Coordinate, LaserCode, Duration)
self.LaserCode = LaserCode
return self.Spot
end
--- Stop Lasing a POSITIONABLE
-- @param #POSITIONABLE self
-- @return #POSITIONABLE