diff --git a/Moose Development/Moose/Core/Base.lua b/Moose Development/Moose/Core/Base.lua index e047c76d1..018f2eb02 100644 --- a/Moose Development/Moose/Core/Base.lua +++ b/Moose Development/Moose/Core/Base.lua @@ -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 diff --git a/Moose Development/Moose/Core/Database.lua b/Moose Development/Moose/Core/Database.lua index 3e9eea077..bdf743d0d 100644 --- a/Moose Development/Moose/Core/Database.lua +++ b/Moose Development/Moose/Core/Database.lua @@ -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 diff --git a/Moose Development/Moose/Core/Set.lua b/Moose Development/Moose/Core/Set.lua index f3bcb4e95..2d206d453 100644 --- a/Moose Development/Moose/Core/Set.lua +++ b/Moose Development/Moose/Core/Set.lua @@ -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 diff --git a/Moose Development/Moose/Core/SpawnStatic.lua b/Moose Development/Moose/Core/SpawnStatic.lua new file mode 100644 index 000000000..9e744d971 --- /dev/null +++ b/Moose Development/Moose/Core/SpawnStatic.lua @@ -0,0 +1,178 @@ +--- **Functional** -- Spawn dynamically new @{Static}s in your missions. +-- +-- ![Banner Image](..\Presentations\SPAWNSTATIC\SPAWNSTATIC.JPG) +-- +-- ==== +-- +-- # 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 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 + diff --git a/Moose Development/Moose/Core/Zone.lua b/Moose Development/Moose/Core/Zone.lua index 432a360a7..8456729a8 100644 --- a/Moose Development/Moose/Core/Zone.lua +++ b/Moose Development/Moose/Core/Zone.lua @@ -615,7 +615,7 @@ end --- @type ZONE +--- @type ZONE -- @extends Core.Zone#ZONE_RADIUS diff --git a/Moose Development/Moose/Functional/Detection.lua b/Moose Development/Moose/Functional/Detection.lua index 15d3efd4c..004d93c59 100644 --- a/Moose Development/Moose/Functional/Detection.lua +++ b/Moose Development/Moose/Functional/Detection.lua @@ -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 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 diff --git a/Moose Development/Moose/Functional/Spawn.lua b/Moose Development/Moose/Functional/Spawn.lua index 7e612ec5b..129cde05b 100644 --- a/Moose Development/Moose/Functional/Spawn.lua +++ b/Moose Development/Moose/Functional/Spawn.lua @@ -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 diff --git a/Moose Mission Setup/Moose.files b/Moose Mission Setup/Moose.files index fac9aa46b..b8084a749 100644 --- a/Moose Mission Setup/Moose.files +++ b/Moose Mission Setup/Moose.files @@ -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 diff --git a/docs/Documentation/AI_Balancer.html b/docs/Documentation/AI_Balancer.html index 3c6b3b617..15193880f 100644 --- a/docs/Documentation/AI_Balancer.html +++ b/docs/Documentation/AI_Balancer.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/AI_Cap.html b/docs/Documentation/AI_Cap.html index 4cd6c823c..e1b610a96 100644 --- a/docs/Documentation/AI_Cap.html +++ b/docs/Documentation/AI_Cap.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/AI_Cas.html b/docs/Documentation/AI_Cas.html index c5c606a8e..dfe838961 100644 --- a/docs/Documentation/AI_Cas.html +++ b/docs/Documentation/AI_Cas.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/AI_Patrol.html b/docs/Documentation/AI_Patrol.html index ac871d530..a3492fd79 100644 --- a/docs/Documentation/AI_Patrol.html +++ b/docs/Documentation/AI_Patrol.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Account.html b/docs/Documentation/Account.html index c9fd86895..3cf4ae169 100644 --- a/docs/Documentation/Account.html +++ b/docs/Documentation/Account.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Airbase.html b/docs/Documentation/Airbase.html index ce20dd22e..e95ffe8a7 100644 --- a/docs/Documentation/Airbase.html +++ b/docs/Documentation/Airbase.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/AirbasePolice.html b/docs/Documentation/AirbasePolice.html index 6e4b86893..a9a309bc9 100644 --- a/docs/Documentation/AirbasePolice.html +++ b/docs/Documentation/AirbasePolice.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Assign.html b/docs/Documentation/Assign.html index d11d2d43f..8d26350da 100644 --- a/docs/Documentation/Assign.html +++ b/docs/Documentation/Assign.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Base.html b/docs/Documentation/Base.html index cd81ced60..487f77662 100644 --- a/docs/Documentation/Base.html +++ b/docs/Documentation/Base.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Cargo.html b/docs/Documentation/Cargo.html index 6ec4d6173..ba3e1c4ad 100644 --- a/docs/Documentation/Cargo.html +++ b/docs/Documentation/Cargo.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/CleanUp.html b/docs/Documentation/CleanUp.html index 842a832d7..2b3bbdf2a 100644 --- a/docs/Documentation/CleanUp.html +++ b/docs/Documentation/CleanUp.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Client.html b/docs/Documentation/Client.html index f01a6e752..c3d1262c5 100644 --- a/docs/Documentation/Client.html +++ b/docs/Documentation/Client.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/CommandCenter.html b/docs/Documentation/CommandCenter.html index c008099e9..ea2d7f464 100644 --- a/docs/Documentation/CommandCenter.html +++ b/docs/Documentation/CommandCenter.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Controllable.html b/docs/Documentation/Controllable.html index c48168362..901518513 100644 --- a/docs/Documentation/Controllable.html +++ b/docs/Documentation/Controllable.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/DCSAirbase.html b/docs/Documentation/DCSAirbase.html index 3a636bd34..860fab349 100644 --- a/docs/Documentation/DCSAirbase.html +++ b/docs/Documentation/DCSAirbase.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/DCSCoalitionObject.html b/docs/Documentation/DCSCoalitionObject.html index 8ffcdb2f0..003f27213 100644 --- a/docs/Documentation/DCSCoalitionObject.html +++ b/docs/Documentation/DCSCoalitionObject.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/DCSCommand.html b/docs/Documentation/DCSCommand.html index 6e0e838f4..72b05130d 100644 --- a/docs/Documentation/DCSCommand.html +++ b/docs/Documentation/DCSCommand.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/DCSController.html b/docs/Documentation/DCSController.html index 08d0ee3d4..f1229fcb4 100644 --- a/docs/Documentation/DCSController.html +++ b/docs/Documentation/DCSController.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/DCSGroup.html b/docs/Documentation/DCSGroup.html index 146fd7552..45543df9b 100644 --- a/docs/Documentation/DCSGroup.html +++ b/docs/Documentation/DCSGroup.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/DCSObject.html b/docs/Documentation/DCSObject.html index ddd1a1d39..0ba8eec6b 100644 --- a/docs/Documentation/DCSObject.html +++ b/docs/Documentation/DCSObject.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/DCSTask.html b/docs/Documentation/DCSTask.html index 7cfa7703b..3300796fe 100644 --- a/docs/Documentation/DCSTask.html +++ b/docs/Documentation/DCSTask.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/DCSTypes.html b/docs/Documentation/DCSTypes.html index 27861a693..771115adc 100644 --- a/docs/Documentation/DCSTypes.html +++ b/docs/Documentation/DCSTypes.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/DCSUnit.html b/docs/Documentation/DCSUnit.html index 9df171024..2966a3c3f 100644 --- a/docs/Documentation/DCSUnit.html +++ b/docs/Documentation/DCSUnit.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/DCSVec3.html b/docs/Documentation/DCSVec3.html index a720ad73b..932c2b123 100644 --- a/docs/Documentation/DCSVec3.html +++ b/docs/Documentation/DCSVec3.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/DCSWorld.html b/docs/Documentation/DCSWorld.html index edbd527a8..0cc029800 100644 --- a/docs/Documentation/DCSWorld.html +++ b/docs/Documentation/DCSWorld.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/DCSZone.html b/docs/Documentation/DCSZone.html index 53c2b2c01..6f730e275 100644 --- a/docs/Documentation/DCSZone.html +++ b/docs/Documentation/DCSZone.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/DCScountry.html b/docs/Documentation/DCScountry.html index d32ddba19..2540119a7 100644 --- a/docs/Documentation/DCScountry.html +++ b/docs/Documentation/DCScountry.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/DCStimer.html b/docs/Documentation/DCStimer.html index 460bfdd4b..6d02f30d2 100644 --- a/docs/Documentation/DCStimer.html +++ b/docs/Documentation/DCStimer.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/DCStrigger.html b/docs/Documentation/DCStrigger.html index 6e5578efe..2b9776637 100644 --- a/docs/Documentation/DCStrigger.html +++ b/docs/Documentation/DCStrigger.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Database.html b/docs/Documentation/Database.html index 66fbf696e..01259863a 100644 --- a/docs/Documentation/Database.html +++ b/docs/Documentation/Database.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • @@ -350,6 +351,12 @@ The following iterator methods are currently available within the DATABASE:

    DATABASE:GetGroupTemplateFromUnitName(UnitName) + + + + DATABASE:GetStaticUnitTemplate(StaticName) + + @@ -362,6 +369,12 @@ The following iterator methods are currently available within the DATABASE:

    DATABASE.NavPoints + + + + DATABASE.Navpoints + + @@ -446,6 +459,12 @@ The following iterator methods are currently available within the DATABASE:

    DATABASE:_RegisterClients()

    Private method that registers all Units of skill Client or Player within in the mission.

    + + + + DATABASE:_RegisterGroupTemplate(GroupTemplate, CoalitionID, CategoryID, CountryID) + +

    Private method that registers new Group Templates within the DATABASE Object.

    @@ -461,15 +480,15 @@ The following iterator methods are currently available within the DATABASE:

    - DATABASE:_RegisterStatics() + DATABASE:_RegisterStaticTemplate(GroupTemplate, StaticTemplate, CoalitionID, CategoryID, CountryID) - +

    Private method that registers new Static Templates within the DATABASE Object.

    - DATABASE:_RegisterTemplate(GroupTemplate, CoalitionID, CategoryID, CountryID) + DATABASE:_RegisterStatics() -

    Private method that registers new Group Templates within the DATABASE Object.

    + @@ -1309,6 +1328,27 @@ self

    + +DATABASE:GetStaticUnitTemplate(StaticName) + +
    +
    + + + +

    Parameter

    +
      +
    • + +

      StaticName :

      + +
    • +
    +
    +
    +
    +
    + DATABASE:GetStatusGroup(GroupName) @@ -1339,6 +1379,20 @@ self

    + +
    +
    +
    + + + +DATABASE.Navpoints + +
    +
    + + +
    @@ -1608,57 +1662,8 @@ self

    - -DATABASE:_RegisterGroupsAndUnits() - -
    -
    - -

    Private method that registers all Groups and Units within in the mission.

    - -

    Return value

    - -

    #DATABASE: -self

    - -
    -
    -
    -
    - - -DATABASE:_RegisterPlayers() - -
    -
    - -

    Private method that registers all alive players in the mission.

    - -

    Return value

    - -

    #DATABASE: -self

    - -
    -
    -
    -
    - - -DATABASE:_RegisterStatics() - -
    -
    - - - -
    -
    -
    -
    - - -DATABASE:_RegisterTemplate(GroupTemplate, CoalitionID, CategoryID, CountryID) + +DATABASE:_RegisterGroupTemplate(GroupTemplate, CoalitionID, CategoryID, CountryID)
    @@ -1693,6 +1698,101 @@ self

    #DATABASE: self

    +
    +
    +
    +
    + + +DATABASE:_RegisterGroupsAndUnits() + +
    +
    + +

    Private method that registers all Groups and Units within in the mission.

    + +

    Return value

    + +

    #DATABASE: +self

    + +
    +
    +
    +
    + + +DATABASE:_RegisterPlayers() + +
    +
    + +

    Private method that registers all alive players in the mission.

    + +

    Return value

    + +

    #DATABASE: +self

    + +
    +
    +
    +
    + + +DATABASE:_RegisterStaticTemplate(GroupTemplate, StaticTemplate, CoalitionID, CategoryID, CountryID) + +
    +
    + +

    Private method that registers new Static Templates within the DATABASE Object.

    + +

    Parameters

    +
      +
    • + +

      #table GroupTemplate :

      + +
    • +
    • + +

      StaticTemplate :

      + +
    • +
    • + +

      CoalitionID :

      + +
    • +
    • + +

      CategoryID :

      + +
    • +
    • + +

      CountryID :

      + +
    • +
    +

    Return value

    + +

    #DATABASE: +self

    + +
    +
    +
    +
    + + +DATABASE:_RegisterStatics() + +
    +
    + + +
    diff --git a/docs/Documentation/Detection.html b/docs/Documentation/Detection.html index e405ef044..f7502a58f 100644 --- a/docs/Documentation/Detection.html +++ b/docs/Documentation/Detection.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • @@ -102,8 +103,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 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

    + +

    DETECTION Demo Missions, only for Beta Testers

    + +

    ALL Demo Missions pack of the Latest Release

    + +
    + +

    YouTube Channel

    + +

    DETECTION YouTube Channel

    + +

    Contributions:

    @@ -129,7 +147,9 @@ DETECTION uses the in-built detection capabilities of DCS World, but adds new fu DETECTION_BASE +

    DETECTION_BASE class, extends Fsm#FSM

    +

    The DETECTION_BASE class defines the core functions to administer detected objects.

    @@ -323,12 +343,6 @@ DETECTION uses the in-built detection capabilities of DCS World, but adds new fu DETECTION_BASE.AlphaAngleProbability - - - - DETECTION_BASE.ClassName - - @@ -473,6 +487,23 @@ DETECTION uses the in-built detection capabilities of DCS World, but adds new fu DETECTION_BASE.DistanceProbability + + + + DETECTION_BASE:FilterCategories(<, FilterCategories) + +

    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.

    @@ -1064,7 +1095,233 @@ DETECTION uses the in-built detection capabilities of DCS World, but adds new fu
    +

    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 Groups detecting targets following (a) detection method(s).

    + +

    DETECTION_BASE constructor

    + +

    Construct a new DETECTION_BASE instance using the DETECTION_BASE.New() method.

    + +

    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. +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.

    + +

    Use the following functions to report the objects it detected using the methods Visual, Optical, Radar, IRST, RWR, DLINK:

    + + + + +

    DETECTION_ derived classes group the detected units into a DetectedItems[] list

    + +

    DETECTIONBASE 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 SETUNIT object that contains the detected units that belong to that group.

    + +

    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.

    + +

    Various methods exist how to retrieve the grouped items from a DETECTION_BASE derived class:

    + +
      +
    • The method Detection#DETECTION_BASE.GetDetectedItems() retrieves the DetectedItems[] list.
    • +
    • A DetectedItem from the DetectedItems[] list can be retrieved using the method Detection#DETECTION_BASE.GetDetectedItem( 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.
    • +
    • 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 ).
    • +
    + +

    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 } )
    +
    + +

    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. +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.

    + +

    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.

    + +

    The following additional filtering can be applied for visual filtering:

    + +
      +
    • A probability factor per kilometer distance.
    • +
    • 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.
    • +
    • 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.
    • +
    + +

    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.

    + + +

    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.

    + +

    A distance probability factor between 0 and 1 can be given, that will model a linear extrapolated probability over 10 km distance.

    + +

    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%.

    + +

    Note that based on this probability factor, not only the detection but also the type of the unit will be applied!

    + +

    Use the method Detection#DETECTION_BASE.SetDistanceProbability() to set the probability factor upon a 10 km distance.

    + +

    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.

    + +

    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.

    + +

    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%

    + +

    Use the method Detection#DETECTION_BASE.SetAlphaAngleProbability() to set the probability factor if 0°.

    + +

    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 +zones that reflect cloudy areas where detected units may not be so easily visually detected.

    + +

    Use the method Detection#DETECTION_BASE.SetZoneProbability() to set for a defined number of zones, the probability factors.

    + +

    Note however, that the more zones are defined to be "cloudy" within a detection, the more performance it will take +from the DETECTIONBASE to calculate the presence of the detected unit within each zone. +Expecially for ZONEPOLYGON, try to limit the amount of nodes of the polygon!

    + +

    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.

    + +

    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.

    + +

    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.

    + +
     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()
    +
    + + +

    Detection acceptance if within zone(s).

    + +

    Specific ZONEBASE object(s) can be given as a parameter, which will only accept a detection if the unit is within the specified ZONEBASE object(s). +Use the method Detection#DETECTION_BASE.SetAcceptZones() will accept detected units if they are within the specified zones.

    + +
     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()
    +
    + +

    Detection rejectance if within zone(s).

    + +

    Specific ZONEBASE object(s) can be given as a parameter, which will reject detection if the unit is within the specified ZONEBASE object(s). +Use the method Detection#DETECTION_BASE.SetRejectZones() will reject detected units if they are within the specified zones. +An example of how to use the method is shown below.

    + +
     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()
    +
    + +

    DETECTION_BASE is a Finite State Machine

    + +

    Various Events and State Transitions can be tailored using DETECTION_BASE.

    + +

    DETECTION_BASE States

    + +
      +
    • Detecting: The detection is running.
    • +
    • Stopped: The detection is stopped.
    • +
    + +

    DETECTION_BASE Events

    + +
      +
    • Start: Start the detection process.
    • +
    • Detect: Detect new units.
    • +
    • Detected: New units have been detected.
    • +
    • Stop: Stop the detection process. +
    • +
    @@ -1547,209 +1804,7 @@ self

    Type DETECTION_BASE

    - -

    1) 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 Groups detecting targets following (a) detection method(s).

    - -

    1.1) DETECTION_BASE constructor

    - -

    Construct a new DETECTION_BASE instance using the DETECTION_BASE.New() method.

    - -

    1.2) DETECTION_BASE 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. -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.

    - -

    Use the following functions to report the objects it detected using the methods Visual, Optical, Radar, IRST, RWR, DLINK:

    - - - -

    1.3) DETECTION_BASE derived classes group the detected units into a DetectedItems[] list

    - -

    DETECTIONBASE 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 SETUNIT object that contains the detected units that belong to that group.

    - -

    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.

    - -

    Various methods exist how to retrieve the grouped items from a DETECTION_BASE derived class:

    - - - -

    1.4) Apply additional Filters to fine-tune 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. -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.

    - -

    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.

    - -

    The following additional filtering can be applied for visual filtering:

    - - - -

    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

    - -

    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.

    - -

    A distance probability factor between 0 and 1 can be given, that will model a linear extrapolated probability over 10 km distance.

    - -

    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%.

    - -

    Note that based on this probability factor, not only the detection but also the type of the unit will be applied!

    - -

    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

    - -

    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.

    - -

    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.

    - -

    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%

    - -

    Use the method Detection#DETECTION_BASE.SetAlphaAngleProbability() to set the probability factor if 0°.

    - -

    1.4.3 ) 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 -zones that reflect cloudy areas where detected units may not be so easily visually detected.

    - -

    Use the method Detection#DETECTION_BASE.SetZoneProbability() to set for a defined number of zones, the probability factors.

    - -

    Note however, that the more zones are defined to be "cloudy" within a detection, the more performance it will take -from the DETECTIONBASE to calculate the presence of the detected unit within each zone. -Expecially for ZONEPOLYGON, try to limit the amount of nodes of the polygon!

    - -

    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

    - -

    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

    - -

    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.

    - -
     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()
    -
    - - -

    1.5.2 ) Detection acceptance if within zone(s).

    - -

    Specific ZONEBASE object(s) can be given as a parameter, which will only accept a detection if the unit is within the specified ZONEBASE object(s). -Use the method Detection#DETECTION_BASE.SetAcceptZones() will accept detected units if they are within the specified zones.

    - -
     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()
    -
    - -

    1.5.3 ) Detection rejectance if within zone(s).

    - -

    Specific ZONEBASE object(s) can be given as a parameter, which will reject detection if the unit is within the specified ZONEBASE object(s). -Use the method Detection#DETECTION_BASE.SetRejectZones() will reject detected units if they are within the specified zones. -An example of how to use the method is shown below.

    - -
     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()
    -
    - -

    1.6) DETECTION_BASE is a Finite State Machine

    - -

    Various Events and State Transitions can be tailored using DETECTION_BASE.

    - -

    1.6.1) DETECTION_BASE States

    - - - -

    1.6.2) DETECTION_BASE Events

    - - - - -

    Field(s)

    +

    Field(s)

    @@ -1966,20 +2021,6 @@ The index of the DetectedItem.

    - -
    -
    -
    - - #string - -DETECTION_BASE.ClassName - -
    -
    - - -
    @@ -2143,7 +2184,6 @@ self

    - #number DETECTION_BASE.DetectedItemMax @@ -2336,6 +2376,62 @@ self

    + +
    +
    +
    + + +DETECTION_BASE:FilterCategories(<, FilterCategories) + +
    +
    + +

    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 } )
    +
    + + +

    Parameters

    +
      +
    • + +

      #list < : +cs.DCSUnit#Unit> FilterCategories The Categories entries

      + +
    • +
    • + +

      FilterCategories :

      + +
    • +
    +

    Return value

    + +

    #DETECTION_BASE: +self

    +
    @@ -4448,6 +4544,8 @@ self

    Type DETECTION_UNITS.DetectedItem

    +

    Type list

    + diff --git a/docs/Documentation/DetectionManager.html b/docs/Documentation/DetectionManager.html index ac9dbd961..feb3ef02d 100644 --- a/docs/Documentation/DetectionManager.html +++ b/docs/Documentation/DetectionManager.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Escort.html b/docs/Documentation/Escort.html index 1f0a069e8..b4744f616 100644 --- a/docs/Documentation/Escort.html +++ b/docs/Documentation/Escort.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Event.html b/docs/Documentation/Event.html index 8a94e12ab..0b437dd65 100644 --- a/docs/Documentation/Event.html +++ b/docs/Documentation/Event.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Fsm.html b/docs/Documentation/Fsm.html index 1096eb06c..2844100c7 100644 --- a/docs/Documentation/Fsm.html +++ b/docs/Documentation/Fsm.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Group.html b/docs/Documentation/Group.html index edc5b0e62..b6a6e2528 100644 --- a/docs/Documentation/Group.html +++ b/docs/Documentation/Group.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Identifiable.html b/docs/Documentation/Identifiable.html index 517054986..910471fbf 100644 --- a/docs/Documentation/Identifiable.html +++ b/docs/Documentation/Identifiable.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/MOVEMENT.html b/docs/Documentation/MOVEMENT.html index ccaa648dc..02add9246 100644 --- a/docs/Documentation/MOVEMENT.html +++ b/docs/Documentation/MOVEMENT.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • @@ -209,6 +210,7 @@ on defined intervals (currently every minute).

    + #number MOVEMENT.AliveUnits @@ -217,6 +219,9 @@ on defined intervals (currently every minute).

    + +

    Contains the counter how many units are currently alive

    +
    diff --git a/docs/Documentation/Menu.html b/docs/Documentation/Menu.html index eedc00986..a578185b3 100644 --- a/docs/Documentation/Menu.html +++ b/docs/Documentation/Menu.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Message.html b/docs/Documentation/Message.html index 1776bfb3e..504fcea66 100644 --- a/docs/Documentation/Message.html +++ b/docs/Documentation/Message.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/MissileTrainer.html b/docs/Documentation/MissileTrainer.html index 7876a3d73..4a1c318a1 100644 --- a/docs/Documentation/MissileTrainer.html +++ b/docs/Documentation/MissileTrainer.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Mission.html b/docs/Documentation/Mission.html index 9ca58b756..ac3b1191e 100644 --- a/docs/Documentation/Mission.html +++ b/docs/Documentation/Mission.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Object.html b/docs/Documentation/Object.html index 917e8c507..3579148b5 100644 --- a/docs/Documentation/Object.html +++ b/docs/Documentation/Object.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Point.html b/docs/Documentation/Point.html index 06c09a4b3..5818ceabf 100644 --- a/docs/Documentation/Point.html +++ b/docs/Documentation/Point.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Positionable.html b/docs/Documentation/Positionable.html index d01c213f7..c226bd787 100644 --- a/docs/Documentation/Positionable.html +++ b/docs/Documentation/Positionable.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Process_JTAC.html b/docs/Documentation/Process_JTAC.html index bdf36fb2d..fc4875aed 100644 --- a/docs/Documentation/Process_JTAC.html +++ b/docs/Documentation/Process_JTAC.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Process_Pickup.html b/docs/Documentation/Process_Pickup.html index db549cb39..304ed4fc4 100644 --- a/docs/Documentation/Process_Pickup.html +++ b/docs/Documentation/Process_Pickup.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Radio.html b/docs/Documentation/Radio.html index 0b93eff9d..f9b895436 100644 --- a/docs/Documentation/Radio.html +++ b/docs/Documentation/Radio.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Route.html b/docs/Documentation/Route.html index a666064c4..f1cd690ac 100644 --- a/docs/Documentation/Route.html +++ b/docs/Documentation/Route.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Scenery.html b/docs/Documentation/Scenery.html index 826738fc2..88029e853 100644 --- a/docs/Documentation/Scenery.html +++ b/docs/Documentation/Scenery.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/ScheduleDispatcher.html b/docs/Documentation/ScheduleDispatcher.html index 336e02a52..a50490b38 100644 --- a/docs/Documentation/ScheduleDispatcher.html +++ b/docs/Documentation/ScheduleDispatcher.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Scheduler.html b/docs/Documentation/Scheduler.html index 0cc29944b..3d8463caf 100644 --- a/docs/Documentation/Scheduler.html +++ b/docs/Documentation/Scheduler.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Scoring.html b/docs/Documentation/Scoring.html index 31f85f366..d60933fee 100644 --- a/docs/Documentation/Scoring.html +++ b/docs/Documentation/Scoring.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Sead.html b/docs/Documentation/Sead.html index 882f19124..732f5a220 100644 --- a/docs/Documentation/Sead.html +++ b/docs/Documentation/Sead.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Set.html b/docs/Documentation/Set.html index b7146af3d..29d8ccc88 100644 --- a/docs/Documentation/Set.html +++ b/docs/Documentation/Set.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Smoke.html b/docs/Documentation/Smoke.html index e277e59c6..9c43e8eb0 100644 --- a/docs/Documentation/Smoke.html +++ b/docs/Documentation/Smoke.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Spawn.html b/docs/Documentation/Spawn.html index 4eb0349df..5627c6528 100644 --- a/docs/Documentation/Spawn.html +++ b/docs/Documentation/Spawn.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • @@ -99,6 +100,10 @@
    +

    The documentation of the SPAWN class can be found further in this document.

    + +
    +

    Demo Missions

    SPAWN Demo Missions source code

    @@ -804,6 +809,12 @@ and any spaces before and after the resulting name are removed.

    SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle) + + + + SPAWN.uncontrolled + + @@ -917,33 +928,83 @@ So in principle, the group list will contain all parameters and configurations a

    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

    + + + +

    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

    + + + +

    Array formation

    + + + +

    Position randomization

    + +
    • SPAWN.InitRandomizePosition(): Randomizes the position of Groups that are spawned within a radius band, given an Outer and Inner radius, from the point that the spawn happens.
    • SPAWN.InitRandomizeUnits(): Randomizes the Units 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 Zones that are declared using this function. Each zone can be given a probability factor.
    • +
    + +

    Enable / Disable AI when spawning a new Group

    + + +

    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

    + + + +

    Repeat spawned Groups upon landing

    + + + +

    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.
    • @@ -954,6 +1015,16 @@ So in principle, the group list will contain all parameters and configurations a

      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

      + + + + +

      Retrieve alive GROUPs spawned by the SPAWN object

      The SPAWN class administers which GROUPS it has reserved (in stock) or has created during mission execution. @@ -991,6 +1062,15 @@ Whenever a new Group 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 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 +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.

      + +
    @@ -1075,7 +1155,7 @@ A coding example is provided at the description of the @@ -2509,9 +2586,6 @@ when nothing was spawned.

    - -

    By default, no InitLimit

    -
    @@ -2547,7 +2621,7 @@ when nothing was spawned.

    - #number + SPAWN.SpawnMaxGroups @@ -2564,7 +2638,7 @@ when nothing was spawned.

    - #number + SPAWN.SpawnMaxUnitsAlive @@ -2882,7 +2956,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
    - + #boolean SPAWN.SpawnUnControlled @@ -3472,6 +3546,20 @@ True = Continue Scheduler

    + +
    +
    +
    + + + +SPAWN.uncontrolled + +
    +
    + + +
    diff --git a/docs/Documentation/SpawnStatic.html b/docs/Documentation/SpawnStatic.html new file mode 100644 index 000000000..d1672e776 --- /dev/null +++ b/docs/Documentation/SpawnStatic.html @@ -0,0 +1,493 @@ + + + + + + +
    +
    + +
    +
    +
    +
    + +
    +

    Module SpawnStatic

    + +

    Functional -- Spawn dynamically new Statics in your missions.

    + + +

    +Banner Image

    + +
    + +

    Demo Missions

    + +

    SPAWNSTATIC Demo Missions source code

    + +

    SPAWNSTATIC Demo Missions, only for beta testers

    + +

    ALL Demo Missions pack of the last release

    + +
    + +

    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
    • +
    + + +

    Global(s)

    + + + + + +
    SPAWNSTATIC +

    SPAWNSTATIC class, extends Base#BASE

    + +

    The SPAWNSTATIC class allows to spawn dynamically new Statics.

    +
    +

    Type SPAWNSTATIC

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    SPAWNSTATIC.CountryID + +
    SPAWNSTATIC:NewFromStatic(SpawnTemplatePrefix, CountryID) +

    Creates the main object to spawn a Static defined in the ME.

    +
    SPAWNSTATIC:NewFromType(SpawnTypeName, SpawnShapeName, SpawnCategory, CountryID) +

    Creates the main object to spawn a Static based on a type name.

    +
    SPAWNSTATIC:SpawnFromPointVec2(PointVec2, Heading, (, NewName) +

    Creates a new Static from a POINT_VEC2.

    +
    SPAWNSTATIC:SpawnFromZone(Zone, Heading, (, NewName) +

    Creates a new Static from a Zone.

    +
    SPAWNSTATIC.SpawnIndex + +
    SPAWNSTATIC.SpawnTemplatePrefix + +
    SPAWNSTATIC.SpawnTypeName + +
    + +

    Global(s)

    +
    +
    + + #SPAWNSTATIC + +SPAWNSTATIC + +
    +
    + +

    SPAWNSTATIC class, extends Base#BASE

    + +

    The SPAWNSTATIC class allows to spawn dynamically new Statics.

    + + + +

    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 Statics get the same name as the name of the Template Static, +or gets the given name when a Static Type is used.
    +Newly spawned Statics will get the following naming structure at run-time:

    + +
      +
    • Spawned Statics 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:

    + + + +
    +
    +

    Type SpawnStatic

    + +

    Type SPAWNSTATIC

    +

    Field(s)

    +
    +
    + + + +SPAWNSTATIC.CountryID + +
    +
    + + + +
    +
    +
    +
    + + +SPAWNSTATIC:NewFromStatic(SpawnTemplatePrefix, CountryID) + +
    +
    + +

    Creates the main object to spawn a Static defined in the ME.

    + +

    Parameters

    +
      +
    • + +

      #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.

      + +
    • +
    • + +

      CountryID :

      + +
    • +
    +

    Return value

    + +

    #SPAWNSTATIC:

    + + +
    +
    +
    +
    + + +SPAWNSTATIC:NewFromType(SpawnTypeName, SpawnShapeName, SpawnCategory, CountryID) + +
    +
    + +

    Creates the main object to spawn a Static based on a type name.

    + +

    Parameters

    +
      +
    • + +

      #string SpawnTypeName : +is the name of the type.

      + +
    • +
    • + +

      SpawnShapeName :

      + +
    • +
    • + +

      SpawnCategory :

      + +
    • +
    • + +

      CountryID :

      + +
    • +
    +

    Return value

    + +

    #SPAWNSTATIC:

    + + +
    +
    +
    +
    + + +SPAWNSTATIC:SpawnFromPointVec2(PointVec2, Heading, (, NewName) + +
    +
    + +

    Creates a new Static from a POINT_VEC2.

    + +

    Parameters

    +
      +
    • + +

      Core.Point#POINT_VEC2 PointVec2 : +The 2D coordinate where to spawn the static.

      + +
    • +
    • + +

      #number Heading : +The heading of the static, which is a number in degrees from 0 to 360.

      + +
    • +
    • + +

      #string ( : +ptional) The name of the new static.

      + +
    • +
    • + +

      NewName :

      + +
    • +
    +

    Return value

    + +

    #SPAWNSTATIC:

    + + +
    +
    +
    +
    + + +SPAWNSTATIC:SpawnFromZone(Zone, Heading, (, NewName) + +
    +
    + +

    Creates a new Static from a Zone.

    + +

    Parameters

    +
      +
    • + +

      Core.Zone#ZONE_BASE Zone : +The Zone where to spawn the static.

      + +
    • +
    • + +

      #number Heading : +The heading of the static, which is a number in degrees from 0 to 360.

      + +
    • +
    • + +

      #string ( : +ptional) The name of the new static.

      + +
    • +
    • + +

      NewName :

      + +
    • +
    +

    Return value

    + +

    #SPAWNSTATIC:

    + + +
    +
    +
    +
    + + #number + +SPAWNSTATIC.SpawnIndex + +
    +
    + + + +
    +
    +
    +
    + + + +SPAWNSTATIC.SpawnTemplatePrefix + +
    +
    + + + +
    +
    +
    +
    + + + +SPAWNSTATIC.SpawnTypeName + +
    +
    + + + +
    +
    + +

    Type SPAWNSTATIC.SpawnZoneTable

    + +
    + +
    + + diff --git a/docs/Documentation/Static.html b/docs/Documentation/Static.html index 301a96091..76a3a0213 100644 --- a/docs/Documentation/Static.html +++ b/docs/Documentation/Static.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/StaticObject.html b/docs/Documentation/StaticObject.html index 9ad29fa58..d2314e1c1 100644 --- a/docs/Documentation/StaticObject.html +++ b/docs/Documentation/StaticObject.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Task.html b/docs/Documentation/Task.html index a1ce73a53..843c8e760 100644 --- a/docs/Documentation/Task.html +++ b/docs/Documentation/Task.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Task_A2G.html b/docs/Documentation/Task_A2G.html index d72d37dcb..710a2a373 100644 --- a/docs/Documentation/Task_A2G.html +++ b/docs/Documentation/Task_A2G.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Task_A2G_Dispatcher.html b/docs/Documentation/Task_A2G_Dispatcher.html index d4db3bea2..75acc606a 100644 --- a/docs/Documentation/Task_A2G_Dispatcher.html +++ b/docs/Documentation/Task_A2G_Dispatcher.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Task_PICKUP.html b/docs/Documentation/Task_PICKUP.html index d3af6452f..e0ad79000 100644 --- a/docs/Documentation/Task_PICKUP.html +++ b/docs/Documentation/Task_PICKUP.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Unit.html b/docs/Documentation/Unit.html index 382677d42..a240ecfdc 100644 --- a/docs/Documentation/Unit.html +++ b/docs/Documentation/Unit.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Utils.html b/docs/Documentation/Utils.html index ff7d656a3..50bd026f5 100644 --- a/docs/Documentation/Utils.html +++ b/docs/Documentation/Utils.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/Zone.html b/docs/Documentation/Zone.html index 15c96b3fe..2116bbc66 100644 --- a/docs/Documentation/Zone.html +++ b/docs/Documentation/Zone.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/env.html b/docs/Documentation/env.html index cc0bb80d7..1e26ec179 100644 --- a/docs/Documentation/env.html +++ b/docs/Documentation/env.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/index.html b/docs/Documentation/index.html index 5459603f9..b8f2c030d 100644 --- a/docs/Documentation/index.html +++ b/docs/Documentation/index.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • @@ -480,6 +481,12 @@ and creates a CSV file logging the scoring events and results for use at team or Spawn

    Functional -- Spawn dynamically new Groups in your missions.

    + + + + SpawnStatic + +

    Functional -- Spawn dynamically new Statics in your missions.

    diff --git a/docs/Documentation/land.html b/docs/Documentation/land.html index 060915f8d..8d34bf296 100644 --- a/docs/Documentation/land.html +++ b/docs/Documentation/land.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task
  • diff --git a/docs/Documentation/routines.html b/docs/Documentation/routines.html index d72f63d77..ec770cd45 100644 --- a/docs/Documentation/routines.html +++ b/docs/Documentation/routines.html @@ -74,6 +74,7 @@
  • Set
  • Smoke
  • Spawn
  • +
  • SpawnStatic
  • Static
  • StaticObject
  • Task