mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge remote-tracking branch 'refs/remotes/origin/master' into master-405-event-handling
# Conflicts: # Moose Mission Setup/Moose.lua
This commit is contained in:
commit
3bf9eab704
@ -219,9 +219,9 @@ local _ClassID = 0
|
||||
BASE = {
|
||||
ClassName = "BASE",
|
||||
ClassID = 0,
|
||||
_Private = {},
|
||||
Events = {},
|
||||
States = {}
|
||||
States = {},
|
||||
_ = {},
|
||||
}
|
||||
|
||||
--- The Formation Class
|
||||
@ -360,7 +360,7 @@ do -- Event Handling
|
||||
-- @param #BASE self
|
||||
-- @return #number The @{Event} processing Priority.
|
||||
function BASE:GetEventPriority()
|
||||
return self._Private.EventPriority or 5
|
||||
return self._.EventPriority or 5
|
||||
end
|
||||
|
||||
--- Set the Class @{Event} processing Priority.
|
||||
@ -370,7 +370,7 @@ do -- Event Handling
|
||||
-- @param #number EventPriority The @{Event} processing Priority.
|
||||
-- @return self
|
||||
function BASE:SetEventPriority( EventPriority )
|
||||
self._Private.EventPriority = EventPriority
|
||||
self._.EventPriority = EventPriority
|
||||
end
|
||||
|
||||
--- Remove all subscribed events
|
||||
|
||||
@ -44,6 +44,7 @@ DATABASE = {
|
||||
Templates = {
|
||||
Units = {},
|
||||
Groups = {},
|
||||
Statics = {},
|
||||
ClientsByName = {},
|
||||
ClientsByID = {},
|
||||
},
|
||||
@ -282,7 +283,7 @@ function DATABASE:Spawn( SpawnTemplate )
|
||||
SpawnTemplate.CountryID = nil
|
||||
SpawnTemplate.CategoryID = nil
|
||||
|
||||
self:_RegisterTemplate( SpawnTemplate, SpawnCoalitionID, SpawnCategoryID, SpawnCountryID )
|
||||
self:_RegisterGroupTemplate( SpawnTemplate, SpawnCoalitionID, SpawnCategoryID, SpawnCountryID )
|
||||
|
||||
self:T3( SpawnTemplate )
|
||||
coalition.addGroup( SpawnCountryID, SpawnCategoryID, SpawnTemplate )
|
||||
@ -318,7 +319,7 @@ end
|
||||
-- @param #DATABASE self
|
||||
-- @param #table GroupTemplate
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:_RegisterTemplate( GroupTemplate, CoalitionID, CategoryID, CountryID )
|
||||
function DATABASE:_RegisterGroupTemplate( GroupTemplate, CoalitionID, CategoryID, CountryID )
|
||||
|
||||
local GroupTemplateName = env.getValueDictByKey(GroupTemplate.name)
|
||||
|
||||
@ -396,6 +397,54 @@ function DATABASE:GetGroupTemplate( GroupName )
|
||||
return GroupTemplate
|
||||
end
|
||||
|
||||
--- Private method that registers new Static Templates within the DATABASE Object.
|
||||
-- @param #DATABASE self
|
||||
-- @param #table GroupTemplate
|
||||
-- @return #DATABASE self
|
||||
function DATABASE:_RegisterStaticTemplate( StaticTemplate, CoalitionID, CategoryID, CountryID )
|
||||
|
||||
local TraceTable = {}
|
||||
|
||||
local StaticTemplateName = env.getValueDictByKey(StaticTemplate.name)
|
||||
|
||||
self.Templates.Statics[StaticTemplateName] = self.Templates.Statics[StaticTemplateName] or {}
|
||||
|
||||
StaticTemplate.CategoryID = CategoryID
|
||||
StaticTemplate.CoalitionID = CoalitionID
|
||||
StaticTemplate.CountryID = CountryID
|
||||
|
||||
self.Templates.Statics[StaticTemplateName].StaticName = StaticTemplateName
|
||||
self.Templates.Statics[StaticTemplateName].GroupTemplate = StaticTemplate
|
||||
self.Templates.Statics[StaticTemplateName].UnitTemplate = StaticTemplate.units[1]
|
||||
self.Templates.Statics[StaticTemplateName].CategoryID = CategoryID
|
||||
self.Templates.Statics[StaticTemplateName].CoalitionID = CoalitionID
|
||||
self.Templates.Statics[StaticTemplateName].CountryID = CountryID
|
||||
|
||||
|
||||
TraceTable[#TraceTable+1] = "Static"
|
||||
TraceTable[#TraceTable+1] = self.Templates.Statics[StaticTemplateName].GroupName
|
||||
|
||||
TraceTable[#TraceTable+1] = "Coalition"
|
||||
TraceTable[#TraceTable+1] = self.Templates.Statics[StaticTemplateName].CoalitionID
|
||||
TraceTable[#TraceTable+1] = "Category"
|
||||
TraceTable[#TraceTable+1] = self.Templates.Statics[StaticTemplateName].CategoryID
|
||||
TraceTable[#TraceTable+1] = "Country"
|
||||
TraceTable[#TraceTable+1] = self.Templates.Statics[StaticTemplateName].CountryID
|
||||
|
||||
self:E( TraceTable )
|
||||
end
|
||||
|
||||
|
||||
--- @param #DATABASE self
|
||||
function DATABASE:GetStaticUnitTemplate( StaticName )
|
||||
local StaticTemplate = self.Templates.Statics[StaticName].UnitTemplate
|
||||
StaticTemplate.SpawnCoalitionID = self.Templates.Statics[StaticName].CoalitionID
|
||||
StaticTemplate.SpawnCategoryID = self.Templates.Statics[StaticName].CategoryID
|
||||
StaticTemplate.SpawnCountryID = self.Templates.Statics[StaticName].CountryID
|
||||
return StaticTemplate
|
||||
end
|
||||
|
||||
|
||||
function DATABASE:GetGroupNameFromUnitName( UnitName )
|
||||
return self.Templates.Units[UnitName].GroupName
|
||||
end
|
||||
@ -725,7 +774,7 @@ function DATABASE:ForEachClient( IteratorFunction, ... )
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- @param #DATABASE self
|
||||
function DATABASE:_RegisterTemplates()
|
||||
self:F2()
|
||||
|
||||
@ -781,11 +830,18 @@ function DATABASE:_RegisterTemplates()
|
||||
|
||||
--self.Units[coa_name][countryName][category] = {}
|
||||
|
||||
for group_num, GroupTemplate in pairs(obj_type_data.group) do
|
||||
for group_num, Template in pairs(obj_type_data.group) do
|
||||
|
||||
if GroupTemplate and GroupTemplate.units and type(GroupTemplate.units) == 'table' then --making sure again- this is a valid group
|
||||
self:_RegisterTemplate(
|
||||
GroupTemplate,
|
||||
if obj_type_name ~= "static" and Template and Template.units and type(Template.units) == 'table' then --making sure again- this is a valid group
|
||||
self:_RegisterGroupTemplate(
|
||||
Template,
|
||||
CoalitionSide,
|
||||
_DATABASECategory[string.lower(CategoryName)],
|
||||
CountryID
|
||||
)
|
||||
else
|
||||
self:_RegisterStaticTemplate(
|
||||
Template,
|
||||
CoalitionSide,
|
||||
_DATABASECategory[string.lower(CategoryName)],
|
||||
CountryID
|
||||
|
||||
@ -1374,7 +1374,7 @@ function SET_UNIT:ForEachUnitCompletelyInZone( ZoneObject, IteratorFunction, ...
|
||||
--- @param Core.Zone#ZONE_BASE ZoneObject
|
||||
-- @param Wrapper.Unit#UNIT UnitObject
|
||||
function( ZoneObject, UnitObject )
|
||||
if UnitObject:IsCompletelyInZone( ZoneObject ) then
|
||||
if UnitObject:IsInZone( ZoneObject ) then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
|
||||
178
Moose Development/Moose/Core/SpawnStatic.lua
Normal file
178
Moose Development/Moose/Core/SpawnStatic.lua
Normal file
@ -0,0 +1,178 @@
|
||||
--- **Functional** -- Spawn dynamically new @{Static}s in your missions.
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # Demo Missions
|
||||
--
|
||||
-- ### [SPAWNSTATIC Demo Missions source code]()
|
||||
--
|
||||
-- ### [SPAWNSTATIC Demo Missions, only for beta testers]()
|
||||
--
|
||||
-- ### [ALL Demo Missions pack of the last release](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases)
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # YouTube Channel
|
||||
--
|
||||
-- ### [SPAWNSTATIC YouTube Channel]()
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # **API CHANGE HISTORY**
|
||||
--
|
||||
-- The underlying change log documents the API changes. Please read this carefully. The following notation is used:
|
||||
--
|
||||
-- * **Added** parts are expressed in bold type face.
|
||||
-- * _Removed_ parts are expressed in italic type face.
|
||||
--
|
||||
-- Hereby the change log:
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- # **AUTHORS and CONTRIBUTIONS**
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- ### Authors:
|
||||
--
|
||||
-- * **FlightControl**: Design & Programming
|
||||
--
|
||||
-- @module SpawnStatic
|
||||
|
||||
|
||||
|
||||
--- @type SPAWNSTATIC
|
||||
-- @extends Core.Base#BASE
|
||||
|
||||
|
||||
--- # SPAWNSTATIC class, extends @{Base#BASE}
|
||||
--
|
||||
-- The SPAWNSTATIC class allows to spawn dynamically new @{Static}s.
|
||||
--
|
||||
-- There are two modes how SPAWNSTATIC can spawn:
|
||||
--
|
||||
-- * Through creating a copy of an existing Template @{Static} as defined in the Mission Editor (ME).
|
||||
-- * Through the provision of the type name of the Static.
|
||||
--
|
||||
-- Spawned @{Static}s get **the same name** as the name of the Template Static,
|
||||
-- or gets the given name when a Static Type is used.
|
||||
-- Newly spawned @{Static}s will get the following naming structure at run-time:
|
||||
--
|
||||
-- * Spawned @{Static}s will have the name _StaticName_#_nnn_, where _StaticName_ is the name of the **Template Static**,
|
||||
-- and _nnn_ is a **counter from 0 to 99999**.
|
||||
--
|
||||
--
|
||||
-- ## SPAWNSTATIC construction methods
|
||||
--
|
||||
-- Create a new SPAWNSTATIC object with the @{#SPAWNSTATIC.NewFromStatic}() or the @{#SPAWNSTATIC.NewFromType}() methods:
|
||||
--
|
||||
-- * @{#SPAWNSTATIC.NewFromStatic}(): Creates a new SPAWNSTATIC object given a name that is used as the base of the naming of each spawned Static.
|
||||
-- * @{#SPAWNSTATIC.NewFromType}(): Creates a new SPAWNSTATIC object given a type name and a name to be given when spawned.
|
||||
--
|
||||
-- ## SPAWNSTATIC **Spawn** methods
|
||||
--
|
||||
-- Groups can be spawned at different times and methods:
|
||||
--
|
||||
-- * @{#SPAWNSTATIC.SpawnInZone}(): Spawn a new group in a @{Zone}.
|
||||
-- * @{#SPAWNSTATIC.SpawnFromVec3}(): Spawn a new group from a Vec3 coordinate. (The group will can be spawned at a point in the air).
|
||||
-- * @{#SPAWNSTATIC.SpawnFromVec2}(): Spawn a new group from a Vec2 coordinate. (The group will be spawned at land height ).
|
||||
-- * @{#SPAWNSTATIC.SpawnFromStatic}(): Spawn a new group from a structure, taking the position of a @{Static}.
|
||||
-- * @{#SPAWNSTATIC.SpawnFromUnit}(): Spawn a new group taking the position of a @{Unit}.
|
||||
--
|
||||
-- @field #SPAWNSTATIC SPAWNSTATIC
|
||||
--
|
||||
SPAWNSTATIC = {
|
||||
ClassName = "SPAWNSTATIC",
|
||||
}
|
||||
|
||||
|
||||
--- @type SPAWNSTATIC.SpawnZoneTable
|
||||
-- @list <Core.Zone#ZONE_BASE> SpawnZone
|
||||
|
||||
|
||||
--- Creates the main object to spawn a @{Static} defined in the ME.
|
||||
-- @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.
|
||||
-- @return #SPAWNSTATIC
|
||||
function SPAWNSTATIC:NewFromStatic( SpawnTemplatePrefix, CountryID )
|
||||
local self = BASE:Inherit( self, BASE:New() ) -- #SPAWNSTATIC
|
||||
self:F( { SpawnTemplatePrefix } )
|
||||
|
||||
local TemplateStatic = StaticObject.getByName( SpawnTemplatePrefix )
|
||||
if TemplateStatic then
|
||||
self.SpawnTemplatePrefix = SpawnTemplatePrefix
|
||||
self.CountryID = CountryID
|
||||
self.SpawnIndex = 0
|
||||
else
|
||||
error( "SPAWNSTATIC:New: There is no group declared in the mission editor with SpawnTemplatePrefix = '" .. SpawnTemplatePrefix .. "'" )
|
||||
end
|
||||
|
||||
self:SetEventPriority( 5 )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Creates the main object to spawn a @{Static} based on a type name.
|
||||
-- @param #SPAWNSTATIC self
|
||||
-- @param #string SpawnTypeName is the name of the type.
|
||||
-- @return #SPAWNSTATIC
|
||||
function SPAWNSTATIC:NewFromType( SpawnTypeName, SpawnShapeName, SpawnCategory, CountryID )
|
||||
local self = BASE:Inherit( self, BASE:New() ) -- #SPAWNSTATIC
|
||||
self:F( { SpawnTypeName } )
|
||||
|
||||
self.SpawnTypeName = SpawnTypeName
|
||||
self.CountryID = CountryID
|
||||
self.SpawnIndex = 0
|
||||
|
||||
self:SetEventPriority( 5 )
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- Creates a new @{Static} from a POINT_VEC2.
|
||||
-- @param #SPAWNSTATIC self
|
||||
-- @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 #string (optional) The name of the new static.
|
||||
-- @return #SPAWNSTATIC
|
||||
function SPAWNSTATIC:SpawnFromPointVec2( PointVec2, Heading, NewName )
|
||||
self:F( { PointVec2, Heading, NewName } )
|
||||
|
||||
local CountryName = _DATABASE.COUNTRY_NAME[self.CountryID]
|
||||
|
||||
local StaticTemplate = _DATABASE:GetStaticUnitTemplate( self.SpawnTemplatePrefix )
|
||||
|
||||
StaticTemplate.x = PointVec2:GetLat()
|
||||
StaticTemplate.y = PointVec2:GetLon()
|
||||
|
||||
StaticTemplate.name = NewName or string.format("%s#%05d", self.SpawnTemplatePrefix, self.SpawnIndex )
|
||||
StaticTemplate.heading = ( Heading / 180 ) * math.pi
|
||||
|
||||
StaticTemplate.CountryID = nil
|
||||
StaticTemplate.CoalitionID = nil
|
||||
StaticTemplate.CategoryID = nil
|
||||
|
||||
local Static = coalition.addStaticObject( self.CountryID, StaticTemplate )
|
||||
|
||||
self.SpawnIndex = self.SpawnIndex + 1
|
||||
|
||||
return Static
|
||||
end
|
||||
|
||||
--- Creates a new @{Static} from a @{Zone}.
|
||||
-- @param #SPAWNSTATIC self
|
||||
-- @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 #string (optional) The name of the new static.
|
||||
-- @return #SPAWNSTATIC
|
||||
function SPAWNSTATIC:SpawnFromZone( Zone, Heading, NewName )
|
||||
self:F( { Zone, Heading, NewName } )
|
||||
|
||||
local Static = self:SpawnFromPointVec2( Zone:GetPointVec2(), Heading, NewName )
|
||||
|
||||
return Static
|
||||
end
|
||||
|
||||
@ -615,7 +615,7 @@ end
|
||||
|
||||
|
||||
|
||||
-- @type ZONE
|
||||
--- @type ZONE
|
||||
-- @extends Core.Zone#ZONE_RADIUS
|
||||
|
||||
|
||||
|
||||
@ -7,8 +7,25 @@
|
||||
-- DETECTION classes facilitate the detection of enemy units within the battle zone executed by FACs (Forward Air Controllers) or RECCEs (Reconnassance Units).
|
||||
-- DETECTION uses the in-built detection capabilities of DCS World, but adds new functionalities.
|
||||
--
|
||||
-- Please watch this [youtube video](https://youtu.be/C7p81dUwP-E) that explains the detection concepts.
|
||||
-- Find the DETECTION classes documentation further in this document in the globals section.
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # Demo Missions
|
||||
--
|
||||
-- ### [DETECTION Demo Missions and Source Code](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/DET%20-%20Detection)
|
||||
--
|
||||
-- ### [DETECTION Demo Missions, only for Beta Testers](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/DET%20-%20Detection)
|
||||
--
|
||||
-- ### [ALL Demo Missions pack of the Latest Release](https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases)
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # YouTube Channel
|
||||
--
|
||||
-- ### [DETECTION YouTube Channel](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl3Cf5jpI6BS0sBOVWK__tji)
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- ### Contributions:
|
||||
--
|
||||
@ -23,16 +40,24 @@
|
||||
|
||||
do -- DETECTION_BASE
|
||||
|
||||
--- # 1) DETECTION_BASE class, extends @{Fsm#FSM}
|
||||
--- @type DETECTION_BASE
|
||||
-- @field Core.Set#SET_GROUP DetectionSetGroup The @{Set} of GROUPs in the Forward Air Controller role.
|
||||
-- @field Dcs.DCSTypes#Distance DetectionRange The range till which targets are accepted to be detected.
|
||||
-- @field #DETECTION_BASE.DetectedObjects DetectedObjects The list of detected objects.
|
||||
-- @field #table DetectedObjectsIdentified Map of the DetectedObjects identified.
|
||||
-- @field #number DetectionRun
|
||||
-- @extends Core.Fsm#FSM
|
||||
|
||||
--- DETECTION_BASE class, extends @{Fsm#FSM}
|
||||
--
|
||||
-- The DETECTION_BASE class defines the core functions to administer detected objects.
|
||||
-- The DETECTION_BASE class will detect objects within the battle zone for a list of @{Group}s detecting targets following (a) detection method(s).
|
||||
--
|
||||
-- ## 1.1) DETECTION_BASE constructor
|
||||
-- ## DETECTION_BASE constructor
|
||||
--
|
||||
-- Construct a new DETECTION_BASE instance using the @{#DETECTION_BASE.New}() method.
|
||||
--
|
||||
-- ## 1.2) DETECTION_BASE initialization
|
||||
-- ## Initialization
|
||||
--
|
||||
-- By default, detection will return detected objects with all the detection sensors available.
|
||||
-- However, you can ask how the objects were found with specific detection methods.
|
||||
@ -48,7 +73,29 @@ do -- DETECTION_BASE
|
||||
-- * @{#DETECTION_BASE.InitDetectRWR}(): Detected using RWR.
|
||||
-- * @{#DETECTION_BASE.InitDetectDLINK}(): Detected using DLINK.
|
||||
--
|
||||
-- ## 1.3) DETECTION_BASE derived classes group the detected units into a DetectedItems[] list
|
||||
-- ## **Filter** detected units based on **category of the unit**
|
||||
--
|
||||
-- Filter the detected units based on Unit.Category using the method @{#DETECTION_BASE.FilterCategories}().
|
||||
-- The different values of Unit.Category can be:
|
||||
--
|
||||
-- * Unit.Category.AIRPLANE
|
||||
-- * Unit.Category.GROUND_UNIT
|
||||
-- * Unit.Category.HELICOPTER
|
||||
-- * Unit.Category.SHIP
|
||||
-- * Unit.Category.STRUCTURE
|
||||
--
|
||||
-- Multiple Unit.Category entries can be given as a table and then these will be evaluated as an OR expression.
|
||||
--
|
||||
-- Example to filter a single category (Unit.Category.AIRPLANE).
|
||||
--
|
||||
-- DetectionObject:FilterCategories( Unit.Category.AIRPLANE )
|
||||
--
|
||||
-- Example to filter multiple categories (Unit.Category.AIRPLANE, Unit.Category.HELICOPTER). Note the {}.
|
||||
--
|
||||
-- DetectionObject:FilterCategories( { Unit.Category.AIRPLANE, Unit.Category.HELICOPTER } )
|
||||
--
|
||||
--
|
||||
-- ## **DETECTION_ derived classes** group the detected units into a **DetectedItems[]** list
|
||||
--
|
||||
-- DETECTION_BASE derived classes build a list called DetectedItems[], which is essentially a first later
|
||||
-- of grouping of detected units. Each DetectedItem within the DetectedItems[] list contains
|
||||
@ -67,7 +114,7 @@ do -- DETECTION_BASE
|
||||
-- * A DetectedSet from the DetectedItems[] list can be retrieved using the method @{Detection#DETECTION_BASE.GetDetectedSet}( DetectedItemIndex ).
|
||||
-- This method retrieves the Set from a DetectedItem element from the DetectedItem list (DetectedItems[ DetectedItemIndex ].Set ).
|
||||
--
|
||||
-- ## 1.4) Apply additional Filters to fine-tune the detected objects
|
||||
-- ## **Visual filters** to fine-tune the probability of the detected objects
|
||||
--
|
||||
-- By default, DCS World will return any object that is in LOS and within "visual reach", or detectable through one of the electronic detection means.
|
||||
-- That being said, the DCS World detection algorithm can sometimes be unrealistic.
|
||||
@ -88,7 +135,8 @@ do -- DETECTION_BASE
|
||||
-- I advise however, that, when you first use the DETECTION derived classes, that you don't use these filters.
|
||||
-- Only when you experience unrealistic behaviour in your missions, these filters could be applied.
|
||||
--
|
||||
-- ### 1.4.1 ) Distance visual detection probability
|
||||
--
|
||||
-- ### Distance visual detection probability
|
||||
--
|
||||
-- Upon a **visual** detection, the further away a detected object is, the less likely it is to be detected properly.
|
||||
-- Also, the speed of accurate detection plays a role.
|
||||
@ -102,7 +150,7 @@ do -- DETECTION_BASE
|
||||
--
|
||||
-- Use the method @{Detection#DETECTION_BASE.SetDistanceProbability}() to set the probability factor upon a 10 km distance.
|
||||
--
|
||||
-- ### 1.4.2 ) Alpha Angle visual detection probability
|
||||
-- ### Alpha Angle visual detection probability
|
||||
--
|
||||
-- Upon a **visual** detection, the higher the unit is during the detecting process, the more likely the detected unit is to be detected properly.
|
||||
-- A detection at a 90% alpha angle is the most optimal, a detection at 10% is less and a detection at 0% is less likely to be correct.
|
||||
@ -114,7 +162,7 @@ do -- DETECTION_BASE
|
||||
--
|
||||
-- Use the method @{Detection#DETECTION_BASE.SetAlphaAngleProbability}() to set the probability factor if 0°.
|
||||
--
|
||||
-- ### 1.4.3 ) Cloudy Zones detection probability
|
||||
-- ### Cloudy Zones detection probability
|
||||
--
|
||||
-- Upon a **visual** detection, the more a detected unit is within a cloudy zone, the less likely the detected unit is to be detected successfully.
|
||||
-- The Cloudy Zones work with the ZONE_BASE derived classes. The mission designer can define within the mission
|
||||
@ -129,12 +177,12 @@ do -- DETECTION_BASE
|
||||
-- Typically, this kind of filter would be applied for very specific areas were a detection needs to be very realisting for
|
||||
-- AI not to detect so easily targets within a forrest or village rich area.
|
||||
--
|
||||
-- ## 1.5 ) Accept / Reject detected units
|
||||
-- ## Accept / Reject detected units
|
||||
--
|
||||
-- DETECTION_BASE can accept or reject successful detections based on the location of the detected object,
|
||||
-- if it is located in range or located inside or outside of specific zones.
|
||||
--
|
||||
-- ### 1.5.1 ) Detection acceptance of within range limit
|
||||
-- ### Detection acceptance of within range limit
|
||||
--
|
||||
-- A range can be set that will limit a successful detection for a unit.
|
||||
-- Use the method @{Detection#DETECTION_BASE.SetAcceptRange}() to apply a range in meters till where detected units will be accepted.
|
||||
@ -151,7 +199,7 @@ do -- DETECTION_BASE
|
||||
-- Detection:Start()
|
||||
--
|
||||
--
|
||||
-- ### 1.5.2 ) Detection acceptance if within zone(s).
|
||||
-- ### Detection acceptance if within zone(s).
|
||||
--
|
||||
-- Specific ZONE_BASE object(s) can be given as a parameter, which will only accept a detection if the unit is within the specified ZONE_BASE object(s).
|
||||
-- Use the method @{Detection#DETECTION_BASE.SetAcceptZones}() will accept detected units if they are within the specified zones.
|
||||
@ -171,7 +219,7 @@ do -- DETECTION_BASE
|
||||
-- -- Start the Detection.
|
||||
-- Detection:Start()
|
||||
--
|
||||
-- ### 1.5.3 ) Detection rejectance if within zone(s).
|
||||
-- ### Detection rejectance if within zone(s).
|
||||
--
|
||||
-- Specific ZONE_BASE object(s) can be given as a parameter, which will reject detection if the unit is within the specified ZONE_BASE object(s).
|
||||
-- Use the method @{Detection#DETECTION_BASE.SetRejectZones}() will reject detected units if they are within the specified zones.
|
||||
@ -192,29 +240,24 @@ do -- DETECTION_BASE
|
||||
-- -- Start the Detection.
|
||||
-- Detection:Start()
|
||||
--
|
||||
-- ## 1.6) DETECTION_BASE is a Finite State Machine
|
||||
-- ## DETECTION_BASE is a Finite State Machine
|
||||
--
|
||||
-- Various Events and State Transitions can be tailored using DETECTION_BASE.
|
||||
--
|
||||
-- ### 1.6.1) DETECTION_BASE States
|
||||
-- ### DETECTION_BASE States
|
||||
--
|
||||
-- * **Detecting**: The detection is running.
|
||||
-- * **Stopped**: The detection is stopped.
|
||||
--
|
||||
-- ### 1.6.2) DETECTION_BASE Events
|
||||
-- ### DETECTION_BASE Events
|
||||
--
|
||||
-- * **Start**: Start the detection process.
|
||||
-- * **Detect**: Detect new units.
|
||||
-- * **Detected**: New units have been detected.
|
||||
-- * **Stop**: Stop the detection process.
|
||||
--
|
||||
-- @field #DETECTION_BASE DETECTION_BASE
|
||||
--
|
||||
-- @type DETECTION_BASE
|
||||
-- @field Core.Set#SET_GROUP DetectionSetGroup The @{Set} of GROUPs in the Forward Air Controller role.
|
||||
-- @field Dcs.DCSTypes#Distance DetectionRange The range till which targets are accepted to be detected.
|
||||
-- @field #DETECTION_BASE.DetectedObjects DetectedObjects The list of detected objects.
|
||||
-- @field #table DetectedObjectsIdentified Map of the DetectedObjects identified.
|
||||
-- @field #number DetectionRun
|
||||
-- @extends Core.Fsm#FSM
|
||||
DETECTION_BASE = {
|
||||
ClassName = "DETECTION_BASE",
|
||||
DetectionSetGroup = nil,
|
||||
@ -267,11 +310,19 @@ do -- DETECTION_BASE
|
||||
self.DetectionInterval = 30
|
||||
|
||||
self:InitDetectVisual( true )
|
||||
self:InitDetectOptical( false )
|
||||
self:InitDetectRadar( false )
|
||||
self:InitDetectRWR( false )
|
||||
self:InitDetectIRST( false )
|
||||
self:InitDetectDLINK( false )
|
||||
self:InitDetectOptical( true )
|
||||
self:InitDetectRadar( true )
|
||||
self:InitDetectRWR( true )
|
||||
self:InitDetectIRST( true )
|
||||
self:InitDetectDLINK( true )
|
||||
|
||||
self:FilterCategories( {
|
||||
Unit.Category.AIRPLANE,
|
||||
Unit.Category.GROUND_UNIT,
|
||||
Unit.Category.HELICOPTER,
|
||||
Unit.Category.SHIP,
|
||||
Unit.Category.STRUCTURE
|
||||
} )
|
||||
|
||||
-- Create FSM transitions.
|
||||
|
||||
@ -498,9 +549,8 @@ do -- DETECTION_BASE
|
||||
|
||||
for DetectionObjectID, Detection in pairs( DetectedTargets ) do
|
||||
local DetectedObject = Detection.object -- Dcs.DCSWrapper.Object#Object
|
||||
self:T2( DetectedObject )
|
||||
|
||||
if DetectedObject and DetectedObject:isExist() and DetectedObject.id_ < 50000000 then
|
||||
if DetectedObject and DetectedObject:isExist() and DetectedObject.id_ < 50000000 then -- and ( DetectedObject:getCategory() == Object.Category.UNIT or DetectedObject:getCategory() == Object.Category.STATIC ) then
|
||||
|
||||
local DetectionAccepted = true
|
||||
|
||||
@ -515,10 +565,14 @@ do -- DETECTION_BASE
|
||||
( DetectedObjectVec3.y - DetectionGroupVec3.y )^2 +
|
||||
( DetectedObjectVec3.z - DetectionGroupVec3.z )^2
|
||||
) ^ 0.5 / 1000
|
||||
|
||||
local DetectedUnitCategory = DetectedObject:getDesc().category
|
||||
|
||||
self:T( { "Detected Target", DetectionGroupName, DetectedObjectName, Distance } )
|
||||
|
||||
self:T( { "Detected Target:", DetectionGroupName, DetectedObjectName, Distance, DetectedUnitCategory, DetectedCategory } )
|
||||
|
||||
-- Calculate Acceptance
|
||||
|
||||
DetectionAccepted = self._.FilterCategories[DetectedUnitCategory] ~= nil and DetectionAccepted or false
|
||||
|
||||
if self.AcceptRange and Distance > self.AcceptRange then
|
||||
DetectionAccepted = false
|
||||
@ -625,10 +679,10 @@ do -- DETECTION_BASE
|
||||
end
|
||||
|
||||
if self.DetectionCount > 0 and self.DetectionRun == self.DetectionCount then
|
||||
self:__Detect( self.DetectionInterval )
|
||||
|
||||
self:T( "--> Create Detection Sets" )
|
||||
self:CreateDetectionSets()
|
||||
|
||||
self:__Detect( self.DetectionInterval )
|
||||
end
|
||||
|
||||
end
|
||||
@ -645,6 +699,8 @@ do -- DETECTION_BASE
|
||||
function DETECTION_BASE:InitDetectVisual( DetectVisual )
|
||||
|
||||
self.DetectVisual = DetectVisual
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Detect Optical.
|
||||
@ -655,6 +711,8 @@ do -- DETECTION_BASE
|
||||
self:F2()
|
||||
|
||||
self.DetectOptical = DetectOptical
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Detect Radar.
|
||||
@ -665,6 +723,8 @@ do -- DETECTION_BASE
|
||||
self:F2()
|
||||
|
||||
self.DetectRadar = DetectRadar
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Detect IRST.
|
||||
@ -675,6 +735,8 @@ do -- DETECTION_BASE
|
||||
self:F2()
|
||||
|
||||
self.DetectIRST = DetectIRST
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Detect RWR.
|
||||
@ -685,6 +747,8 @@ do -- DETECTION_BASE
|
||||
self:F2()
|
||||
|
||||
self.DetectRWR = DetectRWR
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Detect DLINK.
|
||||
@ -695,9 +759,52 @@ do -- DETECTION_BASE
|
||||
self:F2()
|
||||
|
||||
self.DetectDLINK = DetectDLINK
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
do -- Filter methods
|
||||
|
||||
--- Filter the detected units based on Unit.Category
|
||||
-- The different values of Unit.Category can be:
|
||||
--
|
||||
-- * Unit.Category.AIRPLANE
|
||||
-- * Unit.Category.GROUND_UNIT
|
||||
-- * Unit.Category.HELICOPTER
|
||||
-- * Unit.Category.SHIP
|
||||
-- * Unit.Category.STRUCTURE
|
||||
--
|
||||
-- Multiple Unit.Category entries can be given as a table and then these will be evaluated as an OR expression.
|
||||
--
|
||||
-- Example to filter a single category (Unit.Category.AIRPLANE).
|
||||
--
|
||||
-- DetectionObject:FilterCategories( Unit.Category.AIRPLANE )
|
||||
--
|
||||
-- Example to filter multiple categories (Unit.Category.AIRPLANE, Unit.Category.HELICOPTER). Note the {}.
|
||||
--
|
||||
-- DetectionObject:FilterCategories( { Unit.Category.AIRPLANE, Unit.Category.HELICOPTER } )
|
||||
--
|
||||
-- @param #DETECTION_BASE self
|
||||
-- @param #list<Dcs.DCSUnit#Unit> FilterCategories The Categories entries
|
||||
-- @return #DETECTION_BASE self
|
||||
function DETECTION_BASE:FilterCategories( FilterCategories )
|
||||
self:F2()
|
||||
|
||||
self._.FilterCategories = {}
|
||||
if type( FilterCategories ) == "table" then
|
||||
for CategoryID, Category in pairs( FilterCategories ) do
|
||||
self._.FilterCategories[Category] = Category
|
||||
end
|
||||
else
|
||||
self._.FilterCategories[FilterCategories] = FilterCategories
|
||||
end
|
||||
return self
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
do
|
||||
|
||||
|
||||
@ -4,6 +4,10 @@
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- The documentation of the SPAWN class can be found further in this document.
|
||||
--
|
||||
-- ====
|
||||
--
|
||||
-- # Demo Missions
|
||||
--
|
||||
-- ### [SPAWN Demo Missions source code](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/SPA%20-%20Spawning)
|
||||
@ -174,30 +178,62 @@
|
||||
--
|
||||
-- A spawn object will behave differently based on the usage of **initialization** methods, which all start with the **Init** prefix:
|
||||
--
|
||||
-- ### Unit Names
|
||||
--
|
||||
-- * @{#SPAWN.InitKeepUnitNames}(): Keeps the unit names as defined within the mission editor, but note that anything after a # mark is ignored, and any spaces before and after the resulting name are removed. IMPORTANT! This method MUST be the first used after :New !!!
|
||||
-- * @{#SPAWN.InitLimit}(): Limits the amount of groups that can be alive at the same time and that can be dynamically spawned.
|
||||
--
|
||||
-- ### Route randomization
|
||||
--
|
||||
-- * @{#SPAWN.InitRandomizeRoute}(): Randomize the routes of spawned groups, and for air groups also optionally the height.
|
||||
--
|
||||
-- ### Group composition randomization
|
||||
--
|
||||
-- * @{#SPAWN.InitRandomizeTemplate}(): Randomize the group templates so that when a new group is spawned, a random group template is selected from one of the templates defined.
|
||||
--
|
||||
-- ### Uncontrolled
|
||||
--
|
||||
-- * @{#SPAWN.InitUnControlled}(): Spawn plane groups uncontrolled.
|
||||
--
|
||||
-- ### Array formation
|
||||
--
|
||||
-- * @{#SPAWN.InitArray}(): Make groups visible before they are actually activated, and order these groups like a batallion in an array.
|
||||
-- * @{#SPAWN.InitRepeat}(): Re-spawn groups when they land at the home base. Similar methods are @{#SPAWN.InitRepeatOnLanding} and @{#SPAWN.InitRepeatOnEngineShutDown}.
|
||||
--
|
||||
-- ### Position randomization
|
||||
--
|
||||
-- * @{#SPAWN.InitRandomizePosition}(): Randomizes the position of @{Group}s that are spawned within a **radius band**, given an Outer and Inner radius, from the point that the spawn happens.
|
||||
-- * @{#SPAWN.InitRandomizeUnits}(): Randomizes the @{Unit}s in the @{Group} that is spawned within a **radius band**, given an Outer and Inner radius.
|
||||
-- * @{#SPAWN.InitRandomizeZones}(): Randomizes the spawning between a predefined list of @{Zone}s that are declared using this function. Each zone can be given a probability factor.
|
||||
--
|
||||
-- ### Enable / Disable AI when spawning a new @{Group}
|
||||
--
|
||||
-- * @{#SPAWN.InitAIOn}(): Turns the AI On when spawning the new @{Group} object.
|
||||
-- * @{#SPAWN.InitAIOff}(): Turns the AI Off when spawning the new @{Group} object.
|
||||
-- * @{#SPAWN.InitAIOnOff}(): Turns the AI On or Off when spawning the new @{Group} object.
|
||||
-- * @{#SPAWN.InitDelayOnOff}(): Turns the inital delay On/Off when spawning the first @{Group} object.
|
||||
-- * @{#SPAWN.InitDelayOn}(): Turns the inital delay On when spawning the first @{Group} object.
|
||||
-- * @{#SPAWN.InitDelayOff}(): Turns the inital delay On when spawning the first @{Group} object.
|
||||
--
|
||||
-- ### Limit scheduled spawning
|
||||
--
|
||||
-- * @{#SPAWN.InitLimit}(): Limits the amount of groups that can be alive at the same time and that can be dynamically spawned.
|
||||
--
|
||||
-- ### Delay initial scheduled spawn
|
||||
--
|
||||
-- * @{#SPAWN.InitDelayOnOff}(): Turns the inital delay On/Off when scheduled spawning the first @{Group} object.
|
||||
-- * @{#SPAWN.InitDelayOn}(): Turns the inital delay On when scheduled spawning the first @{Group} object.
|
||||
-- * @{#SPAWN.InitDelayOff}(): Turns the inital delay Off when scheduled spawning the first @{Group} object.
|
||||
--
|
||||
-- ### Repeat spawned @{Group}s upon landing
|
||||
--
|
||||
-- * @{#SPAWN.InitRepeat}() or @{#SPAWN.InitRepeatOnLanding}(): This method is used to re-spawn automatically the same group after it has landed.
|
||||
-- * @{#SPAWN.InitRepeatOnEngineShutDown}(): This method is used to re-spawn automatically the same group after it has landed and it shuts down the engines at the ramp.
|
||||
--
|
||||
--
|
||||
-- ## SPAWN **Spawn** methods
|
||||
--
|
||||
-- Groups can be spawned at different times and methods:
|
||||
--
|
||||
-- ### **Single** spawning methods
|
||||
--
|
||||
-- * @{#SPAWN.Spawn}(): Spawn one new group based on the last spawned index.
|
||||
-- * @{#SPAWN.ReSpawn}(): Re-spawn a group based on a given index.
|
||||
-- * @{#SPAWN.SpawnScheduled}(): Spawn groups at scheduled but randomized intervals. You can use @{#SPAWN.SpawnScheduleStart}() and @{#SPAWN.SpawnScheduleStop}() to start and stop the schedule respectively.
|
||||
-- * @{#SPAWN.SpawnFromVec3}(): Spawn a new group from a Vec3 coordinate. (The group will can be spawned at a point in the air).
|
||||
-- * @{#SPAWN.SpawnFromVec2}(): Spawn a new group from a Vec2 coordinate. (The group will be spawned at land height ).
|
||||
-- * @{#SPAWN.SpawnFromStatic}(): Spawn a new group from a structure, taking the position of a @{Static}.
|
||||
@ -206,6 +242,14 @@
|
||||
--
|
||||
-- Note that @{#SPAWN.Spawn} and @{#SPAWN.ReSpawn} return a @{GROUP#GROUP.New} object, that contains a reference to the DCSGroup object.
|
||||
-- You can use the @{GROUP} object to do further actions with the DCSGroup.
|
||||
--
|
||||
-- ### **Scheduled** spawning methods
|
||||
--
|
||||
-- * @{#SPAWN.SpawnScheduled}(): Spawn groups at scheduled but randomized intervals.
|
||||
-- * @{#SPAWN.SpawnScheduledStart}(): Start or continue to spawn groups at scheduled time intervals.
|
||||
-- * @{#SPAWN.SpawnScheduledStop}(): Stop the spawning of groups at scheduled time intervals.
|
||||
--
|
||||
--
|
||||
--
|
||||
-- ## Retrieve alive GROUPs spawned by the SPAWN object
|
||||
--
|
||||
@ -242,6 +286,15 @@
|
||||
-- As a result, your spawn event handling function requires one parameter to be declared, which will contain the spawned @{Group} object.
|
||||
-- A coding example is provided at the description of the @{#SPAWN.OnSpawnGroup}( **function( SpawnedGroup ) end ** ) method.
|
||||
--
|
||||
-- ## Delay the initial spawning
|
||||
--
|
||||
-- When using the @{#SPAWN.SpawnScheduled)() method, the default behaviour of this method will be that it will spawn the initial (first) @{Group}
|
||||
-- immediately when :SpawnScheduled() is initiated. The methods @{#SPAWN.InitDelayOnOff}() and @{#SPAWN.InitDelayOn}() can be used to
|
||||
-- activate a delay before the first @{Group} is spawned. For completeness, a method @{#SPAWN.InitDelayOff}() is also available, that
|
||||
-- can be used to switch off the initial delay. Because there is no delay by default, this method would only be used when a
|
||||
-- @{#SPAWN.SpawnScheduledStop}() ; @{#SPAWN.SpawnScheduledStart}() sequence would have been used.
|
||||
--
|
||||
--
|
||||
-- @field #SPAWN SPAWN
|
||||
--
|
||||
SPAWN = {
|
||||
@ -285,7 +338,7 @@ function SPAWN:New( SpawnTemplatePrefix )
|
||||
self.AIOnOff = true -- The AI is on by default when spawning a group.
|
||||
self.SpawnUnControlled = false
|
||||
self.SpawnInitKeepUnitNames = false -- Overwrite unit names by default with group name.
|
||||
self.DelayOnOff = true -- An intial delay when spawning the first group.
|
||||
self.DelayOnOff = false -- No intial delay when spawning the first group.
|
||||
|
||||
self.SpawnGroups = {} -- Array containing the descriptions of each Group to be Spawned.
|
||||
else
|
||||
@ -329,7 +382,7 @@ function SPAWN:NewWithAlias( SpawnTemplatePrefix, SpawnAliasPrefix )
|
||||
self.AIOnOff = true -- The AI is on by default when spawning a group.
|
||||
self.SpawnUnControlled = false
|
||||
self.SpawnInitKeepUnitNames = false -- Overwrite unit names by default with group name.
|
||||
self.DelayOnOff = true -- An intial delay when spawning the first group.
|
||||
self.DelayOnOff = false -- No intial delay when spawning the first group.
|
||||
|
||||
self.SpawnGroups = {} -- Array containing the descriptions of each Group to be Spawned.
|
||||
else
|
||||
@ -1022,7 +1075,7 @@ end
|
||||
function SPAWN:SpawnFromUnit( HostUnit, SpawnIndex )
|
||||
self:F( { self.SpawnTemplatePrefix, HostUnit, SpawnIndex } )
|
||||
|
||||
if HostUnit and HostUnit:IsAlive() then -- and HostUnit:getUnit(1):inAir() == false then
|
||||
if HostUnit and HostUnit:IsAlive() ~= nil then -- and HostUnit:getUnit(1):inAir() == false then
|
||||
return self:SpawnFromVec3( HostUnit:GetVec3(), SpawnIndex )
|
||||
end
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@ Core/Point.lua
|
||||
Core/Message.lua
|
||||
Core/Fsm.lua
|
||||
Core/Radio.lua
|
||||
Core/SpawnStatic.lua
|
||||
|
||||
Wrapper/Object.lua
|
||||
Wrapper/Identifiable.lua
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
@ -350,6 +351,12 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GetGroupTemplateFromUnitName">DATABASE:GetGroupTemplateFromUnitName(UnitName)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).GetStaticUnitTemplate">DATABASE:GetStaticUnitTemplate(StaticName)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -362,6 +369,12 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).NavPoints">DATABASE.NavPoints</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE).Navpoints">DATABASE.Navpoints</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -446,6 +459,12 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._RegisterClients">DATABASE:_RegisterClients()</a></td>
|
||||
<td class="summary">
|
||||
<p>Private method that registers all Units of skill Client or Player within in the mission.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._RegisterGroupTemplate">DATABASE:_RegisterGroupTemplate(GroupTemplate, CoalitionID, CategoryID, CountryID)</a></td>
|
||||
<td class="summary">
|
||||
<p>Private method that registers new Group Templates within the DATABASE Object.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -461,15 +480,15 @@ The following iterator methods are currently available within the DATABASE:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._RegisterStatics">DATABASE:_RegisterStatics()</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._RegisterStaticTemplate">DATABASE:_RegisterStaticTemplate(GroupTemplate, StaticTemplate, CoalitionID, CategoryID, CountryID)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
<p>Private method that registers new Static Templates within the DATABASE Object.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._RegisterTemplate">DATABASE:_RegisterTemplate(GroupTemplate, CoalitionID, CategoryID, CountryID)</a></td>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DATABASE)._RegisterStatics">DATABASE:_RegisterStatics()</a></td>
|
||||
<td class="summary">
|
||||
<p>Private method that registers new Group Templates within the DATABASE Object.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -1309,6 +1328,27 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).GetStaticUnitTemplate" >
|
||||
<strong>DATABASE:GetStaticUnitTemplate(StaticName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
<h3>Parameter</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em> StaticName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE).GetStatusGroup" >
|
||||
<strong>DATABASE:GetStatusGroup(GroupName)</strong>
|
||||
</a>
|
||||
@ -1339,6 +1379,20 @@ self</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(DATABASE).Navpoints" >
|
||||
<strong>DATABASE.Navpoints</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -1608,57 +1662,8 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE)._RegisterGroupsAndUnits" >
|
||||
<strong>DATABASE:_RegisterGroupsAndUnits()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Private method that registers all Groups and Units within in the mission.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE)._RegisterPlayers" >
|
||||
<strong>DATABASE:_RegisterPlayers()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Private method that registers all alive players in the mission.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE)._RegisterStatics" >
|
||||
<strong>DATABASE:_RegisterStatics()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE)._RegisterTemplate" >
|
||||
<strong>DATABASE:_RegisterTemplate(GroupTemplate, CoalitionID, CategoryID, CountryID)</strong>
|
||||
<a id="#(DATABASE)._RegisterGroupTemplate" >
|
||||
<strong>DATABASE:_RegisterGroupTemplate(GroupTemplate, CoalitionID, CategoryID, CountryID)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
@ -1693,6 +1698,101 @@ self</p>
|
||||
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE)._RegisterGroupsAndUnits" >
|
||||
<strong>DATABASE:_RegisterGroupsAndUnits()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Private method that registers all Groups and Units within in the mission.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE)._RegisterPlayers" >
|
||||
<strong>DATABASE:_RegisterPlayers()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Private method that registers all alive players in the mission.</p>
|
||||
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE)._RegisterStaticTemplate" >
|
||||
<strong>DATABASE:_RegisterStaticTemplate(GroupTemplate, StaticTemplate, CoalitionID, CategoryID, CountryID)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Private method that registers new Static Templates within the DATABASE Object.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#table GroupTemplate </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> StaticTemplate </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> CoalitionID </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> CategoryID </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> CountryID </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(DATABASE)">#DATABASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DATABASE)._RegisterStatics" >
|
||||
<strong>DATABASE:_RegisterStatics()</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
@ -102,8 +103,25 @@
|
||||
<p>DETECTION classes facilitate the detection of enemy units within the battle zone executed by FACs (Forward Air Controllers) or RECCEs (Reconnassance Units).
|
||||
DETECTION uses the in-built detection capabilities of DCS World, but adds new functionalities.</p>
|
||||
|
||||
<p>Please watch this <a href="https://youtu.be/C7p81dUwP-E">youtube video</a> that explains the detection concepts.</p>
|
||||
<p>Find the DETECTION classes documentation further in this document in the globals section.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>Demo Missions</h1>
|
||||
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/DET%20-%20Detection">DETECTION Demo Missions and Source Code</a></h3>
|
||||
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/DET%20-%20Detection">DETECTION Demo Missions, only for Beta Testers</a></h3>
|
||||
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases">ALL Demo Missions pack of the Latest Release</a></h3>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>YouTube Channel</h1>
|
||||
|
||||
<h3><a href="https://www.youtube.com/playlist?list=PL7ZUrU4zZUl3Cf5jpI6BS0sBOVWK__tji">DETECTION YouTube Channel</a></h3>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h3>Contributions:</h3>
|
||||
|
||||
@ -129,7 +147,9 @@ DETECTION uses the in-built detection capabilities of DCS World, but adds new fu
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#DETECTION_BASE">DETECTION_BASE</a></td>
|
||||
<td class="summary">
|
||||
<p>DETECTION_BASE class, extends <a href="Fsm.html##(FSM)">Fsm#FSM</a></p>
|
||||
|
||||
<p>The DETECTION_BASE class defines the core functions to administer detected objects.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -323,12 +343,6 @@ DETECTION uses the in-built detection capabilities of DCS World, but adds new fu
|
||||
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).AlphaAngleProbability">DETECTION_BASE.AlphaAngleProbability</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).ClassName">DETECTION_BASE.ClassName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -473,6 +487,23 @@ DETECTION uses the in-built detection capabilities of DCS World, but adds new fu
|
||||
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).DistanceProbability">DETECTION_BASE.DistanceProbability</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).FilterCategories">DETECTION_BASE:FilterCategories(<, FilterCategories)</a></td>
|
||||
<td class="summary">
|
||||
<p>Filter the detected units based on Unit.Category <br/>
|
||||
The different values of Unit.Category can be:</p>
|
||||
|
||||
<ul>
|
||||
<li>Unit.Category.AIRPLANE</li>
|
||||
<li>Unit.Category.GROUND_UNIT</li>
|
||||
<li>Unit.Category.HELICOPTER</li>
|
||||
<li>Unit.Category.SHIP</li>
|
||||
<li>Unit.Category.STRUCTURE</li>
|
||||
</ul>
|
||||
|
||||
<p>Multiple Unit.Category entries can be given as a table and then these will be evaluated as an OR expression.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -1064,7 +1095,233 @@ DETECTION uses the in-built detection capabilities of DCS World, but adds new fu
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>DETECTION_BASE class, extends <a href="Fsm.html##(FSM)">Fsm#FSM</a></p>
|
||||
|
||||
<p>The DETECTION_BASE class defines the core functions to administer detected objects.</p>
|
||||
|
||||
|
||||
<p>The DETECTION_BASE class will detect objects within the battle zone for a list of <a href="Group.html">Group</a>s detecting targets following (a) detection method(s).</p>
|
||||
|
||||
<h2>DETECTION_BASE constructor</h2>
|
||||
|
||||
<p>Construct a new DETECTION_BASE instance using the <a href="##(DETECTION_BASE).New">DETECTION_BASE.New</a>() method.</p>
|
||||
|
||||
<h2>Initialization</h2>
|
||||
|
||||
<p>By default, detection will return detected objects with all the detection sensors available.
|
||||
However, you can ask how the objects were found with specific detection methods.
|
||||
If you use one of the below methods, the detection will work with the detection method specified.
|
||||
You can specify to apply multiple detection methods.</p>
|
||||
|
||||
<p>Use the following functions to report the objects it detected using the methods Visual, Optical, Radar, IRST, RWR, DLINK:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(DETECTION_BASE).InitDetectVisual">DETECTION_BASE.InitDetectVisual</a>(): Detected using Visual.</li>
|
||||
<li><a href="##(DETECTION_BASE).InitDetectOptical">DETECTION_BASE.InitDetectOptical</a>(): Detected using Optical.</li>
|
||||
<li><a href="##(DETECTION_BASE).InitDetectRadar">DETECTION_BASE.InitDetectRadar</a>(): Detected using Radar.</li>
|
||||
<li><a href="##(DETECTION_BASE).InitDetectIRST">DETECTION_BASE.InitDetectIRST</a>(): Detected using IRST.</li>
|
||||
<li><a href="##(DETECTION_BASE).InitDetectRWR">DETECTION_BASE.InitDetectRWR</a>(): Detected using RWR.</li>
|
||||
<li><a href="##(DETECTION_BASE).InitDetectDLINK">DETECTION_BASE.InitDetectDLINK</a>(): Detected using DLINK.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2><strong>DETECTION_ derived classes</strong> group the detected units into a <strong>DetectedItems[]</strong> list</h2>
|
||||
|
||||
<p>DETECTION<em>BASE derived classes build a list called DetectedItems[], which is essentially a first later
|
||||
of grouping of detected units. Each DetectedItem within the DetectedItems[] list contains
|
||||
a SET</em>UNIT object that contains the detected units that belong to that group.</p>
|
||||
|
||||
<p>Derived classes will apply different methods to group the detected units.
|
||||
Examples are per area, per quadrant, per distance, per type.
|
||||
See further the derived DETECTION classes on which grouping methods are currently supported. </p>
|
||||
|
||||
<p>Various methods exist how to retrieve the grouped items from a DETECTION_BASE derived class:</p>
|
||||
|
||||
<ul>
|
||||
<li>The method <a href="Detection.html##(DETECTION_BASE).GetDetectedItems">Detection#DETECTION_BASE.GetDetectedItems</a>() retrieves the DetectedItems[] list.</li>
|
||||
<li>A DetectedItem from the DetectedItems[] list can be retrieved using the method <a href="Detection.html##(DETECTION_BASE).GetDetectedItem">Detection#DETECTION_BASE.GetDetectedItem</a>( DetectedItemIndex ).
|
||||
Note that this method returns a DetectedItem element from the list, that contains a Set variable and further information
|
||||
about the DetectedItem that is set by the DETECTION_BASE derived classes, used to group the DetectedItem.</li>
|
||||
<li>A DetectedSet from the DetectedItems[] list can be retrieved using the method <a href="Detection.html##(DETECTION_BASE).GetDetectedSet">Detection#DETECTION_BASE.GetDetectedSet</a>( DetectedItemIndex ).
|
||||
This method retrieves the Set from a DetectedItem element from the DetectedItem list (DetectedItems[ DetectedItemIndex ].Set ).</li>
|
||||
</ul>
|
||||
|
||||
<h2><strong>Filter</strong> detected units based on <strong>category of the unit</strong></h2>
|
||||
|
||||
<p>Filter the detected units based on Unit.Category using the method <a href="##(DETECTION_BASE).FilterCategories">DETECTION_BASE.FilterCategories</a>(). <br/>
|
||||
The different values of Unit.Category can be:</p>
|
||||
|
||||
<ul>
|
||||
<li>Unit.Category.AIRPLANE</li>
|
||||
<li>Unit.Category.GROUND_UNIT</li>
|
||||
<li>Unit.Category.HELICOPTER</li>
|
||||
<li>Unit.Category.SHIP</li>
|
||||
<li>Unit.Category.STRUCTURE</li>
|
||||
</ul>
|
||||
|
||||
<p>Multiple Unit.Category entries can be given as a table and then these will be evaluated as an OR expression.</p>
|
||||
|
||||
<p>Example to filter a single category (Unit.Category.AIRPLANE).</p>
|
||||
|
||||
<pre><code>DetectionObject:FilterCategories( Unit.Category.AIRPLANE )
|
||||
</code></pre>
|
||||
|
||||
<p>Example to filter multiple categories (Unit.Category.AIRPLANE, Unit.Category.HELICOPTER). Note the {}.</p>
|
||||
|
||||
<pre><code>DetectionObject:FilterCategories( { Unit.Category.AIRPLANE, Unit.Category.HELICOPTER } )
|
||||
</code></pre>
|
||||
|
||||
<h2><strong>Visual filters</strong> to fine-tune the probability of the detected objects</h2>
|
||||
|
||||
<p>By default, DCS World will return any object that is in LOS and within "visual reach", or detectable through one of the electronic detection means.
|
||||
That being said, the DCS World detection algorithm can sometimes be unrealistic.
|
||||
Especially for a visual detection, DCS World is able to report within 1 second a detailed detection of a group of 20 units (including types of the units) that are 10 kilometers away, using only visual capabilities.
|
||||
Additionally, trees and other obstacles are not accounted during the DCS World detection.</p>
|
||||
|
||||
<p>Therefore, an additional (optional) filtering has been built into the DETECTION_BASE class, that can be set for visual detected units.
|
||||
For electronic detection, this filtering is not applied, only for visually detected targets.</p>
|
||||
|
||||
<p>The following additional filtering can be applied for visual filtering:</p>
|
||||
|
||||
<ul>
|
||||
<li>A probability factor per kilometer distance.</li>
|
||||
<li>A probability factor based on the alpha angle between the detected object and the unit detecting.
|
||||
A detection from a higher altitude allows for better detection than when on the ground.</li>
|
||||
<li>Define a probability factor for "cloudy zones", which are zones where forests or villages are located. In these zones, detection will be much more difficult.
|
||||
The mission designer needs to define these cloudy zones within the mission, and needs to register these zones in the DETECTION_ objects additing a probability factor per zone.</li>
|
||||
</ul>
|
||||
|
||||
<p>I advise however, that, when you first use the DETECTION derived classes, that you don't use these filters.
|
||||
Only when you experience unrealistic behaviour in your missions, these filters could be applied.</p>
|
||||
|
||||
|
||||
<h3>Distance visual detection probability</h3>
|
||||
|
||||
<p>Upon a <strong>visual</strong> detection, the further away a detected object is, the less likely it is to be detected properly.
|
||||
Also, the speed of accurate detection plays a role.</p>
|
||||
|
||||
<p>A distance probability factor between 0 and 1 can be given, that will model a linear extrapolated probability over 10 km distance.</p>
|
||||
|
||||
<p>For example, if a probability factor of 0.6 (60%) is given, the extrapolated probabilities over 15 kilometers would like like:
|
||||
1 km: 96%, 2 km: 92%, 3 km: 88%, 4 km: 84%, 5 km: 80%, 6 km: 76%, 7 km: 72%, 8 km: 68%, 9 km: 64%, 10 km: 60%, 11 km: 56%, 12 km: 52%, 13 km: 48%, 14 km: 44%, 15 km: 40%.</p>
|
||||
|
||||
<p>Note that based on this probability factor, not only the detection but also the <strong>type</strong> of the unit will be applied!</p>
|
||||
|
||||
<p>Use the method <a href="Detection.html##(DETECTION_BASE).SetDistanceProbability">Detection#DETECTION_BASE.SetDistanceProbability</a>() to set the probability factor upon a 10 km distance.</p>
|
||||
|
||||
<h3>Alpha Angle visual detection probability</h3>
|
||||
|
||||
<p>Upon a <strong>visual</strong> detection, the higher the unit is during the detecting process, the more likely the detected unit is to be detected properly.
|
||||
A detection at a 90% alpha angle is the most optimal, a detection at 10% is less and a detection at 0% is less likely to be correct.</p>
|
||||
|
||||
<p>A probability factor between 0 and 1 can be given, that will model a progressive extrapolated probability if the target would be detected at a 0° angle.</p>
|
||||
|
||||
<p>For example, if a alpha angle probability factor of 0.7 is given, the extrapolated probabilities of the different angles would look like:
|
||||
0°: 70%, 10°: 75,21%, 20°: 80,26%, 30°: 85%, 40°: 89,28%, 50°: 92,98%, 60°: 95,98%, 70°: 98,19%, 80°: 99,54%, 90°: 100%</p>
|
||||
|
||||
<p>Use the method <a href="Detection.html##(DETECTION_BASE).SetAlphaAngleProbability">Detection#DETECTION_BASE.SetAlphaAngleProbability</a>() to set the probability factor if 0°.</p>
|
||||
|
||||
<h3>Cloudy Zones detection probability</h3>
|
||||
|
||||
<p>Upon a <strong>visual</strong> detection, the more a detected unit is within a cloudy zone, the less likely the detected unit is to be detected successfully.
|
||||
The Cloudy Zones work with the ZONE_BASE derived classes. The mission designer can define within the mission
|
||||
zones that reflect cloudy areas where detected units may not be so easily visually detected.</p>
|
||||
|
||||
<p>Use the method <a href="Detection.html##(DETECTION_BASE).SetZoneProbability">Detection#DETECTION_BASE.SetZoneProbability</a>() to set for a defined number of zones, the probability factors.</p>
|
||||
|
||||
<p>Note however, that the more zones are defined to be "cloudy" within a detection, the more performance it will take
|
||||
from the DETECTION<em>BASE to calculate the presence of the detected unit within each zone.
|
||||
Expecially for ZONE</em>POLYGON, try to limit the amount of nodes of the polygon!</p>
|
||||
|
||||
<p>Typically, this kind of filter would be applied for very specific areas were a detection needs to be very realisting for
|
||||
AI not to detect so easily targets within a forrest or village rich area.</p>
|
||||
|
||||
<h2>Accept / Reject detected units</h2>
|
||||
|
||||
<p>DETECTION_BASE can accept or reject successful detections based on the location of the detected object,
|
||||
if it is located in range or located inside or outside of specific zones.</p>
|
||||
|
||||
<h3>Detection acceptance of within range limit</h3>
|
||||
|
||||
<p>A range can be set that will limit a successful detection for a unit.
|
||||
Use the method <a href="Detection.html##(DETECTION_BASE).SetAcceptRange">Detection#DETECTION_BASE.SetAcceptRange</a>() to apply a range in meters till where detected units will be accepted.</p>
|
||||
|
||||
<pre><code> local SetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart() -- Build a SetGroup of Forward Air Controllers.
|
||||
|
||||
-- Build a detect object.
|
||||
local Detection = DETECTION_BASE:New( SetGroup )
|
||||
|
||||
-- This will accept detected units if the range is below 5000 meters.
|
||||
Detection:SetAcceptRange( 5000 )
|
||||
|
||||
-- Start the Detection.
|
||||
Detection:Start()
|
||||
</code></pre>
|
||||
|
||||
|
||||
<h3>Detection acceptance if within zone(s).</h3>
|
||||
|
||||
<p>Specific ZONE<em>BASE object(s) can be given as a parameter, which will only accept a detection if the unit is within the specified ZONE</em>BASE object(s).
|
||||
Use the method <a href="Detection.html##(DETECTION_BASE).SetAcceptZones">Detection#DETECTION_BASE.SetAcceptZones</a>() will accept detected units if they are within the specified zones.</p>
|
||||
|
||||
<pre><code> local SetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart() -- Build a SetGroup of Forward Air Controllers.
|
||||
|
||||
-- Search fo the zones where units are to be accepted.
|
||||
local ZoneAccept1 = ZONE:New( "AcceptZone1" )
|
||||
local ZoneAccept2 = ZONE:New( "AcceptZone2" )
|
||||
|
||||
-- Build a detect object.
|
||||
local Detection = DETECTION_BASE:New( SetGroup )
|
||||
|
||||
-- This will accept detected units by Detection when the unit is within ZoneAccept1 OR ZoneAccept2.
|
||||
Detection:SetAcceptZones( { ZoneAccept1, ZoneAccept2 } )
|
||||
|
||||
-- Start the Detection.
|
||||
Detection:Start()
|
||||
</code></pre>
|
||||
|
||||
<h3>Detection rejectance if within zone(s).</h3>
|
||||
|
||||
<p>Specific ZONE<em>BASE object(s) can be given as a parameter, which will reject detection if the unit is within the specified ZONE</em>BASE object(s).
|
||||
Use the method <a href="Detection.html##(DETECTION_BASE).SetRejectZones">Detection#DETECTION_BASE.SetRejectZones</a>() will reject detected units if they are within the specified zones.
|
||||
An example of how to use the method is shown below.</p>
|
||||
|
||||
<pre><code> local SetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart() -- Build a SetGroup of Forward Air Controllers.
|
||||
|
||||
-- Search fo the zones where units are to be rejected.
|
||||
local ZoneReject1 = ZONE:New( "RejectZone1" )
|
||||
local ZoneReject2 = ZONE:New( "RejectZone2" )
|
||||
|
||||
-- Build a detect object.
|
||||
local Detection = DETECTION_BASE:New( SetGroup )
|
||||
|
||||
-- This will reject detected units by Detection when the unit is within ZoneReject1 OR ZoneReject2.
|
||||
Detection:SetRejectZones( { ZoneReject1, ZoneReject2 } )
|
||||
|
||||
-- Start the Detection.
|
||||
Detection:Start()
|
||||
</code></pre>
|
||||
|
||||
<h2>DETECTION_BASE is a Finite State Machine</h2>
|
||||
|
||||
<p>Various Events and State Transitions can be tailored using DETECTION_BASE.</p>
|
||||
|
||||
<h3>DETECTION_BASE States</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>Detecting</strong>: The detection is running.</li>
|
||||
<li><strong>Stopped</strong>: The detection is stopped.</li>
|
||||
</ul>
|
||||
|
||||
<h3>DETECTION_BASE Events</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>Start</strong>: Start the detection process.</li>
|
||||
<li><strong>Detect</strong>: Detect new units.</li>
|
||||
<li><strong>Detected</strong>: New units have been detected.</li>
|
||||
<li><strong>Stop</strong>: Stop the detection process.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -1547,209 +1804,7 @@ self</p>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(DETECTION_BASE)" >Type <code>DETECTION_BASE</code></a></h2>
|
||||
|
||||
<h1>1) DETECTION_BASE class, extends <a href="Fsm.html##(FSM)">Fsm#FSM</a></h1>
|
||||
|
||||
<p>The DETECTION_BASE class defines the core functions to administer detected objects.</p>
|
||||
|
||||
|
||||
<p>The DETECTION_BASE class will detect objects within the battle zone for a list of <a href="Group.html">Group</a>s detecting targets following (a) detection method(s).</p>
|
||||
|
||||
<h2>1.1) DETECTION_BASE constructor</h2>
|
||||
|
||||
<p>Construct a new DETECTION_BASE instance using the <a href="##(DETECTION_BASE).New">DETECTION_BASE.New</a>() method.</p>
|
||||
|
||||
<h2>1.2) DETECTION_BASE initialization</h2>
|
||||
|
||||
<p>By default, detection will return detected objects with all the detection sensors available.
|
||||
However, you can ask how the objects were found with specific detection methods.
|
||||
If you use one of the below methods, the detection will work with the detection method specified.
|
||||
You can specify to apply multiple detection methods.</p>
|
||||
|
||||
<p>Use the following functions to report the objects it detected using the methods Visual, Optical, Radar, IRST, RWR, DLINK:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(DETECTION_BASE).InitDetectVisual">DETECTION_BASE.InitDetectVisual</a>(): Detected using Visual.</li>
|
||||
<li><a href="##(DETECTION_BASE).InitDetectOptical">DETECTION_BASE.InitDetectOptical</a>(): Detected using Optical.</li>
|
||||
<li><a href="##(DETECTION_BASE).InitDetectRadar">DETECTION_BASE.InitDetectRadar</a>(): Detected using Radar.</li>
|
||||
<li><a href="##(DETECTION_BASE).InitDetectIRST">DETECTION_BASE.InitDetectIRST</a>(): Detected using IRST.</li>
|
||||
<li><a href="##(DETECTION_BASE).InitDetectRWR">DETECTION_BASE.InitDetectRWR</a>(): Detected using RWR.</li>
|
||||
<li><a href="##(DETECTION_BASE).InitDetectDLINK">DETECTION_BASE.InitDetectDLINK</a>(): Detected using DLINK.</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.3) DETECTION_BASE derived classes group the detected units into a DetectedItems[] list</h2>
|
||||
|
||||
<p>DETECTION<em>BASE derived classes build a list called DetectedItems[], which is essentially a first later
|
||||
of grouping of detected units. Each DetectedItem within the DetectedItems[] list contains
|
||||
a SET</em>UNIT object that contains the detected units that belong to that group.</p>
|
||||
|
||||
<p>Derived classes will apply different methods to group the detected units.
|
||||
Examples are per area, per quadrant, per distance, per type.
|
||||
See further the derived DETECTION classes on which grouping methods are currently supported. </p>
|
||||
|
||||
<p>Various methods exist how to retrieve the grouped items from a DETECTION_BASE derived class:</p>
|
||||
|
||||
<ul>
|
||||
<li>The method <a href="Detection.html##(DETECTION_BASE).GetDetectedItems">Detection#DETECTION_BASE.GetDetectedItems</a>() retrieves the DetectedItems[] list.</li>
|
||||
<li>A DetectedItem from the DetectedItems[] list can be retrieved using the method <a href="Detection.html##(DETECTION_BASE).GetDetectedItem">Detection#DETECTION_BASE.GetDetectedItem</a>( DetectedItemIndex ).
|
||||
Note that this method returns a DetectedItem element from the list, that contains a Set variable and further information
|
||||
about the DetectedItem that is set by the DETECTION_BASE derived classes, used to group the DetectedItem.</li>
|
||||
<li>A DetectedSet from the DetectedItems[] list can be retrieved using the method <a href="Detection.html##(DETECTION_BASE).GetDetectedSet">Detection#DETECTION_BASE.GetDetectedSet</a>( DetectedItemIndex ).
|
||||
This method retrieves the Set from a DetectedItem element from the DetectedItem list (DetectedItems[ DetectedItemIndex ].Set ).</li>
|
||||
</ul>
|
||||
|
||||
<h2>1.4) Apply additional Filters to fine-tune the detected objects</h2>
|
||||
|
||||
<p>By default, DCS World will return any object that is in LOS and within "visual reach", or detectable through one of the electronic detection means.
|
||||
That being said, the DCS World detection algorithm can sometimes be unrealistic.
|
||||
Especially for a visual detection, DCS World is able to report within 1 second a detailed detection of a group of 20 units (including types of the units) that are 10 kilometers away, using only visual capabilities.
|
||||
Additionally, trees and other obstacles are not accounted during the DCS World detection.</p>
|
||||
|
||||
<p>Therefore, an additional (optional) filtering has been built into the DETECTION_BASE class, that can be set for visual detected units.
|
||||
For electronic detection, this filtering is not applied, only for visually detected targets.</p>
|
||||
|
||||
<p>The following additional filtering can be applied for visual filtering:</p>
|
||||
|
||||
<ul>
|
||||
<li>A probability factor per kilometer distance.</li>
|
||||
<li>A probability factor based on the alpha angle between the detected object and the unit detecting.
|
||||
A detection from a higher altitude allows for better detection than when on the ground.</li>
|
||||
<li>Define a probability factor for "cloudy zones", which are zones where forests or villages are located. In these zones, detection will be much more difficult.
|
||||
The mission designer needs to define these cloudy zones within the mission, and needs to register these zones in the DETECTION_ objects additing a probability factor per zone.</li>
|
||||
</ul>
|
||||
|
||||
<p>I advise however, that, when you first use the DETECTION derived classes, that you don't use these filters.
|
||||
Only when you experience unrealistic behaviour in your missions, these filters could be applied.</p>
|
||||
|
||||
<h3>1.4.1 ) Distance visual detection probability</h3>
|
||||
|
||||
<p>Upon a <strong>visual</strong> detection, the further away a detected object is, the less likely it is to be detected properly.
|
||||
Also, the speed of accurate detection plays a role.</p>
|
||||
|
||||
<p>A distance probability factor between 0 and 1 can be given, that will model a linear extrapolated probability over 10 km distance.</p>
|
||||
|
||||
<p>For example, if a probability factor of 0.6 (60%) is given, the extrapolated probabilities over 15 kilometers would like like:
|
||||
1 km: 96%, 2 km: 92%, 3 km: 88%, 4 km: 84%, 5 km: 80%, 6 km: 76%, 7 km: 72%, 8 km: 68%, 9 km: 64%, 10 km: 60%, 11 km: 56%, 12 km: 52%, 13 km: 48%, 14 km: 44%, 15 km: 40%.</p>
|
||||
|
||||
<p>Note that based on this probability factor, not only the detection but also the <strong>type</strong> of the unit will be applied!</p>
|
||||
|
||||
<p>Use the method <a href="Detection.html##(DETECTION_BASE).SetDistanceProbability">Detection#DETECTION_BASE.SetDistanceProbability</a>() to set the probability factor upon a 10 km distance.</p>
|
||||
|
||||
<h3>1.4.2 ) Alpha Angle visual detection probability</h3>
|
||||
|
||||
<p>Upon a <strong>visual</strong> detection, the higher the unit is during the detecting process, the more likely the detected unit is to be detected properly.
|
||||
A detection at a 90% alpha angle is the most optimal, a detection at 10% is less and a detection at 0% is less likely to be correct.</p>
|
||||
|
||||
<p>A probability factor between 0 and 1 can be given, that will model a progressive extrapolated probability if the target would be detected at a 0° angle.</p>
|
||||
|
||||
<p>For example, if a alpha angle probability factor of 0.7 is given, the extrapolated probabilities of the different angles would look like:
|
||||
0°: 70%, 10°: 75,21%, 20°: 80,26%, 30°: 85%, 40°: 89,28%, 50°: 92,98%, 60°: 95,98%, 70°: 98,19%, 80°: 99,54%, 90°: 100%</p>
|
||||
|
||||
<p>Use the method <a href="Detection.html##(DETECTION_BASE).SetAlphaAngleProbability">Detection#DETECTION_BASE.SetAlphaAngleProbability</a>() to set the probability factor if 0°.</p>
|
||||
|
||||
<h3>1.4.3 ) Cloudy Zones detection probability</h3>
|
||||
|
||||
<p>Upon a <strong>visual</strong> detection, the more a detected unit is within a cloudy zone, the less likely the detected unit is to be detected successfully.
|
||||
The Cloudy Zones work with the ZONE_BASE derived classes. The mission designer can define within the mission
|
||||
zones that reflect cloudy areas where detected units may not be so easily visually detected.</p>
|
||||
|
||||
<p>Use the method <a href="Detection.html##(DETECTION_BASE).SetZoneProbability">Detection#DETECTION_BASE.SetZoneProbability</a>() to set for a defined number of zones, the probability factors.</p>
|
||||
|
||||
<p>Note however, that the more zones are defined to be "cloudy" within a detection, the more performance it will take
|
||||
from the DETECTION<em>BASE to calculate the presence of the detected unit within each zone.
|
||||
Expecially for ZONE</em>POLYGON, try to limit the amount of nodes of the polygon!</p>
|
||||
|
||||
<p>Typically, this kind of filter would be applied for very specific areas were a detection needs to be very realisting for
|
||||
AI not to detect so easily targets within a forrest or village rich area.</p>
|
||||
|
||||
<h2>1.5 ) Accept / Reject detected units</h2>
|
||||
|
||||
<p>DETECTION_BASE can accept or reject successful detections based on the location of the detected object,
|
||||
if it is located in range or located inside or outside of specific zones.</p>
|
||||
|
||||
<h3>1.5.1 ) Detection acceptance of within range limit</h3>
|
||||
|
||||
<p>A range can be set that will limit a successful detection for a unit.
|
||||
Use the method <a href="Detection.html##(DETECTION_BASE).SetAcceptRange">Detection#DETECTION_BASE.SetAcceptRange</a>() to apply a range in meters till where detected units will be accepted.</p>
|
||||
|
||||
<pre><code> local SetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart() -- Build a SetGroup of Forward Air Controllers.
|
||||
|
||||
-- Build a detect object.
|
||||
local Detection = DETECTION_BASE:New( SetGroup )
|
||||
|
||||
-- This will accept detected units if the range is below 5000 meters.
|
||||
Detection:SetAcceptRange( 5000 )
|
||||
|
||||
-- Start the Detection.
|
||||
Detection:Start()
|
||||
</code></pre>
|
||||
|
||||
|
||||
<h3>1.5.2 ) Detection acceptance if within zone(s).</h3>
|
||||
|
||||
<p>Specific ZONE<em>BASE object(s) can be given as a parameter, which will only accept a detection if the unit is within the specified ZONE</em>BASE object(s).
|
||||
Use the method <a href="Detection.html##(DETECTION_BASE).SetAcceptZones">Detection#DETECTION_BASE.SetAcceptZones</a>() will accept detected units if they are within the specified zones.</p>
|
||||
|
||||
<pre><code> local SetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart() -- Build a SetGroup of Forward Air Controllers.
|
||||
|
||||
-- Search fo the zones where units are to be accepted.
|
||||
local ZoneAccept1 = ZONE:New( "AcceptZone1" )
|
||||
local ZoneAccept2 = ZONE:New( "AcceptZone2" )
|
||||
|
||||
-- Build a detect object.
|
||||
local Detection = DETECTION_BASE:New( SetGroup )
|
||||
|
||||
-- This will accept detected units by Detection when the unit is within ZoneAccept1 OR ZoneAccept2.
|
||||
Detection:SetAcceptZones( { ZoneAccept1, ZoneAccept2 } )
|
||||
|
||||
-- Start the Detection.
|
||||
Detection:Start()
|
||||
</code></pre>
|
||||
|
||||
<h3>1.5.3 ) Detection rejectance if within zone(s).</h3>
|
||||
|
||||
<p>Specific ZONE<em>BASE object(s) can be given as a parameter, which will reject detection if the unit is within the specified ZONE</em>BASE object(s).
|
||||
Use the method <a href="Detection.html##(DETECTION_BASE).SetRejectZones">Detection#DETECTION_BASE.SetRejectZones</a>() will reject detected units if they are within the specified zones.
|
||||
An example of how to use the method is shown below.</p>
|
||||
|
||||
<pre><code> local SetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart() -- Build a SetGroup of Forward Air Controllers.
|
||||
|
||||
-- Search fo the zones where units are to be rejected.
|
||||
local ZoneReject1 = ZONE:New( "RejectZone1" )
|
||||
local ZoneReject2 = ZONE:New( "RejectZone2" )
|
||||
|
||||
-- Build a detect object.
|
||||
local Detection = DETECTION_BASE:New( SetGroup )
|
||||
|
||||
-- This will reject detected units by Detection when the unit is within ZoneReject1 OR ZoneReject2.
|
||||
Detection:SetRejectZones( { ZoneReject1, ZoneReject2 } )
|
||||
|
||||
-- Start the Detection.
|
||||
Detection:Start()
|
||||
</code></pre>
|
||||
|
||||
<h2>1.6) DETECTION_BASE is a Finite State Machine</h2>
|
||||
|
||||
<p>Various Events and State Transitions can be tailored using DETECTION_BASE.</p>
|
||||
|
||||
<h3>1.6.1) DETECTION_BASE States</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>Detecting</strong>: The detection is running.</li>
|
||||
<li><strong>Stopped</strong>: The detection is stopped.</li>
|
||||
</ul>
|
||||
|
||||
<h3>1.6.2) DETECTION_BASE Events</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>Start</strong>: Start the detection process.</li>
|
||||
<li><strong>Detect</strong>: Detect new units.</li>
|
||||
<li><strong>Detected</strong>: New units have been detected.</li>
|
||||
<li><strong>Stop</strong>: Stop the detection process.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3>Field(s)</h3>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
@ -1966,20 +2021,6 @@ The index of the DetectedItem.</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#string</em>
|
||||
<a id="#(DETECTION_BASE).ClassName" >
|
||||
<strong>DETECTION_BASE.ClassName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2143,7 +2184,6 @@ self</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(DETECTION_BASE).DetectedItemMax" >
|
||||
<strong>DETECTION_BASE.DetectedItemMax</strong>
|
||||
</a>
|
||||
@ -2336,6 +2376,62 @@ self</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(DETECTION_BASE).FilterCategories" >
|
||||
<strong>DETECTION_BASE:FilterCategories(<, FilterCategories)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Filter the detected units based on Unit.Category <br/>
|
||||
The different values of Unit.Category can be:</p>
|
||||
|
||||
<ul>
|
||||
<li>Unit.Category.AIRPLANE</li>
|
||||
<li>Unit.Category.GROUND_UNIT</li>
|
||||
<li>Unit.Category.HELICOPTER</li>
|
||||
<li>Unit.Category.SHIP</li>
|
||||
<li>Unit.Category.STRUCTURE</li>
|
||||
</ul>
|
||||
|
||||
<p>Multiple Unit.Category entries can be given as a table and then these will be evaluated as an OR expression.</p>
|
||||
|
||||
|
||||
|
||||
<p>Example to filter a single category (Unit.Category.AIRPLANE).</p>
|
||||
|
||||
<pre><code>DetectionObject:FilterCategories( Unit.Category.AIRPLANE )
|
||||
</code></pre>
|
||||
|
||||
<p>Example to filter multiple categories (Unit.Category.AIRPLANE, Unit.Category.HELICOPTER). Note the {}.</p>
|
||||
|
||||
<pre><code>DetectionObject:FilterCategories( { Unit.Category.AIRPLANE, Unit.Category.HELICOPTER } )
|
||||
</code></pre>
|
||||
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="##(list)">#list</a> < </em></code>:
|
||||
cs.DCSUnit#Unit> FilterCategories The Categories entries</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> FilterCategories </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(DETECTION_BASE)">#DETECTION_BASE</a>:</em>
|
||||
self</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -4448,6 +4544,8 @@ self</p>
|
||||
|
||||
<h2><a id="#(DETECTION_UNITS.DetectedItem)" >Type <code>DETECTION_UNITS.DetectedItem</code></a></h2>
|
||||
|
||||
<h2><a id="#(list)" >Type <code>list</code></a></h2>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
@ -209,6 +210,7 @@ on defined intervals (currently every minute).</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(MOVEMENT).AliveUnits" >
|
||||
<strong>MOVEMENT.AliveUnits</strong>
|
||||
</a>
|
||||
@ -217,6 +219,9 @@ on defined intervals (currently every minute).</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Contains the counter how many units are currently alive</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li>Set</li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li>Smoke</li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li>Spawn</li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
@ -99,6 +100,10 @@
|
||||
|
||||
<hr/>
|
||||
|
||||
<p>The documentation of the SPAWN class can be found further in this document.</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>Demo Missions</h1>
|
||||
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master-release/SPA%20-%20Spawning">SPAWN Demo Missions source code</a></h3>
|
||||
@ -804,6 +809,12 @@ and any spaces before and after the resulting name are removed.</p>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._TranslateRotate">SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle)</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWN).uncontrolled">SPAWN.uncontrolled</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -917,33 +928,83 @@ So in principle, the group list will contain all parameters and configurations a
|
||||
|
||||
<p>A spawn object will behave differently based on the usage of <strong>initialization</strong> methods, which all start with the <strong>Init</strong> prefix: </p>
|
||||
|
||||
<h3>Unit Names</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).InitKeepUnitNames">SPAWN.InitKeepUnitNames</a>(): Keeps the unit names as defined within the mission editor, but note that anything after a # mark is ignored, and any spaces before and after the resulting name are removed. IMPORTANT! This method MUST be the first used after :New !!!</li>
|
||||
<li><a href="##(SPAWN).InitLimit">SPAWN.InitLimit</a>(): Limits the amount of groups that can be alive at the same time and that can be dynamically spawned.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Route randomization</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).InitRandomizeRoute">SPAWN.InitRandomizeRoute</a>(): Randomize the routes of spawned groups, and for air groups also optionally the height.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Group composition randomization</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).InitRandomizeTemplate">SPAWN.InitRandomizeTemplate</a>(): Randomize the group templates so that when a new group is spawned, a random group template is selected from one of the templates defined. </li>
|
||||
</ul>
|
||||
|
||||
<h3>Uncontrolled</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).InitUnControlled">SPAWN.InitUnControlled</a>(): Spawn plane groups uncontrolled.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Array formation</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).InitArray">SPAWN.InitArray</a>(): Make groups visible before they are actually activated, and order these groups like a batallion in an array.</li>
|
||||
<li><a href="##(SPAWN).InitRepeat">SPAWN.InitRepeat</a>(): Re-spawn groups when they land at the home base. Similar methods are <a href="##(SPAWN).InitRepeatOnLanding">SPAWN.InitRepeatOnLanding</a> and <a href="##(SPAWN).InitRepeatOnEngineShutDown">SPAWN.InitRepeatOnEngineShutDown</a>.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Position randomization</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).InitRandomizePosition">SPAWN.InitRandomizePosition</a>(): Randomizes the position of <a href="Group.html">Group</a>s that are spawned within a <strong>radius band</strong>, given an Outer and Inner radius, from the point that the spawn happens.</li>
|
||||
<li><a href="##(SPAWN).InitRandomizeUnits">SPAWN.InitRandomizeUnits</a>(): Randomizes the <a href="Unit.html">Unit</a>s in the <a href="Group.html">Group</a> that is spawned within a <strong>radius band</strong>, given an Outer and Inner radius.</li>
|
||||
<li><a href="##(SPAWN).InitRandomizeZones">SPAWN.InitRandomizeZones</a>(): Randomizes the spawning between a predefined list of <a href="Zone.html">Zone</a>s that are declared using this function. Each zone can be given a probability factor.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Enable / Disable AI when spawning a new <a href="Group.html">Group</a></h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).InitAIOn">SPAWN.InitAIOn</a>(): Turns the AI On when spawning the new <a href="Group.html">Group</a> object.</li>
|
||||
<li><a href="##(SPAWN).InitAIOff">SPAWN.InitAIOff</a>(): Turns the AI Off when spawning the new <a href="Group.html">Group</a> object.</li>
|
||||
<li><a href="##(SPAWN).InitAIOnOff">SPAWN.InitAIOnOff</a>(): Turns the AI On or Off when spawning the new <a href="Group.html">Group</a> object.</li>
|
||||
<li><a href="##(SPAWN).InitDelayOnOff">SPAWN.InitDelayOnOff</a>(): Turns the inital delay On/Off when spawning the first <a href="Group.html">Group</a> object.</li>
|
||||
<li><a href="##(SPAWN).InitDelayOn">SPAWN.InitDelayOn</a>(): Turns the inital delay On when spawning the first <a href="Group.html">Group</a> object.</li>
|
||||
<li><a href="##(SPAWN).InitDelayOff">SPAWN.InitDelayOff</a>(): Turns the inital delay On when spawning the first <a href="Group.html">Group</a> object.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Limit scheduled spawning</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).InitLimit">SPAWN.InitLimit</a>(): Limits the amount of groups that can be alive at the same time and that can be dynamically spawned.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Delay initial scheduled spawn</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).InitDelayOnOff">SPAWN.InitDelayOnOff</a>(): Turns the inital delay On/Off when scheduled spawning the first <a href="Group.html">Group</a> object.</li>
|
||||
<li><a href="##(SPAWN).InitDelayOn">SPAWN.InitDelayOn</a>(): Turns the inital delay On when scheduled spawning the first <a href="Group.html">Group</a> object.</li>
|
||||
<li><a href="##(SPAWN).InitDelayOff">SPAWN.InitDelayOff</a>(): Turns the inital delay Off when scheduled spawning the first <a href="Group.html">Group</a> object.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Repeat spawned <a href="Group.html">Group</a>s upon landing</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).InitRepeat">SPAWN.InitRepeat</a>() or <a href="##(SPAWN).InitRepeatOnLanding">SPAWN.InitRepeatOnLanding</a>(): This method is used to re-spawn automatically the same group after it has landed.</li>
|
||||
<li><a href="##(SPAWN).InitRepeatOnEngineShutDown">SPAWN.InitRepeatOnEngineShutDown</a>(): This method is used to re-spawn automatically the same group after it has landed and it shuts down the engines at the ramp.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>SPAWN <strong>Spawn</strong> methods</h2>
|
||||
|
||||
<p>Groups can be spawned at different times and methods:</p>
|
||||
|
||||
<h3><strong>Single</strong> spawning methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).Spawn">SPAWN.Spawn</a>(): Spawn one new group based on the last spawned index.</li>
|
||||
<li><a href="##(SPAWN).ReSpawn">SPAWN.ReSpawn</a>(): Re-spawn a group based on a given index.</li>
|
||||
<li><a href="##(SPAWN).SpawnScheduled">SPAWN.SpawnScheduled</a>(): Spawn groups at scheduled but randomized intervals. You can use <a href="##(SPAWN).SpawnScheduleStart">SPAWN.SpawnScheduleStart</a>() and <a href="##(SPAWN).SpawnScheduleStop">SPAWN.SpawnScheduleStop</a>() to start and stop the schedule respectively.</li>
|
||||
<li><a href="##(SPAWN).SpawnFromVec3">SPAWN.SpawnFromVec3</a>(): Spawn a new group from a Vec3 coordinate. (The group will can be spawned at a point in the air).</li>
|
||||
<li><a href="##(SPAWN).SpawnFromVec2">SPAWN.SpawnFromVec2</a>(): Spawn a new group from a Vec2 coordinate. (The group will be spawned at land height ).</li>
|
||||
<li><a href="##(SPAWN).SpawnFromStatic">SPAWN.SpawnFromStatic</a>(): Spawn a new group from a structure, taking the position of a <a href="Static.html">Static</a>.</li>
|
||||
@ -954,6 +1015,16 @@ So in principle, the group list will contain all parameters and configurations a
|
||||
<p>Note that <a href="##(SPAWN).Spawn">SPAWN.Spawn</a> and <a href="##(SPAWN).ReSpawn">SPAWN.ReSpawn</a> return a <a href="GROUP.html##(GROUP).New">GROUP#GROUP.New</a> object, that contains a reference to the DCSGroup object.
|
||||
You can use the <a href="GROUP.html">GROUP</a> object to do further actions with the DCSGroup.</p>
|
||||
|
||||
<h3><strong>Scheduled</strong> spawning methods</h3>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWN).SpawnScheduled">SPAWN.SpawnScheduled</a>(): Spawn groups at scheduled but randomized intervals. </li>
|
||||
<li><a href="##(SPAWN).SpawnScheduledStart">SPAWN.SpawnScheduledStart</a>(): Start or continue to spawn groups at scheduled time intervals. </li>
|
||||
<li><a href="##(SPAWN).SpawnScheduledStop">SPAWN.SpawnScheduledStop</a>(): Stop the spawning of groups at scheduled time intervals. </li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h2>Retrieve alive GROUPs spawned by the SPAWN object</h2>
|
||||
|
||||
<p>The SPAWN class administers which GROUPS it has reserved (in stock) or has created during mission execution.
|
||||
@ -991,6 +1062,15 @@ Whenever a new <a href="Group.html">Group</a> is spawned, the given function is
|
||||
As a result, your spawn event handling function requires one parameter to be declared, which will contain the spawned <a href="Group.html">Group</a> object.
|
||||
A coding example is provided at the description of the <a href="##(SPAWN).OnSpawnGroup">SPAWN.OnSpawnGroup</a>( <em>*function( SpawnedGroup ) end *</em> ) method.</p>
|
||||
|
||||
<h2>Delay the initial spawning</h2>
|
||||
|
||||
<p>When using the <a href="##(SPAWN).SpawnScheduled">SPAWN.SpawnScheduled</a>
|
||||
immediately when :SpawnScheduled() is initiated. The methods <a href="##(SPAWN).InitDelayOnOff">SPAWN.InitDelayOnOff</a>() and <a href="##(SPAWN).InitDelayOn">SPAWN.InitDelayOn</a>() can be used to
|
||||
activate a delay before the first <a href="Group.html">Group</a> is spawned. For completeness, a method <a href="##(SPAWN).InitDelayOff">SPAWN.InitDelayOff</a>() is also available, that
|
||||
can be used to switch off the initial delay. Because there is no delay by default, this method would only be used when a
|
||||
<a href="##(SPAWN).SpawnScheduledStop">SPAWN.SpawnScheduledStop</a>() ; <a href="##(SPAWN).SpawnScheduledStart">SPAWN.SpawnScheduledStart</a>() sequence would have been used.</p>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -1075,7 +1155,7 @@ A coding example is provided at the description of the <a href="##(SPAWN).OnSpaw
|
||||
|
||||
|
||||
|
||||
<p> An intial delay when spawning the first group.</p>
|
||||
<p> No intial delay when spawning the first group.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
@ -2036,9 +2116,6 @@ The group that was spawned. You can use this group for further actions.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2509,9 +2586,6 @@ when nothing was spawned.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p> By default, no InitLimit</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
@ -2547,7 +2621,7 @@ when nothing was spawned.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<em></em>
|
||||
<a id="#(SPAWN).SpawnMaxGroups" >
|
||||
<strong>SPAWN.SpawnMaxGroups</strong>
|
||||
</a>
|
||||
@ -2564,7 +2638,7 @@ when nothing was spawned.</p>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<em></em>
|
||||
<a id="#(SPAWN).SpawnMaxUnitsAlive" >
|
||||
<strong>SPAWN.SpawnMaxUnitsAlive</strong>
|
||||
</a>
|
||||
@ -2882,7 +2956,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<em>#boolean</em>
|
||||
<a id="#(SPAWN).SpawnUnControlled" >
|
||||
<strong>SPAWN.SpawnUnControlled</strong>
|
||||
</a>
|
||||
@ -3472,6 +3546,20 @@ True = Continue Scheduler</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPAWN).uncontrolled" >
|
||||
<strong>SPAWN.uncontrolled</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
493
docs/Documentation/SpawnStatic.html
Normal file
493
docs/Documentation/SpawnStatic.html
Normal file
@ -0,0 +1,493 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="product">
|
||||
<div id="product_logo"></div>
|
||||
<div id="product_name"><big><b></b></big></div>
|
||||
<div id="product_description"></div>
|
||||
</div>
|
||||
<div id="main">
|
||||
<div id="navigation">
|
||||
<h2>Modules</h2>
|
||||
<ul><li>
|
||||
<a href="index.html">index</a>
|
||||
</li></ul>
|
||||
<ul>
|
||||
<li><a href="AI_Balancer.html">AI_Balancer</a></li>
|
||||
<li><a href="AI_Cap.html">AI_Cap</a></li>
|
||||
<li><a href="AI_Cas.html">AI_Cas</a></li>
|
||||
<li><a href="AI_Patrol.html">AI_Patrol</a></li>
|
||||
<li><a href="Account.html">Account</a></li>
|
||||
<li><a href="Airbase.html">Airbase</a></li>
|
||||
<li><a href="AirbasePolice.html">AirbasePolice</a></li>
|
||||
<li><a href="Assign.html">Assign</a></li>
|
||||
<li><a href="Base.html">Base</a></li>
|
||||
<li><a href="Cargo.html">Cargo</a></li>
|
||||
<li><a href="CleanUp.html">CleanUp</a></li>
|
||||
<li><a href="Client.html">Client</a></li>
|
||||
<li><a href="CommandCenter.html">CommandCenter</a></li>
|
||||
<li><a href="Controllable.html">Controllable</a></li>
|
||||
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
||||
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
||||
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
||||
<li><a href="DCSController.html">DCSController</a></li>
|
||||
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
||||
<li><a href="DCSObject.html">DCSObject</a></li>
|
||||
<li><a href="DCSTask.html">DCSTask</a></li>
|
||||
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
||||
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
||||
<li><a href="DCSVec3.html">DCSVec3</a></li>
|
||||
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
||||
<li><a href="DCSZone.html">DCSZone</a></li>
|
||||
<li><a href="DCScountry.html">DCScountry</a></li>
|
||||
<li><a href="DCStimer.html">DCStimer</a></li>
|
||||
<li><a href="DCStrigger.html">DCStrigger</a></li>
|
||||
<li><a href="Database.html">Database</a></li>
|
||||
<li><a href="Detection.html">Detection</a></li>
|
||||
<li><a href="DetectionManager.html">DetectionManager</a></li>
|
||||
<li><a href="Escort.html">Escort</a></li>
|
||||
<li><a href="Event.html">Event</a></li>
|
||||
<li><a href="Fsm.html">Fsm</a></li>
|
||||
<li><a href="Group.html">Group</a></li>
|
||||
<li><a href="Identifiable.html">Identifiable</a></li>
|
||||
<li><a href="Menu.html">Menu</a></li>
|
||||
<li><a href="Message.html">Message</a></li>
|
||||
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
||||
<li><a href="Mission.html">Mission</a></li>
|
||||
<li><a href="Movement.html">Movement</a></li>
|
||||
<li><a href="Object.html">Object</a></li>
|
||||
<li><a href="Point.html">Point</a></li>
|
||||
<li><a href="Positionable.html">Positionable</a></li>
|
||||
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
|
||||
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
|
||||
<li><a href="Radio.html">Radio</a></li>
|
||||
<li><a href="Route.html">Route</a></li>
|
||||
<li><a href="Scenery.html">Scenery</a></li>
|
||||
<li><a href="ScheduleDispatcher.html">ScheduleDispatcher</a></li>
|
||||
<li><a href="Scheduler.html">Scheduler</a></li>
|
||||
<li><a href="Scoring.html">Scoring</a></li>
|
||||
<li><a href="Sead.html">Sead</a></li>
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li>SpawnStatic</li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
||||
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
|
||||
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
||||
<li><a href="Unit.html">Unit</a></li>
|
||||
<li><a href="Utils.html">Utils</a></li>
|
||||
<li><a href="Zone.html">Zone</a></li>
|
||||
<li><a href="env.html">env</a></li>
|
||||
<li><a href="land.html">land</a></li>
|
||||
<li><a href="routines.html">routines</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h1>Module <code>SpawnStatic</code></h1>
|
||||
|
||||
<p><strong>Functional</strong> -- Spawn dynamically new <a href="Static.html">Static</a>s in your missions.</p>
|
||||
|
||||
|
||||
<p>
|
||||
<img src="..\Presentations\SPAWNSTATIC\SPAWNSTATIC.JPG" alt="Banner Image"/></p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>Demo Missions</h1>
|
||||
|
||||
<h3><a href="">SPAWNSTATIC Demo Missions source code</a></h3>
|
||||
|
||||
<h3><a href="">SPAWNSTATIC Demo Missions, only for beta testers</a></h3>
|
||||
|
||||
<h3><a href="https://github.com/FlightControl-Master/MOOSE_MISSIONS/releases">ALL Demo Missions pack of the last release</a></h3>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1>YouTube Channel</h1>
|
||||
|
||||
<h3><a href="">SPAWNSTATIC YouTube Channel</a></h3>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1><strong>API CHANGE HISTORY</strong></h1>
|
||||
|
||||
<p>The underlying change log documents the API changes. Please read this carefully. The following notation is used:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>Added</strong> parts are expressed in bold type face.</li>
|
||||
<li><em>Removed</em> parts are expressed in italic type face.</li>
|
||||
</ul>
|
||||
|
||||
<p>Hereby the change log:</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h1><strong>AUTHORS and CONTRIBUTIONS</strong></h1>
|
||||
|
||||
<h3>Contributions:</h3>
|
||||
|
||||
<h3>Authors:</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>FlightControl</strong>: Design & Programming</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="#SPAWNSTATIC">SPAWNSTATIC</a></td>
|
||||
<td class="summary">
|
||||
<h1>SPAWNSTATIC class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
||||
|
||||
<p>The SPAWNSTATIC class allows to spawn dynamically new <a href="Static.html">Static</a>s.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2><a id="#(SPAWNSTATIC)">Type <code>SPAWNSTATIC</code></a></h2>
|
||||
<table class="function_list">
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWNSTATIC).CountryID">SPAWNSTATIC.CountryID</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWNSTATIC).NewFromStatic">SPAWNSTATIC:NewFromStatic(SpawnTemplatePrefix, CountryID)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates the main object to spawn a <a href="Static.html">Static</a> defined in the ME.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWNSTATIC).NewFromType">SPAWNSTATIC:NewFromType(SpawnTypeName, SpawnShapeName, SpawnCategory, CountryID)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates the main object to spawn a <a href="Static.html">Static</a> based on a type name.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWNSTATIC).SpawnFromPointVec2">SPAWNSTATIC:SpawnFromPointVec2(PointVec2, Heading, (, NewName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new <a href="Static.html">Static</a> from a POINT_VEC2.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWNSTATIC).SpawnFromZone">SPAWNSTATIC:SpawnFromZone(Zone, Heading, (, NewName)</a></td>
|
||||
<td class="summary">
|
||||
<p>Creates a new <a href="Static.html">Static</a> from a <a href="Zone.html">Zone</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWNSTATIC).SpawnIndex">SPAWNSTATIC.SpawnIndex</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWNSTATIC).SpawnTemplatePrefix">SPAWNSTATIC.SpawnTemplatePrefix</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="##(SPAWNSTATIC).SpawnTypeName">SPAWNSTATIC.SpawnTypeName</a></td>
|
||||
<td class="summary">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2>Global(s)</h2>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em><a href="##(SPAWNSTATIC)">#SPAWNSTATIC</a></em>
|
||||
<a id="SPAWNSTATIC" >
|
||||
<strong>SPAWNSTATIC</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<h1>SPAWNSTATIC class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
||||
|
||||
<p>The SPAWNSTATIC class allows to spawn dynamically new <a href="Static.html">Static</a>s.</p>
|
||||
|
||||
|
||||
|
||||
<p>There are two modes how SPAWNSTATIC can spawn:</p>
|
||||
|
||||
<ul>
|
||||
<li>Through creating a copy of an existing Template <a href="Static.html">Static</a> as defined in the Mission Editor (ME).</li>
|
||||
<li>Through the provision of the type name of the Static. </li>
|
||||
</ul>
|
||||
|
||||
<p>Spawned <a href="Static.html">Static</a>s get <strong>the same name</strong> as the name of the Template Static,
|
||||
or gets the given name when a Static Type is used. <br/>
|
||||
Newly spawned <a href="Static.html">Static</a>s will get the following naming structure at run-time:</p>
|
||||
|
||||
<ul>
|
||||
<li>Spawned <a href="Static.html">Static</a>s will have the name _StaticName<em>#</em>nnn_, where <em>StaticName</em> is the name of the <strong>Template Static</strong>,
|
||||
and <em>nnn</em> is a <strong>counter from 0 to 99999</strong>.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>SPAWNSTATIC construction methods</h2>
|
||||
|
||||
<p>Create a new SPAWNSTATIC object with the <a href="##(SPAWNSTATIC).NewFromStatic">SPAWNSTATIC.NewFromStatic</a>() or the <a href="##(SPAWNSTATIC).NewFromType">SPAWNSTATIC.NewFromType</a>() methods:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWNSTATIC).NewFromStatic">SPAWNSTATIC.NewFromStatic</a>(): Creates a new SPAWNSTATIC object given a name that is used as the base of the naming of each spawned Static.</li>
|
||||
<li><a href="##(SPAWNSTATIC).NewFromType">SPAWNSTATIC.NewFromType</a>(): Creates a new SPAWNSTATIC object given a type name and a name to be given when spawned.</li>
|
||||
</ul>
|
||||
|
||||
<h2>SPAWNSTATIC <strong>Spawn</strong> methods</h2>
|
||||
|
||||
<p>Groups can be spawned at different times and methods:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="##(SPAWNSTATIC).SpawnInZone">SPAWNSTATIC.SpawnInZone</a>(): Spawn a new group in a <a href="Zone.html">Zone</a>.</li>
|
||||
<li><a href="##(SPAWNSTATIC).SpawnFromVec3">SPAWNSTATIC.SpawnFromVec3</a>(): Spawn a new group from a Vec3 coordinate. (The group will can be spawned at a point in the air).</li>
|
||||
<li><a href="##(SPAWNSTATIC).SpawnFromVec2">SPAWNSTATIC.SpawnFromVec2</a>(): Spawn a new group from a Vec2 coordinate. (The group will be spawned at land height ).</li>
|
||||
<li><a href="##(SPAWNSTATIC).SpawnFromStatic">SPAWNSTATIC.SpawnFromStatic</a>(): Spawn a new group from a structure, taking the position of a <a href="Static.html">Static</a>.</li>
|
||||
<li><a href="##(SPAWNSTATIC).SpawnFromUnit">SPAWNSTATIC.SpawnFromUnit</a>(): Spawn a new group taking the position of a <a href="Unit.html">Unit</a>.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2><a id="#(SpawnStatic)" >Type <code>SpawnStatic</code></a></h2>
|
||||
|
||||
<h2><a id="#(SPAWNSTATIC)" >Type <code>SPAWNSTATIC</code></a></h2>
|
||||
<h3>Field(s)</h3>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPAWNSTATIC).CountryID" >
|
||||
<strong>SPAWNSTATIC.CountryID</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPAWNSTATIC).NewFromStatic" >
|
||||
<strong>SPAWNSTATIC:NewFromStatic(SpawnTemplatePrefix, CountryID)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creates the main object to spawn a <a href="Static.html">Static</a> defined in the ME.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string SpawnTemplatePrefix </em></code>:
|
||||
is the name of the Group in the ME that defines the Template. Each new group will have the name starting with SpawnTemplatePrefix.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> CountryID </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SPAWNSTATIC)">#SPAWNSTATIC</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPAWNSTATIC).NewFromType" >
|
||||
<strong>SPAWNSTATIC:NewFromType(SpawnTypeName, SpawnShapeName, SpawnCategory, CountryID)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creates the main object to spawn a <a href="Static.html">Static</a> based on a type name.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string SpawnTypeName </em></code>:
|
||||
is the name of the type.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> SpawnShapeName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> SpawnCategory </em></code>: </p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> CountryID </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SPAWNSTATIC)">#SPAWNSTATIC</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPAWNSTATIC).SpawnFromPointVec2" >
|
||||
<strong>SPAWNSTATIC:SpawnFromPointVec2(PointVec2, Heading, (, NewName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creates a new <a href="Static.html">Static</a> from a POINT_VEC2.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Point.html##(POINT_VEC2)">Core.Point#POINT_VEC2</a> PointVec2 </em></code>:
|
||||
The 2D coordinate where to spawn the static.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number Heading </em></code>:
|
||||
The heading of the static, which is a number in degrees from 0 to 360.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ( </em></code>:
|
||||
ptional) The name of the new static.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> NewName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SPAWNSTATIC)">#SPAWNSTATIC</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<a id="#(SPAWNSTATIC).SpawnFromZone" >
|
||||
<strong>SPAWNSTATIC:SpawnFromZone(Zone, Heading, (, NewName)</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<p>Creates a new <a href="Static.html">Static</a> from a <a href="Zone.html">Zone</a>.</p>
|
||||
|
||||
<h3>Parameters</h3>
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
<p><code><em><a href="Core.Zone.html##(ZONE_BASE)">Core.Zone#ZONE_BASE</a> Zone </em></code>:
|
||||
The Zone where to spawn the static.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#number Heading </em></code>:
|
||||
The heading of the static, which is a number in degrees from 0 to 360.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em>#string ( </em></code>:
|
||||
ptional) The name of the new static.</p>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<p><code><em> NewName </em></code>: </p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Return value</h3>
|
||||
|
||||
<p><em><a href="##(SPAWNSTATIC)">#SPAWNSTATIC</a>:</em></p>
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em>#number</em>
|
||||
<a id="#(SPAWNSTATIC).SpawnIndex" >
|
||||
<strong>SPAWNSTATIC.SpawnIndex</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPAWNSTATIC).SpawnTemplatePrefix" >
|
||||
<strong>SPAWNSTATIC.SpawnTemplatePrefix</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="function">
|
||||
<dt>
|
||||
|
||||
<em></em>
|
||||
<a id="#(SPAWNSTATIC).SpawnTypeName" >
|
||||
<strong>SPAWNSTATIC.SpawnTypeName</strong>
|
||||
</a>
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h2><a id="#(SPAWNSTATIC.SpawnZoneTable)" >Type <code>SPAWNSTATIC.SpawnZoneTable</code></a></h2>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li>Static</li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li>StaticObject</li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li>Task</li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
@ -480,6 +481,12 @@ and creates a CSV file logging the scoring events and results for use at team or
|
||||
<td class="name" nowrap="nowrap"><a href="Spawn.html">Spawn</a></td>
|
||||
<td class="summary">
|
||||
<p><strong>Functional</strong> -- Spawn dynamically new <a href="Group.html">Group</a>s in your missions.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name" nowrap="nowrap"><a href="SpawnStatic.html">SpawnStatic</a></td>
|
||||
<td class="summary">
|
||||
<p><strong>Functional</strong> -- Spawn dynamically new <a href="Static.html">Static</a>s in your missions.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<li><a href="Set.html">Set</a></li>
|
||||
<li><a href="Smoke.html">Smoke</a></li>
|
||||
<li><a href="Spawn.html">Spawn</a></li>
|
||||
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
|
||||
<li><a href="Static.html">Static</a></li>
|
||||
<li><a href="StaticObject.html">StaticObject</a></li>
|
||||
<li><a href="Task.html">Task</a></li>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user