Progress!

This commit is contained in:
FlightControl 2017-04-22 13:53:54 +02:00
parent 4138a54e6b
commit 036768d400
23 changed files with 1129 additions and 239 deletions

View File

@ -19,20 +19,57 @@ do -- AI_DESIGNATE
-- so that following a dynamically generated menu system, -- so that following a dynamically generated menu system,
-- each detected set of potential targets can be lased or smoked... -- each detected set of potential targets can be lased or smoked...
-- --
-- The Recce group is detecting as part of the DETECTION_ class continuously targets. -- Targets can be:
-- Once targets have been detected, they will be reported. The AI_DESIGNATE object will fire the **Detect** event in this case!
-- As part of the reporting, the following happens:
-- --
-- * A message is sent to each GROUP of the Attack SET_GROUP, containing the threat level and the target composition. -- * **Lased** for a period of time.
-- * A menu is created and updated for each GROUP of the Attack SET_GROUP, containing the the treat level and the target composition. -- * **Smoked**. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.)
-- * **Illuminated** through an illumination bomb. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.
-- --
-- One of the players in one of the Attack GROUPs, can then select a Target Set by selecting one of the menu options. -- The following terminology is being used throughout this document:
-- Each menu option has two modes:
-- --
-- * If the Target Set is not being designated, then the Designate menu for the target Set will provide options to Lase or Smoke the targets. -- * The **DesignateObject** is the object of the AI_DESIGNATE class, which is this class explained in the document.
-- * If the Target Set is being designated, then the Designate menu will provide an option to cancel the designation. -- * The **DetectionObject** is the object of a DETECTION_ class (DETECTION_TYPES, DETECTION_AREAS, DETECTION_UNITS), which is executing the detection and grouping of Targets into _DetectionItems_.
-- * **DetectionItems** is the list of detected target groupings by the _DetectionObject_. Each _DetectionItem_ contains a _TargetSet_.
-- * **DetectionItem** is one element of the _DetectionItems_ list, and contains a _TargetSet_.
-- * The **TargetSet** is a SET_UNITS collection of _Targets_, that have been detected by the _DetectionObject_.
-- * A **Target** is a detected UNIT object by the _DetectionObject_.
-- * A **Threat Level** is a number from 0 to 10 that is calculated based on the threat of the Target in an Air to Ground battle scenario.
-- * The **RecceSet** is a SET_GROUP collection that contains the **RecceGroups**.
-- * A **RecceGroup** is a GROUP object containing the **Recces**.
-- * A **Recce** is a UNIT object executing the reconnaissance as part the _DetectionObject_. A Recce can be of any UNIT type.
-- * An **AttackGroup** is a GROUP object that contain _Players_.
-- * A **Player** is an active CLIENT object containing a human player.
-- * A **Designate Menu** is the menu that is dynamically created during the designation process for each _AttackGroup_.
-- --
-- In this way, the AI can assist players to designate ground targets for a coordinated attack! -- The _RecceSet_ is continuously detecting for potential _Targets_, executing its task as part of the _DetectionObject_.
-- Once _Targets_ have been detected, the _DesignateObject_ will trigger the **Detect Event**.
--
-- As part of the Detect Event, the _DetectionItems_ list is used by the _DesignateObject_ to provide the _Players_ with:
--
-- * The _RecceGroups_ are reporting to each _AttackGroup_, sending **Messages** containing the _Threat Level_ and the _TargetSet_ composition.
-- * **Menu options** are created and updated for each _AttackGroup_, containing the _Threat Level_ and the _TargetSet_ composition.
--
-- A _Player_ can then select an action from the _Designate Menu_.
--
-- **Note that each selected action will be executed for a _TargetSet_, thus the _Target_ grouping done by the _DetectionObject_.**
--
-- Each **Menu Option** in the _Designate Menu_ has two modes:
--
-- 1. If the _TargetSet_ **is not being designated**, then the **Designate Menu** option for the target Set will provide options to **Lase** or **Smoke** the targets.
-- 2. If the Target Set **is being designated**, then the **Designate Menu** option will provide an option to stop or cancel the designation.
--
-- While designating, the _RecceGroups_ will report any change in _TargetSet_ composition or _Target_ presence.
--
-- The following logic is executed when a _TargetSet_ is selected to be *lased* from the _Designation Menu_:
--
-- * The _RecceSet_ is searched for any _Recce_ that is within *designation distance* from a _Target_ in the _TargetSet_ that is currently not being designated.
-- * If there is a _Recce_ found that is currently no designating a target, and is within designation distance from the _Target_, then that _Target_ will be designated.
-- * During designation, any _Recce_ that does not have Line of Sight (LOS) and is not within disignation distance from the _Target_, will stop designating the _Target_, and a report is given.
-- * When a _Recce_ is designating a _Target_, and that _Target_ is destroyed, then the _Recce_ will stop designating the _Target_, and will report the event.
-- * When a _Recce_ is designating a _Target_, and that _Recce_ is destroyed, then the _Recce_ will be removed from the _RecceSet_ and designation will stop without reporting.
-- * When all _RecceGroups_ are destroyed from the _RecceSet_, then the DesignationObject will stop functioning, and nothing will be reported.
--
-- In this way, the DesignationObject assists players to designate ground targets for a coordinated attack!
-- --
-- Have FUN! -- Have FUN!
-- --
@ -204,6 +241,32 @@ do -- AI_DESIGNATE
-- @param #AI_DESIGNATE self -- @param #AI_DESIGNATE self
-- @param #number Delay -- @param #number Delay
self:AddTransition( "*", "Illuminate", "*" )
--- Illuminate Handler OnBefore for AI_DESIGNATE
-- @function [parent=#AI_DESIGNATE] OnBeforeIlluminate
-- @param #AI_DESIGNATE self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #boolean
--- Illuminate Handler OnAfter for AI_DESIGNATE
-- @function [parent=#AI_DESIGNATE] OnAfterIlluminate
-- @param #AI_DESIGNATE self
-- @param #string From
-- @param #string Event
-- @param #string To
--- Illuminate Trigger for AI_DESIGNATE
-- @function [parent=#AI_DESIGNATE] Illuminate
-- @param #AI_DESIGNATE self
--- Illuminate Asynchronous Trigger for AI_DESIGNATE
-- @function [parent=#AI_DESIGNATE] __Illuminate
-- @param #AI_DESIGNATE self
-- @param #number Delay
self:AddTransition( "*", "Status", "*" ) self:AddTransition( "*", "Status", "*" )
@ -236,6 +299,7 @@ do -- AI_DESIGNATE
self.GroupSet = GroupSet self.GroupSet = GroupSet
self.RecceSet = Detection:GetDetectionSetGroup() self.RecceSet = Detection:GetDetectionSetGroup()
self.Spots = {} self.Spots = {}
self.Designating = {}
self:SetLaserCodes( 1688 ) self:SetLaserCodes( 1688 )
@ -322,7 +386,7 @@ do -- AI_DESIGNATE
DesignateMenu = nil DesignateMenu = nil
self:E("Remove Menu") self:E("Remove Menu")
end end
DesignateMenu = MENU_GROUP:New( AttackGroup, "Designate Targets" ) DesignateMenu = MENU_GROUP:New( AttackGroup, "Designate" )
self:E(DesignateMenu) self:E(DesignateMenu)
AttackGroup:SetState( AttackGroup, "DesignateMenu", DesignateMenu ) AttackGroup:SetState( AttackGroup, "DesignateMenu", DesignateMenu )
@ -333,53 +397,30 @@ do -- AI_DESIGNATE
local Report = self.Detection:DetectedItemReportSummary( Index ) local Report = self.Detection:DetectedItemReportSummary( Index )
local DetectedMenu = MENU_GROUP:New( if not self.Designating[Index] then
AttackGroup, local DetectedMenu = MENU_GROUP:New( AttackGroup, Report, DesignateMenu )
Report, MENU_GROUP_COMMAND:New( AttackGroup, "Lase target 60 secs", DetectedMenu, self.MenuLaseOn, self, AttackGroup, Index, 60 )
DesignateMenu MENU_GROUP_COMMAND:New( AttackGroup, "Lase target 120 secs", DetectedMenu, self.MenuLaseOn, self,AttackGroup, Index, 120 )
) MENU_GROUP_COMMAND:New( AttackGroup, "Smoke red", DetectedMenu, self.MenuSmoke, self, AttackGroup, Index, SMOKECOLOR.Red )
MENU_GROUP_COMMAND:New( AttackGroup, "Smoke blue", DetectedMenu, self.MenuSmoke, self, AttackGroup, Index, SMOKECOLOR.Blue )
MENU_GROUP_COMMAND:New( MENU_GROUP_COMMAND:New( AttackGroup, "Smoke green", DetectedMenu, self.MenuSmoke, self, AttackGroup, Index, SMOKECOLOR.Green )
AttackGroup, MENU_GROUP_COMMAND:New( AttackGroup, "Smoke white", DetectedMenu, self.MenuSmoke, self, AttackGroup, Index, SMOKECOLOR.White )
"Lase target 60 secs", MENU_GROUP_COMMAND:New( AttackGroup, "Smoke orange", DetectedMenu, self.MenuSmoke, self, AttackGroup, Index, SMOKECOLOR.Orange )
DetectedMenu, MENU_GROUP_COMMAND:New( AttackGroup, "Illuminate", DetectedMenu, self.MenuIlluminate, self, AttackGroup, Index )
self.MenuLaseOn, else
self, if self.Designating[Index] == "Laser" then
AttackGroup, Report = "Lasing " .. Report
Index, elseif self.Designating[Index] == "Smoke" then
60 Report = "Smoking " .. Report
) elseif self.Designating[Index] == "Illuminate" then
MENU_GROUP_COMMAND:New( Report = "Illuminating " .. Report
AttackGroup, end
"Lase target 120 secs", local DetectedMenu = MENU_GROUP:New( AttackGroup, Report, DesignateMenu )
DetectedMenu, if self.Designating[Index] == "Laser" then
self.MenuLaseOn, MENU_GROUP_COMMAND:New( AttackGroup, "Stop lasing", DetectedMenu, self.MenuLaseOff, self, AttackGroup, Index )
self, else
AttackGroup, end
Index, end
120
)
MENU_GROUP_COMMAND:New(
AttackGroup,
"Switch laser Off",
DetectedMenu,
self.MenuLaseOff,
self,
AttackGroup,
Index
)
MENU_GROUP_COMMAND:New(
AttackGroup,
"Smoke",
DetectedMenu,
self.MenuSmoke,
self,
AttackGroup,
Index
)
end end
end end
) )
@ -389,11 +430,22 @@ do -- AI_DESIGNATE
--- ---
-- @param #AI_DESIGNATE self -- @param #AI_DESIGNATE self
function AI_DESIGNATE:MenuSmoke( AttackGroup, Index ) function AI_DESIGNATE:MenuSmoke( AttackGroup, Index, Color )
self:E("Designate through Smoke") self:E("Designate through Smoke")
self:__Smoke( 1, AttackGroup, Index ) self.Designating[Index] = "Smoke"
self:__Smoke( 1, AttackGroup, Index, Color )
end
---
-- @param #AI_DESIGNATE self
function AI_DESIGNATE:MenuIlluminate( AttackGroup, Index )
self:E("Designate through Illumination")
self.Designating[Index] = "Illuminate"
self:__Illuminate( 1, AttackGroup, Index )
end end
--- ---
@ -402,6 +454,7 @@ do -- AI_DESIGNATE
self:E("Designate through Lase") self:E("Designate through Lase")
self.Designating[Index] = "Laser"
self:__LaseOn( 1, AttackGroup, Index, Duration ) self:__LaseOn( 1, AttackGroup, Index, Duration )
end end
@ -411,6 +464,7 @@ do -- AI_DESIGNATE
self:E("Lasing off") self:E("Lasing off")
self.Designating[Index] = nil
self:__LaseOff( 1, AttackGroup, Index ) self:__LaseOff( 1, AttackGroup, Index )
end end
@ -419,7 +473,7 @@ do -- AI_DESIGNATE
-- @return #AI_DESIGNATE -- @return #AI_DESIGNATE
function AI_DESIGNATE:onafterLaseOn( From, Event, To, AttackGroup, Index, Duration ) function AI_DESIGNATE:onafterLaseOn( From, Event, To, AttackGroup, Index, Duration )
self:__Lasing( -5, AttackGroup, Index, Duration ) self:__Lasing( 5, AttackGroup, Index, Duration )
end end
@ -448,24 +502,37 @@ do -- AI_DESIGNATE
--- @param Wrapper.Unit#UNIT SmokeUnit --- @param Wrapper.Unit#UNIT SmokeUnit
function( TargetUnit ) function( TargetUnit )
self:E("In procedure") self:E("In procedure")
--if math.random( 1, ( 100 * TargetSetUnit:Count() ) / 100 ) <= 100 then
if TargetUnit:IsAlive() then if TargetUnit:IsAlive() then
local Spot = self.Spots[TargetUnit] local Spot = self.Spots[TargetUnit]
if (not Spot) or ( Spot and Spot:IsLasing() == false ) then if (not Spot) or ( Spot and Spot:IsLasing() == false ) then
local NearestRecceGroup = self.RecceSet:FindNearestGroupFromPointVec2( TargetUnit:GetPointVec2() ) for RecceGroupID, RecceGroup in pairs( self.RecceSet:GetSet() ) do
if NearestRecceGroup then for UnitID, UnitData in pairs( RecceGroup:GetUnits() or {} ) do
for UnitID, UnitData in pairs( NearestRecceGroup:GetUnits() or {} ) do
local RecceUnit = UnitData -- Wrapper.Unit#UNIT local RecceUnit = UnitData -- Wrapper.Unit#UNIT
if RecceUnit:IsLasing() == false then if RecceUnit:IsLasing() == false then
local LaserCodeIndex = math.random(1, #self.LaserCodes) if RecceUnit:IsDetected( TargetUnit ) and RecceUnit:IsLOS( TargetUnit ) then
local LaserCode = self.LaserCodes[LaserCodeIndex] local LaserCodeIndex = math.random( 1, #self.LaserCodes )
if not self.LaserCodesUsed[LaserCode] then local LaserCode = self.LaserCodes[LaserCodeIndex]
MoreTargets = true if not self.LaserCodesUsed[LaserCode] then
self.LaserCodesUsed[LaserCode] = LaserCodeIndex MoreTargets = true
local Spot = RecceUnit:LaseUnit( TargetUnit, LaserCode, Duration ) self.LaserCodesUsed[LaserCode] = LaserCodeIndex
self.Spots[TargetUnit] = Spot local Spot = RecceUnit:LaseUnit( TargetUnit, LaserCode, Duration )
RecceUnit:MessageToGroup( "Lasing " .. TargetUnit:GetTypeName() .. " for " .. Duration .. " seconds. Laser Code: " .. Spot.LaserCode, 15, AttackGroup ) function Spot:OnAfterDestroyed( From, Event, To )
break self:E( "Destroyed Message" )
self.Recce:MessageToGroup( "Target " .. TargetUnit:GetTypeName() .. " destroyed." .. TargetSetUnit:Count() .. " targets left.", 5, AttackGroup )
end
self.Spots[TargetUnit] = Spot
RecceUnit:MessageToGroup( "Lasing " .. TargetUnit:GetTypeName() .. " for " .. Duration .. "s, code: " .. Spot.LaserCode, 5, AttackGroup )
break
end
end
else
-- The Recce is lasing, but the Target is not detected or within LOS. So stop lasing and send a report.
if not RecceUnit:IsDetected( TargetUnit ) or not RecceUnit:IsLOS( TargetUnit ) then
local Spot = self.Spots[TargetUnit] -- Core.Spot#SPOT
if Spot then
Spot.Recce:LaseOff()
Spot.Recce:MessageToGroup( "Target " .. TargetUnit:GetTypeName() "out of LOS. Cancelling lase!", 5, AttackGroup )
end
end end
end end
end end
@ -473,20 +540,20 @@ do -- AI_DESIGNATE
else else
MoreTargets = true MoreTargets = true
local RecceUnit = Spot.Recce local RecceUnit = Spot.Recce
RecceUnit:MessageToGroup( "Lasing " .. TargetUnit:GetTypeName() .. " for " .. Duration .. " seconds. Laser Code: " .. Spot.LaserCode, 15, AttackGroup ) RecceUnit:MessageToGroup( "Lasing " .. TargetUnit:GetTypeName() .. ", code " .. Spot.LaserCode, 5, AttackGroup )
end end
else else
self.Spots[TargetUnit] = nil self.Spots[TargetUnit] = nil
end end
--end
end end
) )
if MoreTargets == true then if MoreTargets == true then
self:__Lasing( -30, AttackGroup, Index, Duration ) self:__Lasing( 30, AttackGroup, Index, Duration )
else else
self:__LaseOff( 1, AttackGroup, Index ) self:__LaseOff( 1, AttackGroup, Index )
end end
self:SetDesignateMenu() self:SetDesignateMenu()
end end
@ -519,7 +586,7 @@ do -- AI_DESIGNATE
--- ---
-- @param #AI_DESIGNATE self -- @param #AI_DESIGNATE self
-- @return #AI_DESIGNATE -- @return #AI_DESIGNATE
function AI_DESIGNATE:onafterSmoke( From, Event, To, AttackGroup, Index ) function AI_DESIGNATE:onafterSmoke( From, Event, To, AttackGroup, Index, Color )
local TargetSetUnit = self.Detection:GetDetectedSet( Index ) local TargetSetUnit = self.Detection:GetDetectedSet( Index )
@ -532,7 +599,33 @@ do -- AI_DESIGNATE
SCHEDULER:New( self, SCHEDULER:New( self,
function() function()
if SmokeUnit:IsAlive() then if SmokeUnit:IsAlive() then
SmokeUnit:Smoke( SMOKECOLOR.Red, 150 ) SmokeUnit:Smoke( Color, 150 )
end
end, {}, math.random( 10, 60 )
)
--end
end
)
end
--- Illuminating
-- @param #AI_DESIGNATE self
-- @return #AI_DESIGNATE
function AI_DESIGNATE:onafterIlluminate( From, Event, To, AttackGroup, Index )
local TargetSetUnit = self.Detection:GetDetectedSet( Index )
TargetSetUnit:ForEachUnit(
--- @param Wrapper.Unit#UNIT SmokeUnit
function( SmokeUnit )
self:E("In procedure")
--if math.random( 1, ( 100 * TargetSetUnit:Count() ) / 100 ) <= 100 then
SCHEDULER:New( self,
function()
if SmokeUnit:IsAlive() then
SmokeUnit:GetPointVec3():AddY(800):IlluminationBomb()
end end
end, {}, math.random( 10, 60 ) end, {}, math.random( 10, 60 )
) )

View File

@ -1,4 +1,4 @@
--- **Core** -- Management of CARGO logistics, that can be transported from and to transportation carriers. --- **(R2.1) Core** -- Management of CARGO logistics, that can be transported from and to transportation carriers.
-- --
-- ![Banner Image](..\Presentations\CARGO\Dia1.JPG) -- ![Banner Image](..\Presentations\CARGO\Dia1.JPG)
-- --
@ -165,7 +165,7 @@ do -- CARGO
-- @field #boolean Representable This flag defines if the cargo can be represented by a DCS Unit. -- @field #boolean Representable This flag defines if the cargo can be represented by a DCS Unit.
-- @field #boolean Containable This flag defines if the cargo can be contained within a DCS Unit. -- @field #boolean Containable This flag defines if the cargo can be contained within a DCS Unit.
--- # CARGO class, extends @{Fsm#FSM_PROCESS} --- # (R2.1) CARGO class, extends @{Fsm#FSM_PROCESS}
-- --
-- The CARGO class defines the core functions that defines a cargo object within MOOSE. -- The CARGO class defines the core functions that defines a cargo object within MOOSE.
-- A cargo is a logical object defined that is available for transport, and has a life status within a simulation. -- A cargo is a logical object defined that is available for transport, and has a life status within a simulation.
@ -224,7 +224,7 @@ do -- CARGO
-- @map < #string, Wrapper.Positionable#POSITIONABLE > The alive POSITIONABLE objects representing the the cargo. -- @map < #string, Wrapper.Positionable#POSITIONABLE > The alive POSITIONABLE objects representing the the cargo.
--- CARGO Constructor. This class is an abstract class and should not be instantiated. --- (R2.1) CARGO Constructor. This class is an abstract class and should not be instantiated.
-- @param #CARGO self -- @param #CARGO self
-- @param #string Type -- @param #string Type
-- @param #string Name -- @param #string Name
@ -266,7 +266,7 @@ function CARGO:New( Type, Name, Weight )
return self return self
end end
--- Get the name of the Cargo. --- (R2.1) Get the name of the Cargo.
-- @param #CARGO self -- @param #CARGO self
-- @return #string The name of the Cargo. -- @return #string The name of the Cargo.
function CARGO:GetName() function CARGO:GetName()

View File

@ -789,6 +789,25 @@ function POINT_VEC3:FlareRed( Azimuth )
self:Flare( FLARECOLOR.Red, Azimuth ) self:Flare( FLARECOLOR.Red, Azimuth )
end end
--- (R2.1) Returns if a PointVec3 has Line of Sight (LOS) with the ToPointVec3.
-- @param #POINT_VEC3 self
-- @param #POINT_VEC3 ToPointVec3
-- @return #boolean true If the ToPointVec3 has LOS with the PointVec3, otherwise false.
function POINT_VEC3:IsLOS( ToPointVec3 )
-- Measurement of visibility should not be from the ground, so Adding a hypotethical 2 meters to each PointVec3.
local FromVec3 = self:GetVec3()
FromVec3.y = FromVec3.y + 2
local ToVec3 = ToPointVec3:GetVec3()
ToVec3.y = ToVec3.y + 2
local IsLOS = land.isVisible( FromVec3, ToVec3 )
return IsLOS
end
end end
do -- POINT_VEC2 do -- POINT_VEC2

View File

@ -2440,7 +2440,7 @@ end
--- @type SET_CARGO --- @type SET_CARGO
-- @extends Core.Set#SET_BASE -- @extends Core.Set#SET_BASE
--- # SET_CARGO class, extends @{Set#SET_BASE} --- # (R2.1) SET_CARGO class, extends @{Set#SET_BASE}
-- --
-- Mission designers can use the @{Set#SET_CARGO} class to build sets of cargos optionally belonging to certain: -- Mission designers can use the @{Set#SET_CARGO} class to build sets of cargos optionally belonging to certain:
-- --
@ -2502,7 +2502,7 @@ SET_CARGO = {
} }
--- Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories. --- (R2.1) Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.
-- @param #SET_CARGO self -- @param #SET_CARGO self
-- @return #SET_CARGO self -- @return #SET_CARGO self
-- @usage -- @usage
@ -2515,7 +2515,7 @@ function SET_CARGO:New()
return self return self
end end
--- Add CARGOs to SET_CARGO. --- (R2.1) Add CARGOs to SET_CARGO.
-- @param Core.Set#SET_CARGO self -- @param Core.Set#SET_CARGO self
-- @param #string AddCargoNames A single name or an array of CARGO names. -- @param #string AddCargoNames A single name or an array of CARGO names.
-- @return self -- @return self
@ -2530,7 +2530,7 @@ function SET_CARGO:AddCargosByName( AddCargoNames )
return self return self
end end
--- Remove CARGOs from SET_CARGO. --- (R2.1) Remove CARGOs from SET_CARGO.
-- @param Core.Set#SET_CARGO self -- @param Core.Set#SET_CARGO self
-- @param Wrapper.Cargo#CARGO RemoveCargoNames A single name or an array of CARGO names. -- @param Wrapper.Cargo#CARGO RemoveCargoNames A single name or an array of CARGO names.
-- @return self -- @return self
@ -2546,7 +2546,7 @@ function SET_CARGO:RemoveCargosByName( RemoveCargoNames )
end end
--- Finds a Cargo based on the Cargo Name. --- (R2.1) Finds a Cargo based on the Cargo Name.
-- @param #SET_CARGO self -- @param #SET_CARGO self
-- @param #string CargoName -- @param #string CargoName
-- @return Wrapper.Cargo#CARGO The found Cargo. -- @return Wrapper.Cargo#CARGO The found Cargo.
@ -2558,7 +2558,7 @@ end
--- Builds a set of cargos of coalitions. --- (R2.1) Builds a set of cargos of coalitions.
-- Possible current coalitions are red, blue and neutral. -- Possible current coalitions are red, blue and neutral.
-- @param #SET_CARGO self -- @param #SET_CARGO self
-- @param #string Coalitions Can take the following values: "red", "blue", "neutral". -- @param #string Coalitions Can take the following values: "red", "blue", "neutral".
@ -2576,7 +2576,7 @@ function SET_CARGO:FilterCoalitions( Coalitions )
return self return self
end end
--- Builds a set of cargos of defined cargo types. --- (R2.1) Builds a set of cargos of defined cargo types.
-- Possible current types are those types known within DCS world. -- Possible current types are those types known within DCS world.
-- @param #SET_CARGO self -- @param #SET_CARGO self
-- @param #string Types Can take those type strings known within DCS world. -- @param #string Types Can take those type strings known within DCS world.
@ -2595,7 +2595,7 @@ function SET_CARGO:FilterTypes( Types )
end end
--- Builds a set of cargos of defined countries. --- (R2.1) Builds a set of cargos of defined countries.
-- Possible current countries are those known within DCS world. -- Possible current countries are those known within DCS world.
-- @param #SET_CARGO self -- @param #SET_CARGO self
-- @param #string Countries Can take those country strings known within DCS world. -- @param #string Countries Can take those country strings known within DCS world.
@ -2614,7 +2614,7 @@ function SET_CARGO:FilterCountries( Countries )
end end
--- Builds a set of cargos of defined cargo prefixes. --- (R2.1) Builds a set of cargos of defined cargo prefixes.
-- All the cargos starting with the given prefixes will be included within the set. -- All the cargos starting with the given prefixes will be included within the set.
-- @param #SET_CARGO self -- @param #SET_CARGO self
-- @param #string Prefixes The prefix of which the cargo name starts with. -- @param #string Prefixes The prefix of which the cargo name starts with.
@ -2634,7 +2634,7 @@ end
--- Starts the filtering. --- (R2.1) Starts the filtering.
-- @param #SET_CARGO self -- @param #SET_CARGO self
-- @return #SET_CARGO self -- @return #SET_CARGO self
function SET_CARGO:FilterStart() function SET_CARGO:FilterStart()
@ -2650,7 +2650,7 @@ function SET_CARGO:FilterStart()
end end
--- Handles the Database to check on an event (birth) that the Object was added in the Database. --- (R2.1) Handles the Database to check on an event (birth) that the Object was added in the Database.
-- This is required, because sometimes the _DATABASE birth event gets called later than the SET_BASE birth event! -- This is required, because sometimes the _DATABASE birth event gets called later than the SET_BASE birth event!
-- @param #SET_CARGO self -- @param #SET_CARGO self
-- @param Core.Event#EVENTDATA Event -- @param Core.Event#EVENTDATA Event
@ -2662,7 +2662,7 @@ function SET_CARGO:AddInDatabase( Event )
return Event.IniDCSUnitName, self.Database[Event.IniDCSUnitName] return Event.IniDCSUnitName, self.Database[Event.IniDCSUnitName]
end end
--- Handles the Database to check on any event that Object exists in the Database. --- (R2.1) Handles the Database to check on any event that Object exists in the Database.
-- This is required, because sometimes the _DATABASE event gets called later than the SET_BASE event or vise versa! -- This is required, because sometimes the _DATABASE event gets called later than the SET_BASE event or vise versa!
-- @param #SET_CARGO self -- @param #SET_CARGO self
-- @param Core.Event#EVENTDATA Event -- @param Core.Event#EVENTDATA Event
@ -2674,7 +2674,7 @@ function SET_CARGO:FindInDatabase( Event )
return Event.IniDCSUnitName, self.Database[Event.IniDCSUnitName] return Event.IniDCSUnitName, self.Database[Event.IniDCSUnitName]
end end
--- Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters. --- (R2.1) Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.
-- @param #SET_CARGO self -- @param #SET_CARGO self
-- @param #function IteratorFunction The function that will be called when there is an alive CARGO in the SET_CARGO. The function needs to accept a CARGO parameter. -- @param #function IteratorFunction The function that will be called when there is an alive CARGO in the SET_CARGO. The function needs to accept a CARGO parameter.
-- @return #SET_CARGO self -- @return #SET_CARGO self
@ -2686,7 +2686,7 @@ function SET_CARGO:ForEachCargo( IteratorFunction, ... )
return self return self
end end
--- Iterate the SET_CARGO while identifying the nearest @{Cargo#CARGO} from a @{Point#POINT_VEC2}. --- (R2.1) Iterate the SET_CARGO while identifying the nearest @{Cargo#CARGO} from a @{Point#POINT_VEC2}.
-- @param #SET_CARGO self -- @param #SET_CARGO self
-- @param Core.Point#POINT_VEC2 PointVec2 A @{Point#POINT_VEC2} object from where to evaluate the closest @{Cargo#CARGO}. -- @param Core.Point#POINT_VEC2 PointVec2 A @{Point#POINT_VEC2} object from where to evaluate the closest @{Cargo#CARGO}.
-- @return Wrapper.Cargo#CARGO The closest @{Cargo#CARGO}. -- @return Wrapper.Cargo#CARGO The closest @{Cargo#CARGO}.
@ -2699,7 +2699,7 @@ end
--- --- (R2.1)
-- @param #SET_CARGO self -- @param #SET_CARGO self
-- @param AI.AI_Cargo#AI_CARGO MCargo -- @param AI.AI_Cargo#AI_CARGO MCargo
-- @return #SET_CARGO self -- @return #SET_CARGO self
@ -2753,7 +2753,7 @@ function SET_CARGO:IsIncludeObject( MCargo )
return MCargoInclude return MCargoInclude
end end
--- Handles the OnEventNewCargo event for the Set. --- (R2.1) Handles the OnEventNewCargo event for the Set.
-- @param #SET_CARGO self -- @param #SET_CARGO self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function SET_CARGO:OnEventNewCargo( EventData ) function SET_CARGO:OnEventNewCargo( EventData )
@ -2765,7 +2765,7 @@ function SET_CARGO:OnEventNewCargo( EventData )
end end
end end
--- Handles the OnDead or OnCrash event for alive units set. --- (R2.1) Handles the OnDead or OnCrash event for alive units set.
-- @param #SET_CARGO self -- @param #SET_CARGO self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function SET_CARGO:OnEventDeleteCargo( EventData ) function SET_CARGO:OnEventDeleteCargo( EventData )

View File

@ -1,4 +1,4 @@
--- **Core** -- Spawn dynamically new STATICs in your missions. --- (R2.1) **Core** -- Spawn dynamically new STATICs in your missions.
-- --
-- ![Banner Image](..\Presentations\SPAWNSTATIC\Dia1.JPG) -- ![Banner Image](..\Presentations\SPAWNSTATIC\Dia1.JPG)
-- --
@ -91,7 +91,7 @@ SPAWNSTATIC = {
-- @list <Core.Zone#ZONE_BASE> SpawnZone -- @list <Core.Zone#ZONE_BASE> SpawnZone
--- Creates the main object to spawn a @{Static} defined in the ME. --- (R2.1) Creates the main object to spawn a @{Static} defined in the ME.
-- @param #SPAWNSTATIC self -- @param #SPAWNSTATIC self
-- @param #string SpawnTemplatePrefix is the name of the Group in the ME that defines the Template. Each new group will have the name starting with SpawnTemplatePrefix. -- @param #string SpawnTemplatePrefix is the name of the Group in the ME that defines the Template. Each new group will have the name starting with SpawnTemplatePrefix.
-- @return #SPAWNSTATIC -- @return #SPAWNSTATIC
@ -113,7 +113,7 @@ function SPAWNSTATIC:NewFromStatic( SpawnTemplatePrefix, CountryID )
return self return self
end end
--- Creates the main object to spawn a @{Static} based on a type name. --- (R2.1) Creates the main object to spawn a @{Static} based on a type name.
-- @param #SPAWNSTATIC self -- @param #SPAWNSTATIC self
-- @param #string SpawnTypeName is the name of the type. -- @param #string SpawnTypeName is the name of the type.
-- @return #SPAWNSTATIC -- @return #SPAWNSTATIC
@ -131,7 +131,7 @@ function SPAWNSTATIC:NewFromType( SpawnTypeName, SpawnShapeName, SpawnCategory,
end end
--- Creates a new @{Static} from a POINT_VEC2. --- (R2.1) Creates a new @{Static} from a POINT_VEC2.
-- @param #SPAWNSTATIC self -- @param #SPAWNSTATIC self
-- @param Core.Point#POINT_VEC2 PointVec2 The 2D coordinate where to spawn the static. -- @param Core.Point#POINT_VEC2 PointVec2 The 2D coordinate where to spawn the static.
-- @param #number Heading The heading of the static, which is a number in degrees from 0 to 360. -- @param #number Heading The heading of the static, which is a number in degrees from 0 to 360.
@ -161,7 +161,7 @@ function SPAWNSTATIC:SpawnFromPointVec2( PointVec2, Heading, NewName )
return Static return Static
end end
--- Creates a new @{Static} from a @{Zone}. --- (R2.1) Creates a new @{Static} from a @{Zone}.
-- @param #SPAWNSTATIC self -- @param #SPAWNSTATIC self
-- @param Core.Zone#ZONE_BASE Zone The Zone where to spawn the static. -- @param Core.Zone#ZONE_BASE Zone The Zone where to spawn the static.
-- @param #number Heading The heading of the static, which is a number in degrees from 0 to 360. -- @param #number Heading The heading of the static, which is a number in degrees from 0 to 360.

View File

@ -50,7 +50,7 @@ do
function SPOT:New( Recce ) function SPOT:New( Recce )
local self = BASE:Inherit( self, FSM:New() ) -- #SPOT local self = BASE:Inherit( self, FSM:New() ) -- #SPOT
self:F( { Type, Name, Weight } ) self:F( {} )
self:SetStartState( "Off" ) self:SetStartState( "Off" )
self:AddTransition( "Off", "LaseOn", "On" ) self:AddTransition( "Off", "LaseOn", "On" )
@ -82,7 +82,7 @@ do
self:AddTransition( "On", "Lasing", "On" ) self:AddTransition( "On", "Lasing", "On" )
self:AddTransition( "On" , "LaseOff", "Off" ) self:AddTransition( { "On", "Destroyed" } , "LaseOff", "Off" )
--- LaseOff Handler OnBefore for SPOT --- LaseOff Handler OnBefore for SPOT
-- @function [parent=#SPOT] OnBeforeLaseOff -- @function [parent=#SPOT] OnBeforeLaseOff
@ -108,6 +108,32 @@ do
-- @param #SPOT self -- @param #SPOT self
-- @param #number Delay -- @param #number Delay
self:AddTransition( "*" , "Destroyed", "Destroyed" )
--- Destroyed Handler OnBefore for SPOT
-- @function [parent=#SPOT] OnBeforeDestroyed
-- @param #SPOT self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #boolean
--- Destroyed Handler OnAfter for SPOT
-- @function [parent=#SPOT] OnAfterDestroyed
-- @param #SPOT self
-- @param #string From
-- @param #string Event
-- @param #string To
--- Destroyed Trigger for SPOT
-- @function [parent=#SPOT] Destroyed
-- @param #SPOT self
--- Destroyed Asynchronous Trigger for SPOT
-- @function [parent=#SPOT] __Destroyed
-- @param #SPOT self
-- @param #number Delay
self.Recce = Recce self.Recce = Recce
@ -127,6 +153,7 @@ do
-- @param #number LaserCode -- @param #number LaserCode
-- @param #number Duration -- @param #number Duration
function SPOT:onafterLaseOn( From, Event, To, Target, LaserCode, Duration ) function SPOT:onafterLaseOn( From, Event, To, Target, LaserCode, Duration )
self:E( { "LaseOn", Target, LaserCode, Duration } )
local function StopLase( self ) local function StopLase( self )
self:LaseOff() self:LaseOff()
@ -137,8 +164,8 @@ do
local RecceDcsUnit = self.Recce:GetDCSObject() local RecceDcsUnit = self.Recce:GetDCSObject()
self.Spot = Spot.createInfraRed( RecceDcsUnit, { x = 0, y = 2, z = 0 }, Target:GetPointVec3():AddY(1):GetVec3() ) self.SpotIR = Spot.createInfraRed( RecceDcsUnit, { x = 0, y = 2, z = 0 }, Target:GetPointVec3():AddY(1):GetVec3() )
self.Spot = Spot.createLaser( RecceDcsUnit, { x = 0, y = 2, z = 0 }, Target:GetPointVec3():AddY(1):GetVec3(), LaserCode ) self.SpotLaser = Spot.createLaser( RecceDcsUnit, { x = 0, y = 2, z = 0 }, Target:GetPointVec3():AddY(1):GetVec3(), LaserCode )
if Duration then if Duration then
self.ScheduleID = self.LaseScheduler:Schedule( self, StopLase, {self}, Duration ) self.ScheduleID = self.LaseScheduler:Schedule( self, StopLase, {self}, Duration )
@ -152,10 +179,12 @@ do
--- @param #SPOT self --- @param #SPOT self
-- @param Core.Event#EVENTDATA EventData -- @param Core.Event#EVENTDATA EventData
function SPOT:OnEventDead(EventData) function SPOT:OnEventDead(EventData)
self:E( { Dead = EventData.IniDCSUnitName, Target = self.Target } )
if self.Target then if self.Target then
if EventData.IniDCSUnitName == self.Target:GetName() then if EventData.IniDCSUnitName == self.Target:GetName() then
self:E( {"Target dead ", self.Target:GetName() } ) self:E( {"Target dead ", self.Target:GetName() } )
self:__LaseOff( 0.1 ) self:Destroyed()
self:LaseOff( 0.1 )
end end
end end
end end
@ -167,10 +196,11 @@ do
function SPOT:onafterLasing( From, Event, To ) function SPOT:onafterLasing( From, Event, To )
if self.Target:IsAlive() then if self.Target:IsAlive() then
self.Spot:setPoint( self.Target:GetPointVec3():AddY(1):GetVec3() ) self.SpotIR:setPoint( self.Target:GetPointVec3():AddY(1):GetVec3() )
self.SpotLaser:setPoint( self.Target:GetPointVec3():AddY(1):GetVec3() )
self:__Lasing( -0.2 ) self:__Lasing( -0.2 )
else else
self:__LaseOff( 0.2 ) self:E( { "Target is not alive", self.Target:IsAlive() } )
end end
end end
@ -182,9 +212,14 @@ do
-- @return #SPOT -- @return #SPOT
function SPOT:onafterLaseOff( From, Event, To ) function SPOT:onafterLaseOff( From, Event, To )
self:E( {"Stopped lasing for ", self.Target:GetName() } ) self:E( {"Stopped lasing for ", self.Target:GetName() , SpotIR = self.SportIR, SpotLaser = self.SpotLaser } )
self.Spot:destroy()
self.Spot = nil self.SpotIR:destroy()
self.SpotLaser:destroy()
self.SpotIR = nil
self.SpotLaser = nil
if self.ScheduleID then if self.ScheduleID then
self.LaseScheduler:Stop(self.ScheduleID) self.LaseScheduler:Stop(self.ScheduleID)
end end
@ -203,7 +238,7 @@ do
local Lasing = false local Lasing = false
if self.Spot then if self.SpotIR then
Lasing = true Lasing = true
end end

View File

@ -1786,17 +1786,21 @@ function CONTROLLABLE:IsTargetDetected( DCSObject )
self:F2( self.ControllableName ) self:F2( self.ControllableName )
local DCSControllable = self:GetDCSObject() local DCSControllable = self:GetDCSObject()
if DCSControllable then if DCSControllable then
local DetectionVisual = ( DetectVisual and DetectVisual == true ) and Controller.Detection.VISUAL or nil
local DetectionOptical = ( DetectOptical and DetectOptical == true ) and Controller.Detection.OPTICAL or nil
local DetectionRadar = ( DetectRadar and DetectRadar == true ) and Controller.Detection.RADAR or nil
local DetectionIRST = ( DetectIRST and DetectIRST == true ) and Controller.Detection.IRST or nil
local DetectionRWR = ( DetectRWR and DetectRWR == true ) and Controller.Detection.RWR or nil
local DetectionDLINK = ( DetectDLINK and DetectDLINK == true ) and Controller.Detection.DLINK or nil
local Controller = self:_GetController()
local TargetIsDetected, TargetIsVisible, TargetLastTime, TargetKnowType, TargetKnowDistance, TargetLastPos, TargetLastVelocity local TargetIsDetected, TargetIsVisible, TargetLastTime, TargetKnowType, TargetKnowDistance, TargetLastPos, TargetLastVelocity
= self:_GetController().isTargetDetected( self:_GetController(), DCSObject, = Controller:isTargetDetected( DCSObject, DetectionVisual, DetectionOptical, DetectionRadar, DetectionIRST, DetectionRWR, DetectionDLINK )
Controller.Detection.VISUAL,
Controller.Detection.OPTIC,
Controller.Detection.RADAR,
Controller.Detection.IRST,
Controller.Detection.RWR,
Controller.Detection.DLINK
)
return TargetIsDetected, TargetIsVisible, TargetLastTime, TargetKnowType, TargetKnowDistance, TargetLastPos, TargetLastVelocity return TargetIsDetected, TargetIsVisible, TargetLastTime, TargetKnowType, TargetKnowDistance, TargetLastPos, TargetLastVelocity
end end

View File

@ -443,7 +443,7 @@ function POSITIONABLE:Message( Message, Duration, Name )
return nil return nil
end end
--- Create a @{Radio#RADIO}, to allow radio transmission for this POSITIONABLE. --- (R2.1) Create a @{Radio#RADIO}, to allow radio transmission for this POSITIONABLE.
-- Set parameters with the methods provided, then use RADIO:Broadcast() to actually broadcast the message -- Set parameters with the methods provided, then use RADIO:Broadcast() to actually broadcast the message
-- @param #POSITIONABLE self -- @param #POSITIONABLE self
-- @return #RADIO Radio -- @return #RADIO Radio
@ -452,7 +452,7 @@ function POSITIONABLE:GetRadio()
return RADIO:New(self) return RADIO:New(self)
end end
--- Create a @{Radio#BEACON}, to allow this POSITIONABLE to broadcast beacon signals --- (R2.1) Create a @{Radio#BEACON}, to allow this POSITIONABLE to broadcast beacon signals
-- @param #POSITIONABLE self -- @param #POSITIONABLE self
-- @return #RADIO Radio -- @return #RADIO Radio
function POSITIONABLE:GetBeacon() function POSITIONABLE:GetBeacon()
@ -460,7 +460,7 @@ function POSITIONABLE:GetBeacon()
return BEACON:New(self) return BEACON:New(self)
end end
--- Start Lasing a POSITIONABLE --- (R2.1) Start Lasing a POSITIONABLE
-- @param #POSITIONABLE self -- @param #POSITIONABLE self
-- @param #POSITIONABLE Target -- @param #POSITIONABLE Target
-- @param #number LaserCode -- @param #number LaserCode
@ -482,15 +482,12 @@ function POSITIONABLE:LaseUnit( Target, LaserCode, Duration )
end end
--- Stop Lasing a POSITIONABLE --- (R2.1) Stop Lasing a POSITIONABLE
-- @param #POSITIONABLE self -- @param #POSITIONABLE self
-- @param #POSITIONABLE Target
-- @return #POSITIONABLE -- @return #POSITIONABLE
function POSITIONABLE:LaseOff( Target ) function POSITIONABLE:LaseOff()
self:F2() self:F2()
local TargetUnitName = Target:GetName()
if self.Spot then if self.Spot then
self.Spot:LaseOff() self.Spot:LaseOff()
self.Spot = nil self.Spot = nil
@ -499,7 +496,7 @@ function POSITIONABLE:LaseOff( Target )
return self return self
end end
--- Check if the POSITIONABLE is lasing a target --- (R2.1) Check if the POSITIONABLE is lasing a target
-- @param #POSITIONABLE self -- @param #POSITIONABLE self
-- @return #boolean true if it is lasing a target -- @return #boolean true if it is lasing a target
function POSITIONABLE:IsLasing() function POSITIONABLE:IsLasing()

View File

@ -64,13 +64,18 @@
-- --
-- The UNIT class contains methods to test the location or proximity against zones or other objects. -- The UNIT class contains methods to test the location or proximity against zones or other objects.
-- --
-- ### Zones -- ### Zones range
-- --
-- To test whether the Unit is within a **zone**, use the @{#UNIT.IsInZone}() or the @{#UNIT.IsNotInZone}() methods. Any zone can be tested on, but the zone must be derived from @{Zone#ZONE_BASE}. -- To test whether the Unit is within a **zone**, use the @{#UNIT.IsInZone}() or the @{#UNIT.IsNotInZone}() methods. Any zone can be tested on, but the zone must be derived from @{Zone#ZONE_BASE}.
-- --
-- ### Units -- ### Unit range
--
-- * Test if another DCS Unit is within a given radius of the current DCS Unit, use the @{#UNIT.OtherUnitInRadius}() method.
--
-- ## Test Line of Sight
--
-- * Use the @{#UNIT.IsLOS}() method to check if the given unit is within line of sight.
-- --
-- Test if another DCS Unit is within a given radius of the current DCS Unit, use the @{#UNIT.OtherUnitInRadius}() method.
-- --
-- @field #UNIT UNIT -- @field #UNIT UNIT
UNIT = { UNIT = {
@ -1003,5 +1008,31 @@ do -- Event Handling
return self return self
end end
end
do -- Detection
--- (R2.1) Returns if a unit is detecting the TargetUnit.
-- @param #UNIT self
-- @param #UNIT TargetUnit
-- @return #boolean true If the TargetUnit is detected by the unit, otherwise false.
function UNIT:IsDetected( TargetUnit )
local TargetIsDetected, TargetIsVisible, TargetLastTime, TargetKnowType, TargetKnowDistance, TargetLastPos, TargetLastVelocity = self:IsTargetDetected( TargetUnit:GetDCSObject() )
return TargetIsDetected
end
--- (R2.1) Returns if a unit has Line of Sight (LOS) with the TargetUnit.
-- @param #UNIT self
-- @param #UNIT TargetUnit
-- @return #boolean true If the TargetUnit has LOS with the unit, otherwise false.
function UNIT:IsLOS( TargetUnit )
local IsLOS = self:GetPointVec3():IsLOS( TargetUnit:GetPointVec3() )
return IsLOS
end
end end

View File

@ -1,5 +1,5 @@
env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' ) env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' )
env.info( 'Moose Generation Timestamp: 20170419_1937' ) env.info( 'Moose Generation Timestamp: 20170422_1159' )
local base = _G local base = _G

View File

@ -121,6 +121,12 @@ each detected set of potential targets can be lased or smoked...</p>
<h2><a id="#(AI_DESIGNATE)">Type <code>AI_DESIGNATE</code></a></h2> <h2><a id="#(AI_DESIGNATE)">Type <code>AI_DESIGNATE</code></a></h2>
<table class="function_list"> <table class="function_list">
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).Designating">AI_DESIGNATE.Designating</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).Detect">AI_DESIGNATE:Detect()</a></td> <td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).Detect">AI_DESIGNATE:Detect()</a></td>
<td class="summary"> <td class="summary">
<p>Detect Trigger for AI_DESIGNATE</p> <p>Detect Trigger for AI_DESIGNATE</p>
@ -154,6 +160,12 @@ each detected set of potential targets can be lased or smoked...</p>
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).LaserCodes">AI_DESIGNATE.LaserCodes</a></td> <td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).LaserCodes">AI_DESIGNATE.LaserCodes</a></td>
<td class="summary"> <td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).LaserCodesUsed">AI_DESIGNATE.LaserCodesUsed</a></td>
<td class="summary">
</td> </td>
</tr> </tr>
<tr> <tr>
@ -328,6 +340,12 @@ each detected set of potential targets can be lased or smoked...</p>
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).onafterLaseOn">AI_DESIGNATE:onafterLaseOn(From, Event, To, AttackGroup, Index, Duration)</a></td> <td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).onafterLaseOn">AI_DESIGNATE:onafterLaseOn(From, Event, To, AttackGroup, Index, Duration)</a></td>
<td class="summary"> <td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_DESIGNATE).onafterLasing">AI_DESIGNATE:onafterLasing(From, Event, To, AttackGroup, Index, Duration)</a></td>
<td class="summary">
</td> </td>
</tr> </tr>
<tr> <tr>
@ -358,24 +376,59 @@ each detected set of potential targets can be lased or smoked...</p>
<p>The Recce group is detecting as part of the DETECTION_ class continuously targets. <p>The following terminology is being used throughout this document:</p>
Once targets have been detected, they will be reported. The AI_DESIGNATE object will fire the <strong>Detect</strong> event in this case!
As part of the reporting, the following happens:</p>
<ul> <ul>
<li>A message is sent to each GROUP of the Attack SET_GROUP, containing the threat level and the target composition.</li> <li>The <strong>DesignateObject</strong> is the object of the AI_DESIGNATE class, which is this class explained in the document.</li>
<li>A menu is created and updated for each GROUP of the Attack SET_GROUP, containing the the treat level and the target composition.</li> <li>The <strong>DetectionObject</strong> is the object of a DETECTION_ class (DETECTION<em>TYPES, DETECTION</em>AREAS, DETECTION_UNITS), which is executing the detection and grouping of Targets into <em>DetectionItems</em>.</li>
<li><strong>DetectionItems</strong> is the list of detected target groupings by the <em>DetectionObject</em>. Each <em>DetectionItem</em> contains a <em>TargetSet</em>.</li>
<li><strong>DetectionItem</strong> is one element of the <em>DetectionItems</em> list, and contains a <em>TargetSet</em>.</li>
<li>The <strong>TargetSet</strong> is a SET_UNITS collection of <em>Targets</em>, that have been detected by the <em>DetectionObject</em>.</li>
<li>A <strong>Target</strong> is a detected UNIT object by the <em>DetectionObject</em>.</li>
<li>A <strong>Threat Level</strong> is a number from 0 to 10 that is calculated based on the threat of the Target in an Air to Ground battle scenario.</li>
<li>The <strong>RecceSet</strong> is a SET_GROUP collection that contains the <strong>RecceGroups</strong>.</li>
<li>A <strong>RecceGroup</strong> is a GROUP object containing the <strong>Recces</strong>.</li>
<li>A <strong>Recce</strong> is a UNIT object executing the reconnaissance as part the <em>DetectionObject</em>. A Recce can be of any UNIT type.</li>
<li>An <strong>AttackGroup</strong> is a GROUP object that contain <em>Players</em>.</li>
<li>A <strong>Player</strong> is an active CLIENT object containing a human player.</li>
<li>A <strong>Designate Menu</strong> is the menu that is dynamically created during the designation process for each <em>AttackGroup</em>.</li>
</ul> </ul>
<p>One of the players in one of the Attack GROUPs, can then select a Target Set by selecting one of the menu options. <p>The <em>RecceSet</em> is continuously detecting for potential <em>Targets</em>, executing its task as part of the <em>DetectionObject</em>.
Each menu option has two modes: </p> Once <em>Targets</em> have been detected, the <em>DesignateObject</em> will trigger the <strong>Detect Event</strong>.</p>
<p>As part of the Detect Event, the <em>DetectionItems</em> list is used by the <em>DesignateObject</em> to provide the <em>Players</em> with:</p>
<ul> <ul>
<li>If the Target Set is not being designated, then the Designate menu for the target Set will provide options to Lase or Smoke the targets.</li> <li>The <em>RecceGroups</em> are reporting to each <em>AttackGroup</em>, sending <strong>Messages</strong> containing the <em>Threat Level</em> and the <em>TargetSet</em> composition.</li>
<li>If the Target Set is being designated, then the Designate menu will provide an option to cancel the designation.</li> <li><strong>Menu options</strong> are created and updated for each <em>AttackGroup</em>, containing the <em>Threat Level</em> and the <em>TargetSet</em> composition.</li>
</ul> </ul>
<p>In this way, the AI can assist players to designate ground targets for a coordinated attack!</p> <p>A <em>Player</em> can then select an action from the <em>Designate Menu</em>. </p>
<p><strong>Note that each selected action will be executed for a <em>TargetSet</em>, thus the <em>Target</em> grouping done by the <em>DetectionObject</em>.</strong></p>
<p>Each <strong>Menu Option</strong> in the <em>Designate Menu</em> has two modes: </p>
<ol>
<li>If the <em>TargetSet</em> <strong>is not being designated</strong>, then the <strong>Designate Menu</strong> option for the target Set will provide options to <strong>Lase</strong> or <strong>Smoke</strong> the targets.</li>
<li>If the Target Set <strong>is being designated</strong>, then the <strong>Designate Menu</strong> option will provide an option to stop or cancel the designation.</li>
</ol>
<p>While designating, the <em>RecceGroups</em> will report any change in <em>TargetSet</em> composition or <em>Target</em> presence.</p>
<p>The following logic is executed when a <em>TargetSet</em> is selected to be <em>lased</em> from the <em>Designation Menu</em>:</p>
<ul>
<li>The <em>RecceSet</em> is searched for any <em>Recce</em> that is within <em>designation distance</em> from a <em>Target</em> in the <em>TargetSet</em> that is currently not being designated.</li>
<li>If there is a <em>Recce</em> found that is currently no designating a target, and is within designation distance from the <em>Target</em>, then that <em>Target</em> will be designated.</li>
<li>During designation, any <em>Recce</em> that does not have Line of Sight (LOS) and is not within disignation distance from the <em>Target</em>, will stop designating the <em>Target</em>, and a report is given.</li>
<li>When a <em>Recce</em> is designating a <em>Target</em>, and that <em>Target</em> is destroyed, then the <em>Recce</em> will stop designating the <em>Target</em>, and will report the event.</li>
<li>When a <em>Recce</em> is designating a <em>Target</em>, and that <em>Recce</em> is destroyed, then the <em>Recce</em> will be removed from the <em>RecceSet</em> and designation will stop without reporting.</li>
<li>When all <em>RecceGroups</em> are destroyed from the <em>RecceSet</em>, then the DesignationObject will stop functioning, and nothing will be reported.</li>
</ul>
<p>In this way, the DesignationObject assists players to designate ground targets for a coordinated attack!</p>
<p>Have FUN!</p> <p>Have FUN!</p>
@ -437,6 +490,20 @@ One laser code can be given or an sequence of laser codes through an table...</p
<dl class="function"> <dl class="function">
<dt> <dt>
<em></em>
<a id="#(AI_DESIGNATE).Designating" >
<strong>AI_DESIGNATE.Designating</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_DESIGNATE).Detect" > <a id="#(AI_DESIGNATE).Detect" >
<strong>AI_DESIGNATE:Detect()</strong> <strong>AI_DESIGNATE:Detect()</strong>
</a> </a>
@ -512,6 +579,20 @@ One laser code can be given or an sequence of laser codes through an table...</p
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(AI_DESIGNATE).LaserCodesUsed" >
<strong>AI_DESIGNATE.LaserCodesUsed</strong>
</a>
</dt>
<dd>
</dd> </dd>
</dl> </dl>
<dl class="function"> <dl class="function">
@ -1315,6 +1396,57 @@ number> LaserCodes</p>
<p><em><a href="##(AI_DESIGNATE)">#AI_DESIGNATE</a>:</em></p> <p><em><a href="##(AI_DESIGNATE)">#AI_DESIGNATE</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_DESIGNATE).onafterLasing" >
<strong>AI_DESIGNATE:onafterLasing(From, Event, To, AttackGroup, Index, Duration)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> From </em></code>: </p>
</li>
<li>
<p><code><em> Event </em></code>: </p>
</li>
<li>
<p><code><em> To </em></code>: </p>
</li>
<li>
<p><code><em> AttackGroup </em></code>: </p>
</li>
<li>
<p><code><em> Index </em></code>: </p>
</li>
<li>
<p><code><em> Duration </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_DESIGNATE)">#AI_DESIGNATE</a>:</em></p>
</dd> </dd>
</dl> </dl>
<dl class="function"> <dl class="function">

View File

@ -312,6 +312,12 @@ YYYY-MM-DD: CLASS:<strong>NewFunction( Params )</strong> added</p>
<td class="name" nowrap="nowrap"><a href="##(BASE).OnEventCrash">BASE:OnEventCrash(EventData)</a></td> <td class="name" nowrap="nowrap"><a href="##(BASE).OnEventCrash">BASE:OnEventCrash(EventData)</a></td>
<td class="summary"> <td class="summary">
<p>Occurs when any aircraft crashes into the ground and is completely destroyed.</p> <p>Occurs when any aircraft crashes into the ground and is completely destroyed.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).OnEventDead">BASE:OnEventDead(EventData)</a></td>
<td class="summary">
<p>Occurs when an object is dead.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -1398,6 +1404,31 @@ The EventData structure.</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<a id="#(BASE).OnEventDead" >
<strong>BASE:OnEventDead(EventData)</strong>
</a>
</dt>
<dd>
<p>Occurs when an object is dead.</p>
<p>initiator : The unit that is dead. </p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> EventData </em></code>:
The EventData structure.</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).OnEventEjection" > <a id="#(BASE).OnEventEjection" >
<strong>BASE:OnEventEjection(EventData)</strong> <strong>BASE:OnEventEjection(EventData)</strong>
</a> </a>

View File

@ -95,7 +95,7 @@
<div id="content"> <div id="content">
<h1>Module <code>Cargo</code></h1> <h1>Module <code>Cargo</code></h1>
<p><strong>Core</strong> -- Management of CARGO logistics, that can be transported from and to transportation carriers.</p> <p><strong>(R2.1) Core</strong> -- Management of CARGO logistics, that can be transported from and to transportation carriers.</p>
@ -136,7 +136,7 @@
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="#CARGO">CARGO</a></td> <td class="name" nowrap="nowrap"><a href="#CARGO">CARGO</a></td>
<td class="summary"> <td class="summary">
<h1>CARGO class, extends <a href="Fsm.html##(FSM_PROCESS)">Fsm#FSM_PROCESS</a></h1> <h1>(R2.1) CARGO class, extends <a href="Fsm.html##(FSM_PROCESS)">Fsm#FSM_PROCESS</a></h1>
<p>The CARGO class defines the core functions that defines a cargo object within MOOSE.</p> <p>The CARGO class defines the core functions that defines a cargo object within MOOSE.</p>
</td> </td>
@ -217,7 +217,7 @@
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(CARGO).GetName">CARGO:GetName()</a></td> <td class="name" nowrap="nowrap"><a href="##(CARGO).GetName">CARGO:GetName()</a></td>
<td class="summary"> <td class="summary">
<p>Get the name of the Cargo.</p> <p>(R2.1) Get the name of the Cargo.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -283,7 +283,7 @@
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(CARGO).New">CARGO:New(Type, Name, Weight, NearRadius)</a></td> <td class="name" nowrap="nowrap"><a href="##(CARGO).New">CARGO:New(Type, Name, Weight, NearRadius)</a></td>
<td class="summary"> <td class="summary">
<p>CARGO Constructor.</p> <p>(R2.1) CARGO Constructor.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -721,7 +721,7 @@
</dt> </dt>
<dd> <dd>
<h1>CARGO class, extends <a href="Fsm.html##(FSM_PROCESS)">Fsm#FSM_PROCESS</a></h1> <h1>(R2.1) CARGO class, extends <a href="Fsm.html##(FSM_PROCESS)">Fsm#FSM_PROCESS</a></h1>
<p>The CARGO class defines the core functions that defines a cargo object within MOOSE.</p> <p>The CARGO class defines the core functions that defines a cargo object within MOOSE.</p>
@ -970,7 +970,7 @@ The radius when the cargo will board the Carrier (to avoid collision).</p>
</dt> </dt>
<dd> <dd>
<p>Get the name of the Cargo.</p> <p>(R2.1) Get the name of the Cargo.</p>
<h3>Return value</h3> <h3>Return value</h3>
@ -1186,7 +1186,7 @@ The Carrier that will hold the cargo.</p>
</dt> </dt>
<dd> <dd>
<p>CARGO Constructor.</p> <p>(R2.1) CARGO Constructor.</p>
<p>This class is an abstract class and should not be instantiated.</p> <p>This class is an abstract class and should not be instantiated.</p>
@ -2847,7 +2847,6 @@ The range till cargo will board.</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<em></em>
<a id="#(CARGO_UNIT).CargoCarrier" > <a id="#(CARGO_UNIT).CargoCarrier" >
<strong>CARGO_UNIT.CargoCarrier</strong> <strong>CARGO_UNIT.CargoCarrier</strong>
</a> </a>

View File

@ -2174,6 +2174,7 @@ self</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<em>#number</em>
<a id="#(DETECTION_BASE).DetectedItemCount" > <a id="#(DETECTION_BASE).DetectedItemCount" >
<strong>DETECTION_BASE.DetectedItemCount</strong> <strong>DETECTION_BASE.DetectedItemCount</strong>
</a> </a>
@ -2187,6 +2188,7 @@ self</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<em>#number</em>
<a id="#(DETECTION_BASE).DetectedItemMax" > <a id="#(DETECTION_BASE).DetectedItemMax" >
<strong>DETECTION_BASE.DetectedItemMax</strong> <strong>DETECTION_BASE.DetectedItemMax</strong>
</a> </a>
@ -2300,7 +2302,7 @@ self</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<em>#number</em> <em></em>
<a id="#(DETECTION_BASE).DetectionInterval" > <a id="#(DETECTION_BASE).DetectionInterval" >
<strong>DETECTION_BASE.DetectionInterval</strong> <strong>DETECTION_BASE.DetectionInterval</strong>
</a> </a>

View File

@ -213,6 +213,7 @@ on defined intervals (currently every minute).</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<em>#number</em>
<a id="#(MOVEMENT).AliveUnits" > <a id="#(MOVEMENT).AliveUnits" >
<strong>MOVEMENT.AliveUnits</strong> <strong>MOVEMENT.AliveUnits</strong>
</a> </a>
@ -221,6 +222,9 @@ on defined intervals (currently every minute).</p>
<p> Contains the counter how many units are currently alive</p>
</dd> </dd>
</dl> </dl>
<dl class="function"> <dl class="function">

View File

@ -484,6 +484,12 @@
<td class="name" nowrap="nowrap"><a href="##(POINT_VEC3).IlluminationBomb">POINT_VEC3:IlluminationBomb()</a></td> <td class="name" nowrap="nowrap"><a href="##(POINT_VEC3).IlluminationBomb">POINT_VEC3:IlluminationBomb()</a></td>
<td class="summary"> <td class="summary">
<p>Creates an illumination bomb at the point.</p> <p>Creates an illumination bomb at the point.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(POINT_VEC3).IsLOS">POINT_VEC3:IsLOS(ToPointVec3)</a></td>
<td class="summary">
<p>(R2.1) Returns if a PointVec3 has Line of Sight (LOS) with the ToPointVec3.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -1445,7 +1451,6 @@ The new calculated POINT_VEC2.</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<em></em>
<a id="#(POINT_VEC2).z" > <a id="#(POINT_VEC2).z" >
<strong>POINT_VEC2.z</strong> <strong>POINT_VEC2.z</strong>
</a> </a>
@ -2140,6 +2145,32 @@ The z coodinate.</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<a id="#(POINT_VEC3).IsLOS" >
<strong>POINT_VEC3:IsLOS(ToPointVec3)</strong>
</a>
</dt>
<dd>
<p>(R2.1) Returns if a PointVec3 has Line of Sight (LOS) with the ToPointVec3.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="##(POINT_VEC3)">#POINT_VEC3</a> ToPointVec3 </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em>
true If the ToPointVec3 has LOS with the PointVec3, otherwise false.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(POINT_VEC3).IsMetric" > <a id="#(POINT_VEC3).IsMetric" >
<strong>POINT_VEC3:IsMetric()</strong> <strong>POINT_VEC3:IsMetric()</strong>
</a> </a>

View File

@ -162,7 +162,7 @@
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).GetBeacon">POSITIONABLE:GetBeacon()</a></td> <td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).GetBeacon">POSITIONABLE:GetBeacon()</a></td>
<td class="summary"> <td class="summary">
<p>Create a <a href="Radio.html##(BEACON)">Radio#BEACON</a>, to allow this POSITIONABLE to broadcast beacon signals</p> <p>(R2.1) Create a <a href="Radio.html##(BEACON)">Radio#BEACON</a>, to allow this POSITIONABLE to broadcast beacon signals</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -198,7 +198,7 @@
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).GetRadio">POSITIONABLE:GetRadio()</a></td> <td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).GetRadio">POSITIONABLE:GetRadio()</a></td>
<td class="summary"> <td class="summary">
<p>Create a <a href="Radio.html##(RADIO)">Radio#RADIO</a>, to allow radio transmission for this POSITIONABLE.</p> <p>(R2.1) Create a <a href="Radio.html##(RADIO)">Radio#RADIO</a>, to allow radio transmission for this POSITIONABLE.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -246,19 +246,19 @@
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).IsLasing">POSITIONABLE:IsLasing()</a></td> <td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).IsLasing">POSITIONABLE:IsLasing()</a></td>
<td class="summary"> <td class="summary">
<p>Check if the POSITIONABLE is lasing a target</p> <p>(R2.1) Check if the POSITIONABLE is lasing a target</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).LaseOff">POSITIONABLE:LaseOff(Target)</a></td> <td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).LaseOff">POSITIONABLE:LaseOff()</a></td>
<td class="summary"> <td class="summary">
<p>Stop Lasing a POSITIONABLE</p> <p>(R2.1) Stop Lasing a POSITIONABLE</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).LaseUnit">POSITIONABLE:LaseUnit(Target, LaserCode, Duration)</a></td> <td class="name" nowrap="nowrap"><a href="##(POSITIONABLE).LaseUnit">POSITIONABLE:LaseUnit(Target, LaserCode, Duration)</a></td>
<td class="summary"> <td class="summary">
<p>Start Lasing a POSITIONABLE</p> <p>(R2.1) Start Lasing a POSITIONABLE</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -415,7 +415,7 @@ The POSITIONABLE is not existing or alive. </p>
</dt> </dt>
<dd> <dd>
<p>Create a <a href="Radio.html##(BEACON)">Radio#BEACON</a>, to allow this POSITIONABLE to broadcast beacon signals</p> <p>(R2.1) Create a <a href="Radio.html##(BEACON)">Radio#BEACON</a>, to allow this POSITIONABLE to broadcast beacon signals</p>
<h3>Return value</h3> <h3>Return value</h3>
@ -584,7 +584,7 @@ The POSITIONABLE is not existing or alive. </p>
</dt> </dt>
<dd> <dd>
<p>Create a <a href="Radio.html##(RADIO)">Radio#RADIO</a>, to allow radio transmission for this POSITIONABLE.</p> <p>(R2.1) Create a <a href="Radio.html##(RADIO)">Radio#RADIO</a>, to allow radio transmission for this POSITIONABLE.</p>
<p>Set parameters with the methods provided, then use RADIO:Broadcast() to actually broadcast the message</p> <p>Set parameters with the methods provided, then use RADIO:Broadcast() to actually broadcast the message</p>
@ -816,7 +816,7 @@ The POSITIONABLE is not existing or alive. </p>
</dt> </dt>
<dd> <dd>
<p>Check if the POSITIONABLE is lasing a target</p> <p>(R2.1) Check if the POSITIONABLE is lasing a target</p>
<h3>Return value</h3> <h3>Return value</h3>
@ -829,21 +829,13 @@ true if it is lasing a target</p>
<dt> <dt>
<a id="#(POSITIONABLE).LaseOff" > <a id="#(POSITIONABLE).LaseOff" >
<strong>POSITIONABLE:LaseOff(Target)</strong> <strong>POSITIONABLE:LaseOff()</strong>
</a> </a>
</dt> </dt>
<dd> <dd>
<p>Stop Lasing a POSITIONABLE</p> <p>(R2.1) Stop Lasing a POSITIONABLE</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="##(POSITIONABLE)">#POSITIONABLE</a> Target </em></code>: </p>
</li>
</ul>
<h3>Return value</h3> <h3>Return value</h3>
<p><em><a href="##(POSITIONABLE)">#POSITIONABLE</a>:</em></p> <p><em><a href="##(POSITIONABLE)">#POSITIONABLE</a>:</em></p>
@ -860,7 +852,7 @@ true if it is lasing a target</p>
</dt> </dt>
<dd> <dd>
<p>Start Lasing a POSITIONABLE</p> <p>(R2.1) Start Lasing a POSITIONABLE</p>
<h3>Parameters</h3> <h3>Parameters</h3>
<ul> <ul>

View File

@ -170,7 +170,7 @@
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="#SET_CARGO">SET_CARGO</a></td> <td class="name" nowrap="nowrap"><a href="#SET_CARGO">SET_CARGO</a></td>
<td class="summary"> <td class="summary">
<h1>SET_CARGO class, extends <a href="Set.html##(SET_BASE)">Set#SET_BASE</a></h1> <h1>(R2.1) SET_CARGO class, extends <a href="Set.html##(SET_BASE)">Set#SET_BASE</a></h1>
<p>Mission designers can use the <a href="Set.html##(SET_CARGO)">Set#SET_CARGO</a> class to build sets of cargos optionally belonging to certain:</p> <p>Mission designers can use the <a href="Set.html##(SET_CARGO)">Set#SET_CARGO</a> class to build sets of cargos optionally belonging to certain:</p>
@ -349,6 +349,18 @@
<td class="name" nowrap="nowrap"><a href="##(SET_BASE).Filter">SET_BASE.Filter</a></td> <td class="name" nowrap="nowrap"><a href="##(SET_BASE).Filter">SET_BASE.Filter</a></td>
<td class="summary"> <td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SET_BASE).FilterCrashes">SET_BASE:FilterCrashes()</a></td>
<td class="summary">
<p>Starts the filtering of the Crash events for the collection.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SET_BASE).FilterDeads">SET_BASE:FilterDeads()</a></td>
<td class="summary">
<p>Starts the filtering of the Dead events for the collection.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -508,97 +520,97 @@
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).AddCargosByName">SET_CARGO:AddCargosByName(AddCargoNames)</a></td> <td class="name" nowrap="nowrap"><a href="##(SET_CARGO).AddCargosByName">SET_CARGO:AddCargosByName(AddCargoNames)</a></td>
<td class="summary"> <td class="summary">
<p>Add CARGOs to SET_CARGO.</p> <p>(R2.1) Add CARGOs to SET_CARGO.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).AddInDatabase">SET_CARGO:AddInDatabase(Event)</a></td> <td class="name" nowrap="nowrap"><a href="##(SET_CARGO).AddInDatabase">SET_CARGO:AddInDatabase(Event)</a></td>
<td class="summary"> <td class="summary">
<p>Handles the Database to check on an event (birth) that the Object was added in the Database.</p> <p>(R2.1) Handles the Database to check on an event (birth) that the Object was added in the Database.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterCoalitions">SET_CARGO:FilterCoalitions(Coalitions)</a></td> <td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterCoalitions">SET_CARGO:FilterCoalitions(Coalitions)</a></td>
<td class="summary"> <td class="summary">
<p>Builds a set of cargos of coalitions.</p> <p>(R2.1) Builds a set of cargos of coalitions.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterCountries">SET_CARGO:FilterCountries(Countries)</a></td> <td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterCountries">SET_CARGO:FilterCountries(Countries)</a></td>
<td class="summary"> <td class="summary">
<p>Builds a set of cargos of defined countries.</p> <p>(R2.1) Builds a set of cargos of defined countries.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterPrefixes">SET_CARGO:FilterPrefixes(Prefixes)</a></td> <td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterPrefixes">SET_CARGO:FilterPrefixes(Prefixes)</a></td>
<td class="summary"> <td class="summary">
<p>Builds a set of cargos of defined cargo prefixes.</p> <p>(R2.1) Builds a set of cargos of defined cargo prefixes.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterStart">SET_CARGO:FilterStart()</a></td> <td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterStart">SET_CARGO:FilterStart()</a></td>
<td class="summary"> <td class="summary">
<p>Starts the filtering.</p> <p>(R2.1) Starts the filtering.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterTypes">SET_CARGO:FilterTypes(Types)</a></td> <td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FilterTypes">SET_CARGO:FilterTypes(Types)</a></td>
<td class="summary"> <td class="summary">
<p>Builds a set of cargos of defined cargo types.</p> <p>(R2.1) Builds a set of cargos of defined cargo types.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FindCargo">SET_CARGO:FindCargo(CargoName)</a></td> <td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FindCargo">SET_CARGO:FindCargo(CargoName)</a></td>
<td class="summary"> <td class="summary">
<p>Finds a Cargo based on the Cargo Name.</p> <p>(R2.1) Finds a Cargo based on the Cargo Name.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FindInDatabase">SET_CARGO:FindInDatabase(Event)</a></td> <td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FindInDatabase">SET_CARGO:FindInDatabase(Event)</a></td>
<td class="summary"> <td class="summary">
<p>Handles the Database to check on any event that Object exists in the Database.</p> <p>(R2.1) Handles the Database to check on any event that Object exists in the Database.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FindNearestCargoFromPointVec2">SET_CARGO:FindNearestCargoFromPointVec2(PointVec2)</a></td> <td class="name" nowrap="nowrap"><a href="##(SET_CARGO).FindNearestCargoFromPointVec2">SET_CARGO:FindNearestCargoFromPointVec2(PointVec2)</a></td>
<td class="summary"> <td class="summary">
<p>Iterate the SET_CARGO while identifying the nearest <a href="Cargo.html##(CARGO)">Cargo#CARGO</a> from a <a href="Point.html##(POINT_VEC2)">Point#POINT_VEC2</a>.</p> <p>(R2.1) Iterate the SET_CARGO while identifying the nearest <a href="Cargo.html##(CARGO)">Cargo#CARGO</a> from a <a href="Point.html##(POINT_VEC2)">Point#POINT_VEC2</a>.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).ForEachCargo">SET_CARGO:ForEachCargo(IteratorFunction, ...)</a></td> <td class="name" nowrap="nowrap"><a href="##(SET_CARGO).ForEachCargo">SET_CARGO:ForEachCargo(IteratorFunction, ...)</a></td>
<td class="summary"> <td class="summary">
<p>Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.</p> <p>(R2.1) Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).IsIncludeObject">SET_CARGO:IsIncludeObject(MCargo)</a></td> <td class="name" nowrap="nowrap"><a href="##(SET_CARGO).IsIncludeObject">SET_CARGO:IsIncludeObject(MCargo)</a></td>
<td class="summary"> <td class="summary">
<p>(R2.1) </p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).New">SET_CARGO:New()</a></td> <td class="name" nowrap="nowrap"><a href="##(SET_CARGO).New">SET_CARGO:New()</a></td>
<td class="summary"> <td class="summary">
<p>Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.</p> <p>(R2.1) Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).OnEventDeleteCargo">SET_CARGO:OnEventDeleteCargo(EventData)</a></td> <td class="name" nowrap="nowrap"><a href="##(SET_CARGO).OnEventDeleteCargo">SET_CARGO:OnEventDeleteCargo(EventData)</a></td>
<td class="summary"> <td class="summary">
<p>Handles the OnDead or OnCrash event for alive units set.</p> <p>(R2.1) Handles the OnDead or OnCrash event for alive units set.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).OnEventNewCargo">SET_CARGO:OnEventNewCargo(EventData)</a></td> <td class="name" nowrap="nowrap"><a href="##(SET_CARGO).OnEventNewCargo">SET_CARGO:OnEventNewCargo(EventData)</a></td>
<td class="summary"> <td class="summary">
<p>Handles the OnEventNewCargo event for the Set.</p> <p>(R2.1) Handles the OnEventNewCargo event for the Set.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SET_CARGO).RemoveCargosByName">SET_CARGO:RemoveCargosByName(RemoveCargoNames)</a></td> <td class="name" nowrap="nowrap"><a href="##(SET_CARGO).RemoveCargosByName">SET_CARGO:RemoveCargosByName(RemoveCargoNames)</a></td>
<td class="summary"> <td class="summary">
<p>Remove CARGOs from SET_CARGO.</p> <p>(R2.1) Remove CARGOs from SET_CARGO.</p>
</td> </td>
</tr> </tr>
</table> </table>
@ -1085,7 +1097,7 @@ You can set the <strong>"yield interval"</strong>, and the <strong>"time interva
</dt> </dt>
<dd> <dd>
<h1>SET_CARGO class, extends <a href="Set.html##(SET_BASE)">Set#SET_BASE</a></h1> <h1>(R2.1) SET_CARGO class, extends <a href="Set.html##(SET_BASE)">Set#SET_BASE</a></h1>
<p>Mission designers can use the <a href="Set.html##(SET_CARGO)">Set#SET_CARGO</a> class to build sets of cargos optionally belonging to certain:</p> <p>Mission designers can use the <a href="Set.html##(SET_CARGO)">Set#SET_CARGO</a> class to build sets of cargos optionally belonging to certain:</p>
@ -1856,6 +1868,42 @@ Count</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SET_BASE).FilterCrashes" >
<strong>SET_BASE:FilterCrashes()</strong>
</a>
</dt>
<dd>
<p>Starts the filtering of the Crash events for the collection.</p>
<h3>Return value</h3>
<p><em><a href="##(SET_BASE)">#SET_BASE</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SET_BASE).FilterDeads" >
<strong>SET_BASE:FilterDeads()</strong>
</a>
</dt>
<dd>
<p>Starts the filtering of the Dead events for the collection.</p>
<h3>Return value</h3>
<p><em><a href="##(SET_BASE)">#SET_BASE</a>:</em>
self</p>
</dd> </dd>
</dl> </dl>
<dl class="function"> <dl class="function">
@ -2419,7 +2467,7 @@ The Object found.</p>
</dt> </dt>
<dd> <dd>
<p>Add CARGOs to SET_CARGO.</p> <p>(R2.1) Add CARGOs to SET_CARGO.</p>
<h3>Parameter</h3> <h3>Parameter</h3>
<ul> <ul>
@ -2446,7 +2494,7 @@ A single name or an array of CARGO names.</p>
</dt> </dt>
<dd> <dd>
<p>Handles the Database to check on an event (birth) that the Object was added in the Database.</p> <p>(R2.1) Handles the Database to check on an event (birth) that the Object was added in the Database.</p>
<p>This is required, because sometimes the <em>DATABASE birth event gets called later than the SET</em>BASE birth event!</p> <p>This is required, because sometimes the <em>DATABASE birth event gets called later than the SET</em>BASE birth event!</p>
@ -2485,7 +2533,7 @@ The CARGO</p>
</dt> </dt>
<dd> <dd>
<p>Builds a set of cargos of coalitions.</p> <p>(R2.1) Builds a set of cargos of coalitions.</p>
<p>Possible current coalitions are red, blue and neutral.</p> <p>Possible current coalitions are red, blue and neutral.</p>
@ -2515,7 +2563,7 @@ self</p>
</dt> </dt>
<dd> <dd>
<p>Builds a set of cargos of defined countries.</p> <p>(R2.1) Builds a set of cargos of defined countries.</p>
<p>Possible current countries are those known within DCS world.</p> <p>Possible current countries are those known within DCS world.</p>
@ -2545,7 +2593,7 @@ self</p>
</dt> </dt>
<dd> <dd>
<p>Builds a set of cargos of defined cargo prefixes.</p> <p>(R2.1) Builds a set of cargos of defined cargo prefixes.</p>
<p>All the cargos starting with the given prefixes will be included within the set.</p> <p>All the cargos starting with the given prefixes will be included within the set.</p>
@ -2575,7 +2623,7 @@ self</p>
</dt> </dt>
<dd> <dd>
<p>Starts the filtering.</p> <p>(R2.1) Starts the filtering.</p>
<h3>Return value</h3> <h3>Return value</h3>
@ -2593,7 +2641,7 @@ self</p>
</dt> </dt>
<dd> <dd>
<p>Builds a set of cargos of defined cargo types.</p> <p>(R2.1) Builds a set of cargos of defined cargo types.</p>
<p>Possible current types are those types known within DCS world.</p> <p>Possible current types are those types known within DCS world.</p>
@ -2623,7 +2671,7 @@ self</p>
</dt> </dt>
<dd> <dd>
<p>Finds a Cargo based on the Cargo Name.</p> <p>(R2.1) Finds a Cargo based on the Cargo Name.</p>
<h3>Parameter</h3> <h3>Parameter</h3>
<ul> <ul>
@ -2649,7 +2697,7 @@ The found Cargo.</p>
</dt> </dt>
<dd> <dd>
<p>Handles the Database to check on any event that Object exists in the Database.</p> <p>(R2.1) Handles the Database to check on any event that Object exists in the Database.</p>
<p>This is required, because sometimes the <em>DATABASE event gets called later than the SET</em>BASE event or vise versa!</p> <p>This is required, because sometimes the <em>DATABASE event gets called later than the SET</em>BASE event or vise versa!</p>
@ -2688,7 +2736,7 @@ The CARGO</p>
</dt> </dt>
<dd> <dd>
<p>Iterate the SET_CARGO while identifying the nearest <a href="Cargo.html##(CARGO)">Cargo#CARGO</a> from a <a href="Point.html##(POINT_VEC2)">Point#POINT_VEC2</a>.</p> <p>(R2.1) Iterate the SET_CARGO while identifying the nearest <a href="Cargo.html##(CARGO)">Cargo#CARGO</a> from a <a href="Point.html##(POINT_VEC2)">Point#POINT_VEC2</a>.</p>
<h3>Parameter</h3> <h3>Parameter</h3>
<ul> <ul>
@ -2715,7 +2763,7 @@ The closest <a href="Cargo.html##(CARGO)">Cargo#CARGO</a>.</p>
</dt> </dt>
<dd> <dd>
<p>Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.</p> <p>(R2.1) Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.</p>
<h3>Parameters</h3> <h3>Parameters</h3>
<ul> <ul>
@ -2747,7 +2795,7 @@ self</p>
</dt> </dt>
<dd> <dd>
<p>(R2.1) </p>
<h3>Parameter</h3> <h3>Parameter</h3>
<ul> <ul>
@ -2773,7 +2821,7 @@ self</p>
</dt> </dt>
<dd> <dd>
<p>Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.</p> <p>(R2.1) Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.</p>
<h3>Return value</h3> <h3>Return value</h3>
@ -2795,7 +2843,7 @@ DatabaseSet = SET_CARGO:New()</code></pre>
</dt> </dt>
<dd> <dd>
<p>Handles the OnDead or OnCrash event for alive units set.</p> <p>(R2.1) Handles the OnDead or OnCrash event for alive units set.</p>
<h3>Parameter</h3> <h3>Parameter</h3>
<ul> <ul>
@ -2816,7 +2864,7 @@ DatabaseSet = SET_CARGO:New()</code></pre>
</dt> </dt>
<dd> <dd>
<p>Handles the OnEventNewCargo event for the Set.</p> <p>(R2.1) Handles the OnEventNewCargo event for the Set.</p>
<h3>Parameter</h3> <h3>Parameter</h3>
<ul> <ul>
@ -2837,7 +2885,7 @@ DatabaseSet = SET_CARGO:New()</code></pre>
</dt> </dt>
<dd> <dd>
<p>Remove CARGOs from SET_CARGO.</p> <p>(R2.1) Remove CARGOs from SET_CARGO.</p>
<h3>Parameter</h3> <h3>Parameter</h3>
<ul> <ul>

View File

@ -2566,9 +2566,6 @@ when nothing was spawned.</p>
<p> Overwrite unit names by default with group name.</p>
</dd> </dd>
</dl> </dl>
<dl class="function"> <dl class="function">

View File

@ -95,7 +95,7 @@
<div id="content"> <div id="content">
<h1>Module <code>SpawnStatic</code></h1> <h1>Module <code>SpawnStatic</code></h1>
<p><strong>Core</strong> -- Spawn dynamically new STATICs in your missions.</p> <p>(R2.1) <strong>Core</strong> -- Spawn dynamically new STATICs in your missions.</p>
<p> <p>
@ -169,25 +169,25 @@
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SPAWNSTATIC).NewFromStatic">SPAWNSTATIC:NewFromStatic(SpawnTemplatePrefix, CountryID)</a></td> <td class="name" nowrap="nowrap"><a href="##(SPAWNSTATIC).NewFromStatic">SPAWNSTATIC:NewFromStatic(SpawnTemplatePrefix, CountryID)</a></td>
<td class="summary"> <td class="summary">
<p>Creates the main object to spawn a <a href="Static.html">Static</a> defined in the ME.</p> <p>(R2.1) Creates the main object to spawn a <a href="Static.html">Static</a> defined in the ME.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SPAWNSTATIC).NewFromType">SPAWNSTATIC:NewFromType(SpawnTypeName, SpawnShapeName, SpawnCategory, CountryID)</a></td> <td class="name" nowrap="nowrap"><a href="##(SPAWNSTATIC).NewFromType">SPAWNSTATIC:NewFromType(SpawnTypeName, SpawnShapeName, SpawnCategory, CountryID)</a></td>
<td class="summary"> <td class="summary">
<p>Creates the main object to spawn a <a href="Static.html">Static</a> based on a type name.</p> <p>(R2.1) Creates the main object to spawn a <a href="Static.html">Static</a> based on a type name.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SPAWNSTATIC).SpawnFromPointVec2">SPAWNSTATIC:SpawnFromPointVec2(PointVec2, Heading, (, NewName)</a></td> <td class="name" nowrap="nowrap"><a href="##(SPAWNSTATIC).SpawnFromPointVec2">SPAWNSTATIC:SpawnFromPointVec2(PointVec2, Heading, (, NewName)</a></td>
<td class="summary"> <td class="summary">
<p>Creates a new <a href="Static.html">Static</a> from a POINT_VEC2.</p> <p>(R2.1) Creates a new <a href="Static.html">Static</a> from a POINT_VEC2.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SPAWNSTATIC).SpawnFromZone">SPAWNSTATIC:SpawnFromZone(Zone, Heading, (, NewName)</a></td> <td class="name" nowrap="nowrap"><a href="##(SPAWNSTATIC).SpawnFromZone">SPAWNSTATIC:SpawnFromZone(Zone, Heading, (, NewName)</a></td>
<td class="summary"> <td class="summary">
<p>Creates a new <a href="Static.html">Static</a> from a <a href="Zone.html">Zone</a>.</p> <p>(R2.1) Creates a new <a href="Static.html">Static</a> from a <a href="Zone.html">Zone</a>.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -288,7 +288,7 @@ By default, spawned <a href="Static.html">Static</a>s will follow a naming conve
</dt> </dt>
<dd> <dd>
<p>Creates the main object to spawn a <a href="Static.html">Static</a> defined in the ME.</p> <p>(R2.1) Creates the main object to spawn a <a href="Static.html">Static</a> defined in the ME.</p>
<h3>Parameters</h3> <h3>Parameters</h3>
<ul> <ul>
@ -320,7 +320,7 @@ is the name of the Group in the ME that defines the Template. Each new group wi
</dt> </dt>
<dd> <dd>
<p>Creates the main object to spawn a <a href="Static.html">Static</a> based on a type name.</p> <p>(R2.1) Creates the main object to spawn a <a href="Static.html">Static</a> based on a type name.</p>
<h3>Parameters</h3> <h3>Parameters</h3>
<ul> <ul>
@ -362,7 +362,7 @@ is the name of the type.</p>
</dt> </dt>
<dd> <dd>
<p>Creates a new <a href="Static.html">Static</a> from a POINT_VEC2.</p> <p>(R2.1) Creates a new <a href="Static.html">Static</a> from a POINT_VEC2.</p>
<h3>Parameters</h3> <h3>Parameters</h3>
<ul> <ul>
@ -406,7 +406,7 @@ ptional) The name of the new static.</p>
</dt> </dt>
<dd> <dd>
<p>Creates a new <a href="Static.html">Static</a> from a <a href="Zone.html">Zone</a>.</p> <p>(R2.1) Creates a new <a href="Static.html">Static</a> from a <a href="Zone.html">Zone</a>.</p>
<h3>Parameters</h3> <h3>Parameters</h3>
<ul> <ul>

View File

@ -138,15 +138,27 @@
<h2><a id="#(SPOT)">Type <code>SPOT</code></a></h2> <h2><a id="#(SPOT)">Type <code>SPOT</code></a></h2>
<table class="function_list"> <table class="function_list">
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SPOT).ClassName">SPOT.ClassName</a></td> <td class="name" nowrap="nowrap"><a href="##(SPOT).Destroyed">SPOT:Destroyed()</a></td>
<td class="summary"> <td class="summary">
<p>Destroyed Trigger for SPOT</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SPOT).IsLasing">SPOT:IsLasing()</a></td> <td class="name" nowrap="nowrap"><a href="##(SPOT).IsLasing">SPOT:IsLasing()</a></td>
<td class="summary"> <td class="summary">
<p>Check if the SPOT is lasing</p> <p>Check if the SPOT is lasing</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPOT).LaseOff">SPOT:LaseOff()</a></td>
<td class="summary">
<p>LaseOff Trigger for SPOT</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPOT).LaseOn">SPOT:LaseOn()</a></td>
<td class="summary">
<p>LaseOn Trigger for SPOT</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -165,6 +177,48 @@
<td class="name" nowrap="nowrap"><a href="##(SPOT).New">SPOT:New(Recce, LaserCode, Duration)</a></td> <td class="name" nowrap="nowrap"><a href="##(SPOT).New">SPOT:New(Recce, LaserCode, Duration)</a></td>
<td class="summary"> <td class="summary">
<p>SPOT Constructor.</p> <p>SPOT Constructor.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPOT).OnAfterDestroyed">SPOT:OnAfterDestroyed(From, Event, To)</a></td>
<td class="summary">
<p>Destroyed Handler OnAfter for SPOT</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPOT).OnAfterLaseOff">SPOT:OnAfterLaseOff(From, Event, To)</a></td>
<td class="summary">
<p>LaseOff Handler OnAfter for SPOT</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPOT).OnAfterLaseOn">SPOT:OnAfterLaseOn(From, Event, To)</a></td>
<td class="summary">
<p>LaseOn Handler OnAfter for SPOT</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPOT).OnBeforeDestroyed">SPOT:OnBeforeDestroyed(From, Event, To)</a></td>
<td class="summary">
<p>Destroyed Handler OnBefore for SPOT</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPOT).OnBeforeLaseOff">SPOT:OnBeforeLaseOff(From, Event, To)</a></td>
<td class="summary">
<p>LaseOff Handler OnBefore for SPOT</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPOT).OnBeforeLaseOn">SPOT:OnBeforeLaseOn(From, Event, To)</a></td>
<td class="summary">
<p>LaseOn Handler OnBefore for SPOT</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPOT).OnEventDead">SPOT:OnEventDead(EventData)</a></td>
<td class="summary">
</td> </td>
</tr> </tr>
<tr> <tr>
@ -180,7 +234,13 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(SPOT).Spot">SPOT.Spot</a></td> <td class="name" nowrap="nowrap"><a href="##(SPOT).SpotIR">SPOT.SpotIR</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPOT).SpotLaser">SPOT.SpotLaser</a></td>
<td class="summary"> <td class="summary">
</td> </td>
@ -189,6 +249,24 @@
<td class="name" nowrap="nowrap"><a href="##(SPOT).Target">SPOT.Target</a></td> <td class="name" nowrap="nowrap"><a href="##(SPOT).Target">SPOT.Target</a></td>
<td class="summary"> <td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPOT).__Destroyed">SPOT:__Destroyed(Delay)</a></td>
<td class="summary">
<p>Destroyed Asynchronous Trigger for SPOT</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPOT).__LaseOff">SPOT:__LaseOff(Delay)</a></td>
<td class="summary">
<p>LaseOff Asynchronous Trigger for SPOT</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPOT).__LaseOn">SPOT:__LaseOn(Delay)</a></td>
<td class="summary">
<p>LaseOn Asynchronous Trigger for SPOT</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -233,14 +311,13 @@
<dl class="function"> <dl class="function">
<dt> <dt>
<em>#string</em> <a id="#(SPOT).Destroyed" >
<a id="#(SPOT).ClassName" > <strong>SPOT:Destroyed()</strong>
<strong>SPOT.ClassName</strong>
</a> </a>
</dt> </dt>
<dd> <dd>
<p>Destroyed Trigger for SPOT</p>
</dd> </dd>
</dl> </dl>
@ -260,6 +337,32 @@
<p><em>#boolean:</em> <p><em>#boolean:</em>
true if it is lasing</p> true if it is lasing</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SPOT).LaseOff" >
<strong>SPOT:LaseOff()</strong>
</a>
</dt>
<dd>
<p>LaseOff Trigger for SPOT</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SPOT).LaseOn" >
<strong>SPOT:LaseOn()</strong>
</a>
</dt>
<dd>
<p>LaseOn Trigger for SPOT</p>
</dd> </dd>
</dl> </dl>
<dl class="function"> <dl class="function">
@ -324,6 +427,228 @@ true if it is lasing</p>
<p><em><a href="##(SPOT)">#SPOT</a>:</em></p> <p><em><a href="##(SPOT)">#SPOT</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SPOT).OnAfterDestroyed" >
<strong>SPOT:OnAfterDestroyed(From, Event, To)</strong>
</a>
</dt>
<dd>
<p>Destroyed Handler OnAfter for SPOT</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string From </em></code>: </p>
</li>
<li>
<p><code><em>#string Event </em></code>: </p>
</li>
<li>
<p><code><em>#string To </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SPOT).OnAfterLaseOff" >
<strong>SPOT:OnAfterLaseOff(From, Event, To)</strong>
</a>
</dt>
<dd>
<p>LaseOff Handler OnAfter for SPOT</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string From </em></code>: </p>
</li>
<li>
<p><code><em>#string Event </em></code>: </p>
</li>
<li>
<p><code><em>#string To </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SPOT).OnAfterLaseOn" >
<strong>SPOT:OnAfterLaseOn(From, Event, To)</strong>
</a>
</dt>
<dd>
<p>LaseOn Handler OnAfter for SPOT</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string From </em></code>: </p>
</li>
<li>
<p><code><em>#string Event </em></code>: </p>
</li>
<li>
<p><code><em>#string To </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SPOT).OnBeforeDestroyed" >
<strong>SPOT:OnBeforeDestroyed(From, Event, To)</strong>
</a>
</dt>
<dd>
<p>Destroyed Handler OnBefore for SPOT</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string From </em></code>: </p>
</li>
<li>
<p><code><em>#string Event </em></code>: </p>
</li>
<li>
<p><code><em>#string To </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SPOT).OnBeforeLaseOff" >
<strong>SPOT:OnBeforeLaseOff(From, Event, To)</strong>
</a>
</dt>
<dd>
<p>LaseOff Handler OnBefore for SPOT</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string From </em></code>: </p>
</li>
<li>
<p><code><em>#string Event </em></code>: </p>
</li>
<li>
<p><code><em>#string To </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SPOT).OnBeforeLaseOn" >
<strong>SPOT:OnBeforeLaseOn(From, Event, To)</strong>
</a>
</dt>
<dd>
<p>LaseOn Handler OnBefore for SPOT</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string From </em></code>: </p>
</li>
<li>
<p><code><em>#string Event </em></code>: </p>
</li>
<li>
<p><code><em>#string To </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SPOT).OnEventDead" >
<strong>SPOT:OnEventDead(EventData)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="Core.Event.html##(EVENTDATA)">Core.Event#EVENTDATA</a> EventData </em></code>: </p>
</li>
</ul>
</dd> </dd>
</dl> </dl>
<dl class="function"> <dl class="function">
@ -358,8 +683,22 @@ true if it is lasing</p>
<dt> <dt>
<em></em> <em></em>
<a id="#(SPOT).Spot" > <a id="#(SPOT).SpotIR" >
<strong>SPOT.Spot</strong> <strong>SPOT.SpotIR</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(SPOT).SpotLaser" >
<strong>SPOT.SpotLaser</strong>
</a> </a>
</dt> </dt>
<dd> <dd>
@ -380,6 +719,69 @@ true if it is lasing</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SPOT).__Destroyed" >
<strong>SPOT:__Destroyed(Delay)</strong>
</a>
</dt>
<dd>
<p>Destroyed Asynchronous Trigger for SPOT</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#number Delay </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SPOT).__LaseOff" >
<strong>SPOT:__LaseOff(Delay)</strong>
</a>
</dt>
<dd>
<p>LaseOff Asynchronous Trigger for SPOT</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#number Delay </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(SPOT).__LaseOn" >
<strong>SPOT:__LaseOn(Delay)</strong>
</a>
</dt>
<dd>
<p>LaseOn Asynchronous Trigger for SPOT</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#number Delay </em></code>: </p>
</li>
</ul>
</dd> </dd>
</dl> </dl>
<dl class="function"> <dl class="function">

View File

@ -300,6 +300,12 @@
<td class="name" nowrap="nowrap"><a href="##(UNIT).IsAlive">UNIT:IsAlive()</a></td> <td class="name" nowrap="nowrap"><a href="##(UNIT).IsAlive">UNIT:IsAlive()</a></td>
<td class="summary"> <td class="summary">
<p>Returns if the Unit is alive.</p> <p>Returns if the Unit is alive.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).IsDetected">UNIT:IsDetected(TargetUnit)</a></td>
<td class="summary">
<p>(R2.1) Returns if a unit is detecting the TargetUnit.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -318,6 +324,12 @@
<td class="name" nowrap="nowrap"><a href="##(UNIT).IsInZone">UNIT:IsInZone(Zone)</a></td> <td class="name" nowrap="nowrap"><a href="##(UNIT).IsInZone">UNIT:IsInZone(Zone)</a></td>
<td class="summary"> <td class="summary">
<p>Returns true if the unit is within a <a href="Zone.html">Zone</a>.</p> <p>Returns true if the unit is within a <a href="Zone.html">Zone</a>.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(UNIT).IsLOS">UNIT:IsLOS(TargetUnit)</a></td>
<td class="summary">
<p>(R2.1) Returns if a unit has Line of Sight (LOS) with the TargetUnit.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -498,13 +510,22 @@ If you want to obtain the complete <strong>3D position</strong> including ori<72>
<p>The UNIT class contains methods to test the location or proximity against zones or other objects.</p> <p>The UNIT class contains methods to test the location or proximity against zones or other objects.</p>
<h3>Zones</h3> <h3>Zones range</h3>
<p>To test whether the Unit is within a <strong>zone</strong>, use the <a href="##(UNIT).IsInZone">UNIT.IsInZone</a>() or the <a href="##(UNIT).IsNotInZone">UNIT.IsNotInZone</a>() methods. Any zone can be tested on, but the zone must be derived from <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a>. </p> <p>To test whether the Unit is within a <strong>zone</strong>, use the <a href="##(UNIT).IsInZone">UNIT.IsInZone</a>() or the <a href="##(UNIT).IsNotInZone">UNIT.IsNotInZone</a>() methods. Any zone can be tested on, but the zone must be derived from <a href="Zone.html##(ZONE_BASE)">Zone#ZONE_BASE</a>. </p>
<h3>Units</h3> <h3>Unit range</h3>
<ul>
<li>Test if another DCS Unit is within a given radius of the current DCS Unit, use the <a href="##(UNIT).OtherUnitInRadius">UNIT.OtherUnitInRadius</a>() method.</li>
</ul>
<h2>Test Line of Sight</h2>
<ul>
<li>Use the <a href="##(UNIT).IsLOS">UNIT.IsLOS</a>() method to check if the given unit is within line of sight.</li>
</ul>
<p>Test if another DCS Unit is within a given radius of the current DCS Unit, use the <a href="##(UNIT).OtherUnitInRadius">UNIT.OtherUnitInRadius</a>() method.</p>
</dd> </dd>
@ -1278,6 +1299,32 @@ if the Unit is not existing or is not alive. </p>
<dl class="function"> <dl class="function">
<dt> <dt>
<a id="#(UNIT).IsDetected" >
<strong>UNIT:IsDetected(TargetUnit)</strong>
</a>
</dt>
<dd>
<p>(R2.1) Returns if a unit is detecting the TargetUnit.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="##(UNIT)">#UNIT</a> TargetUnit </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em>
true If the TargetUnit is detected by the unit, otherwise false.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).IsFriendly" > <a id="#(UNIT).IsFriendly" >
<strong>UNIT:IsFriendly(FriendlyCoalition)</strong> <strong>UNIT:IsFriendly(FriendlyCoalition)</strong>
</a> </a>
@ -1352,6 +1399,32 @@ Returns true if the unit is within the <a href="Zone.html##(ZONE_BASE)">Zone#ZON
<dl class="function"> <dl class="function">
<dt> <dt>
<a id="#(UNIT).IsLOS" >
<strong>UNIT:IsLOS(TargetUnit)</strong>
</a>
</dt>
<dd>
<p>(R2.1) Returns if a unit has Line of Sight (LOS) with the TargetUnit.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em><a href="##(UNIT)">#UNIT</a> TargetUnit </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em>
true If the TargetUnit has LOS with the unit, otherwise false.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(UNIT).IsNotInZone" > <a id="#(UNIT).IsNotInZone" >
<strong>UNIT:IsNotInZone(Zone)</strong> <strong>UNIT:IsNotInZone(Zone)</strong>
</a> </a>

View File

@ -202,7 +202,7 @@ even when there are hardly any players in the mission.</strong></p>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="Cargo.html">Cargo</a></td> <td class="name" nowrap="nowrap"><a href="Cargo.html">Cargo</a></td>
<td class="summary"> <td class="summary">
<p><strong>Core</strong> -- Management of CARGO logistics, that can be transported from and to transportation carriers.</p> <p><strong>(R2.1) Core</strong> -- Management of CARGO logistics, that can be transported from and to transportation carriers.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -499,7 +499,7 @@ and creates a CSV file logging the scoring events and results for use at team or
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="SpawnStatic.html">SpawnStatic</a></td> <td class="name" nowrap="nowrap"><a href="SpawnStatic.html">SpawnStatic</a></td>
<td class="summary"> <td class="summary">
<p><strong>Core</strong> -- Spawn dynamically new STATICs in your missions.</p> <p>(R2.1) <strong>Core</strong> -- Spawn dynamically new STATICs in your missions.</p>
</td> </td>
</tr> </tr>
<tr> <tr>