diff --git a/Moose Development/Moose/AI/AI_Designate.lua b/Moose Development/Moose/AI/AI_Designate.lua index 5d725e623..0feb71078 100644 --- a/Moose Development/Moose/AI/AI_Designate.lua +++ b/Moose Development/Moose/AI/AI_Designate.lua @@ -1,9 +1,35 @@ ---- **AI (Release 2.1)** -- Management of target designation. +--- **AI R2.1** -- Management of target **Designation**. -- -- --![Banner Image](..\Presentations\DESIGNATE\Dia1.JPG) -- -- === -- +-- AI_DESIGNATE is orchestrating the designation of potential targets executed by a Recce group, +-- and communicates these to a dedicated attacking group of players, +-- so that following a dynamically generated menu system, +-- each detected set of potential targets can be lased or smoked... +-- +-- Targets can be: +-- +-- * **Lased** for a period of time. +-- * **Smoked**. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.) +-- * **Illuminated** through an illumination bomb. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready. +-- +-- === +-- +-- # **AUTHORS and CONTRIBUTIONS** +-- +-- ### Contributions: +-- +-- * [**Ciribob**](https://forums.eagle.ru/member.php?u=112175): Showing the way how to lase targets + how laser codes work!!! Explained the autolase script. +-- * [**EasyEB**](https://forums.eagle.ru/member.php?u=112055): Ideas and Beta Testing +-- * [**Wingthor**](https://forums.eagle.ru/member.php?u=123698): Beta Testing +-- +-- +-- ### Authors: +-- +-- * **FlightControl**: Design & Programming +-- -- @module AI_Designate @@ -79,7 +105,7 @@ do -- AI_DESIGNATE -- -- ## 2. AI_DESIGNATE is a FSM -- - -- ![Process](µ) + -- ![Process]() -- -- ### 2.1 AI_DESIGNATE States -- @@ -111,7 +137,16 @@ do -- AI_DESIGNATE -- -- The above sets a collection of possible laser codes that can be assigned. **Note the { } notation!** -- + -- ## 4. Autolase to automatically lase detected targets. -- + -- _DetectionItems_ can be auto lased once detected by _Recces_. As such, there is almost no action required from the _Players_ using the _Designate Menu_. + -- The **auto lase** function can be activated through the Designation Menu. + -- Use the method @{#AI_DESIGNATE.SetAutoLase}() to activate or deactivate the auto lase function programmatically. + -- Note that autolase will automatically activate lasing for ALL _DetectedItems_. Individual items can be switched-off if required using the _Designation Menu_. + -- + -- AIDesignate:SetAutoLase( true ) + -- + -- Activate the auto lasing. -- -- @field #AI_DESIGNATE -- @@ -321,7 +356,7 @@ do -- AI_DESIGNATE -- @param #AI_DESIGNATE self -- @param #list<#number> LaserCodes -- @return #AI_DESIGNATE - function AI_DESIGNATE:SetLaserCodes( LaserCodes ) + function AI_DESIGNATE:SetLaserCodes( LaserCodes ) --R2.1 self.LaserCodes = ( type( LaserCodes ) == "table" ) and LaserCodes or { LaserCodes } self:E(self.LaserCodes) @@ -336,7 +371,7 @@ do -- AI_DESIGNATE -- @param #AI_DESIGNATE self -- @param #boolean AutoLase -- @return #AI_DESIGNATE - function AI_DESIGNATE:SetAutoLase( AutoLase ) + function AI_DESIGNATE:SetAutoLase( AutoLase ) --R2.1 self.AutoLase = AutoLase diff --git a/Moose Development/Moose/Core/Cargo.lua b/Moose Development/Moose/Core/Cargo.lua index 2199ad032..feb1291b7 100644 --- a/Moose Development/Moose/Core/Cargo.lua +++ b/Moose Development/Moose/Core/Cargo.lua @@ -224,14 +224,14 @@ do -- CARGO -- @map < #string, Wrapper.Positionable#POSITIONABLE > The alive POSITIONABLE objects representing the the cargo. ---- (R2.1) CARGO Constructor. This class is an abstract class and should not be instantiated. +--- CARGO Constructor. This class is an abstract class and should not be instantiated. -- @param #CARGO self -- @param #string Type -- @param #string Name -- @param #number Weight -- @param #number NearRadius (optional) -- @return #CARGO -function CARGO:New( Type, Name, Weight ) +function CARGO:New( Type, Name, Weight ) --R2.1 local self = BASE:Inherit( self, FSM:New() ) -- #CARGO self:F( { Type, Name, Weight } ) @@ -266,10 +266,10 @@ function CARGO:New( Type, Name, Weight ) return self end ---- (R2.1) Get the name of the Cargo. +--- Get the name of the Cargo. -- @param #CARGO self -- @return #string The name of the Cargo. -function CARGO:GetName() +function CARGO:GetName() --R2.1 return self.Name end diff --git a/Moose Development/Moose/Core/Point.lua b/Moose Development/Moose/Core/Point.lua index 0c8e1885c..5055f52f1 100644 --- a/Moose Development/Moose/Core/Point.lua +++ b/Moose Development/Moose/Core/Point.lua @@ -789,11 +789,11 @@ function POINT_VEC3:FlareRed( Azimuth ) self:Flare( FLARECOLOR.Red, Azimuth ) end ---- (R2.1) Returns if a PointVec3 has Line of Sight (LOS) with the ToPointVec3. +--- Returns if a PointVec3 has Line of Sight (LOS) with the ToPointVec3. -- @param #POINT_VEC3 self -- @param #POINT_VEC3 ToPointVec3 -- @return #boolean true If the ToPointVec3 has LOS with the PointVec3, otherwise false. -function POINT_VEC3:IsLOS( ToPointVec3 ) +function POINT_VEC3:IsLOS( ToPointVec3 ) --R2.1 -- Measurement of visibility should not be from the ground, so Adding a hypotethical 2 meters to each PointVec3. local FromVec3 = self:GetVec3() diff --git a/Moose Development/Moose/Core/SpawnStatic.lua b/Moose Development/Moose/Core/SpawnStatic.lua index 0ddbe4d12..2655ac08b 100644 --- a/Moose Development/Moose/Core/SpawnStatic.lua +++ b/Moose Development/Moose/Core/SpawnStatic.lua @@ -91,11 +91,11 @@ SPAWNSTATIC = { -- @list SpawnZone ---- (R2.1) Creates the main object to spawn a @{Static} defined in the ME. +--- 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 ) +function SPAWNSTATIC:NewFromStatic( SpawnTemplatePrefix, CountryID ) --R2.1 local self = BASE:Inherit( self, BASE:New() ) -- #SPAWNSTATIC self:F( { SpawnTemplatePrefix } ) @@ -113,11 +113,11 @@ function SPAWNSTATIC:NewFromStatic( SpawnTemplatePrefix, CountryID ) return self end ---- (R2.1) Creates the main object to spawn a @{Static} based on a type name. +--- 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 ) +function SPAWNSTATIC:NewFromType( SpawnTypeName, SpawnShapeName, SpawnCategory, CountryID ) --R2.1 local self = BASE:Inherit( self, BASE:New() ) -- #SPAWNSTATIC self:F( { SpawnTypeName } ) @@ -131,13 +131,13 @@ function SPAWNSTATIC:NewFromType( SpawnTypeName, SpawnShapeName, SpawnCategory, end ---- (R2.1) Creates a new @{Static} from a POINT_VEC2. +--- 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 ) +function SPAWNSTATIC:SpawnFromPointVec2( PointVec2, Heading, NewName ) --R2.1 self:F( { PointVec2, Heading, NewName } ) local CountryName = _DATABASE.COUNTRY_NAME[self.CountryID] @@ -161,13 +161,13 @@ function SPAWNSTATIC:SpawnFromPointVec2( PointVec2, Heading, NewName ) return Static end ---- (R2.1) Creates a new @{Static} from a @{Zone}. +--- 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 ) +function SPAWNSTATIC:SpawnFromZone( Zone, Heading, NewName ) --R2.1 self:F( { Zone, Heading, NewName } ) local Static = self:SpawnFromPointVec2( Zone:GetPointVec2(), Heading, NewName ) diff --git a/Moose Development/Moose/Core/Spot.lua b/Moose Development/Moose/Core/Spot.lua index b925af8a4..3adccb06f 100644 --- a/Moose Development/Moose/Core/Spot.lua +++ b/Moose Development/Moose/Core/Spot.lua @@ -1,10 +1,15 @@ ---- **Core (Release 2.1)** -- Management of SPOT logistics, that can be transported from and to transportation carriers. +--- **Core 2.1** -- Management of SPOT logistics, that can be transported from and to transportation carriers. -- -- ![Banner Image](..\Presentations\SPOT\Dia1.JPG) -- -- === -- --- Spot lases points endlessly or for a duration. +-- SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to: +-- +-- * Spot for a defined duration. +-- * wiggle the spot at the target. +-- * Provide a @{Unit} as a target, instead of a point. +-- * Implement a status machine, LaseOn, LaseOff. -- -- ==== -- @@ -22,9 +27,20 @@ -- -- ### [SPOT YouTube Channel]() -- --- ==== +-- === -- --- This module is still under construction, but is described above works already, and will keep working ... +-- # **AUTHORS and CONTRIBUTIONS** +-- +-- ### Contributions: +-- +-- * [**Ciribob**](https://forums.eagle.ru/member.php?u=112175): Showing the way how to lase targets + how laser codes work!!! Explained the autolase script. +-- * [**EasyEB**](https://forums.eagle.ru/member.php?u=112055): Ideas and Beta Testing +-- * [**Wingthor**](https://forums.eagle.ru/member.php?u=123698): Beta Testing +-- +-- +-- ### Authors: +-- +-- * **FlightControl**: Design & Programming -- -- @module Spot @@ -32,10 +48,43 @@ do --- @type SPOT - -- @extends Core.Base#BASE + -- @extends Core.Fsm#FSM - --- + --- # SPOT class, extends @{Fsm#FSM} + -- + -- SPOT implements the DCS Spot class functionality, but adds additional luxury to be able to: + -- + -- * Spot for a defined duration. + -- * wiggle the spot at the target. + -- * Provide a @{Unit} as a target, instead of a point. + -- * Implement a status machine, LaseOn, LaseOff. + -- + -- ## 1. SPOT constructor + -- + -- * @{#SPOT.New}(): Creates a new SPOT object. + -- + -- ## 2. SPOT is a FSM + -- + -- ![Process]() + -- + -- ### 2.1 SPOT States + -- + -- * **Off**: Lasing is switched off. + -- * **On**: Lasing is switched on. + -- * **Destroyed**: Target is destroyed. + -- + -- ### 2.2 SPOT Events + -- + -- * **@{#SPOT.LaseOn}(Target, LaserCode, Duration)**: Lase to a target. + -- * **@{#SPOT.LaseOff}()**: Stop lasing the target. + -- * **@{#SPOT.Lasing}()**: Target is being lased. + -- * **@{#SPOT.Destroyed}()**: Triggered when target is destroyed. + -- + -- ## 3. Check if a Target is being lased + -- + -- The method @{#SPOT.IsLasing}() indicates whether lasing is on or off. + -- -- @field #SPOT SPOT = { ClassName = "SPOT", diff --git a/Moose Development/Moose/Functional/Spawn.lua b/Moose Development/Moose/Functional/Spawn.lua index fc3473d59..c6faf2ee8 100644 --- a/Moose Development/Moose/Functional/Spawn.lua +++ b/Moose Development/Moose/Functional/Spawn.lua @@ -22,46 +22,6 @@ -- -- ### [SPAWN YouTube Channel](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl1jirWIo4t4YxqN-HxjqRkL) -- --- ==== --- --- # **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: --- --- 2017-04-08: SPAWN:**InitDelayOnOff( DelayOnOff )** added. --- 2017-04-08: SPAWN:**InitDelayOn()** added. --- 2017-04-08: SPAWN:**InitDelayOff()** added. --- --- 2017-03-14: SPAWN:**InitKeepUnitNames()** added. --- 2017-03-14: SPAWN:**InitRandomizePosition( RandomizePosition, OuterRadious, InnerRadius )** added. --- --- 2017-02-04: SPAWN:InitUnControlled( **UnControlled** ) replaces SPAWN:InitUnControlled(). --- --- 2017-01-24: SPAWN:**InitAIOnOff( AIOnOff )** added. --- 2017-01-24: SPAWN:**InitAIOn()** added. --- 2017-01-24: SPAWN:**InitAIOff()** added. --- --- 2016-08-15: SPAWN:**InitCleanUp**( SpawnCleanUpInterval ) replaces SPAWN:_CleanUp_( SpawnCleanUpInterval ). --- 2016-08-15: SPAWN:**InitRandomizeZones( SpawnZones )** added. --- --- 2016-08-14: SPAWN:**OnSpawnGroup**( SpawnCallBackFunction, ... ) replaces SPAWN:_SpawnFunction_( SpawnCallBackFunction, ... ). --- 2016-08-14: SPAWN.SpawnInZone( Zone, __RandomizeGroup__, SpawnIndex ) replaces SpawnInZone( Zone, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ). --- 2016-08-14: SPAWN.SpawnFromVec3( Vec3, SpawnIndex ) replaces SpawnFromVec3( Vec3, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ). --- 2016-08-14: SPAWN.SpawnFromVec2( Vec2, SpawnIndex ) replaces SpawnFromVec2( Vec2, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ). --- 2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromUnit( SpawnUnit, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ). --- 2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromStatic( SpawnStatic, _RandomizeUnits, OuterRadius, InnerRadius,_ SpawnIndex ). --- 2016-08-14: SPAWN.**InitRandomizeUnits( RandomizeUnits, OuterRadius, InnerRadius )** added. --- 2016-08-14: SPAWN.**Init**Limit( SpawnMaxUnitsAlive, SpawnMaxGroups ) replaces SPAWN._Limit_( SpawnMaxUnitsAlive, SpawnMaxGroups ). --- 2016-08-14: SPAWN.**Init**Array( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ) replaces SPAWN._Array_( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ). --- 2016-08-14: SPAWN.**Init**RandomizeRoute( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ) replaces SPAWN._RandomizeRoute_( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ). --- 2016-08-14: SPAWN.**Init**RandomizeTemplate( SpawnTemplatePrefixTable ) replaces SPAWN._RandomizeTemplate_( SpawnTemplatePrefixTable ). --- 2016-08-14: SPAWN.**Init**UnControlled() replaces SPAWN._UnControlled_(). --- -- === -- -- # **AUTHORS and CONTRIBUTIONS** diff --git a/Moose Development/Moose/Wrapper/Positionable.lua b/Moose Development/Moose/Wrapper/Positionable.lua index 5b3d2339c..695e2ed44 100644 --- a/Moose Development/Moose/Wrapper/Positionable.lua +++ b/Moose Development/Moose/Wrapper/Positionable.lua @@ -428,14 +428,14 @@ function POSITIONABLE:MessageToGroup( Message, Duration, MessageGroup, Name ) return nil end ---- (R2.1) Send a message to a @{Set#SET_GROUP}. +--- Send a message to a @{Set#SET_GROUP}. -- The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message. -- @param #POSITIONABLE self -- @param #string Message The message text -- @param Dcs.DCSTypes#Duration Duration The duration of the message. -- @param Core.Set#SET_GROUP MessageSetGroup The SET_GROUP collection receiving the message. -- @param #string Name (optional) The Name of the sender. If not provided, the Name is the type of the Positionable. -function POSITIONABLE:MessageToSetGroup( Message, Duration, MessageSetGroup, Name ) +function POSITIONABLE:MessageToSetGroup( Message, Duration, MessageSetGroup, Name ) --R2.1 self:F2( { Message, Duration } ) local DCSObject = self:GetDCSObject() @@ -469,30 +469,30 @@ function POSITIONABLE:Message( Message, Duration, Name ) return nil end ---- (R2.1) Create a @{Radio#RADIO}, to allow radio transmission for this POSITIONABLE. +--- Create a @{Radio#RADIO}, to allow radio transmission for this POSITIONABLE. -- Set parameters with the methods provided, then use RADIO:Broadcast() to actually broadcast the message -- @param #POSITIONABLE self -- @return #RADIO Radio -function POSITIONABLE:GetRadio() +function POSITIONABLE:GetRadio() --R2.1 self:F2(self) return RADIO:New(self) end ---- (R2.1) Create a @{Radio#BEACON}, to allow this POSITIONABLE to broadcast beacon signals +--- Create a @{Radio#BEACON}, to allow this POSITIONABLE to broadcast beacon signals -- @param #POSITIONABLE self -- @return #RADIO Radio -function POSITIONABLE:GetBeacon() +function POSITIONABLE:GetBeacon() --R2.1 self:F2(self) return BEACON:New(self) end ---- (R2.1) Start Lasing a POSITIONABLE +--- Start Lasing a POSITIONABLE -- @param #POSITIONABLE self -- @param #POSITIONABLE Target -- @param #number LaserCode -- @param #number Duration -- @return Core.Spot#SPOT -function POSITIONABLE:LaseUnit( Target, LaserCode, Duration ) +function POSITIONABLE:LaseUnit( Target, LaserCode, Duration ) --R2.1 self:F2() LaserCode = LaserCode or math.random( 1000, 9999 ) @@ -509,10 +509,10 @@ function POSITIONABLE:LaseUnit( Target, LaserCode, Duration ) end ---- (R2.1) Stop Lasing a POSITIONABLE +--- Stop Lasing a POSITIONABLE -- @param #POSITIONABLE self -- @return #POSITIONABLE -function POSITIONABLE:LaseOff() +function POSITIONABLE:LaseOff() --R2.1 self:F2() if self.Spot then @@ -523,10 +523,10 @@ function POSITIONABLE:LaseOff() return self end ---- (R2.1) Check if the POSITIONABLE is lasing a target +--- Check if the POSITIONABLE is lasing a target -- @param #POSITIONABLE self -- @return #boolean true if it is lasing a target -function POSITIONABLE:IsLasing() +function POSITIONABLE:IsLasing() --R2.1 self:F2() local Lasing = false @@ -538,18 +538,18 @@ function POSITIONABLE:IsLasing() return Lasing end ---- (R2.1) Get the Spot +--- Get the Spot -- @param #POSITIONABLE self -- @return Core.Spot#SPOT The Spot -function POSITIONABLE:GetSpot() +function POSITIONABLE:GetSpot() --R2.1 return self.Spot end ---- (R2.1) Get the last assigned laser code +--- Get the last assigned laser code -- @param #POSITIONABLE self -- @return #number The laser code -function POSITIONABLE:GetLaserCode() +function POSITIONABLE:GetLaserCode() --R2.1 return self.LaserCode end diff --git a/Moose Development/Moose/Wrapper/Unit.lua b/Moose Development/Moose/Wrapper/Unit.lua index d35ffc175..0107839b5 100644 --- a/Moose Development/Moose/Wrapper/Unit.lua +++ b/Moose Development/Moose/Wrapper/Unit.lua @@ -1012,22 +1012,22 @@ end do -- Detection - --- (R2.1) Returns if a unit is detecting the TargetUnit. + --- Returns if a unit is detecting the TargetUnit. -- @param #UNIT self -- @param #UNIT TargetUnit -- @return #boolean true If the TargetUnit is detected by the unit, otherwise false. - function UNIT:IsDetected( TargetUnit ) + function UNIT:IsDetected( TargetUnit ) --R2.1 local TargetIsDetected, TargetIsVisible, TargetLastTime, TargetKnowType, TargetKnowDistance, TargetLastPos, TargetLastVelocity = self:IsTargetDetected( TargetUnit:GetDCSObject() ) return TargetIsDetected end - --- (R2.1) Returns if a unit has Line of Sight (LOS) with the TargetUnit. + --- Returns if a unit has Line of Sight (LOS) with the TargetUnit. -- @param #UNIT self -- @param #UNIT TargetUnit -- @return #boolean true If the TargetUnit has LOS with the unit, otherwise false. - function UNIT:IsLOS( TargetUnit ) + function UNIT:IsLOS( TargetUnit ) --R2.1 local IsLOS = self:GetPointVec3():IsLOS( TargetUnit:GetPointVec3() ) diff --git a/docs/Documentation/AI_Designate.html b/docs/Documentation/AI_Designate.html index df67983a0..1afab5d4c 100644 --- a/docs/Documentation/AI_Designate.html +++ b/docs/Documentation/AI_Designate.html @@ -95,7 +95,7 @@

Module AI_Designate

-

AI (Release 2.1) -- Management of target designation.

+

AI R2.1 -- Management of target Designation.

@@ -103,6 +103,38 @@
+

AI_DESIGNATE is orchestrating the designation of potential targets executed by a Recce group, +and communicates these to a dedicated attacking group of players, +so that following a dynamically generated menu system, +each detected set of potential targets can be lased or smoked...

+ +

Targets can be:

+ + + +
+ +

AUTHORS and CONTRIBUTIONS

+ +

Contributions:

+ + + + +

Authors:

+ + +

Global(s)

@@ -121,6 +153,24 @@ each detected set of potential targets can be lased or smoked...

Type AI_DESIGNATE

+ + + + + + + + + + + + - - - - + + + + @@ -175,31 +225,43 @@ each detected set of potential targets can be lased or smoked...

- + - + - + - + - + + + + + + + + + @@ -280,12 +342,24 @@ each detected set of potential targets can be lased or smoked...

+ + + + + + + + @@ -304,12 +378,6 @@ each detected set of potential targets can be lased or smoked...

- - - - @@ -367,31 +435,31 @@ each detected set of potential targets can be lased or smoked...

- + - + - + - + - + @@ -490,7 +558,7 @@ Once Targets have been detected, the DesignateObject will trig

2. AI_DESIGNATE is a FSM

-

Process

+

Process

2.1 AI_DESIGNATE States

@@ -528,7 +596,17 @@ One laser code can be given or an sequence of laser codes through an table...

The above sets a collection of possible laser codes that can be assigned. Note the { } notation!

+

4. Autolase to automatically lase detected targets.

+

DetectionItems can be auto lased once detected by Recces. As such, there is almost no action required from the Players using the Designate Menu. +The auto lase function can be activated through the Designation Menu. +Use the method AI_DESIGNATE.SetAutoLase() to activate or deactivate the auto lase function programmatically. +Note that autolase will automatically activate lasing for ALL DetectedItems. Individual items can be switched-off if required using the Designation Menu.

+ +
AIDesignate:SetAutoLase( true )
+
+ +

Activate the auto lasing.

@@ -540,6 +618,52 @@ One laser code can be given or an sequence of laser codes through an table...

+ +AI_DESIGNATE:ActivateAutoLase() + +
+
+ +

Coordinates the Auto Lase.

+ +

Return value

+ +

#AI_DESIGNATE:

+ + +
+ +
+
+ + + +AI_DESIGNATE.AttackSet + +
+
+ + + +
+
+
+
+ + + +AI_DESIGNATE.AutoLase + +
+
+ + + +
+
+
+
+ AI_DESIGNATE.Designating @@ -576,20 +700,6 @@ One laser code can be given or an sequence of laser codes through an table...

-
-
-
- - - -AI_DESIGNATE.GroupSet - -
-
- - -
@@ -603,6 +713,20 @@ One laser code can be given or an sequence of laser codes through an table...

Illuminate Trigger for AI_DESIGNATE

+ +
+
+
+ + #number + +AI_DESIGNATE.LaseDuration + +
+
+ + +
@@ -661,21 +785,37 @@ One laser code can be given or an sequence of laser codes through an table...

- -AI_DESIGNATE:MenuIlluminate(AttackGroup, Index) + +AI_DESIGNATE:MenuAutoLase(AutoLase)
-

Parameters

+

Parameter

  • -

    AttackGroup :

    +

    AutoLase :

  • +
+
+
+
+
+ + +AI_DESIGNATE:MenuIlluminate(Index) + +
+
+ + + +

Parameter

+
+
+
+ -AI_DESIGNATE:New(Detection, GroupSet) +AI_DESIGNATE:New(Detection, AttackSet)
@@ -800,8 +946,8 @@ One laser code can be given or an sequence of laser codes through an table...

  • -

    Core.Set#SET_GROUP GroupSet : -The set of groups to designate for.

    +

    Core.Set#SET_GROUP AttackSet : +The Attack collection of GROUP objects to designate and report for.

  • @@ -1226,6 +1372,20 @@ The set of groups to designate for.

    +
    +
    +
    +
    + + + +AI_DESIGNATE.Recces + +
    +
    + + +
    @@ -1244,6 +1404,35 @@ The set of groups to designate for.

    #AI_DESIGNATE:

    + +
    +
    +
    + + +AI_DESIGNATE:SetAutoLase(AutoLase) + +
    +
    + +

    Set auto lase.

    + + +

    Auto lase will start lasing targets immediately when these are in range.

    + +

    Parameter

    +
      +
    • + +

      #boolean AutoLase :

      + +
    • +
    +

    Return value

    + +

    #AI_DESIGNATE:

    + +
    @@ -1310,20 +1499,6 @@ number> LaserCodes

    Smoke Trigger for AI_DESIGNATE

    - -
    -
    -
    - - - -AI_DESIGNATE.Spots - -
    -
    - - -
    @@ -1528,7 +1703,7 @@ number> LaserCodes

    -AI_DESIGNATE:onafterIlluminate(From, Event, To, AttackGroup, Index) +AI_DESIGNATE:onafterIlluminate(From, Event, To, Index)
    @@ -1554,11 +1729,6 @@ number> LaserCodes

  • -

    AttackGroup :

    - -
  • -
  • -

    Index :

  • @@ -1574,7 +1744,7 @@ number> LaserCodes

    -AI_DESIGNATE:onafterLaseOff(From, Event, To, AttackGroup, Index) +AI_DESIGNATE:onafterLaseOff(From, Event, To, Index)
    @@ -1600,11 +1770,6 @@ number> LaserCodes

  • -

    AttackGroup :

    - -
  • -
  • -

    Index :

  • @@ -1620,7 +1785,7 @@ number> LaserCodes

    -AI_DESIGNATE:onafterLaseOn(From, Event, To, AttackGroup, Index, Duration) +AI_DESIGNATE:onafterLaseOn(From, Event, To, Index, Duration)
    @@ -1646,11 +1811,6 @@ number> LaserCodes

  • -

    AttackGroup :

    - -
  • -
  • -

    Index :

  • @@ -1660,18 +1820,13 @@ number> LaserCodes

    -

    Return value

    - -

    #AI_DESIGNATE:

    - -
    -AI_DESIGNATE:onafterLasing(From, Event, To, AttackGroup, Index, Duration) +AI_DESIGNATE:onafterLasing(From, Event, To, Index, Duration)
    @@ -1697,11 +1852,6 @@ number> LaserCodes

  • -

    AttackGroup :

    - -
  • -
  • -

    Index :

  • @@ -1722,7 +1872,7 @@ number> LaserCodes

    -AI_DESIGNATE:onafterSmoke(From, Event, To, AttackGroup, Index, Color) +AI_DESIGNATE:onafterSmoke(From, Event, To, Index, Color)
    @@ -1748,11 +1898,6 @@ number> LaserCodes

  • -

    AttackGroup :

    - -
  • -
  • -

    Index :

  • diff --git a/docs/Documentation/Cargo.html b/docs/Documentation/Cargo.html index c0533186b..950d977d9 100644 --- a/docs/Documentation/Cargo.html +++ b/docs/Documentation/Cargo.html @@ -217,7 +217,7 @@
    @@ -283,7 +283,7 @@ @@ -970,7 +970,7 @@ The radius when the cargo will board the Carrier (to avoid collision).

    -

    (R2.1) Get the name of the Cargo.

    +

    Get the name of the Cargo.

    Return value

    @@ -1186,7 +1186,7 @@ The Carrier that will hold the cargo.

    -

    (R2.1) CARGO Constructor.

    +

    CARGO Constructor.

    This class is an abstract class and should not be instantiated.

    diff --git a/docs/Documentation/Movement.html b/docs/Documentation/Movement.html index 6c410e890..6199b647b 100644 --- a/docs/Documentation/Movement.html +++ b/docs/Documentation/Movement.html @@ -213,6 +213,7 @@ on defined intervals (currently every minute).

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

    + +

    Contains the counter how many units are currently alive

    +
    diff --git a/docs/Documentation/Point.html b/docs/Documentation/Point.html index 3b284b806..a0d189a7f 100644 --- a/docs/Documentation/Point.html +++ b/docs/Documentation/Point.html @@ -489,7 +489,7 @@
    @@ -1451,6 +1451,7 @@ The new calculated POINT_VEC2.

    + POINT_VEC2.z @@ -2151,7 +2152,7 @@ The z coodinate.

    -

    (R2.1) Returns if a PointVec3 has Line of Sight (LOS) with the ToPointVec3.

    +

    Returns if a PointVec3 has Line of Sight (LOS) with the ToPointVec3.

    Parameter

      diff --git a/docs/Documentation/Positionable.html b/docs/Documentation/Positionable.html index 66a0b50be..f6c4a9726 100644 --- a/docs/Documentation/Positionable.html +++ b/docs/Documentation/Positionable.html @@ -162,13 +162,19 @@
    + + + + @@ -198,13 +204,19 @@ + + + + @@ -246,19 +258,25 @@ + + + + @@ -301,6 +319,12 @@ + + + + @@ -318,7 +342,7 @@
    AI_DESIGNATE:ActivateAutoLase() +

    Coordinates the Auto Lase.

    +
    AI_DESIGNATE.AttackSet + +
    AI_DESIGNATE.AutoLase + +
    AI_DESIGNATE.Designating @@ -136,18 +186,18 @@ each detected set of potential targets can be lased or smoked...

    AI_DESIGNATE.Detection -
    AI_DESIGNATE.GroupSet -
    AI_DESIGNATE:Illuminate()

    Illuminate Trigger for AI_DESIGNATE

    +
    AI_DESIGNATE.LaseDuration +
    AI_DESIGNATE:MenuIlluminate(AttackGroup, Index)AI_DESIGNATE:MenuAutoLase(AutoLase)
    AI_DESIGNATE:MenuLaseOff(AttackGroup, Index, Duration)AI_DESIGNATE:MenuIlluminate(Index)
    AI_DESIGNATE:MenuLaseOn(AttackGroup, Index, Duration)AI_DESIGNATE:MenuLaseOff(Index, Duration)
    AI_DESIGNATE:MenuSmoke(AttackGroup, Index, Color)AI_DESIGNATE:MenuLaseOn(Index, Duration)
    AI_DESIGNATE:New(Detection, GroupSet)AI_DESIGNATE:MenuSmoke(Index, Color) + +
    AI_DESIGNATE:MenuStatus(AttackGroup) + +
    AI_DESIGNATE:New(Detection, AttackSet)

    AI_DESIGNATE Constructor.

    AI_DESIGNATE.RecceSet +
    AI_DESIGNATE.Recces +
    AI_DESIGNATE:SendStatus()

    Sends the status to the Attack Groups.

    +
    AI_DESIGNATE:SetAutoLase(AutoLase) +

    Set auto lase.

    AI_DESIGNATE:Smoke()

    Smoke Trigger for AI_DESIGNATE

    -
    AI_DESIGNATE.Spots -
    AI_DESIGNATE:onafterIlluminate(From, Event, To, AttackGroup, Index)AI_DESIGNATE:onafterIlluminate(From, Event, To, Index)

    Illuminating

    AI_DESIGNATE:onafterLaseOff(From, Event, To, AttackGroup, Index)AI_DESIGNATE:onafterLaseOff(From, Event, To, Index)
    AI_DESIGNATE:onafterLaseOn(From, Event, To, AttackGroup, Index, Duration)AI_DESIGNATE:onafterLaseOn(From, Event, To, Index, Duration)
    AI_DESIGNATE:onafterLasing(From, Event, To, AttackGroup, Index, Duration)AI_DESIGNATE:onafterLasing(From, Event, To, Index, Duration)
    AI_DESIGNATE:onafterSmoke(From, Event, To, AttackGroup, Index, Color)AI_DESIGNATE:onafterSmoke(From, Event, To, Index, Color)
    CARGO:GetName() -

    (R2.1) Get the name of the Cargo.

    +

    Get the name of the Cargo.

    CARGO:New(Type, Name, Weight, NearRadius) -

    (R2.1) CARGO Constructor.

    +

    CARGO Constructor.

    POINT_VEC3:IsLOS(ToPointVec3) -

    (R2.1) Returns if a PointVec3 has Line of Sight (LOS) with the ToPointVec3.

    +

    Returns if a PointVec3 has Line of Sight (LOS) with the ToPointVec3.

    POSITIONABLE:GetBeacon() -

    (R2.1) Create a Radio#BEACON, to allow this POSITIONABLE to broadcast beacon signals

    +

    Create a Radio#BEACON, to allow this POSITIONABLE to broadcast beacon signals

    POSITIONABLE:GetHeading()

    Returns the POSITIONABLE heading in degrees.

    +
    POSITIONABLE:GetLaserCode() +

    Get the last assigned laser code

    POSITIONABLE:GetRadio() -

    (R2.1) Create a Radio#RADIO, to allow radio transmission for this POSITIONABLE.

    +

    Create a Radio#RADIO, to allow radio transmission for this POSITIONABLE.

    POSITIONABLE:GetRandomVec3(Radius)

    Returns a random DCSTypes#Vec3 vector within a range, indicating the point in 3D of the POSITIONABLE within the mission.

    +
    POSITIONABLE:GetSpot() +

    Get the Spot

    POSITIONABLE:IsLasing() -

    (R2.1) Check if the POSITIONABLE is lasing a target

    +

    Check if the POSITIONABLE is lasing a target

    POSITIONABLE:LaseOff() -

    (R2.1) Stop Lasing a POSITIONABLE

    +

    Stop Lasing a POSITIONABLE

    POSITIONABLE:LaseUnit(Target, LaserCode, Duration) -

    (R2.1) Start Lasing a POSITIONABLE

    +

    Start Lasing a POSITIONABLE

    +
    POSITIONABLE.LaserCode +

    The last assigned laser code.

    POSITIONABLE:MessageToRed(Message, Duration, Name)

    Send a message to the red coalition.

    +
    POSITIONABLE:MessageToSetGroup(Message, Duration, MessageSetGroup, Name) +

    Send a message to a Set#SET_GROUP.

    POSITIONABLE.Spot - +

    The laser Spot.

    @@ -415,7 +439,7 @@ The POSITIONABLE is not existing or alive.

    -

    (R2.1) Create a Radio#BEACON, to allow this POSITIONABLE to broadcast beacon signals

    +

    Create a Radio#BEACON, to allow this POSITIONABLE to broadcast beacon signals

    Return value

    @@ -455,6 +479,24 @@ The POSITIONABLE is not existing or alive.

    + +POSITIONABLE:GetLaserCode() + +
    +
    + +

    Get the last assigned laser code

    + +

    Return value

    + +

    #number: +The laser code

    + +
    +
    +
    +
    + POSITIONABLE:GetMessage(Message, Duration, Name) @@ -584,7 +626,7 @@ The POSITIONABLE is not existing or alive.

    -

    (R2.1) Create a Radio#RADIO, to allow radio transmission for this POSITIONABLE.

    +

    Create a Radio#RADIO, to allow radio transmission for this POSITIONABLE.

    Set parameters with the methods provided, then use RADIO:Broadcast() to actually broadcast the message

    @@ -639,6 +681,24 @@ The POSITIONABLE is not existing or alive.

    + +POSITIONABLE:GetSpot() + +
    +
    + +

    Get the Spot

    + +

    Return value

    + +

    Core.Spot#SPOT: +The Spot

    + +
    +
    +
    +
    + POSITIONABLE:GetVec2() @@ -816,7 +876,7 @@ The POSITIONABLE is not existing or alive.

    -

    (R2.1) Check if the POSITIONABLE is lasing a target

    +

    Check if the POSITIONABLE is lasing a target

    Return value

    @@ -834,7 +894,7 @@ true if it is lasing a target

    -

    (R2.1) Stop Lasing a POSITIONABLE

    +

    Stop Lasing a POSITIONABLE

    Return value

    @@ -852,7 +912,7 @@ true if it is lasing a target

    -

    (R2.1) Start Lasing a POSITIONABLE

    +

    Start Lasing a POSITIONABLE

    Parameters

    +
    +
    +
    + + #number + +POSITIONABLE.LaserCode + +
    +
    + +

    The last assigned laser code.

    +
    @@ -1159,6 +1233,49 @@ The duration of the message.

    + +POSITIONABLE:MessageToSetGroup(Message, Duration, MessageSetGroup, Name) + +
    +
    + +

    Send a message to a Set#SET_GROUP.

    + + +

    The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.

    + +

    Parameters

    +
      +
    • + +

      #string Message : +The message text

      + +
    • +
    • + +

      Dcs.DCSTypes#Duration Duration : +The duration of the message.

      + +
    • +
    • + +

      Core.Set#SET_GROUP MessageSetGroup : +The SET_GROUP collection receiving the message.

      + +
    • +
    • + +

      #string Name : +(optional) The Name of the sender. If not provided, the Name is the type of the Positionable.

      + +
    • +
    +
    +
    +
    +
    + POSITIONABLE:New(PositionableName) @@ -1207,7 +1324,7 @@ self

    - +

    The laser Spot.

    diff --git a/docs/Documentation/Spawn.html b/docs/Documentation/Spawn.html index 715ca53a1..dc938b7ba 100644 --- a/docs/Documentation/Spawn.html +++ b/docs/Documentation/Spawn.html @@ -123,48 +123,6 @@
    -

    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:

    - -

    2017-04-08: SPAWN:InitDelayOnOff( DelayOnOff ) added.
    -2017-04-08: SPAWN:InitDelayOn() added.
    -2017-04-08: SPAWN:InitDelayOff() added.

    - -

    2017-03-14: SPAWN:InitKeepUnitNames() added.
    -2017-03-14: SPAWN:InitRandomizePosition( RandomizePosition, OuterRadious, InnerRadius ) added.

    - -

    2017-02-04: SPAWN:InitUnControlled( UnControlled ) replaces SPAWN:InitUnControlled().

    - -

    2017-01-24: SPAWN:InitAIOnOff( AIOnOff ) added.
    -2017-01-24: SPAWN:InitAIOn() added.
    -2017-01-24: SPAWN:InitAIOff() added.

    - -

    2016-08-15: SPAWN:InitCleanUp( SpawnCleanUpInterval ) replaces SPAWN:CleanUp( SpawnCleanUpInterval ).
    -2016-08-15: SPAWN:InitRandomizeZones( SpawnZones ) added.

    - -

    2016-08-14: SPAWN:OnSpawnGroup( SpawnCallBackFunction, ... ) replaces SPAWN:SpawnFunction( SpawnCallBackFunction, ... ).
    -2016-08-14: SPAWN.SpawnInZone( Zone, RandomizeGroup, SpawnIndex ) replaces SpawnInZone( Zone, RandomizeUnits, OuterRadius, InnerRadius, SpawnIndex ).
    -2016-08-14: SPAWN.SpawnFromVec3( Vec3, SpawnIndex ) replaces SpawnFromVec3( Vec3, RandomizeUnits, OuterRadius, InnerRadius, SpawnIndex ).
    -2016-08-14: SPAWN.SpawnFromVec2( Vec2, SpawnIndex ) replaces SpawnFromVec2( Vec2, RandomizeUnits, OuterRadius, InnerRadius, SpawnIndex ).
    -2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromUnit( SpawnUnit, RandomizeUnits, OuterRadius, InnerRadius, SpawnIndex ).
    -2016-08-14: SPAWN.SpawnFromUnit( SpawnUnit, SpawnIndex ) replaces SpawnFromStatic( SpawnStatic, RandomizeUnits, OuterRadius, InnerRadius, SpawnIndex ).
    -2016-08-14: SPAWN.InitRandomizeUnits( RandomizeUnits, OuterRadius, InnerRadius ) added.
    -2016-08-14: SPAWN.InitLimit( SpawnMaxUnitsAlive, SpawnMaxGroups ) replaces SPAWN.Limit( SpawnMaxUnitsAlive, SpawnMaxGroups ).
    -2016-08-14: SPAWN.InitArray( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ) replaces SPAWN.Array( SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY ).
    -2016-08-14: SPAWN.InitRandomizeRoute( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ) replaces SPAWN.RandomizeRoute( SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight ).
    -2016-08-14: SPAWN.InitRandomizeTemplate( SpawnTemplatePrefixTable ) replaces SPAWN.RandomizeTemplate( SpawnTemplatePrefixTable ).
    -2016-08-14: SPAWN.InitUnControlled() replaces SPAWN.UnControlled().

    - -
    -

    AUTHORS and CONTRIBUTIONS

    Contributions:

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

    SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle) - - - - SPAWN.uncontrolled - - @@ -2119,6 +2071,9 @@ The group that was spawned. You can use this group for further actions.

    + +

    Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.

    +
    @@ -2572,6 +2527,9 @@ when nothing was spawned.

    + +

    Overwrite unit names by default with group name.

    +
    @@ -2586,6 +2544,9 @@ when nothing was spawned.

    + +

    By default, no InitLimit

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

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

    - + #number SPAWN.SpawnMaxUnitsAlive @@ -2990,7 +2951,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 ) -

    When the first Spawn executes, all the Groups need to be made visible before start.

    +

    Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.

    @@ -3556,20 +3517,6 @@ True = Continue Scheduler

    - -
    -
    -
    - - - -SPAWN.uncontrolled - -
    -
    - - -
    diff --git a/docs/Documentation/SpawnStatic.html b/docs/Documentation/SpawnStatic.html index 7c5843544..d1eef677c 100644 --- a/docs/Documentation/SpawnStatic.html +++ b/docs/Documentation/SpawnStatic.html @@ -169,25 +169,25 @@ SPAWNSTATIC:NewFromStatic(SpawnTemplatePrefix, CountryID) -

    (R2.1) Creates the main object to spawn a Static defined in the ME.

    +

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

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

    (R2.1) Creates the main object to spawn a Static based on a type name.

    +

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

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

    (R2.1) Creates a new Static from a POINT_VEC2.

    +

    Creates a new Static from a POINT_VEC2.

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

    (R2.1) Creates a new Static from a Zone.

    +

    Creates a new Static from a Zone.

    @@ -288,7 +288,7 @@ By default, spawned Statics will follow a naming conve
    -

    (R2.1) Creates the main object to spawn a Static defined in the ME.

    +

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

    Parameters