From 329c89f12fc8d65007357a01110691875374e3b3 Mon Sep 17 00:00:00 2001 From: FlightControl Date: Fri, 14 Apr 2017 09:42:35 +0200 Subject: [PATCH 1/4] Rename Task_Cargo --- docs/Documentation/Task_CARGO.html | 943 ----------------------------- 1 file changed, 943 deletions(-) delete mode 100644 docs/Documentation/Task_CARGO.html diff --git a/docs/Documentation/Task_CARGO.html b/docs/Documentation/Task_CARGO.html deleted file mode 100644 index d6a95cfc8..000000000 --- a/docs/Documentation/Task_CARGO.html +++ /dev/null @@ -1,943 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Task_Cargo

- -

Tasking (Release 2.1) -- The TASK_CARGO models tasks for players to transport Cargo.

- - - -

Banner Image

- -
- -

The Moose framework provides various CARGO classes that allow DCS phisical or logical objects to be transported or sling loaded by Carriers. -The CARGO_ classes, as part of the moose core, are able to Board, Load, UnBoard and UnLoad cargo between Carrier units.

- -

This collection of classes in this module define tasks for human players to handle these cargo objects. -Cargo can be transported, picked-up, deployed and sling-loaded from and to other places.

- -

The following classes are important to consider:

- -
    -
  • #TASKCARGOTRANSPORT: Defines a task for a human player to transport a set of cargo between various zones.
  • -
- -

==

- -

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-03-09: Revised version.

- -
- -

AUTHORS and CONTRIBUTIONS

- -

Contributions:

- -

Authors:

- -
    -
  • FlightControl: Concept, Design & Programming. -
  • -
- -

Global(s)

- - - - - - - - - -
TASK_CARGO -

TASK_CARGO class, extends Task#TASK

- -

A flexible tasking system

- -

The TASK_CARGO classes provide you with a flexible tasking sytem, -that allows you to transport cargo of various types between various locations -and various dedicated deployment zones.

-
TASK_CARGO_TRANSPORT - -
-

Type FSM_PROCESS

- - - - - - - - - -
FSM_PROCESS.Cargo - -
FSM_PROCESS.DeployZone - -
- -

Type TASK_CARGO

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TASK_CARGO:AddDeployZone(DeployZone, TaskUnit) - -
TASK_CARGO.DeployZones - -
TASK_CARGO:GetPlannedMenuText() - -
TASK_CARGO:GetTargetZone(TaskUnit) - -
TASK_CARGO:New(Mission, SetGroup, TaskName, SetCargo, TaskType) -

Instantiates a new TASK_CARGO.

-
TASK_CARGO:RemoveDeployZone(DeployZone, TaskUnit) - -
TASK_CARGO.SetCargo - -
TASK_CARGO:SetCargoPickup(Cargo, TaskUnit) - -
TASK_CARGO:SetDeployZone(DeployZone, TaskUnit) - -
TASK_CARGO:SetDeployZones(@, TaskUnit, DeployZones) - -
TASK_CARGO:SetPenaltyOnFailed(Text, Penalty, TaskUnit) -

Set a penalty when the A2G attack has failed.

-
TASK_CARGO:SetScoreOnDestroy(Text, Score, TaskUnit) -

Set a score when a target in scope of the A2G attack, has been destroyed .

-
TASK_CARGO:SetScoreOnSuccess(Text, Score, TaskUnit) -

Set a score when all the targets in scope of the A2G attack, have been destroyed.

-
TASK_CARGO.TaskType - -
- -

Type TASK_CARGO_TRANSPORT

- - - - - - - - - -
TASK_CARGO_TRANSPORT.ClassName - -
TASK_CARGO_TRANSPORT:New(Mission, SetGroup, TaskName, SetCargo) -

Instantiates a new TASKCARGOTRANSPORT.

-
- -

Global(s)

-
-
- - #TASK_CARGO - -TASK_CARGO - -
-
- -

TASK_CARGO class, extends Task#TASK

- -

A flexible tasking system

- -

The TASK_CARGO classes provide you with a flexible tasking sytem, -that allows you to transport cargo of various types between various locations -and various dedicated deployment zones.

- - - -

The cargo in scope of the TASKCARGO classes must be explicitly given, and is of type SETCARGO. -The SET_CARGO contains a collection of CARGO objects that must be handled by the players in the mission.

- - -

Task execution experience from the player perspective

- -

A human player can join the battle field in a client airborne slot or a ground vehicle within the CA module (ALT-J). -The player needs to accept the task from the task overview list within the mission, using the radio menus.

- -

Once the TASK_CARGO is assigned to the player and accepted by the player, the player will obtain -an extra Cargo Handling Radio Menu that contains the CARGO objects that need to be transported.

- -

Each CARGO object has a certain state:

- -
    -
  • UnLoaded: The CARGO is located within the battlefield. It may still need to be transported.
  • -
  • Loaded: The CARGO is loaded within a Carrier. This can be your air unit, or another air unit, or even a vehicle.
  • -
  • Boarding: The CARGO is running or moving towards your Carrier for loading.
  • -
  • UnBoarding: The CARGO is driving or jumping out of your Carrier and moves to a location in the Deployment Zone.
  • -
- -

Cargo must be transported towards different **Deployment Zones**.

- -

The Cargo Handling Radio Menu system allows to execute various actions to handle the cargo. -In the menu, you'll find for each CARGO, that is part of the scope of the task, various actions that can be completed. -Depending on the location of your Carrier unit, the menu options will vary.

- - -

Cargo Pickup and Boarding

- -

For cargo boarding, a cargo can only execute the boarding actions if it is within the foreseen Reporting Range. -Therefore, it is important that you steer your Carrier within the Reporting Range, -so that boarding actions can be executed on the cargo. -To Pickup and Board cargo, the following menu items will be shown in your carrier radio menu:

- -

Board Cargo

- -

If your Carrier is within the Reporting Range of the cargo, it will allow to pickup the cargo by selecting this menu option. -Depending on the Cargo type, the cargo will either move to your Carrier or you will receive instructions how to handle the cargo -pickup. If the cargo moves to your carrier, it will indicate the boarding status. -Note that multiple units need to board your Carrier, so it is required to await the full boarding process. -Once the cargo is fully boarded within your Carrier, you will be notified of this.

- -

Note that for airborne Carriers, it is required to land first before the Boarding process can be initiated. -If during boarding the Carrier gets airborne, the boarding process will be cancelled.

- -

Pickup Cargo

- -

If your Carrier is not within the Reporting Range of the cargo, the HQ will guide you to its location. -Routing information is shown in flight that directs you to the cargo within Reporting Range. -Upon arrival, the Cargo will contact you and further instructions will be given. -When your Carrier is airborne, you will receive instructions to land your Carrier. -The action will not be completed until you've landed your Carrier.

- - -

Cargo Deploy and UnBoarding

- -

Various Deployment Zones can be foreseen in the scope of the Cargo transportation. Each deployment zone can be of varying Zone type. -The Cargo Handling Radio Menu provides with menu options to execute an action to steer your Carrier to a specific Zone.

- -

UnBoard Cargo

- -

If your Carrier is already within a Deployment Zone, -then the Cargo Handling Radio Menu allows to UnBoard a specific cargo that is -loaded within your Carrier group into the Deployment Zone. -Note that the Unboarding process takes a while, as the cargo units (infantry or vehicles) must unload from your Carrier. -Ensure that you stay at the position or stay on the ground while Unboarding. -If any unforeseen manoeuvre is done by the Carrier, then the Unboarding will be cancelled.

- -

Deploy Cargo

- -

If your Carrier is not within a Deployment Zone, you'll need to fly towards one. -Fortunately, the Cargo Handling Radio Menu provides you with menu options to select a specific Deployment Zone to fly towards. -Once a Deployment Zone has been selected, your Carrier will receive routing information from HQ towards the Deployment Zone center. -Upon arrival, the HQ will provide you with further instructions. -When your Carrier is airborne, you will receive instructions to land your Carrier. -The action will not be completed until you've landed your Carrier!

- -

Handle TASK_CARGO Events ...

- -

The TASK_CARGO classes define Cargo transport tasks, -based on the tasking capabilities defined in Task#TASK.

- -

Specific TASK_CARGO Events

- -

Specific Cargo Handling event can be captured, that allow to trigger specific actions!

- -
    -
  • Boarded: Triggered when the Cargo has been Boarded into your Carrier.
  • -
  • UnBoarded: Triggered when the cargo has been Unboarded from your Carrier and has arrived at the Deployment Zone.
  • -
- -

Standard TASK_CARGO Events

- -

The TASK_CARGO is implemented using a Statemachine#FSM_TASK, and has the following standard statuses:

- -
    -
  • None: Start of the process.
  • -
  • Planned: The cargo task is planned.
  • -
  • Assigned: The cargo task is assigned to a Group#GROUP.
  • -
  • Success: The cargo task is successfully completed.
  • -
  • Failed: The cargo task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
  • -
- -
- - -
-
-
-
- - #TASK_CARGO_TRANSPORT - -TASK_CARGO_TRANSPORT - -
-
- - - -
-
-

Type Task_Cargo

- -

Type FSM_PROCESS

-

Field(s)

-
-
- - - -FSM_PROCESS.Cargo - -
-
- - - -
-
-
-
- - - -FSM_PROCESS.DeployZone - -
-
- - - -
-
- -

Type TASK_CARGO

-

Field(s)

-
-
- - -TASK_CARGO:AddDeployZone(DeployZone, TaskUnit) - -
-
- - - -

Parameters

- -

Return value

- -

#TASK_CARGO:

- - -
-
-
-
- - - -TASK_CARGO.DeployZones - -
-
- - - - -

setmetatable( {}, { __mode = "v" } ) -- weak table on value

- -
-
-
-
- - -TASK_CARGO:GetPlannedMenuText() - -
-
- - - -
-
-
-
- - -TASK_CARGO:GetTargetZone(TaskUnit) - -
-
- - - -

Parameter

- -

Return value

- -

Core.Zone#ZONE_BASE: -The Zone object where the Target is located on the map.

- -
-
-
-
- - -TASK_CARGO:New(Mission, SetGroup, TaskName, SetCargo, TaskType) - -
-
- -

Instantiates a new TASK_CARGO.

- -

Parameters

-
    -
  • - -

    Tasking.Mission#MISSION Mission :

    - -
  • -
  • - -

    Set#SET_GROUP SetGroup : -The set of groups for which the Task can be assigned.

    - -
  • -
  • - -

    #string TaskName : -The name of the Task.

    - -
  • -
  • - -

    Core.Set#SET_CARGO SetCargo : -The scope of the cargo to be transported.

    - -
  • -
  • - -

    #string TaskType : -The type of Cargo task.

    - -
  • -
-

Return value

- -

#TASK_CARGO: -self

- -
-
-
-
- - -TASK_CARGO:RemoveDeployZone(DeployZone, TaskUnit) - -
-
- - - -

Parameters

- -

Return value

- -

#TASK_CARGO:

- - -
-
-
-
- - - -TASK_CARGO.SetCargo - -
-
- - - -
-
-
-
- - -TASK_CARGO:SetCargoPickup(Cargo, TaskUnit) - -
-
- - - -

Parameters

- -

Return value

- -

#TASK_CARGO:

- - -
-
-
-
- - -TASK_CARGO:SetDeployZone(DeployZone, TaskUnit) - -
-
- - - -

Parameters

- -

Return value

- -

#TASK_CARGO:

- - -
-
-
-
- - -TASK_CARGO:SetDeployZones(@, TaskUnit, DeployZones) - -
-
- - - -

Parameters

-
    -
  • - -

    @ : -ist DeployZones

    - -
  • -
  • - -

    Wrapper.Unit#UNIT TaskUnit :

    - -
  • -
  • - -

    DeployZones :

    - -
  • -
-

Return value

- -

#TASK_CARGO:

- - -
-
-
-
- - -TASK_CARGO:SetPenaltyOnFailed(Text, Penalty, TaskUnit) - -
-
- -

Set a penalty when the A2G attack has failed.

- -

Parameters

-
    -
  • - -

    #string Text : -The text to display to the player, when the A2G attack has failed.

    - -
  • -
  • - -

    #number Penalty : -The penalty in points.

    - -
  • -
  • - -

    Wrapper.Unit#UNIT TaskUnit :

    - -
  • -
-

Return value

- -

#TASK_CARGO:

- - -
-
-
-
- - -TASK_CARGO:SetScoreOnDestroy(Text, Score, TaskUnit) - -
-
- -

Set a score when a target in scope of the A2G attack, has been destroyed .

- -

Parameters

-
    -
  • - -

    #string Text : -The text to display to the player, when the target has been destroyed.

    - -
  • -
  • - -

    #number Score : -The score in points.

    - -
  • -
  • - -

    Wrapper.Unit#UNIT TaskUnit :

    - -
  • -
-

Return value

- -

#TASK_CARGO:

- - -
-
-
-
- - -TASK_CARGO:SetScoreOnSuccess(Text, Score, TaskUnit) - -
-
- -

Set a score when all the targets in scope of the A2G attack, have been destroyed.

- -

Parameters

-
    -
  • - -

    #string Text : -The text to display to the player, when all targets hav been destroyed.

    - -
  • -
  • - -

    #number Score : -The score in points.

    - -
  • -
  • - -

    Wrapper.Unit#UNIT TaskUnit :

    - -
  • -
-

Return value

- -

#TASK_CARGO:

- - -
-
-
-
- - - -TASK_CARGO.TaskType - -
-
- - - -
-
- -

Type TASK_CARGO_TRANSPORT

- -

The TASKCARGOTRANSPORT class

- -

Field(s)

-
-
- - #string - -TASK_CARGO_TRANSPORT.ClassName - -
-
- - - -
-
-
-
- - -TASK_CARGO_TRANSPORT:New(Mission, SetGroup, TaskName, SetCargo) - -
-
- -

Instantiates a new TASKCARGOTRANSPORT.

- -

Parameters

- -

Return value

- -

#TASKCARGOTRANSPORT: -self

- -
-
- -
- -
- - From 2ab00d22a6530e5a276273035c45894d7a007f42 Mon Sep 17 00:00:00 2001 From: FlightControl Date: Fri, 14 Apr 2017 09:43:29 +0200 Subject: [PATCH 2/4] Rename Task_Cargo --- docs/Documentation/AI_Patrol.html | 3 + docs/Documentation/Cargo.html | 1 + docs/Documentation/Detection.html | 2 +- docs/Documentation/MOVEMENT.html | 4 + docs/Documentation/Point.html | 1 + docs/Documentation/SpawnStatic.html | 1 + docs/Documentation/Task_Cargo.html | 943 ++++++++++++++++++++++++++++ 7 files changed, 954 insertions(+), 1 deletion(-) create mode 100644 docs/Documentation/Task_Cargo.html diff --git a/docs/Documentation/AI_Patrol.html b/docs/Documentation/AI_Patrol.html index e21b9498f..b6fa99328 100644 --- a/docs/Documentation/AI_Patrol.html +++ b/docs/Documentation/AI_Patrol.html @@ -933,6 +933,9 @@ Use the method AIPATROLZONE.M + +

This table contains the targets detected during patrol.

+
diff --git a/docs/Documentation/Cargo.html b/docs/Documentation/Cargo.html index b6abf92f7..19046ba83 100644 --- a/docs/Documentation/Cargo.html +++ b/docs/Documentation/Cargo.html @@ -2797,6 +2797,7 @@ The range till cargo will board.

+ CARGO_UNIT.CargoCarrier diff --git a/docs/Documentation/Detection.html b/docs/Documentation/Detection.html index dc52c4036..c17360e5a 100644 --- a/docs/Documentation/Detection.html +++ b/docs/Documentation/Detection.html @@ -2298,7 +2298,7 @@ self

- #number + DETECTION_BASE.DetectionInterval diff --git a/docs/Documentation/MOVEMENT.html b/docs/Documentation/MOVEMENT.html index d3966610d..1a64cbb26 100644 --- a/docs/Documentation/MOVEMENT.html +++ b/docs/Documentation/MOVEMENT.html @@ -211,6 +211,7 @@ on defined intervals (currently every minute).

+ #number MOVEMENT.AliveUnits @@ -219,6 +220,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 8eade306d..b321acabb 100644 --- a/docs/Documentation/Point.html +++ b/docs/Documentation/Point.html @@ -1367,6 +1367,7 @@ The new calculated POINT_VEC2.

+ POINT_VEC2.z diff --git a/docs/Documentation/SpawnStatic.html b/docs/Documentation/SpawnStatic.html index 5413f9a2e..99a7e20af 100644 --- a/docs/Documentation/SpawnStatic.html +++ b/docs/Documentation/SpawnStatic.html @@ -442,6 +442,7 @@ ptional) The name of the new static.

+ #number SPAWNSTATIC.SpawnIndex diff --git a/docs/Documentation/Task_Cargo.html b/docs/Documentation/Task_Cargo.html new file mode 100644 index 000000000..d6a95cfc8 --- /dev/null +++ b/docs/Documentation/Task_Cargo.html @@ -0,0 +1,943 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Task_Cargo

+ +

Tasking (Release 2.1) -- The TASK_CARGO models tasks for players to transport Cargo.

+ + + +

Banner Image

+ +
+ +

The Moose framework provides various CARGO classes that allow DCS phisical or logical objects to be transported or sling loaded by Carriers. +The CARGO_ classes, as part of the moose core, are able to Board, Load, UnBoard and UnLoad cargo between Carrier units.

+ +

This collection of classes in this module define tasks for human players to handle these cargo objects. +Cargo can be transported, picked-up, deployed and sling-loaded from and to other places.

+ +

The following classes are important to consider:

+ +
    +
  • #TASKCARGOTRANSPORT: Defines a task for a human player to transport a set of cargo between various zones.
  • +
+ +

==

+ +

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-03-09: Revised version.

+ +
+ +

AUTHORS and CONTRIBUTIONS

+ +

Contributions:

+ +

Authors:

+ +
    +
  • FlightControl: Concept, Design & Programming. +
  • +
+ +

Global(s)

+ + + + + + + + + +
TASK_CARGO +

TASK_CARGO class, extends Task#TASK

+ +

A flexible tasking system

+ +

The TASK_CARGO classes provide you with a flexible tasking sytem, +that allows you to transport cargo of various types between various locations +and various dedicated deployment zones.

+
TASK_CARGO_TRANSPORT + +
+

Type FSM_PROCESS

+ + + + + + + + + +
FSM_PROCESS.Cargo + +
FSM_PROCESS.DeployZone + +
+ +

Type TASK_CARGO

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TASK_CARGO:AddDeployZone(DeployZone, TaskUnit) + +
TASK_CARGO.DeployZones + +
TASK_CARGO:GetPlannedMenuText() + +
TASK_CARGO:GetTargetZone(TaskUnit) + +
TASK_CARGO:New(Mission, SetGroup, TaskName, SetCargo, TaskType) +

Instantiates a new TASK_CARGO.

+
TASK_CARGO:RemoveDeployZone(DeployZone, TaskUnit) + +
TASK_CARGO.SetCargo + +
TASK_CARGO:SetCargoPickup(Cargo, TaskUnit) + +
TASK_CARGO:SetDeployZone(DeployZone, TaskUnit) + +
TASK_CARGO:SetDeployZones(@, TaskUnit, DeployZones) + +
TASK_CARGO:SetPenaltyOnFailed(Text, Penalty, TaskUnit) +

Set a penalty when the A2G attack has failed.

+
TASK_CARGO:SetScoreOnDestroy(Text, Score, TaskUnit) +

Set a score when a target in scope of the A2G attack, has been destroyed .

+
TASK_CARGO:SetScoreOnSuccess(Text, Score, TaskUnit) +

Set a score when all the targets in scope of the A2G attack, have been destroyed.

+
TASK_CARGO.TaskType + +
+ +

Type TASK_CARGO_TRANSPORT

+ + + + + + + + + +
TASK_CARGO_TRANSPORT.ClassName + +
TASK_CARGO_TRANSPORT:New(Mission, SetGroup, TaskName, SetCargo) +

Instantiates a new TASKCARGOTRANSPORT.

+
+ +

Global(s)

+
+
+ + #TASK_CARGO + +TASK_CARGO + +
+
+ +

TASK_CARGO class, extends Task#TASK

+ +

A flexible tasking system

+ +

The TASK_CARGO classes provide you with a flexible tasking sytem, +that allows you to transport cargo of various types between various locations +and various dedicated deployment zones.

+ + + +

The cargo in scope of the TASKCARGO classes must be explicitly given, and is of type SETCARGO. +The SET_CARGO contains a collection of CARGO objects that must be handled by the players in the mission.

+ + +

Task execution experience from the player perspective

+ +

A human player can join the battle field in a client airborne slot or a ground vehicle within the CA module (ALT-J). +The player needs to accept the task from the task overview list within the mission, using the radio menus.

+ +

Once the TASK_CARGO is assigned to the player and accepted by the player, the player will obtain +an extra Cargo Handling Radio Menu that contains the CARGO objects that need to be transported.

+ +

Each CARGO object has a certain state:

+ +
    +
  • UnLoaded: The CARGO is located within the battlefield. It may still need to be transported.
  • +
  • Loaded: The CARGO is loaded within a Carrier. This can be your air unit, or another air unit, or even a vehicle.
  • +
  • Boarding: The CARGO is running or moving towards your Carrier for loading.
  • +
  • UnBoarding: The CARGO is driving or jumping out of your Carrier and moves to a location in the Deployment Zone.
  • +
+ +

Cargo must be transported towards different **Deployment Zones**.

+ +

The Cargo Handling Radio Menu system allows to execute various actions to handle the cargo. +In the menu, you'll find for each CARGO, that is part of the scope of the task, various actions that can be completed. +Depending on the location of your Carrier unit, the menu options will vary.

+ + +

Cargo Pickup and Boarding

+ +

For cargo boarding, a cargo can only execute the boarding actions if it is within the foreseen Reporting Range. +Therefore, it is important that you steer your Carrier within the Reporting Range, +so that boarding actions can be executed on the cargo. +To Pickup and Board cargo, the following menu items will be shown in your carrier radio menu:

+ +

Board Cargo

+ +

If your Carrier is within the Reporting Range of the cargo, it will allow to pickup the cargo by selecting this menu option. +Depending on the Cargo type, the cargo will either move to your Carrier or you will receive instructions how to handle the cargo +pickup. If the cargo moves to your carrier, it will indicate the boarding status. +Note that multiple units need to board your Carrier, so it is required to await the full boarding process. +Once the cargo is fully boarded within your Carrier, you will be notified of this.

+ +

Note that for airborne Carriers, it is required to land first before the Boarding process can be initiated. +If during boarding the Carrier gets airborne, the boarding process will be cancelled.

+ +

Pickup Cargo

+ +

If your Carrier is not within the Reporting Range of the cargo, the HQ will guide you to its location. +Routing information is shown in flight that directs you to the cargo within Reporting Range. +Upon arrival, the Cargo will contact you and further instructions will be given. +When your Carrier is airborne, you will receive instructions to land your Carrier. +The action will not be completed until you've landed your Carrier.

+ + +

Cargo Deploy and UnBoarding

+ +

Various Deployment Zones can be foreseen in the scope of the Cargo transportation. Each deployment zone can be of varying Zone type. +The Cargo Handling Radio Menu provides with menu options to execute an action to steer your Carrier to a specific Zone.

+ +

UnBoard Cargo

+ +

If your Carrier is already within a Deployment Zone, +then the Cargo Handling Radio Menu allows to UnBoard a specific cargo that is +loaded within your Carrier group into the Deployment Zone. +Note that the Unboarding process takes a while, as the cargo units (infantry or vehicles) must unload from your Carrier. +Ensure that you stay at the position or stay on the ground while Unboarding. +If any unforeseen manoeuvre is done by the Carrier, then the Unboarding will be cancelled.

+ +

Deploy Cargo

+ +

If your Carrier is not within a Deployment Zone, you'll need to fly towards one. +Fortunately, the Cargo Handling Radio Menu provides you with menu options to select a specific Deployment Zone to fly towards. +Once a Deployment Zone has been selected, your Carrier will receive routing information from HQ towards the Deployment Zone center. +Upon arrival, the HQ will provide you with further instructions. +When your Carrier is airborne, you will receive instructions to land your Carrier. +The action will not be completed until you've landed your Carrier!

+ +

Handle TASK_CARGO Events ...

+ +

The TASK_CARGO classes define Cargo transport tasks, +based on the tasking capabilities defined in Task#TASK.

+ +

Specific TASK_CARGO Events

+ +

Specific Cargo Handling event can be captured, that allow to trigger specific actions!

+ +
    +
  • Boarded: Triggered when the Cargo has been Boarded into your Carrier.
  • +
  • UnBoarded: Triggered when the cargo has been Unboarded from your Carrier and has arrived at the Deployment Zone.
  • +
+ +

Standard TASK_CARGO Events

+ +

The TASK_CARGO is implemented using a Statemachine#FSM_TASK, and has the following standard statuses:

+ +
    +
  • None: Start of the process.
  • +
  • Planned: The cargo task is planned.
  • +
  • Assigned: The cargo task is assigned to a Group#GROUP.
  • +
  • Success: The cargo task is successfully completed.
  • +
  • Failed: The cargo task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
  • +
+ +
+ + +
+
+
+
+ + #TASK_CARGO_TRANSPORT + +TASK_CARGO_TRANSPORT + +
+
+ + + +
+
+

Type Task_Cargo

+ +

Type FSM_PROCESS

+

Field(s)

+
+
+ + + +FSM_PROCESS.Cargo + +
+
+ + + +
+
+
+
+ + + +FSM_PROCESS.DeployZone + +
+
+ + + +
+
+ +

Type TASK_CARGO

+

Field(s)

+
+
+ + +TASK_CARGO:AddDeployZone(DeployZone, TaskUnit) + +
+
+ + + +

Parameters

+ +

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + + +TASK_CARGO.DeployZones + +
+
+ + + + +

setmetatable( {}, { __mode = "v" } ) -- weak table on value

+ +
+
+
+
+ + +TASK_CARGO:GetPlannedMenuText() + +
+
+ + + +
+
+
+
+ + +TASK_CARGO:GetTargetZone(TaskUnit) + +
+
+ + + +

Parameter

+ +

Return value

+ +

Core.Zone#ZONE_BASE: +The Zone object where the Target is located on the map.

+ +
+
+
+
+ + +TASK_CARGO:New(Mission, SetGroup, TaskName, SetCargo, TaskType) + +
+
+ +

Instantiates a new TASK_CARGO.

+ +

Parameters

+
    +
  • + +

    Tasking.Mission#MISSION Mission :

    + +
  • +
  • + +

    Set#SET_GROUP SetGroup : +The set of groups for which the Task can be assigned.

    + +
  • +
  • + +

    #string TaskName : +The name of the Task.

    + +
  • +
  • + +

    Core.Set#SET_CARGO SetCargo : +The scope of the cargo to be transported.

    + +
  • +
  • + +

    #string TaskType : +The type of Cargo task.

    + +
  • +
+

Return value

+ +

#TASK_CARGO: +self

+ +
+
+
+
+ + +TASK_CARGO:RemoveDeployZone(DeployZone, TaskUnit) + +
+
+ + + +

Parameters

+ +

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + + +TASK_CARGO.SetCargo + +
+
+ + + +
+
+
+
+ + +TASK_CARGO:SetCargoPickup(Cargo, TaskUnit) + +
+
+ + + +

Parameters

+ +

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + +TASK_CARGO:SetDeployZone(DeployZone, TaskUnit) + +
+
+ + + +

Parameters

+ +

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + +TASK_CARGO:SetDeployZones(@, TaskUnit, DeployZones) + +
+
+ + + +

Parameters

+
    +
  • + +

    @ : +ist DeployZones

    + +
  • +
  • + +

    Wrapper.Unit#UNIT TaskUnit :

    + +
  • +
  • + +

    DeployZones :

    + +
  • +
+

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + +TASK_CARGO:SetPenaltyOnFailed(Text, Penalty, TaskUnit) + +
+
+ +

Set a penalty when the A2G attack has failed.

+ +

Parameters

+
    +
  • + +

    #string Text : +The text to display to the player, when the A2G attack has failed.

    + +
  • +
  • + +

    #number Penalty : +The penalty in points.

    + +
  • +
  • + +

    Wrapper.Unit#UNIT TaskUnit :

    + +
  • +
+

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + +TASK_CARGO:SetScoreOnDestroy(Text, Score, TaskUnit) + +
+
+ +

Set a score when a target in scope of the A2G attack, has been destroyed .

+ +

Parameters

+
    +
  • + +

    #string Text : +The text to display to the player, when the target has been destroyed.

    + +
  • +
  • + +

    #number Score : +The score in points.

    + +
  • +
  • + +

    Wrapper.Unit#UNIT TaskUnit :

    + +
  • +
+

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + +TASK_CARGO:SetScoreOnSuccess(Text, Score, TaskUnit) + +
+
+ +

Set a score when all the targets in scope of the A2G attack, have been destroyed.

+ +

Parameters

+
    +
  • + +

    #string Text : +The text to display to the player, when all targets hav been destroyed.

    + +
  • +
  • + +

    #number Score : +The score in points.

    + +
  • +
  • + +

    Wrapper.Unit#UNIT TaskUnit :

    + +
  • +
+

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + + +TASK_CARGO.TaskType + +
+
+ + + +
+
+ +

Type TASK_CARGO_TRANSPORT

+ +

The TASKCARGOTRANSPORT class

+ +

Field(s)

+
+
+ + #string + +TASK_CARGO_TRANSPORT.ClassName + +
+
+ + + +
+
+
+
+ + +TASK_CARGO_TRANSPORT:New(Mission, SetGroup, TaskName, SetCargo) + +
+
+ +

Instantiates a new TASKCARGOTRANSPORT.

+ +

Parameters

+ +

Return value

+ +

#TASKCARGOTRANSPORT: +self

+ +
+
+ +
+ +
+ + From b245ed0e1d2e7e560b7ecb944c7c57088f773795 Mon Sep 17 00:00:00 2001 From: FlightControl Date: Fri, 14 Apr 2017 09:48:00 +0200 Subject: [PATCH 3/4] Update web site --- docs/Documentation/AI_Balancer.html | 804 ---- docs/Documentation/AI_Cap.html | 1723 ------- docs/Documentation/AI_Cas.html | 1858 -------- docs/Documentation/AI_Patrol.html | 2857 ------------ docs/Documentation/Account.html | 849 ---- docs/Documentation/Airbase.html | 339 -- docs/Documentation/AirbasePolice.html | 378 -- docs/Documentation/Assign.html | 1045 ----- docs/Documentation/Base.html | 2292 ---------- docs/Documentation/Cargo.html | 3271 ------------- docs/Documentation/Cas.html | 1549 ------- docs/Documentation/CleanUp.html | 606 --- docs/Documentation/Client.html | 1128 ----- docs/Documentation/CommandCenter.html | 846 ---- docs/Documentation/Controllable.html | 3222 ------------- docs/Documentation/DCSAirbase.html | 475 -- docs/Documentation/DCSCoalitionObject.html | 207 - docs/Documentation/DCSCommand.html | 153 - docs/Documentation/DCSController.html | 750 --- docs/Documentation/DCSGroup.html | 582 --- docs/Documentation/DCSObject.html | 603 --- docs/Documentation/DCSTask.html | 161 - docs/Documentation/DCSTypes.html | 2518 ---------- docs/Documentation/DCSUnit.html | 2080 --------- docs/Documentation/DCSVec3.html | 195 - docs/Documentation/DCSWorld.html | 637 --- docs/Documentation/DCSZone.html | 175 - docs/Documentation/DCScountry.html | 523 --- docs/Documentation/DCStimer.html | 329 -- docs/Documentation/DCStrigger.html | 130 - docs/Documentation/Database.html | 2026 -------- docs/Documentation/Detection.html | 4554 ------------------ docs/Documentation/DetectionManager.html | 708 --- docs/Documentation/Escort.html | 2689 ----------- docs/Documentation/Event.html | 2607 ----------- docs/Documentation/Fsm.html | 2875 ------------ docs/Documentation/Group.html | 1951 -------- docs/Documentation/Identifiable.html | 550 --- docs/Documentation/MOVEMENT.html | 427 -- docs/Documentation/Menu.html | 2212 --------- docs/Documentation/Message.html | 594 --- docs/Documentation/MissileTrainer.html | 1043 ----- docs/Documentation/Mission.html | 2092 --------- docs/Documentation/Object.html | 331 -- docs/Documentation/Patrol.html | 771 ---- docs/Documentation/Point.html | 2747 ----------- docs/Documentation/Positionable.html | 1085 ----- docs/Documentation/Process_JTAC.html | 611 --- docs/Documentation/Process_Pickup.html | 702 --- docs/Documentation/Radio.html | 841 ---- docs/Documentation/Route.html | 1285 ------ docs/Documentation/Scenery.html | 241 - docs/Documentation/ScheduleDispatcher.html | 483 -- docs/Documentation/Scheduler.html | 529 --- docs/Documentation/Scoring.html | 2226 --------- docs/Documentation/Sead.html | 291 -- docs/Documentation/Set.html | 4577 ------------------- docs/Documentation/Smoke.html | 699 --- docs/Documentation/Spawn.html | 3566 --------------- docs/Documentation/SpawnStatic.html | 491 -- docs/Documentation/Static.html | 318 -- docs/Documentation/StaticObject.html | 272 -- docs/Documentation/Task.html | 2847 ------------ docs/Documentation/Task_A2G.html | 1149 ----- docs/Documentation/Task_A2G_Dispatcher.html | 556 --- docs/Documentation/Task_Cargo.html | 943 ---- docs/Documentation/Task_PICKUP.html | 418 -- docs/Documentation/Task_SEAD.html | 256 -- docs/Documentation/Unit.html | 1725 ------- docs/Documentation/Utils.html | 874 ---- docs/Documentation/Zone.html | 2399 ---------- docs/Documentation/env.html | 128 - docs/Documentation/index.html | 566 --- docs/Documentation/land.html | 323 -- docs/Documentation/routines.html | 1232 ----- 75 files changed, 92095 deletions(-) delete mode 100644 docs/Documentation/AI_Balancer.html delete mode 100644 docs/Documentation/AI_Cap.html delete mode 100644 docs/Documentation/AI_Cas.html delete mode 100644 docs/Documentation/AI_Patrol.html delete mode 100644 docs/Documentation/Account.html delete mode 100644 docs/Documentation/Airbase.html delete mode 100644 docs/Documentation/AirbasePolice.html delete mode 100644 docs/Documentation/Assign.html delete mode 100644 docs/Documentation/Base.html delete mode 100644 docs/Documentation/Cargo.html delete mode 100644 docs/Documentation/Cas.html delete mode 100644 docs/Documentation/CleanUp.html delete mode 100644 docs/Documentation/Client.html delete mode 100644 docs/Documentation/CommandCenter.html delete mode 100644 docs/Documentation/Controllable.html delete mode 100644 docs/Documentation/DCSAirbase.html delete mode 100644 docs/Documentation/DCSCoalitionObject.html delete mode 100644 docs/Documentation/DCSCommand.html delete mode 100644 docs/Documentation/DCSController.html delete mode 100644 docs/Documentation/DCSGroup.html delete mode 100644 docs/Documentation/DCSObject.html delete mode 100644 docs/Documentation/DCSTask.html delete mode 100644 docs/Documentation/DCSTypes.html delete mode 100644 docs/Documentation/DCSUnit.html delete mode 100644 docs/Documentation/DCSVec3.html delete mode 100644 docs/Documentation/DCSWorld.html delete mode 100644 docs/Documentation/DCSZone.html delete mode 100644 docs/Documentation/DCScountry.html delete mode 100644 docs/Documentation/DCStimer.html delete mode 100644 docs/Documentation/DCStrigger.html delete mode 100644 docs/Documentation/Database.html delete mode 100644 docs/Documentation/Detection.html delete mode 100644 docs/Documentation/DetectionManager.html delete mode 100644 docs/Documentation/Escort.html delete mode 100644 docs/Documentation/Event.html delete mode 100644 docs/Documentation/Fsm.html delete mode 100644 docs/Documentation/Group.html delete mode 100644 docs/Documentation/Identifiable.html delete mode 100644 docs/Documentation/MOVEMENT.html delete mode 100644 docs/Documentation/Menu.html delete mode 100644 docs/Documentation/Message.html delete mode 100644 docs/Documentation/MissileTrainer.html delete mode 100644 docs/Documentation/Mission.html delete mode 100644 docs/Documentation/Object.html delete mode 100644 docs/Documentation/Patrol.html delete mode 100644 docs/Documentation/Point.html delete mode 100644 docs/Documentation/Positionable.html delete mode 100644 docs/Documentation/Process_JTAC.html delete mode 100644 docs/Documentation/Process_Pickup.html delete mode 100644 docs/Documentation/Radio.html delete mode 100644 docs/Documentation/Route.html delete mode 100644 docs/Documentation/Scenery.html delete mode 100644 docs/Documentation/ScheduleDispatcher.html delete mode 100644 docs/Documentation/Scheduler.html delete mode 100644 docs/Documentation/Scoring.html delete mode 100644 docs/Documentation/Sead.html delete mode 100644 docs/Documentation/Set.html delete mode 100644 docs/Documentation/Smoke.html delete mode 100644 docs/Documentation/Spawn.html delete mode 100644 docs/Documentation/SpawnStatic.html delete mode 100644 docs/Documentation/Static.html delete mode 100644 docs/Documentation/StaticObject.html delete mode 100644 docs/Documentation/Task.html delete mode 100644 docs/Documentation/Task_A2G.html delete mode 100644 docs/Documentation/Task_A2G_Dispatcher.html delete mode 100644 docs/Documentation/Task_Cargo.html delete mode 100644 docs/Documentation/Task_PICKUP.html delete mode 100644 docs/Documentation/Task_SEAD.html delete mode 100644 docs/Documentation/Unit.html delete mode 100644 docs/Documentation/Utils.html delete mode 100644 docs/Documentation/Zone.html delete mode 100644 docs/Documentation/env.html delete mode 100644 docs/Documentation/index.html delete mode 100644 docs/Documentation/land.html delete mode 100644 docs/Documentation/routines.html diff --git a/docs/Documentation/AI_Balancer.html b/docs/Documentation/AI_Balancer.html deleted file mode 100644 index 84f7b559e..000000000 --- a/docs/Documentation/AI_Balancer.html +++ /dev/null @@ -1,804 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module AI_Balancer

- -

Single-Player:No / Multi-Player:Yes / AI:Yes / Human:No / Types:All -- AI Balancing will replace in multi player missions -non-occupied human slots with AI groups, in order to provide an engaging simulation environment, -even when there are hardly any players in the mission.

- -

Banner Image

- -
- -

1) AIBalancer#AIBALANCER class, extends Fsm#FSM_SET

- -

The AIBalancer#AIBALANCER class monitors and manages as many replacement AI groups as there are -CLIENTS in a SET_CLIENT collection, which are not occupied by human players.

- - -

In other words, use AI_BALANCER to simulate human behaviour by spawning in replacement AI in multi player missions.

- -

The parent class Fsm#FSM_SET manages the functionality to control the Finite State Machine (FSM). -The mission designer can tailor the behaviour of the AI_BALANCER, by defining event and state transition methods. -An explanation about state and event transition methods can be found in the FSM module documentation.

- -

The mission designer can tailor the AI_BALANCER behaviour, by implementing a state or event handling method for the following:

- - - -

1.1) AI_BALANCER construction

- -

Create a new AI_BALANCER object with the AI_BALANCER.New() method:

- -

1.2) AI_BALANCER is a FSM

- -

Process

- -

1.2.1) AI_BALANCER States

- -
    -
  • Monitoring ( Set ): Monitoring the Set if all AI is spawned for the Clients.
  • -
  • Spawning ( Set, ClientName ): There is a new AI group spawned with ClientName as the name of reference.
  • -
  • Spawned ( Set, AIGroup ): A new AI has been spawned. You can handle this event to customize the AI behaviour with other AI FSMs or own processes.
  • -
  • Destroying ( Set, AIGroup ): The AI is being destroyed.
  • -
  • Returning ( Set, AIGroup ): The AI is returning to the airbase specified by the ReturnToAirbase methods. Handle this state to customize the return behaviour of the AI, if any.
  • -
- -

1.2.2) AI_BALANCER Events

- -
    -
  • Monitor ( Set ): Every 10 seconds, the Monitor event is triggered to monitor the Set.
  • -
  • Spawn ( Set, ClientName ): Triggers when there is a new AI group to be spawned with ClientName as the name of reference.
  • -
  • Spawned ( Set, AIGroup ): Triggers when a new AI has been spawned. You can handle this event to customize the AI behaviour with other AI FSMs or own processes.
  • -
  • Destroy ( Set, AIGroup ): The AI is being destroyed.
  • -
  • Return ( Set, AIGroup ): The AI is returning to the airbase specified by the ReturnToAirbase methods.
  • -
- -

1.3) AI_BALANCER spawn interval for replacement AI

- -

Use the method AI_BALANCER.InitSpawnInterval() to set the earliest and latest interval in seconds that is waited until a new replacement AI is spawned.

- -

1.4) AI_BALANCER returns AI to Airbases

- -

By default, When a human player joins a slot that is AI_BALANCED, the AI group will be destroyed by default. -However, there are 2 additional options that you can use to customize the destroy behaviour. -When a human player joins a slot, you can configure to let the AI return to:

- - - -

Note that when AI returns to an airbase, the AIBALANCER will trigger the Return event and the AI will return, -otherwise the AIBALANCER will trigger a Destroy event, and the AI will be destroyed.

- -
- -

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-01-17: There is still a problem with AI being destroyed, but not respawned. Need to check further upon that.

- -

2017-01-08: AI_BALANCER:InitSpawnInterval( Earliest, Latest ) added.

- -
- -

AUTHORS and CONTRIBUTIONS

- -

Contributions:

- -
    -
  • Dutch_Baron: Working together with James has resulted in the creation of the AI_BALANCER class. James has shared his ideas on balancing AI with air units, and together we made a first design which you can use now :-)
  • -
  • SNAFU: Had a couple of mails with the guys to validate, if the same concept in the GCI/CAP script could be reworked within MOOSE. None of the script code has been used however within the new AI_BALANCER moose class.
  • -
- -

Authors:

- -
    -
  • FlightControl: Framework Design & Programming and Documentation.
  • -
- - -

Global(s)

- - - - - -
AI_BALANCER - -
-

Type AI_BALANCER

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AI_BALANCER.AIGroups - -
AI_BALANCER.ClassName - -
AI_BALANCER.Earliest - -
AI_BALANCER:InitSpawnInterval(Earliest, Latest) -

Sets the earliest to the latest interval in seconds how long AI_BALANCER will wait to spawn a new AI.

-
AI_BALANCER.Latest - -
AI_BALANCER:New(SetClient, SpawnAI) -

Creates a new AI_BALANCER object

-
AI_BALANCER.PatrolZones - -
AI_BALANCER.ReturnAirbaseSet - -
AI_BALANCER:ReturnToHomeAirbase(ReturnTresholdRange) -

Returns the AI to the home Airbase#AIRBASE.

-
AI_BALANCER:ReturnToNearestAirbases(ReturnTresholdRange, ReturnAirbaseSet) -

Returns the AI to the nearest friendly Airbase#AIRBASE.

-
AI_BALANCER.ReturnTresholdRange - -
AI_BALANCER.SetClient - -
AI_BALANCER.SpawnAI - -
AI_BALANCER.Test - -
AI_BALANCER.ToHomeAirbase - -
AI_BALANCER.ToNearestAirbase - -
AI_BALANCER:onenterDestroying(SetGroup, AIGroup, From, Event, To, ClientName) - -
AI_BALANCER:onenterMonitoring(SetGroup) - -
AI_BALANCER:onenterReturning(SetGroup, AIGroup, From, Event, To) - -
AI_BALANCER:onenterSpawning(SetGroup, ClientName, AIGroup, From, Event, To) - -
- -

Global(s)

-
-
- - #AI_BALANCER - -AI_BALANCER - -
-
- - - -
-
-

Type AI_Balancer

- -

Type AI_BALANCER

- -

AI_BALANCER class

- -

Field(s)

-
-
- - - -AI_BALANCER.AIGroups - -
-
- - - -
-
-
-
- - #string - -AI_BALANCER.ClassName - -
-
- - - -
-
-
-
- - - -AI_BALANCER.Earliest - -
-
- - - -
-
-
-
- - -AI_BALANCER:InitSpawnInterval(Earliest, Latest) - -
-
- -

Sets the earliest to the latest interval in seconds how long AI_BALANCER will wait to spawn a new AI.

- - -

Provide 2 identical seconds if the interval should be a fixed amount of seconds.

- -

Parameters

-
    -
  • - -

    #number Earliest : -The earliest a new AI can be spawned in seconds.

    - -
  • -
  • - -

    #number Latest : -The latest a new AI can be spawned in seconds.

    - -
  • -
-

Return value

- - -

self

- -
-
-
-
- - - -AI_BALANCER.Latest - -
-
- - - -
-
-
-
- - -AI_BALANCER:New(SetClient, SpawnAI) - -
-
- -

Creates a new AI_BALANCER object

- -

Parameters

-
    -
  • - -

    Core.Set#SET_CLIENT SetClient : -A SET_CLIENT object that will contain the CLIENT objects to be monitored if they are alive or not (joined by a player).

    - -
  • -
  • - -

    Functional.Spawn#SPAWN SpawnAI : -The default Spawn object to spawn new AI Groups when needed.

    - -
  • -
-

Return value

- -

#AI_BALANCER:

- - -
-
-
-
- - - -AI_BALANCER.PatrolZones - -
-
- - - -
-
-
-
- - - -AI_BALANCER.ReturnAirbaseSet - -
-
- - - -
-
-
-
- - -AI_BALANCER:ReturnToHomeAirbase(ReturnTresholdRange) - -
-
- -

Returns the AI to the home Airbase#AIRBASE.

- -

Parameter

- -
-
-
-
- - -AI_BALANCER:ReturnToNearestAirbases(ReturnTresholdRange, ReturnAirbaseSet) - -
-
- -

Returns the AI to the nearest friendly Airbase#AIRBASE.

- -

Parameters

- -
-
-
-
- - - -AI_BALANCER.ReturnTresholdRange - -
-
- - - -
-
-
-
- - Core.Set#SET_CLIENT - -AI_BALANCER.SetClient - -
-
- - - -
-
-
-
- - Functional.Spawn#SPAWN - -AI_BALANCER.SpawnAI - -
-
- - - -
-
-
-
- - Wrapper.Group#GROUP - -AI_BALANCER.Test - -
-
- - - -
-
-
-
- - #boolean - -AI_BALANCER.ToHomeAirbase - -
-
- - - -
-
-
-
- - #boolean - -AI_BALANCER.ToNearestAirbase - -
-
- - - -
-
-
-
- - -AI_BALANCER:onenterDestroying(SetGroup, AIGroup, From, Event, To, ClientName) - -
-
- - - -

Parameters

- -
-
-
-
- - -AI_BALANCER:onenterMonitoring(SetGroup) - -
-
- - - -

Parameter

-
    -
  • - -

    SetGroup :

    - -
  • -
-
-
-
-
- - -AI_BALANCER:onenterReturning(SetGroup, AIGroup, From, Event, To) - -
-
- - - -

Parameters

- -
-
-
-
- - -AI_BALANCER:onenterSpawning(SetGroup, ClientName, AIGroup, From, Event, To) - -
-
- - - -

Parameters

- -
-
- -
- -
- - diff --git a/docs/Documentation/AI_Cap.html b/docs/Documentation/AI_Cap.html deleted file mode 100644 index 7b1a109bc..000000000 --- a/docs/Documentation/AI_Cap.html +++ /dev/null @@ -1,1723 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module AI_Cap

- -

AI - Execute Combat Air Patrol (CAP).

- -

Banner Image

- -
- -

AI CAP classes makes AI Controllables execute a Combat Air Patrol.

- - - -

There are the following types of CAP classes defined:

- - - -
- -

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-01-15: Initial class and API.

- -
- -

AUTHORS and CONTRIBUTIONS

- -

Contributions:

- - - -

Authors:

- -
    -
  • FlightControl: Concept, Design & Programming.
  • -
- - -

Global(s)

- - - - - - - - - -
AI_CAP_ZONE -

1) #AICAPZONE class, extends AICAP#AIPATROL_ZONE

- -

The #AICAPZONE class implements the core functions to patrol a Zone by an AI Controllable or Group -and automatically engage any airborne enemies that are within a certain range or within a certain zone.

-
_NewEngageCapRoute(AIControllable) - -
-

Type AI_CAP_ZONE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AI_CAP_ZONE.AIControllable -

The Controllable patrolling.

-
AI_CAP_ZONE:Abort() -

Synchronous Event Trigger for Event Abort.

-
AI_CAP_ZONE:Accomplish() -

Synchronous Event Trigger for Event Accomplish.

-
AI_CAP_ZONE.Accomplished - -
AI_CAP_ZONE:Destroy() -

Synchronous Event Trigger for Event Destroy.

-
AI_CAP_ZONE:Engage() -

Synchronous Event Trigger for Event Engage.

-
AI_CAP_ZONE.EngageRange - -
AI_CAP_ZONE.EngageZone - -
AI_CAP_ZONE.Engaging - -
AI_CAP_ZONE:Fired() -

Synchronous Event Trigger for Event Fired.

-
AI_CAP_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType) -

Creates a new AICAPZONE object

-
AI_CAP_ZONE:OnAfterAbort(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Abort.

-
AI_CAP_ZONE:OnAfterAccomplish(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Accomplish.

-
AI_CAP_ZONE:OnAfterDestroy(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Destroy.

-
AI_CAP_ZONE:OnAfterEngage(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Engage.

-
AI_CAP_ZONE:OnAfterFired(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Fired.

-
AI_CAP_ZONE:OnBeforeAbort(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Abort.

-
AI_CAP_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Accomplish.

-
AI_CAP_ZONE:OnBeforeDestroy(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Destroy.

-
AI_CAP_ZONE:OnBeforeEngage(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Engage.

-
AI_CAP_ZONE:OnBeforeFired(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Fired.

-
AI_CAP_ZONE:OnEnterEngaging(Controllable, From, Event, To) -

OnEnter Transition Handler for State Engaging.

-
AI_CAP_ZONE:OnEventDead(EventData) - -
AI_CAP_ZONE:OnLeaveEngaging(Controllable, From, Event, To) -

OnLeave Transition Handler for State Engaging.

-
AI_CAP_ZONE:SetEngageRange(EngageRange) -

Set the Engage Range when the AI will engage with airborne enemies.

-
AI_CAP_ZONE:SetEngageZone(EngageZone) -

Set the Engage Zone which defines where the AI will engage bogies.

-
AI_CAP_ZONE.TargetZone -

The Zone where the patrol needs to be executed.

-
AI_CAP_ZONE:__Abort(Delay) -

Asynchronous Event Trigger for Event Abort.

-
AI_CAP_ZONE:__Accomplish(Delay) -

Asynchronous Event Trigger for Event Accomplish.

-
AI_CAP_ZONE:__Destroy(Delay) -

Asynchronous Event Trigger for Event Destroy.

-
AI_CAP_ZONE:__Engage(Delay) -

Asynchronous Event Trigger for Event Engage.

-
AI_CAP_ZONE:__Fired(Delay) -

Asynchronous Event Trigger for Event Fired.

-
AI_CAP_ZONE:onafterAbort(Controllable, From, Event, To) - -
AI_CAP_ZONE:onafterAccomplish(Controllable, From, Event, To) - -
AI_CAP_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) - -
AI_CAP_ZONE:onafterDetected(Controllable, From, Event, To) - -
AI_CAP_ZONE:onafterEngage(Controllable, From, Event, To) - -
AI_CAP_ZONE:onafterStart(Controllable, From, Event, To) -

onafter State Transition for Event Start.

-
AI_CAP_ZONE:onbeforeEngage(Controllable, From, Event, To) - -
- -

Global(s)

-
-
- - #AI_CAP_ZONE - -AI_CAP_ZONE - -
-
- -

1) #AICAPZONE class, extends AICAP#AIPATROL_ZONE

- -

The #AICAPZONE class implements the core functions to patrol a Zone by an AI Controllable or Group -and automatically engage any airborne enemies that are within a certain range or within a certain zone.

- - - -

Process

- -

The AICAPZONE is assigned a Group and this must be done before the AICAPZONE process can be started using the Start event.

- -

Process

- -

The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits. -Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.

- -

Process

- -

This cycle will continue.

- -

Process

- -

During the patrol, the AI will detect enemy targets, which are reported through the Detected event.

- -

Process

- -

When enemies are detected, the AI will automatically engage the enemy.

- -

Process

- -

Until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB. -When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.

- -

Process

- -

1.1) AICAPZONE constructor

- - - -

1.2) AICAPZONE is a FSM

- -

Process

- -

1.2.1) AICAPZONE States

- -
    -
  • None ( Group ): The process is not started yet.
  • -
  • Patrolling ( Group ): The AI is patrolling the Patrol Zone.
  • -
  • Engaging ( Group ): The AI is engaging the bogeys.
  • -
  • Returning ( Group ): The AI is returning to Base..
  • -
- -

1.2.2) AICAPZONE Events

- - - -

1.3) Set the Range of Engagement

- -

Range

- -

An optional range can be set in meters, -that will define when the AI will engage with the detected airborne enemy targets. -The range can be beyond or smaller than the range of the Patrol Zone. -The range is applied at the position of the AI. -Use the method AICAP#AICAP_ZONE.SetEngageRange() to define that range.

- -

1.4) Set the Zone of Engagement

- -

Zone

- -

An optional Zone can be set, -that will define when the AI will engage with the detected airborne enemy targets. -Use the method AICap#AICAP_ZONE.SetEngageZone() to define that Zone.

- -
- - -
-
-
-
- - -_NewEngageCapRoute(AIControllable) - -
-
- - - -

Parameter

- -
-
-

Type AI_Cap

- -

Type AI_CAP_ZONE

-

Field(s)

-
-
- - Wrapper.Controllable#CONTROLLABLE - -AI_CAP_ZONE.AIControllable - -
-
- -

The Controllable patrolling.

- -
-
-
-
- - -AI_CAP_ZONE:Abort() - -
-
- -

Synchronous Event Trigger for Event Abort.

- -
-
-
-
- - -AI_CAP_ZONE:Accomplish() - -
-
- -

Synchronous Event Trigger for Event Accomplish.

- -
-
-
-
- - #boolean - -AI_CAP_ZONE.Accomplished - -
-
- - - -
-
-
-
- - -AI_CAP_ZONE:Destroy() - -
-
- -

Synchronous Event Trigger for Event Destroy.

- -
-
-
-
- - -AI_CAP_ZONE:Engage() - -
-
- -

Synchronous Event Trigger for Event Engage.

- -
-
-
-
- - - -AI_CAP_ZONE.EngageRange - -
-
- - - -
-
-
-
- - - -AI_CAP_ZONE.EngageZone - -
-
- - - -
-
-
-
- - #boolean - -AI_CAP_ZONE.Engaging - -
-
- - - -
-
-
-
- - -AI_CAP_ZONE:Fired() - -
-
- -

Synchronous Event Trigger for Event Fired.

- -
-
-
-
- - -AI_CAP_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType) - -
-
- -

Creates a new AICAPZONE object

- -

Parameters

- -

Return value

- -

#AICAPZONE: -self

- -
-
-
-
- - -AI_CAP_ZONE:OnAfterAbort(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Abort.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAP_ZONE:OnAfterAccomplish(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Accomplish.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAP_ZONE:OnAfterDestroy(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Destroy.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAP_ZONE:OnAfterEngage(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Engage.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAP_ZONE:OnAfterFired(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Fired.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAP_ZONE:OnBeforeAbort(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Abort.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_CAP_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Accomplish.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_CAP_ZONE:OnBeforeDestroy(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Destroy.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_CAP_ZONE:OnBeforeEngage(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Engage.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_CAP_ZONE:OnBeforeFired(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Fired.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_CAP_ZONE:OnEnterEngaging(Controllable, From, Event, To) - -
-
- -

OnEnter Transition Handler for State Engaging.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAP_ZONE:OnEventDead(EventData) - -
-
- - - -

Parameter

- -
-
-
-
- - -AI_CAP_ZONE:OnLeaveEngaging(Controllable, From, Event, To) - -
-
- -

OnLeave Transition Handler for State Engaging.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_CAP_ZONE:SetEngageRange(EngageRange) - -
-
- -

Set the Engage Range when the AI will engage with airborne enemies.

- -

Parameter

-
    -
  • - -

    #number EngageRange : -The Engage Range.

    - -
  • -
-

Return value

- -

#AICAPZONE: -self

- -
-
-
-
- - -AI_CAP_ZONE:SetEngageZone(EngageZone) - -
-
- -

Set the Engage Zone which defines where the AI will engage bogies.

- -

Parameter

-
    -
  • - -

    Core.Zone#ZONE EngageZone : -The zone where the AI is performing CAP.

    - -
  • -
-

Return value

- -

#AICAPZONE: -self

- -
-
-
-
- - Core.Zone#ZONE_BASE - -AI_CAP_ZONE.TargetZone - -
-
- -

The Zone where the patrol needs to be executed.

- -
-
-
-
- - -AI_CAP_ZONE:__Abort(Delay) - -
-
- -

Asynchronous Event Trigger for Event Abort.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_CAP_ZONE:__Accomplish(Delay) - -
-
- -

Asynchronous Event Trigger for Event Accomplish.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_CAP_ZONE:__Destroy(Delay) - -
-
- -

Asynchronous Event Trigger for Event Destroy.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_CAP_ZONE:__Engage(Delay) - -
-
- -

Asynchronous Event Trigger for Event Engage.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_CAP_ZONE:__Fired(Delay) - -
-
- -

Asynchronous Event Trigger for Event Fired.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_CAP_ZONE:onafterAbort(Controllable, From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAP_ZONE:onafterAccomplish(Controllable, From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAP_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
  • - -

    Core.Event#EVENTDATA EventData :

    - -
  • -
-
-
-
-
- - -AI_CAP_ZONE:onafterDetected(Controllable, From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAP_ZONE:onafterEngage(Controllable, From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAP_ZONE:onafterStart(Controllable, From, Event, To) - -
-
- -

onafter State Transition for Event Start.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAP_ZONE:onbeforeEngage(Controllable, From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
- -
- -
- - diff --git a/docs/Documentation/AI_Cas.html b/docs/Documentation/AI_Cas.html deleted file mode 100644 index 4c0163c84..000000000 --- a/docs/Documentation/AI_Cas.html +++ /dev/null @@ -1,1858 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module AI_Cas

- -

AI -- Provide Close Air Support to friendly ground troops.

- -

Banner Image

- -
- -

AI CAS classes makes AI Controllables execute a Close Air Support.

- - - -

There are the following types of CAS classes defined:

- - - -
- -

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-01-15: Initial class and API.

- -
- -

AUTHORS and CONTRIBUTIONS

- -

Contributions:

- -
    -
  • Quax: Concept, Advice & Testing.
  • -
  • Pikey: Concept, Advice & Testing.
  • -
  • Gunterlund: Test case revision.
  • -
- -

Authors:

- -
    -
  • FlightControl: Concept, Design & Programming.
  • -
- - -

Global(s)

- - - - - - - - - -
AI_CAS_ZONE -

1) #AICASZONE class, extends AIPatrol#AIPATROL_ZONE

- -

#AICASZONE derives from the AIPatrol#AIPATROL_ZONE, inheriting its methods and behaviour.

-
_NewEngageRoute(AIControllable) - -
-

Type AI_CAS_ZONE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AI_CAS_ZONE.AIControllable -

The Controllable patrolling.

-
AI_CAS_ZONE:Abort() -

Synchronous Event Trigger for Event Abort.

-
AI_CAS_ZONE:Accomplish() -

Synchronous Event Trigger for Event Accomplish.

-
AI_CAS_ZONE.Accomplished - -
AI_CAS_ZONE:Destroy() -

Synchronous Event Trigger for Event Destroy.

-
AI_CAS_ZONE:Engage(EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) -

Synchronous Event Trigger for Event Engage.

-
AI_CAS_ZONE.EngageAltitude - -
AI_CAS_ZONE.EngageAttackQty - -
AI_CAS_ZONE.EngageDirection - -
AI_CAS_ZONE.EngageSpeed - -
AI_CAS_ZONE.EngageWeaponExpend - -
AI_CAS_ZONE.EngageZone - -
AI_CAS_ZONE:Fired() -

Synchronous Event Trigger for Event Fired.

-
AI_CAS_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageZone, PatrolAltType) -

Creates a new AICASZONE object

-
AI_CAS_ZONE:OnAfterAbort(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Abort.

-
AI_CAS_ZONE:OnAfterAccomplish(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Accomplish.

-
AI_CAS_ZONE:OnAfterDestroy(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Destroy.

-
AI_CAS_ZONE:OnAfterEngage(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Engage.

-
AI_CAS_ZONE:OnAfterFired(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Fired.

-
AI_CAS_ZONE:OnBeforeAbort(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Abort.

-
AI_CAS_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Accomplish.

-
AI_CAS_ZONE:OnBeforeDestroy(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Destroy.

-
AI_CAS_ZONE:OnBeforeEngage(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Engage.

-
AI_CAS_ZONE:OnBeforeFired(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Fired.

-
AI_CAS_ZONE:OnEnterEngaging(Controllable, From, Event, To) -

OnEnter Transition Handler for State Engaging.

-
AI_CAS_ZONE:OnEventDead(EventData) - -
AI_CAS_ZONE:OnLeaveEngaging(Controllable, From, Event, To) -

OnLeave Transition Handler for State Engaging.

-
AI_CAS_ZONE:SetEngageZone(EngageZone) -

Set the Engage Zone where the AI is performing CAS.

-
AI_CAS_ZONE.TargetZone -

The Zone where the patrol needs to be executed.

-
AI_CAS_ZONE:__Abort(Delay) -

Asynchronous Event Trigger for Event Abort.

-
AI_CAS_ZONE:__Accomplish(Delay) -

Asynchronous Event Trigger for Event Accomplish.

-
AI_CAS_ZONE:__Destroy(Delay) -

Asynchronous Event Trigger for Event Destroy.

-
AI_CAS_ZONE:__Engage(Delay, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) -

Asynchronous Event Trigger for Event Engage.

-
AI_CAS_ZONE:__Fired(Delay) -

Asynchronous Event Trigger for Event Fired.

-
AI_CAS_ZONE:onafterAbort(Controllable, From, Event, To) - -
AI_CAS_ZONE:onafterAccomplish(Controllable, From, Event, To) - -
AI_CAS_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) - -
AI_CAS_ZONE:onafterEngage(Controllable, From, Event, To, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) - -
AI_CAS_ZONE:onafterStart(Controllable, From, Event, To) -

onafter State Transition for Event Start.

-
AI_CAS_ZONE:onafterTarget(Controllable, From, Event, To) - -
AI_CAS_ZONE:onbeforeEngage(Controllable, From, Event, To) - -
- -

Global(s)

-
-
- - #AI_CAS_ZONE - -AI_CAS_ZONE - -
-
- -

1) #AICASZONE class, extends AIPatrol#AIPATROL_ZONE

- -

#AICASZONE derives from the AIPatrol#AIPATROL_ZONE, inheriting its methods and behaviour.

- - -

-The #AICASZONE class implements the core functions to provide Close Air Support in an Engage Zone by an AIR Controllable or Group. -The AICASZONE runs a process. It holds an AI in a Patrol Zone and when the AI is commanded to engage, it will fly to an Engage Zone.

- -

HoldAndEngage

- -

The AICASZONE is assigned a Group and this must be done before the AICASZONE process can be started through the Start event.

- -

Start Event

- -

Upon started, The AI will Route itself towards the random 3D point within a patrol zone, -using a random speed within the given altitude and speed limits. -Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits. -This cycle will continue until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB.

- -

Route Event

- -

When the AI is commanded to provide Close Air Support (through the event Engage), the AI will fly towards the Engage Zone. -Any target that is detected in the Engage Zone will be reported and will be destroyed by the AI.

- -

Engage Event

- -

The AI will detect the targets and will only destroy the targets within the Engage Zone.

- -

Engage Event

- -

Every target that is destroyed, is reported< by the AI.

- -

Engage Event

- -

Note that the AI does not know when the Engage Zone is cleared, and therefore will keep circling in the zone.

- -

Engage Event

- -

Until it is notified through the event Accomplish, which is to be triggered by an observing party:

- -
    -
  • a FAC
  • -
  • a timed event
  • -
  • a menu option selected by a human
  • -
  • a condition
  • -
  • others ...
  • -
- -

Engage Event

- -

When the AI has accomplished the CAS, it will fly back to the Patrol Zone.

- -

Engage Event

- -

It will keep patrolling there, until it is notified to RTB or move to another CAS Zone. -It can be notified to go RTB through the RTB event.

- -

When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.

- -

Engage Event

- -

1.1) AICASZONE constructor

- - - -

1.2) AICASZONE is a FSM

- -

Process

- -

1.2.1) AICASZONE States

- -
    -
  • None ( Group ): The process is not started yet.
  • -
  • Patrolling ( Group ): The AI is patrolling the Patrol Zone.
  • -
  • Engaging ( Group ): The AI is engaging the targets in the Engage Zone, executing CAS.
  • -
  • Returning ( Group ): The AI is returning to Base..
  • -
- -

1.2.2) AICASZONE Events

- - - -
- - -
-
-
-
- - -_NewEngageRoute(AIControllable) - -
-
- - - -

Parameter

- -
-
-

Type AI_Cas

- -

Type AI_CAS_ZONE

- -

AICASZONE class

- -

Field(s)

-
-
- - Wrapper.Controllable#CONTROLLABLE - -AI_CAS_ZONE.AIControllable - -
-
- -

The Controllable patrolling.

- -
-
-
-
- - -AI_CAS_ZONE:Abort() - -
-
- -

Synchronous Event Trigger for Event Abort.

- -
-
-
-
- - -AI_CAS_ZONE:Accomplish() - -
-
- -

Synchronous Event Trigger for Event Accomplish.

- -
-
-
-
- - #boolean - -AI_CAS_ZONE.Accomplished - -
-
- - - -
-
-
-
- - -AI_CAS_ZONE:Destroy() - -
-
- -

Synchronous Event Trigger for Event Destroy.

- -
-
-
-
- - -AI_CAS_ZONE:Engage(EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) - -
-
- -

Synchronous Event Trigger for Event Engage.

- -

Parameters

-
    -
  • - -

    #number EngageSpeed : -(optional) The speed the Group will hold when engaging to the target zone.

    - -
  • -
  • - -

    Dcs.DCSTypes#Distance EngageAltitude : -(optional) Desired altitude to perform the unit engagement.

    - -
  • -
  • - -

    Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend : -(optional) Determines how much weapon will be released at each attack. -If parameter is not defined the unit / controllable will choose expend on its own discretion. -Use the structure DCSTypes#AI.Task.WeaponExpend to define the amount of weapons to be release at each attack.

    - -
  • -
  • - -

    #number EngageAttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    - -
  • -
  • - -

    Dcs.DCSTypes#Azimuth EngageDirection : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE.EngageAltitude - -
-
- - - -
-
-
-
- - - -AI_CAS_ZONE.EngageAttackQty - -
-
- - - -
-
-
-
- - - -AI_CAS_ZONE.EngageDirection - -
-
- - - -
-
-
-
- - -AI_CAS_ZONE.EngageSpeed - -
-
- - - -
-
-
-
- - - -AI_CAS_ZONE.EngageWeaponExpend - -
-
- - - -
-
-
-
- - - -AI_CAS_ZONE.EngageZone - -
-
- - - -
-
-
-
- - -AI_CAS_ZONE:Fired() - -
-
- -

Synchronous Event Trigger for Event Fired.

- -
-
-
-
- - -AI_CAS_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageZone, PatrolAltType) - -
-
- -

Creates a new AICASZONE object

- -

Parameters

- -

Return value

- -

#AICASZONE: -self

- -
-
-
-
- - -AI_CAS_ZONE:OnAfterAbort(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Abort.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:OnAfterAccomplish(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Accomplish.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:OnAfterDestroy(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Destroy.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:OnAfterEngage(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Engage.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:OnAfterFired(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Fired.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:OnBeforeAbort(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Abort.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_CAS_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Accomplish.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_CAS_ZONE:OnBeforeDestroy(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Destroy.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_CAS_ZONE:OnBeforeEngage(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Engage.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:OnBeforeFired(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Fired.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_CAS_ZONE:OnEnterEngaging(Controllable, From, Event, To) - -
-
- -

OnEnter Transition Handler for State Engaging.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:OnEventDead(EventData) - -
-
- - - -

Parameter

- -
-
-
-
- - -AI_CAS_ZONE:OnLeaveEngaging(Controllable, From, Event, To) - -
-
- -

OnLeave Transition Handler for State Engaging.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_CAS_ZONE:SetEngageZone(EngageZone) - -
-
- -

Set the Engage Zone where the AI is performing CAS.

- - -

Note that if the EngageZone is changed, the AI needs to re-detect targets.

- -

Parameter

-
    -
  • - -

    Core.Zone#ZONE EngageZone : -The zone where the AI is performing CAS.

    - -
  • -
-

Return value

- -

#AICASZONE: -self

- -
-
-
-
- - Core.Zone#ZONE_BASE - -AI_CAS_ZONE.TargetZone - -
-
- -

The Zone where the patrol needs to be executed.

- -
-
-
-
- - -AI_CAS_ZONE:__Abort(Delay) - -
-
- -

Asynchronous Event Trigger for Event Abort.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:__Accomplish(Delay) - -
-
- -

Asynchronous Event Trigger for Event Accomplish.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:__Destroy(Delay) - -
-
- -

Asynchronous Event Trigger for Event Destroy.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:__Engage(Delay, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) - -
-
- -

Asynchronous Event Trigger for Event Engage.

- -

Parameters

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
  • - -

    #number EngageSpeed : -(optional) The speed the Group will hold when engaging to the target zone.

    - -
  • -
  • - -

    Dcs.DCSTypes#Distance EngageAltitude : -(optional) Desired altitude to perform the unit engagement.

    - -
  • -
  • - -

    Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend : -(optional) Determines how much weapon will be released at each attack. -If parameter is not defined the unit / controllable will choose expend on its own discretion. -Use the structure DCSTypes#AI.Task.WeaponExpend to define the amount of weapons to be release at each attack.

    - -
  • -
  • - -

    #number EngageAttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    - -
  • -
  • - -

    Dcs.DCSTypes#Azimuth EngageDirection : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:__Fired(Delay) - -
-
- -

Asynchronous Event Trigger for Event Fired.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:onafterAbort(Controllable, From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:onafterAccomplish(Controllable, From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
  • - -

    Core.Event#EVENTDATA EventData :

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:onafterEngage(Controllable, From, Event, To, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
  • - -

    #number EngageSpeed : -(optional) The speed the Group will hold when engaging to the target zone.

    - -
  • -
  • - -

    Dcs.DCSTypes#Distance EngageAltitude : -(optional) Desired altitude to perform the unit engagement.

    - -
  • -
  • - -

    Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend : -(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    - -
  • -
  • - -

    #number EngageAttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    - -
  • -
  • - -

    Dcs.DCSTypes#Azimuth EngageDirection : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:onafterStart(Controllable, From, Event, To) - -
-
- -

onafter State Transition for Event Start.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:onafterTarget(Controllable, From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:onbeforeEngage(Controllable, From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
- -
- -
- - diff --git a/docs/Documentation/AI_Patrol.html b/docs/Documentation/AI_Patrol.html deleted file mode 100644 index b6fa99328..000000000 --- a/docs/Documentation/AI_Patrol.html +++ /dev/null @@ -1,2857 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module AI_Patrol

- -

AI -- Air Patrolling or Staging.

- -

Banner Image

- -
- -

AI PATROL classes makes AI Controllables execute an Patrol.

- - - -

There are the following types of PATROL classes defined:

- - - -
- -

OPEN ISSUES

- -

2017-01-17: When Spawned AI is located at an airbase, it will be routed first back to the airbase after take-off.

- -

2016-01-17: - -- Fixed problem with AI returning to base too early and unexpected. - -- ReSpawning of AI will reset the AI_PATROL and derived classes. - -- Checked the correct workings of SCHEDULER, and it DOES work correctly.

- -
- -

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-01-17: Rename of class: AI_PATROL_ZONE is the new name for the old AI_PATROLZONE.

- -

2017-01-15: Complete revision. AIPATROLZONE is the base class for other AI_PATROL like classes.

- -

2016-09-01: Initial class and API.

- -
- -

AUTHORS and CONTRIBUTIONS

- -

Contributions:

- -
    -
  • Dutch_Baron: Working together with James has resulted in the creation of the AI_BALANCER class. James has shared his ideas on balancing AI with air units, and together we made a first design which you can use now :-)
  • -
  • Pikey: Testing and API concept review.
  • -
- -

Authors:

- -
    -
  • FlightControl: Design & Programming.
  • -
- - -

Global(s)

- - - - - -
AI_PATROL_ZONE -

1) #AIPATROLZONE class, extends Fsm#FSM_CONTROLLABLE

- -

The #AIPATROLZONE class implements the core functions to patrol a Zone by an AI Controllable or Group.

-
-

Type AI_PATROL_ZONE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AI_PATROL_ZONE.AIControllable -

The Controllable patrolling.

-
AI_PATROL_ZONE.CheckStatus - -
AI_PATROL_ZONE:ClearDetectedUnits() -

Clears the list of Unit#UNITs that were detected by the AI.

-
AI_PATROL_ZONE.CoordTest - -
AI_PATROL_ZONE:Detect() -

Synchronous Event Trigger for Event Detect.

-
AI_PATROL_ZONE.DetectActivated - -
AI_PATROL_ZONE.DetectInterval - -
AI_PATROL_ZONE.DetectOn - -
AI_PATROL_ZONE.DetectZone - -
AI_PATROL_ZONE:Detected() -

Synchronous Event Trigger for Event Detected.

-
AI_PATROL_ZONE.DetectedUnits - -
AI_PATROL_ZONE:GetDetectedUnits() -

Gets a list of Unit#UNITs that were detected by the AI.

-
AI_PATROL_ZONE:ManageDamage(PatrolDamageTreshold) -

When the AI is damaged beyond a certain treshold, it is required that the AI returns to the home base.

-
AI_PATROL_ZONE:ManageFuel(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime) -

When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.

-
AI_PATROL_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType) -

Creates a new AIPATROLZONE object

-
AI_PATROL_ZONE:OnAfterDetect(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Detect.

-
AI_PATROL_ZONE:OnAfterDetected(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Detected.

-
AI_PATROL_ZONE:OnAfterRTB(Controllable, From, Event, To) -

OnAfter Transition Handler for Event RTB.

-
AI_PATROL_ZONE:OnAfterRoute(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Route.

-
AI_PATROL_ZONE:OnAfterStart(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Start.

-
AI_PATROL_ZONE:OnAfterStatus(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Status.

-
AI_PATROL_ZONE:OnAfterStop(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Stop.

-
AI_PATROL_ZONE:OnBeforeDetect(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Detect.

-
AI_PATROL_ZONE:OnBeforeDetected(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Detected.

-
AI_PATROL_ZONE:OnBeforeRTB(Controllable, From, Event, To) -

OnBefore Transition Handler for Event RTB.

-
AI_PATROL_ZONE:OnBeforeRoute(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Route.

-
AI_PATROL_ZONE:OnBeforeStart(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Start.

-
AI_PATROL_ZONE:OnBeforeStatus(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Status.

-
AI_PATROL_ZONE:OnBeforeStop(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Stop.

-
AI_PATROL_ZONE:OnCrash(EventData) - -
AI_PATROL_ZONE:OnEjection(EventData) - -
AI_PATROL_ZONE:OnEnterPatrolling(Controllable, From, Event, To) -

OnEnter Transition Handler for State Patrolling.

-
AI_PATROL_ZONE:OnEnterReturning(Controllable, From, Event, To) -

OnEnter Transition Handler for State Returning.

-
AI_PATROL_ZONE:OnEnterStopped(Controllable, From, Event, To) -

OnEnter Transition Handler for State Stopped.

-
AI_PATROL_ZONE:OnLeavePatrolling(Controllable, From, Event, To) -

OnLeave Transition Handler for State Patrolling.

-
AI_PATROL_ZONE:OnLeaveReturning(Controllable, From, Event, To) -

OnLeave Transition Handler for State Returning.

-
AI_PATROL_ZONE:OnLeaveStopped(Controllable, From, Event, To) -

OnLeave Transition Handler for State Stopped.

-
AI_PATROL_ZONE:OnPilotDead(EventData) - -
AI_PATROL_ZONE.PatrolAltType - -
AI_PATROL_ZONE.PatrolCeilingAltitude -

The highest altitude in meters where to execute the patrol.

-
AI_PATROL_ZONE.PatrolDamageTreshold - -
AI_PATROL_ZONE.PatrolFloorAltitude -

The lowest altitude in meters where to execute the patrol.

-
AI_PATROL_ZONE.PatrolFuelTresholdPercentage - -
AI_PATROL_ZONE.PatrolManageDamage - -
AI_PATROL_ZONE.PatrolManageFuel - -
AI_PATROL_ZONE.PatrolMaxSpeed -

The maximum speed of the Controllable in km/h.

-
AI_PATROL_ZONE.PatrolMinSpeed -

The minimum speed of the Controllable in km/h.

-
AI_PATROL_ZONE.PatrolOutOfFuelOrbitTime - -
AI_PATROL_ZONE.PatrolZone -

The Zone where the patrol needs to be executed.

-
AI_PATROL_ZONE:RTB() -

Synchronous Event Trigger for Event RTB.

-
AI_PATROL_ZONE:Route() -

Synchronous Event Trigger for Event Route.

-
AI_PATROL_ZONE:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude) -

Sets the floor and ceiling altitude of the patrol.

-
AI_PATROL_ZONE:SetDetectionActivated() -

Activate the detection.

-
AI_PATROL_ZONE:SetDetectionDeactivated() -

Deactivate the detection.

-
AI_PATROL_ZONE:SetDetectionInterval(Seconds) -

Set the interval in seconds between each detection executed by the AI.

-
AI_PATROL_ZONE:SetDetectionOff() -

Set the detection off.

-
AI_PATROL_ZONE:SetDetectionOn() -

Set the detection on.

-
AI_PATROL_ZONE:SetDetectionZone(DetectionZone) -

Set the detection zone where the AI is detecting targets.

-
AI_PATROL_ZONE:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed) -

Sets (modifies) the minimum and maximum speed of the patrol.

-
AI_PATROL_ZONE:SetStatusOff() -

Set the status checking off.

-
AI_PATROL_ZONE:Start() -

Synchronous Event Trigger for Event Start.

-
AI_PATROL_ZONE:Status() -

Synchronous Event Trigger for Event Status.

-
AI_PATROL_ZONE:Stop() -

Synchronous Event Trigger for Event Stop.

-
AI_PATROL_ZONE._NewPatrolRoute(AIControllable, self) - -
AI_PATROL_ZONE:__Detect(Delay) -

Asynchronous Event Trigger for Event Detect.

-
AI_PATROL_ZONE:__Detected(Delay) -

Asynchronous Event Trigger for Event Detected.

-
AI_PATROL_ZONE:__RTB(Delay) -

Asynchronous Event Trigger for Event RTB.

-
AI_PATROL_ZONE:__Route(Delay) -

Asynchronous Event Trigger for Event Route.

-
AI_PATROL_ZONE:__Start(Delay) -

Asynchronous Event Trigger for Event Start.

-
AI_PATROL_ZONE:__Status(Delay) -

Asynchronous Event Trigger for Event Status.

-
AI_PATROL_ZONE:__Stop(Delay) -

Asynchronous Event Trigger for Event Stop.

-
AI_PATROL_ZONE:onafterDead() - -
AI_PATROL_ZONE:onafterDetect(Controllable, From, Event, To) - -
AI_PATROL_ZONE:onafterRTB() - -
AI_PATROL_ZONE:onafterRoute(Controllable, From, Event, To) -

Defines a new patrol route using the Process_PatrolZone parameters and settings.

-
AI_PATROL_ZONE:onafterStart(Controllable, From, Event, To) -

Defines a new patrol route using the Process_PatrolZone parameters and settings.

-
AI_PATROL_ZONE:onafterStatus() - -
AI_PATROL_ZONE:onbeforeDetect(Controllable, From, Event, To) - -
AI_PATROL_ZONE:onbeforeStatus() - -
- -

Global(s)

-
-
- - #AI_PATROL_ZONE - -AI_PATROL_ZONE - -
-
- -

1) #AIPATROLZONE class, extends Fsm#FSM_CONTROLLABLE

- -

The #AIPATROLZONE class implements the core functions to patrol a Zone by an AI Controllable or Group.

- - - -

Process

- -

The AIPATROLZONE is assigned a Group and this must be done before the AIPATROLZONE process can be started using the Start event.

- -

Process

- -

The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits. -Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.

- -

Process

- -

This cycle will continue.

- -

Process

- -

During the patrol, the AI will detect enemy targets, which are reported through the Detected event.

- -

Process

- -

-- Note that the enemy is not engaged! To model enemy engagement, either tailor the Detected event, or -use derived AI_ classes to model AI offensive or defensive behaviour.

- -

Process

- -

Until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB. -When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.

- -

Process

- -

1.1) AIPATROLZONE constructor

- - - -

1.2) AIPATROLZONE is a FSM

- -

Process

- -

1.2.1) AIPATROLZONE States

- -
    -
  • None ( Group ): The process is not started yet.
  • -
  • Patrolling ( Group ): The AI is patrolling the Patrol Zone.
  • -
  • Returning ( Group ): The AI is returning to Base.
  • -
  • Stopped ( Group ): The process is stopped.
  • -
  • Crashed ( Group ): The AI has crashed or is dead.
  • -
- -

1.2.2) AIPATROLZONE Events

- -
    -
  • Start ( Group ): Start the process.
  • -
  • Stop ( Group ): Stop the process.
  • -
  • Route ( Group ): Route the AI to a new random 3D point within the Patrol Zone.
  • -
  • RTB ( Group ): Route the AI to the home base.
  • -
  • Detect ( Group ): The AI is detecting targets.
  • -
  • Detected ( Group ): The AI has detected new targets.
  • -
  • Status ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.
  • -
- -

1.3) Set or Get the AI controllable

- - - -

1.4) Set the Speed and Altitude boundaries of the AI controllable

- - - -

1.5) Manage the detection process of the AI controllable

- -

The detection process of the AI controllable can be manipulated. -Detection requires an amount of CPU power, which has an impact on your mission performance. -Only put detection on when absolutely necessary, and the frequency of the detection can also be set.

- - - -

The detection frequency can be set with AIPATROLZONE.SetDetectionInterval( seconds ), where the amount of seconds specify how much seconds will be waited before the next detection. -Use the method AIPATROLZONE.GetDetectedUnits() to obtain a list of the Units detected by the AI.

- -

The detection can be filtered to potential targets in a specific zone. -Use the method AIPATROLZONE.SetDetectionZone() to set the zone where targets need to be detected. -Note that when the zone is too far away, or the AI is not heading towards the zone, or the AI is too high, no targets may be detected -according the weather conditions.

- -

1.6) Manage the "out of fuel" in the AIPATROLZONE

- -

When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base. -Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. -When the fuel treshold is reached, the AI will continue for a given time its patrol task in orbit, -while a new AI is targetted to the AIPATROLZONE. -Once the time is finished, the old AI will return to the base. -Use the method AIPATROLZONE.ManageFuel() to have this proces in place.

- -

1.7) Manage "damage" behaviour of the AI in the AIPATROLZONE

- -

When the AI is damaged, it is required that a new AIControllable is started. However, damage cannon be foreseen early on. -Therefore, when the damage treshold is reached, the AI will return immediately to the home base (RTB). -Use the method AIPATROLZONE.ManageDamage() to have this proces in place.

- -
- - -
-
-

Type AI_Patrol

- -

Type AI_PATROL_ZONE

- -

AIPATROLZONE class

- -

Field(s)

-
-
- - Wrapper.Controllable#CONTROLLABLE - -AI_PATROL_ZONE.AIControllable - -
-
- -

The Controllable patrolling.

- -
-
-
-
- - #boolean - -AI_PATROL_ZONE.CheckStatus - -
-
- - - -
-
-
-
- - -AI_PATROL_ZONE:ClearDetectedUnits() - -
-
- -

Clears the list of Unit#UNITs that were detected by the AI.

- -
-
-
-
- - Functional.Spawn#SPAWN - -AI_PATROL_ZONE.CoordTest - -
-
- - - -
-
-
-
- - -AI_PATROL_ZONE:Detect() - -
-
- -

Synchronous Event Trigger for Event Detect.

- -
-
-
-
- - #boolean - -AI_PATROL_ZONE.DetectActivated - -
-
- - - -
-
-
-
- - - -AI_PATROL_ZONE.DetectInterval - -
-
- - - -
-
-
-
- - #boolean - -AI_PATROL_ZONE.DetectOn - -
-
- - - -
-
-
-
- - - -AI_PATROL_ZONE.DetectZone - -
-
- - - -
-
-
-
- - -AI_PATROL_ZONE:Detected() - -
-
- -

Synchronous Event Trigger for Event Detected.

- -
-
-
-
- - - -AI_PATROL_ZONE.DetectedUnits - -
-
- - - - -

This table contains the targets detected during patrol.

- -
-
-
-
- - -AI_PATROL_ZONE:GetDetectedUnits() - -
-
- -

Gets a list of Unit#UNITs that were detected by the AI.

- - -

No filtering is applied, so, ANY detected UNIT can be in this list. -It is up to the mission designer to use the Unit class and methods to filter the targets.

- -

Return value

- -

#table: -The list of Unit#UNITs

- -
-
-
-
- - -AI_PATROL_ZONE:ManageDamage(PatrolDamageTreshold) - -
-
- -

When the AI is damaged beyond a certain treshold, it is required that the AI returns to the home base.

- - -

However, damage cannot be foreseen early on. -Therefore, when the damage treshold is reached, -the AI will return immediately to the home base (RTB). -Note that for groups, the average damage of the complete group will be calculated. -So, in a group of 4 airplanes, 2 lost and 2 with damage 0.2, the damage treshold will be 0.25.

- -

Parameter

-
    -
  • - -

    #number PatrolDamageTreshold : -The treshold in percentage (between 0 and 1) when the AI is considered to be damaged.

    - -
  • -
-

Return value

- -

#AIPATROLZONE: -self

- -
-
-
-
- - -AI_PATROL_ZONE:ManageFuel(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime) - -
-
- -

When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.

- - -

Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. -When the fuel treshold is reached, the AI will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AIPATROLZONE. -Once the time is finished, the old AI will return to the base.

- -

Parameters

-
    -
  • - -

    #number PatrolFuelTresholdPercentage : -The treshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel.

    - -
  • -
  • - -

    #number PatrolOutOfFuelOrbitTime : -The amount of seconds the out of fuel AIControllable will orbit before returning to the base.

    - -
  • -
-

Return value

- -

#AIPATROLZONE: -self

- -
-
-
-
- - -AI_PATROL_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType) - -
-
- -

Creates a new AIPATROLZONE object

- -

Parameters

- -

Return value

- -

#AIPATROLZONE: -self

- -

Usage:

-
-- Define a new AI_PATROL_ZONE Object. This PatrolArea will patrol an AIControllable within PatrolZone between 3000 and 6000 meters, with a variying speed between 600 and 900 km/h.
-PatrolZone = ZONE:New( 'PatrolZone' )
-PatrolSpawn = SPAWN:New( 'Patrol Group' )
-PatrolArea = AI_PATROL_ZONE:New( PatrolZone, 3000, 6000, 600, 900 )
- -
-
-
-
- - -AI_PATROL_ZONE:OnAfterDetect(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Detect.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:OnAfterDetected(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Detected.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:OnAfterRTB(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event RTB.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:OnAfterRoute(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Route.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:OnAfterStart(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Start.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:OnAfterStatus(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Status.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:OnAfterStop(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Stop.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:OnBeforeDetect(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Detect.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_PATROL_ZONE:OnBeforeDetected(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Detected.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_PATROL_ZONE:OnBeforeRTB(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event RTB.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_PATROL_ZONE:OnBeforeRoute(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Route.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_PATROL_ZONE:OnBeforeStart(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Start.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_PATROL_ZONE:OnBeforeStatus(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Status.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_PATROL_ZONE:OnBeforeStop(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Stop.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_PATROL_ZONE:OnCrash(EventData) - -
-
- - - -

Parameter

- -
-
-
-
- - -AI_PATROL_ZONE:OnEjection(EventData) - -
-
- - - -

Parameter

- -
-
-
-
- - -AI_PATROL_ZONE:OnEnterPatrolling(Controllable, From, Event, To) - -
-
- -

OnEnter Transition Handler for State Patrolling.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:OnEnterReturning(Controllable, From, Event, To) - -
-
- -

OnEnter Transition Handler for State Returning.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:OnEnterStopped(Controllable, From, Event, To) - -
-
- -

OnEnter Transition Handler for State Stopped.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:OnLeavePatrolling(Controllable, From, Event, To) - -
-
- -

OnLeave Transition Handler for State Patrolling.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_PATROL_ZONE:OnLeaveReturning(Controllable, From, Event, To) - -
-
- -

OnLeave Transition Handler for State Returning.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_PATROL_ZONE:OnLeaveStopped(Controllable, From, Event, To) - -
-
- -

OnLeave Transition Handler for State Stopped.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_PATROL_ZONE:OnPilotDead(EventData) - -
-
- - - -

Parameter

- -
-
-
-
- - -AI_PATROL_ZONE.PatrolAltType - -
-
- - - - -

defafult PatrolAltType to "RADIO" if not specified

- -
-
-
-
- - Dcs.DCSTypes#Altitude - -AI_PATROL_ZONE.PatrolCeilingAltitude - -
-
- -

The highest altitude in meters where to execute the patrol.

- -
-
-
-
- - - -AI_PATROL_ZONE.PatrolDamageTreshold - -
-
- - - -
-
-
-
- - Dcs.DCSTypes#Altitude - -AI_PATROL_ZONE.PatrolFloorAltitude - -
-
- -

The lowest altitude in meters where to execute the patrol.

- -
-
-
-
- - - -AI_PATROL_ZONE.PatrolFuelTresholdPercentage - -
-
- - - -
-
-
-
- - #boolean - -AI_PATROL_ZONE.PatrolManageDamage - -
-
- - - -
-
-
-
- - #boolean - -AI_PATROL_ZONE.PatrolManageFuel - -
-
- - - -
-
-
-
- - Dcs.DCSTypes#Speed - -AI_PATROL_ZONE.PatrolMaxSpeed - -
-
- -

The maximum speed of the Controllable in km/h.

- -
-
-
-
- - Dcs.DCSTypes#Speed - -AI_PATROL_ZONE.PatrolMinSpeed - -
-
- -

The minimum speed of the Controllable in km/h.

- -
-
-
-
- - - -AI_PATROL_ZONE.PatrolOutOfFuelOrbitTime - -
-
- - - -
-
-
-
- - Core.Zone#ZONE_BASE - -AI_PATROL_ZONE.PatrolZone - -
-
- -

The Zone where the patrol needs to be executed.

- -
-
-
-
- - -AI_PATROL_ZONE:RTB() - -
-
- -

Synchronous Event Trigger for Event RTB.

- -
-
-
-
- - -AI_PATROL_ZONE:Route() - -
-
- -

Synchronous Event Trigger for Event Route.

- -
-
-
-
- - -AI_PATROL_ZONE:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude) - -
-
- -

Sets the floor and ceiling altitude of the patrol.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Altitude PatrolFloorAltitude : -The lowest altitude in meters where to execute the patrol.

    - -
  • -
  • - -

    Dcs.DCSTypes#Altitude PatrolCeilingAltitude : -The highest altitude in meters where to execute the patrol.

    - -
  • -
-

Return value

- -

#AIPATROLZONE: -self

- -
-
-
-
- - -AI_PATROL_ZONE:SetDetectionActivated() - -
-
- -

Activate the detection.

- - -

The AI will detect for targets if the Detection is switched On.

- -

Return value

- -

#AIPATROLZONE: -self

- -
-
-
-
- - -AI_PATROL_ZONE:SetDetectionDeactivated() - -
-
- -

Deactivate the detection.

- - -

The AI will NOT detect for targets.

- -

Return value

- -

#AIPATROLZONE: -self

- -
-
-
-
- - -AI_PATROL_ZONE:SetDetectionInterval(Seconds) - -
-
- -

Set the interval in seconds between each detection executed by the AI.

- - -

The list of already detected targets will be kept and updated. -Newly detected targets will be added, but already detected targets that were -not detected in this cycle, will NOT be removed! -The default interval is 30 seconds.

- -

Parameter

-
    -
  • - -

    #number Seconds : -The interval in seconds.

    - -
  • -
-

Return value

- -

#AIPATROLZONE: -self

- -
-
-
-
- - -AI_PATROL_ZONE:SetDetectionOff() - -
-
- -

Set the detection off.

- - -

The AI will NOT detect for targets. -However, the list of already detected targets will be kept and can be enquired!

- -

Return value

- -

#AIPATROLZONE: -self

- -
-
-
-
- - -AI_PATROL_ZONE:SetDetectionOn() - -
-
- -

Set the detection on.

- - -

The AI will detect for targets.

- -

Return value

- -

#AIPATROLZONE: -self

- -
-
-
-
- - -AI_PATROL_ZONE:SetDetectionZone(DetectionZone) - -
-
- -

Set the detection zone where the AI is detecting targets.

- -

Parameter

-
    -
  • - -

    Core.Zone#ZONE DetectionZone : -The zone where to detect targets.

    - -
  • -
-

Return value

- -

#AIPATROLZONE: -self

- -
-
-
-
- - -AI_PATROL_ZONE:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed) - -
-
- -

Sets (modifies) the minimum and maximum speed of the patrol.

- -

Parameters

- -

Return value

- -

#AIPATROLZONE: -self

- -
-
-
-
- - -AI_PATROL_ZONE:SetStatusOff() - -
-
- -

Set the status checking off.

- -

Return value

- -

#AIPATROLZONE: -self

- -
-
-
-
- - -AI_PATROL_ZONE:Start() - -
-
- -

Synchronous Event Trigger for Event Start.

- -
-
-
-
- - -AI_PATROL_ZONE:Status() - -
-
- -

Synchronous Event Trigger for Event Status.

- -
-
-
-
- - -AI_PATROL_ZONE:Stop() - -
-
- -

Synchronous Event Trigger for Event Stop.

- -
-
-
-
- - -AI_PATROL_ZONE._NewPatrolRoute(AIControllable, self) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE AIControllable : -This statis method is called from the route path within the last task at the last waaypoint of the Controllable. -Note that this method is required, as triggers the next route when patrolling for the Controllable.

    - -
  • -
  • - -

    self :

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:__Detect(Delay) - -
-
- -

Asynchronous Event Trigger for Event Detect.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:__Detected(Delay) - -
-
- -

Asynchronous Event Trigger for Event Detected.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:__RTB(Delay) - -
-
- -

Asynchronous Event Trigger for Event RTB.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:__Route(Delay) - -
-
- -

Asynchronous Event Trigger for Event Route.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:__Start(Delay) - -
-
- -

Asynchronous Event Trigger for Event Start.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:__Status(Delay) - -
-
- -

Asynchronous Event Trigger for Event Status.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:__Stop(Delay) - -
-
- -

Asynchronous Event Trigger for Event Stop.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:onafterDead() - -
-
- - - -
-
-
-
- - -AI_PATROL_ZONE:onafterDetect(Controllable, From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    Controllable :

    - -
  • -
  • - -

    From :

    - -
  • -
  • - -

    Event :

    - -
  • -
  • - -

    To :

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:onafterRTB() - -
-
- - - -
-
-
-
- - -AI_PATROL_ZONE:onafterRoute(Controllable, From, Event, To) - -
-
- -

Defines a new patrol route using the Process_PatrolZone parameters and settings.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:onafterStart(Controllable, From, Event, To) - -
-
- -

Defines a new patrol route using the Process_PatrolZone parameters and settings.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#AIPATROLZONE: -self

- -
-
-
-
- - -AI_PATROL_ZONE:onafterStatus() - -
-
- - - -
-
-
-
- - -AI_PATROL_ZONE:onbeforeDetect(Controllable, From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    Controllable :

    - -
  • -
  • - -

    From :

    - -
  • -
  • - -

    Event :

    - -
  • -
  • - -

    To :

    - -
  • -
-
-
-
-
- - -AI_PATROL_ZONE:onbeforeStatus() - -
-
- - - -
-
- -
- -
- - diff --git a/docs/Documentation/Account.html b/docs/Documentation/Account.html deleted file mode 100644 index 134b635fa..000000000 --- a/docs/Documentation/Account.html +++ /dev/null @@ -1,849 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Account

- -

Actions - ACTACCOUNT classes account for (detect, count & report) various DCS events occuring on Units.

- - - -

Banner Image

- -
- - -

Global(s)

- - - - - - - - - -
ACT_ACCOUNT - -
ACT_ACCOUNT_DEADS - -
-

Type ACT_ACCOUNT

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ACT_ACCOUNT.ClassName - -
ACT_ACCOUNT.DisplayCount - -
ACT_ACCOUNT:New() -

Creates a new DESTROY process.

-
ACT_ACCOUNT.TargetSetUnit - -
ACT_ACCOUNT:onafterEvent(ProcessUnit, Event, From, To) -

StateMachine callback function

-
ACT_ACCOUNT:onafterStart(ProcessUnit, Event, From, To) -

StateMachine callback function

-
ACT_ACCOUNT:onenterWaiting(ProcessUnit, Event, From, To) -

StateMachine callback function

-
- -

Type ACT_ACCOUNT_DEADS

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ACT_ACCOUNT_DEADS.ClassName - -
ACT_ACCOUNT_DEADS.DisplayCategory - -
ACT_ACCOUNT_DEADS.DisplayCount - -
ACT_ACCOUNT_DEADS.DisplayInterval - -
ACT_ACCOUNT_DEADS.DisplayMessage - -
ACT_ACCOUNT_DEADS.DisplayTime - -
ACT_ACCOUNT_DEADS:Init(FsmAccount) - -
ACT_ACCOUNT_DEADS:New(TargetSetUnit, TaskName) -

Creates a new DESTROY process.

-
ACT_ACCOUNT_DEADS.TargetSetUnit - -
ACT_ACCOUNT_DEADS.TaskName - -
ACT_ACCOUNT_DEADS:onafterEvent(ProcessUnit, Event, From, To, Task) -

StateMachine callback function

-
ACT_ACCOUNT_DEADS:onenterAccount(ProcessUnit, Event, From, To, Task, EventData) -

StateMachine callback function

-
ACT_ACCOUNT_DEADS:onenterReport(ProcessUnit, Event, From, To, Task) -

StateMachine callback function

-
ACT_ACCOUNT_DEADS:onfuncEventDead(EventData) - -
- -

Global(s)

-
-
- - #ACT_ACCOUNT - -ACT_ACCOUNT - -
-
- - - -
-
-
-
- - #ACT_ACCOUNT_DEADS - -ACT_ACCOUNT_DEADS - -
-
- - - -
-
-

Type Account

- -

Type ACT_ACCOUNT

- -

#ACT_ACCOUNT FSM class, extends Fsm#FSM_PROCESS

- -

ACT_ACCOUNT state machine:

- -

This class is a state machine: it manages a process that is triggered by events causing state transitions to occur.

- - -

All derived classes from this class will start with the class name, followed by a _. See the relevant derived class descriptions below. -Each derived class follows exactly the same process, using the same events and following the same state transitions, -but will have different implementation behaviour upon each event or state transition.

- -

ACT_ACCOUNT States

- -
    -
  • Asigned: The player is assigned.
  • -
  • Waiting: Waiting for an event.
  • -
  • Report: Reporting.
  • -
  • Account: Account for an event.
  • -
  • Accounted: All events have been accounted for, end of the process.
  • -
  • Failed: Failed the process.
  • -
- -

ACT_ACCOUNT Events

- -
    -
  • Start: Start the process.
  • -
  • Wait: Wait for an event.
  • -
  • Report: Report the status of the accounting.
  • -
  • Event: An event happened, process the event.
  • -
  • More: More targets.
  • -
  • NoMore (*): No more targets.
  • -
  • Fail (*): The action process has failed.
  • -
- -

(*) End states of the process.

- -

ACT_ACCOUNT state transition methods:

- -

State transition functions can be set by the mission designer customizing or improving the behaviour of the state. -There are 2 moments when state transition methods will be called by the state machine:

- -
    -
  • Before the state transition. - The state transition method needs to start with the name OnBefore + the name of the state. - If the state transition method returns false, then the processing of the state transition will not be done! - If you want to change the behaviour of the AIControllable at this event, return false, - but then you'll need to specify your own logic using the AIControllable!

  • -
  • After the state transition. - The state transition method needs to start with the name OnAfter + the name of the state. - These state transition methods need to provide a return value, which is specified at the function description.

    -
  • -
- -

Field(s)

-
-
- - #string - -ACT_ACCOUNT.ClassName - -
-
- - - -
-
-
-
- - #number - -ACT_ACCOUNT.DisplayCount - -
-
- - - -
-
-
-
- - -ACT_ACCOUNT:New() - -
-
- -

Creates a new DESTROY process.

- -

Return value

- -

#ACT_ACCOUNT:

- - -
-
-
-
- - Set#SET_UNIT - -ACT_ACCOUNT.TargetSetUnit - -
-
- - - -
-
-
-
- - -ACT_ACCOUNT:onafterEvent(ProcessUnit, Event, From, To) - -
-
- -

StateMachine callback function

- -

Parameters

- -
-
-
-
- - -ACT_ACCOUNT:onafterStart(ProcessUnit, Event, From, To) - -
-
- -

StateMachine callback function

- -

Parameters

- -
-
-
-
- - -ACT_ACCOUNT:onenterWaiting(ProcessUnit, Event, From, To) - -
-
- -

StateMachine callback function

- -

Parameters

- -
-
- -

Type ACT_ACCOUNT_DEADS

- -

#ACTACCOUNTDEADS FSM class, extends Fsm.Account#ACT_ACCOUNT

- -

The ACTACCOUNTDEADS class accounts (detects, counts and reports) successful kills of DCS units.

- - -

The process is given a Set of units that will be tracked upon successful destruction. -The process will end after each target has been successfully destroyed. -Each successful dead will trigger an Account state transition that can be scored, modified or administered.

- - -

ACTACCOUNTDEADS constructor:

- - - -

Field(s)

-
-
- - #string - -ACT_ACCOUNT_DEADS.ClassName - -
-
- - - -
-
-
-
- - #string - -ACT_ACCOUNT_DEADS.DisplayCategory - -
-
- - - - -

Targets is the default display category

- -
-
-
-
- - #number - -ACT_ACCOUNT_DEADS.DisplayCount - -
-
- - - -
-
-
-
- - #number - -ACT_ACCOUNT_DEADS.DisplayInterval - -
-
- - - -
-
-
-
- - #boolean - -ACT_ACCOUNT_DEADS.DisplayMessage - -
-
- - - -
-
-
-
- - #number - -ACT_ACCOUNT_DEADS.DisplayTime - -
-
- - - - -

10 seconds is the default

- -
-
-
-
- - -ACT_ACCOUNT_DEADS:Init(FsmAccount) - -
-
- - - -

Parameter

-
    -
  • - -

    FsmAccount :

    - -
  • -
-
-
-
-
- - -ACT_ACCOUNT_DEADS:New(TargetSetUnit, TaskName) - -
-
- -

Creates a new DESTROY process.

- -

Parameters

-
    -
  • - -

    Set#SET_UNIT TargetSetUnit :

    - -
  • -
  • - -

    #string TaskName :

    - -
  • -
-
-
-
-
- - Set#SET_UNIT - -ACT_ACCOUNT_DEADS.TargetSetUnit - -
-
- - - -
-
-
-
- - - -ACT_ACCOUNT_DEADS.TaskName - -
-
- - - -
-
-
-
- - -ACT_ACCOUNT_DEADS:onafterEvent(ProcessUnit, Event, From, To, Task) - -
-
- -

StateMachine callback function

- -

Parameters

- -
-
-
-
- - -ACT_ACCOUNT_DEADS:onenterAccount(ProcessUnit, Event, From, To, Task, EventData) - -
-
- -

StateMachine callback function

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE ProcessUnit :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    Task :

    - -
  • -
  • - -

    EventData :

    - -
  • -
-
-
-
-
- - -ACT_ACCOUNT_DEADS:onenterReport(ProcessUnit, Event, From, To, Task) - -
-
- -

StateMachine callback function

- -

Parameters

- -
-
-
-
- - -ACT_ACCOUNT_DEADS:onfuncEventDead(EventData) - -
-
- - - -

Parameter

- -
-
- -
- -
- - diff --git a/docs/Documentation/Airbase.html b/docs/Documentation/Airbase.html deleted file mode 100644 index b08e91ce6..000000000 --- a/docs/Documentation/Airbase.html +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Airbase

- -

This module contains the AIRBASE classes.

- - - -
- -

1) Airbase#AIRBASE class, extends Positionable#POSITIONABLE

-

The AIRBASE class is a wrapper class to handle the DCS Airbase objects:

- -
    -
  • Support all DCS Airbase APIs.
  • -
  • Enhance with Airbase specific APIs not in the DCS Airbase API set.
  • -
- - -

1.1) AIRBASE reference methods

-

For each DCS Airbase object alive within a running mission, a AIRBASE wrapper object (instance) will be created within the _DATABASE object. -This is done at the beginning of the mission (when the mission starts).

- -

The AIRBASE class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference -using the DCS Airbase or the DCS AirbaseName.

- -

Another thing to know is that AIRBASE objects do not "contain" the DCS Airbase object. -The AIRBASE methods will reference the DCS Airbase object by name when it is needed during API execution. -If the DCS Airbase object does not exist or is nil, the AIRBASE methods will return nil and log an exception in the DCS.log file.

- -

The AIRBASE class provides the following functions to retrieve quickly the relevant AIRBASE instance:

- -
    -
  • AIRBASE.Find(): Find a AIRBASE instance from the _DATABASE object using a DCS Airbase object.
  • -
  • AIRBASE.FindByName(): Find a AIRBASE instance from the _DATABASE object using a DCS Airbase name.
  • -
- -

IMPORTANT: ONE SHOULD NEVER SANATIZE these AIRBASE OBJECT REFERENCES! (make the AIRBASE object references nil).

- -

1.2) DCS AIRBASE APIs

-

The DCS Airbase APIs are used extensively within MOOSE. The AIRBASE class has for each DCS Airbase API a corresponding method. -To be able to distinguish easily in your code the difference between a AIRBASE API call and a DCS Airbase API call, -the first letter of the method is also capitalized. So, by example, the DCS Airbase method DCSWrapper.Airbase#Airbase.getName() -is implemented in the AIRBASE class as AIRBASE.GetName().

- -

More functions will be added

-

During the MOOSE development, more functions will be added.

- - -

Global(s)

- - - - - -
AIRBASE - -
-

Type AIRBASE

- - - - - - - - - - - - - - - - - - - - - - - - - -
AIRBASE.CategoryName - -
AIRBASE.ClassName - -
AIRBASE:Find(DCSAirbase) -

Finds a AIRBASE from the _DATABASE using a DCSAirbase object.

-
AIRBASE:FindByName(AirbaseName) -

Find a AIRBASE in the _DATABASE using the name of an existing DCS Airbase.

-
AIRBASE:GetDCSObject() - -
AIRBASE:Register(AirbaseName) -

Create a new AIRBASE from DCSAirbase.

-
- -

Global(s)

-
-
- - #AIRBASE - -AIRBASE - -
-
- - - -
-
-

Type Airbase

- -

Type AIRBASE

- -

The AIRBASE class

- -

Field(s)

-
-
- - - -AIRBASE.CategoryName - -
-
- - - -
-
-
-
- - #string - -AIRBASE.ClassName - -
-
- - - -
-
-
-
- - -AIRBASE:Find(DCSAirbase) - -
-
- -

Finds a AIRBASE from the _DATABASE using a DCSAirbase object.

- -

Parameter

- -

Return value

- -

Wrapper.Airbase#AIRBASE: -self

- -
-
-
-
- - -AIRBASE:FindByName(AirbaseName) - -
-
- -

Find a AIRBASE in the _DATABASE using the name of an existing DCS Airbase.

- -

Parameter

-
    -
  • - -

    #string AirbaseName : -The Airbase Name.

    - -
  • -
-

Return value

- -

Wrapper.Airbase#AIRBASE: -self

- -
-
-
-
- - -AIRBASE:GetDCSObject() - -
-
- - - -
-
-
-
- - -AIRBASE:Register(AirbaseName) - -
-
- -

Create a new AIRBASE from DCSAirbase.

- -

Parameter

-
    -
  • - -

    #string AirbaseName : -The name of the airbase.

    - -
  • -
-

Return value

- -

Wrapper.Airbase#AIRBASE:

- - -
-
- -
- -
- - diff --git a/docs/Documentation/AirbasePolice.html b/docs/Documentation/AirbasePolice.html deleted file mode 100644 index 698da3ed6..000000000 --- a/docs/Documentation/AirbasePolice.html +++ /dev/null @@ -1,378 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module AirbasePolice

- -

This module contains the AIRBASEPOLICE classes.

- - - -
- -

1) AirbasePolice#AIRBASEPOLICE_BASE class, extends Base#BASE

-

The AirbasePolice#AIRBASEPOLICE_BASE class provides the main methods to monitor CLIENT behaviour at airbases. -CLIENTS should not be allowed to:

- -
    -
  • Don't taxi faster than 40 km/h.
  • -
  • Don't take-off on taxiways.
  • -
  • Avoid to hit other planes on the airbase.
  • -
  • Obey ground control orders.
  • -
- -

2) AirbasePolice#AIRBASEPOLICE_CAUCASUS class, extends AirbasePolice#AIRBASEPOLICE_BASE

-

All the airbases on the caucasus map can be monitored using this class. -If you want to monitor specific airbases, you need to use the AIRBASEPOLICE_BASE.Monitor() method, which takes a table or airbase names. -The following names can be given: - * AnapaVityazevo - * Batumi - * Beslan - * Gelendzhik - * Gudauta - * Kobuleti - * KrasnodarCenter - * KrasnodarPashkovsky - * Krymsk - * Kutaisi - * MaykopKhanskaya - * MineralnyeVody - * Mozdok - * Nalchik - * Novorossiysk - * SenakiKolkhi - * SochiAdler - * Soganlug - * SukhumiBabushara - * TbilisiLochini - * Vaziani

- -

3) AirbasePolice#AIRBASEPOLICE_NEVADA class, extends AirbasePolice#AIRBASEPOLICE_BASE

-

All the airbases on the NEVADA map can be monitored using this class. -If you want to monitor specific airbases, you need to use the AIRBASEPOLICE_BASE.Monitor() method, which takes a table or airbase names. -The following names can be given: - * Nellis - * McCarran - * Creech - * Groom Lake

- -

Contributions: Dutch Baron - Concept & Testing

-

Author: FlightControl - Framework Design & Programming

- - -

Global(s)

- - - - - - - - - - - - - -
AIRBASEPOLICE_BASE - -
AIRBASEPOLICE_CAUCASUS - -
AIRBASEPOLICE_NEVADA - -
-

Type AIRBASEPOLICE_BASE

- - - - - - - - - -
AIRBASEPOLICE_BASE.AirbaseNames - -
AIRBASEPOLICE_BASE.SetClient - -
- -

Type AIRBASEPOLICE_CAUCASUS

- - - - - -
AIRBASEPOLICE_CAUCASUS.SetClient - -
- -

Type AIRBASEPOLICE_NEVADA

- - - - - - - - - - - - - -
AIRBASEPOLICE_NEVADA.Airbases - -
AIRBASEPOLICE_NEVADA.ClassName - -
AIRBASEPOLICE_NEVADA:New(SetClient) -

Creates a new AIRBASEPOLICE_NEVADA object.

-
- -

Global(s)

-
-
- - - -AIRBASEPOLICE_BASE - -
-
- - - -
-
-
-
- - - -AIRBASEPOLICE_CAUCASUS - -
-
- - - -
-
-
-
- - #AIRBASEPOLICE_NEVADA - -AIRBASEPOLICE_NEVADA - -
-
- - - -
-
-

Type AirbasePolice

- -

Type AIRBASEPOLICE_BASE

-

Field(s)

-
-
- - - -AIRBASEPOLICE_BASE.AirbaseNames - -
-
- - - -
-
-
-
- - Core.Set#SET_CLIENT - -AIRBASEPOLICE_BASE.SetClient - -
-
- - - -
-
- -

Type AIRBASEPOLICE_BASE.AirbaseNames

- -

Type AIRBASEPOLICE_CAUCASUS

-

Field(s)

-
-
- - Core.Set#SET_CLIENT - -AIRBASEPOLICE_CAUCASUS.SetClient - -
-
- - - -
-
- -

Type AIRBASEPOLICE_NEVADA

-

Field(s)

-
-
- - - -AIRBASEPOLICE_NEVADA.Airbases - -
-
- - - -
-
-
-
- - #string - -AIRBASEPOLICE_NEVADA.ClassName - -
-
- - - -
-
-
-
- - -AIRBASEPOLICE_NEVADA:New(SetClient) - -
-
- -

Creates a new AIRBASEPOLICE_NEVADA object.

- -

Parameter

-
    -
  • - -

    SetClient : -A SET_CLIENT object that will contain the CLIENT objects to be monitored if they follow the rules of the airbase.

    - -
  • -
-

Return value

- -

#AIRBASEPOLICE_NEVADA: -self

- -
-
- -
- -
- - diff --git a/docs/Documentation/Assign.html b/docs/Documentation/Assign.html deleted file mode 100644 index 11f0041b7..000000000 --- a/docs/Documentation/Assign.html +++ /dev/null @@ -1,1045 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Assign

- -

(SP) (MP) (FSM) Accept or reject process for player (task) assignments.

- - - -
- -

#ACT_ASSIGN FSM template class, extends Fsm#FSM_PROCESS

- -

ACT_ASSIGN state machine:

- -

This class is a state machine: it manages a process that is triggered by events causing state transitions to occur. -All derived classes from this class will start with the class name, followed by a _. See the relevant derived class descriptions below. -Each derived class follows exactly the same process, using the same events and following the same state transitions, -but will have different implementation behaviour upon each event or state transition.

- -

ACT_ASSIGN Events:

- -

These are the events defined in this class:

- -
    -
  • Start: Start the tasking acceptance process.
  • -
  • Assign: Assign the task.
  • -
  • Reject: Reject the task..
  • -
- -

ACT_ASSIGN Event methods:

- -

Event methods are available (dynamically allocated by the state machine), that accomodate for state transitions occurring in the process. -There are two types of event methods, which you can use to influence the normal mechanisms in the state machine:

- -
    -
  • Immediate: The event method has exactly the name of the event.
  • -
  • Delayed: The event method starts with a __ + the name of the event. The first parameter of the event method is a number value, expressing the delay in seconds when the event will be executed.
  • -
- -

ACT_ASSIGN States:

- -
    -
  • UnAssigned: The player has not accepted the task.
  • -
  • Assigned (*): The player has accepted the task.
  • -
  • Rejected (*): The player has not accepted the task.
  • -
  • Waiting: The process is awaiting player feedback.
  • -
  • Failed (*): The process has failed.
  • -
- -

(*) End states of the process.

- -

ACT_ASSIGN state transition methods:

- -

State transition functions can be set by the mission designer customizing or improving the behaviour of the state. -There are 2 moments when state transition methods will be called by the state machine:

- -
    -
  • Before the state transition. - The state transition method needs to start with the name OnBefore + the name of the state. - If the state transition method returns false, then the processing of the state transition will not be done! - If you want to change the behaviour of the AIControllable at this event, return false, - but then you'll need to specify your own logic using the AIControllable!

  • -
  • After the state transition. - The state transition method needs to start with the name OnAfter + the name of the state. - These state transition methods need to provide a return value, which is specified at the function description.

  • -
- -
- -

1) #ACTASSIGNACCEPT class, extends Fsm.Assign#ACT_ASSIGN

- -

The ACTASSIGNACCEPT class accepts by default a task for a player. No player intervention is allowed to reject the task.

- -

1.1) ACTASSIGNACCEPT constructor:

- - - -
- -

2) #ACTASSIGNMENU_ACCEPT class, extends Fsm.Assign#ACT_ASSIGN

- -

The ACTASSIGNMENU_ACCEPT class accepts a task when the player accepts the task through an added menu option. -This assignment type is useful to conditionally allow the player to choose whether or not he would accept the task. -The assignment type also allows to reject the task.

- -

2.1) ACTASSIGNMENU_ACCEPT constructor:

-
- - - -
- - -

Global(s)

- - - - - - - - - - - - - -
ACT_ASSIGN - -
ACT_ASSIGN_ACCEPT - -
ACT_ASSIGN_MENU_ACCEPT - -
-

Type ACT_ASSIGN

- - - - - - - - - - - - - - - - - - - - - -
ACT_ASSIGN.ClassName - -
ACT_ASSIGN:New() -

Creates a new task assignment state machine.

-
ACT_ASSIGN.ProcessUnit - -
ACT_ASSIGN.TargetZone - -
ACT_ASSIGN.Task - -
- -

Type ACT_ASSIGN_ACCEPT

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ACT_ASSIGN_ACCEPT.ClassName - -
ACT_ASSIGN_ACCEPT:Init(FsmAssign) - -
ACT_ASSIGN_ACCEPT:New(TaskBriefing) -

Creates a new task assignment state machine.

-
ACT_ASSIGN_ACCEPT.ProcessUnit - -
ACT_ASSIGN_ACCEPT.TargetZone - -
ACT_ASSIGN_ACCEPT.Task - -
ACT_ASSIGN_ACCEPT.TaskBriefing - -
ACT_ASSIGN_ACCEPT:onafterStart(ProcessUnit, Event, From, To) -

StateMachine callback function

-
ACT_ASSIGN_ACCEPT:onenterAssigned(ProcessUnit, Event, From, To) -

StateMachine callback function

-
- -

Type ACT_ASSIGN_MENU_ACCEPT

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ACT_ASSIGN_MENU_ACCEPT.ClassName - -
ACT_ASSIGN_MENU_ACCEPT:Init(FsmAssign) - -
ACT_ASSIGN_MENU_ACCEPT.Menu - -
ACT_ASSIGN_MENU_ACCEPT.MenuAcceptTask - -
ACT_ASSIGN_MENU_ACCEPT:MenuAssign() -

Menu function.

-
ACT_ASSIGN_MENU_ACCEPT:MenuReject() -

Menu function.

-
ACT_ASSIGN_MENU_ACCEPT.MenuRejectTask - -
ACT_ASSIGN_MENU_ACCEPT:New(TaskName, TaskBriefing) -

Init.

-
ACT_ASSIGN_MENU_ACCEPT.ProcessUnit - -
ACT_ASSIGN_MENU_ACCEPT.TargetZone - -
ACT_ASSIGN_MENU_ACCEPT.Task - -
ACT_ASSIGN_MENU_ACCEPT.TaskBriefing - -
ACT_ASSIGN_MENU_ACCEPT.TaskName - -
ACT_ASSIGN_MENU_ACCEPT:onafterAssign(ProcessUnit, Event, From, To) -

StateMachine callback function

-
ACT_ASSIGN_MENU_ACCEPT:onafterReject(ProcessUnit, Event, From, To) -

StateMachine callback function

-
ACT_ASSIGN_MENU_ACCEPT:onafterStart(ProcessUnit, Event, From, To) -

StateMachine callback function

-
- -

Global(s)

-
-
- - #ACT_ASSIGN - -ACT_ASSIGN - -
-
- - - -
-
-
-
- - #ACT_ASSIGN_ACCEPT - -ACT_ASSIGN_ACCEPT - -
-
- - - -
-
-
-
- - #ACT_ASSIGN_MENU_ACCEPT - -ACT_ASSIGN_MENU_ACCEPT - -
-
- - - -
-
-

Type Assign

- -

Type ACT_ASSIGN

- -

ACT_ASSIGN class

- -

Field(s)

-
-
- - #string - -ACT_ASSIGN.ClassName - -
-
- - - -
-
-
-
- - -ACT_ASSIGN:New() - -
-
- -

Creates a new task assignment state machine.

- - -

The process will accept the task by default, no player intervention accepted.

- -

Return value

- -

#ACT_ASSIGN: -The task acceptance process.

- -
-
-
-
- - Wrapper.Unit#UNIT - -ACT_ASSIGN.ProcessUnit - -
-
- - - -
-
-
-
- - Core.Zone#ZONE_BASE - -ACT_ASSIGN.TargetZone - -
-
- - - -
-
-
-
- - Tasking.Task#TASK - -ACT_ASSIGN.Task - -
-
- - - -
-
- -

Type ACT_ASSIGN_ACCEPT

- -

ACTASSIGNACCEPT class

- -

Field(s)

-
-
- - #string - -ACT_ASSIGN_ACCEPT.ClassName - -
-
- - - -
-
-
-
- - -ACT_ASSIGN_ACCEPT:Init(FsmAssign) - -
-
- - - -

Parameter

-
    -
  • - -

    FsmAssign :

    - -
  • -
-
-
-
-
- - -ACT_ASSIGN_ACCEPT:New(TaskBriefing) - -
-
- -

Creates a new task assignment state machine.

- - -

The process will accept the task by default, no player intervention accepted.

- -

Parameter

-
    -
  • - -

    #string TaskBriefing :

    - -
  • -
-
-
-
-
- - Wrapper.Unit#UNIT - -ACT_ASSIGN_ACCEPT.ProcessUnit - -
-
- - - -
-
-
-
- - Core.Zone#ZONE_BASE - -ACT_ASSIGN_ACCEPT.TargetZone - -
-
- - - -
-
-
-
- - Tasking.Task#TASK - -ACT_ASSIGN_ACCEPT.Task - -
-
- - - -
-
-
-
- - - -ACT_ASSIGN_ACCEPT.TaskBriefing - -
-
- - - -
-
-
-
- - -ACT_ASSIGN_ACCEPT:onafterStart(ProcessUnit, Event, From, To) - -
-
- -

StateMachine callback function

- -

Parameters

-
    -
  • - -

    Wrapper.Unit#UNIT ProcessUnit :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
-
-
-
-
- - -ACT_ASSIGN_ACCEPT:onenterAssigned(ProcessUnit, Event, From, To) - -
-
- -

StateMachine callback function

- -

Parameters

-
    -
  • - -

    Wrapper.Unit#UNIT ProcessUnit :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
-
-
- -

Type ACT_ASSIGN_MENU_ACCEPT

- -

ACTASSIGNMENU_ACCEPT class

- -

Field(s)

-
-
- - #string - -ACT_ASSIGN_MENU_ACCEPT.ClassName - -
-
- - - -
-
-
-
- - -ACT_ASSIGN_MENU_ACCEPT:Init(FsmAssign) - -
-
- - - -

Parameter

-
    -
  • - -

    FsmAssign :

    - -
  • -
-
-
-
-
- - - -ACT_ASSIGN_MENU_ACCEPT.Menu - -
-
- - - -
-
-
-
- - - -ACT_ASSIGN_MENU_ACCEPT.MenuAcceptTask - -
-
- - - -
-
-
-
- - -ACT_ASSIGN_MENU_ACCEPT:MenuAssign() - -
-
- -

Menu function.

- -
-
-
-
- - -ACT_ASSIGN_MENU_ACCEPT:MenuReject() - -
-
- -

Menu function.

- -
-
-
-
- - - -ACT_ASSIGN_MENU_ACCEPT.MenuRejectTask - -
-
- - - -
-
-
-
- - -ACT_ASSIGN_MENU_ACCEPT:New(TaskName, TaskBriefing) - -
-
- -

Init.

- -

Parameters

-
    -
  • - -

    #string TaskName :

    - -
  • -
  • - -

    #string TaskBriefing :

    - -
  • -
-

Return value

- -

#ACTASSIGNMENU_ACCEPT: -self

- -
-
-
-
- - Wrapper.Unit#UNIT - -ACT_ASSIGN_MENU_ACCEPT.ProcessUnit - -
-
- - - -
-
-
-
- - Core.Zone#ZONE_BASE - -ACT_ASSIGN_MENU_ACCEPT.TargetZone - -
-
- - - -
-
-
-
- - Tasking.Task#TASK - -ACT_ASSIGN_MENU_ACCEPT.Task - -
-
- - - -
-
-
-
- - - -ACT_ASSIGN_MENU_ACCEPT.TaskBriefing - -
-
- - - -
-
-
-
- - - -ACT_ASSIGN_MENU_ACCEPT.TaskName - -
-
- - - -
-
-
-
- - -ACT_ASSIGN_MENU_ACCEPT:onafterAssign(ProcessUnit, Event, From, To) - -
-
- -

StateMachine callback function

- -

Parameters

- -
-
-
-
- - -ACT_ASSIGN_MENU_ACCEPT:onafterReject(ProcessUnit, Event, From, To) - -
-
- -

StateMachine callback function

- -

Parameters

- -
-
-
-
- - -ACT_ASSIGN_MENU_ACCEPT:onafterStart(ProcessUnit, Event, From, To) - -
-
- -

StateMachine callback function

- -

Parameters

- -
-
- -
- -
- - diff --git a/docs/Documentation/Base.html b/docs/Documentation/Base.html deleted file mode 100644 index 7e2d36e6d..000000000 --- a/docs/Documentation/Base.html +++ /dev/null @@ -1,2292 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Base

- -

Core - BASE forms the basis of the MOOSE framework.

- - -

Each class within the MOOSE framework derives from BASE.

- -

Banner Image

- -
- -

The #BASE class is the core root class from where every other class in moose is derived.

- -
- -

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

YYYY-MM-DD: CLASS:NewFunction( Params ) replaces CLASS:OldFunction( Params ) -YYYY-MM-DD: CLASS:NewFunction( Params ) added

- -

Hereby the change log:

- -
- -

AUTHORS and CONTRIBUTIONS

- -

Contributions:

- -
    -
  • None.
  • -
- -

Authors:

- -
    -
  • FlightControl: Design & Programming
  • -
- - -

Global(s)

- - - - - - - - - -
BASE -

1) #BASE class

- -

All classes within the MOOSE framework are derived from the BASE class.

-
FORMATION - -
-

Type BASE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BASE.ClassID -

The ID number of the class.

-
BASE.ClassName -

The name of the class.

-
BASE.ClassNameAndID -

The name of the class concatenated with the ID number of the class.

-
BASE:ClearState(Object, StateName) - -
BASE:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) -

Creation of a Birth Event.

-
BASE:CreateEventCrash(EventTime, Initiator) -

Creation of a Crash Event.

-
BASE:E(Arguments) -

Log an exception which will be traced always.

-
BASE:EventDispatcher() -

Returns the event dispatcher

-
BASE:EventRemoveAll() -

Remove all subscribed events

-
BASE:F(Arguments) -

Trace a function call.

-
BASE:F2(Arguments) -

Trace a function call level 2.

-
BASE:F3(Arguments) -

Trace a function call level 3.

-
BASE:GetClassID() -

Get the ClassID of the class instance.

-
BASE:GetClassName() -

Get the ClassName of the class instance.

-
BASE:GetClassNameAndID() -

Get the ClassName + ClassID of the class instance.

-
BASE:GetEventPriority() -

Get the Class Event processing Priority.

-
BASE:GetParent(Child) -

This is the worker method to retrieve the Parent class.

-
BASE:GetState(Object, Key, Value) -

Get a Value given a Key from the Object.

-
BASE:HandleEvent(Event, EventFunction) -

Subscribe to a DCS Event.

-
BASE:Inherit(Child, Parent) -

This is the worker method to inherit from a parent class.

-
BASE:IsTrace() -

Enquires if tracing is on (for the class).

-
BASE:New() -

BASE constructor.

-
BASE:OnEvent(EventData) -

Occurs when an object is completely destroyed.

-
BASE:OnEventBaseCaptured(EventData) -

Occurs when a ground unit captures either an airbase or a farp.

-
BASE:OnEventBirth(EventData) -

Occurs when any object is spawned into the mission.

-
BASE:OnEventCrash(EventData) -

Occurs when any aircraft crashes into the ground and is completely destroyed.

-
BASE:OnEventEjection(EventData) -

Occurs when a pilot ejects from an aircraft -initiator : The unit that has ejected

-
BASE:OnEventEngineShutdown(EventData) -

Occurs when any aircraft shuts down its engines.

-
BASE:OnEventEngineStartup(EventData) -

Occurs when any aircraft starts its engines.

-
BASE:OnEventHit(EventData) -

Occurs whenever an object is hit by a weapon.

-
BASE:OnEventHumanFailure(EventData) -

Occurs when any system fails on a human controlled aircraft.

-
BASE:OnEventLand(EventData) -

Occurs when an aircraft lands at an airbase, farp or ship -initiator : The unit that has landed -place: Object that the unit landed on.

-
BASE:OnEventMissionEnd(EventData) -

Occurs when a mission ends

-
BASE:OnEventMissionStart(EventData) -

Occurs when a mission starts

-
BASE:OnEventPilotDead(EventData) -

Occurs when the pilot of an aircraft is killed.

-
BASE:OnEventPlayerEnterUnit(EventData) -

Occurs when any player assumes direct control of a unit.

-
BASE:OnEventPlayerLeaveUnit(EventData) -

Occurs when any player relieves control of a unit to the AI.

-
BASE:OnEventRefueling(EventData) -

Occurs when an aircraft connects with a tanker and begins taking on fuel.

-
BASE:OnEventRefuelingStop(EventData) -

Occurs when an aircraft is finished taking fuel.

-
BASE:OnEventShootingEnd(EventData) -

Occurs when any unit stops firing its weapon.

-
BASE:OnEventShootingStart(EventData) -

Occurs when any unit begins firing a weapon that has a high rate of fire.

-
BASE:OnEventShot(EventData) -

Occurs whenever any unit in a mission fires a weapon.

-
BASE:OnEventTakeoff(EventData) -

Occurs when an aircraft takes off from an airbase, farp, or ship.

-
BASE:SetEventPriority(EventPriority) -

Set the Class Event processing Priority.

-
BASE:SetState(Object, Key, Value) -

Set a state or property of the Object given a Key and a Value.

-
BASE:T(Arguments) -

Trace a function logic level 1.

-
BASE:T2(Arguments) -

Trace a function logic level 2.

-
BASE:T3(Arguments) -

Trace a function logic level 3.

-
BASE:TraceAll(TraceAll) -

Trace all methods in MOOSE

-
BASE:TraceClass(Class) -

Set tracing for a class

-
BASE:TraceClassMethod(Class, Method) -

Set tracing for a specific method of class

-
BASE:TraceLevel(Level) -

Set trace level

-
BASE:TraceOnOff(TraceOnOff) -

Set trace on or off -Note that when trace is off, no debug statement is performed, increasing performance! -When Moose is loaded statically, (as one file), tracing is switched off by default.

-
BASE:UnHandleEvent(Event) -

UnSubscribe to a DCS event.

-
BASE:_Destructor() - -
BASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) -

Trace a function call.

-
BASE:_SetDestructor() - -
BASE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) -

Trace a function logic.

-
BASE:onEvent(event) - -
- -

Type FORMATION

- - - - - - - - - -
FORMATION.Cone -

A cone formation.

-
FORMATION.Vee - -
- -

Global(s)

-
-
- - #BASE - -BASE - -
-
- -

1) #BASE class

- -

All classes within the MOOSE framework are derived from the BASE class.

- - -

-BASE provides facilities for :

- -
    -
  • The construction and inheritance of MOOSE classes.
  • -
  • The class naming and numbering system.
  • -
  • The class hierarchy search system.
  • -
  • The tracing of information or objects during mission execution for debuggin purposes.
  • -
  • The subscription to DCS events for event handling in MOOSE objects.
  • -
- -

Note: The BASE class is an abstract class and is not meant to be used directly.

- -

1.1) BASE constructor

- -

Any class derived from BASE, will use the Base#BASE.New constructor embedded in the Base#BASE.Inherit method. -See an example at the Base#BASE.New method how this is done.

- -

1.2) Trace information for debugging

- -

The BASE class contains trace methods to trace progress within a mission execution of a certain object. -These trace methods are inherited by each MOOSE class interiting BASE, soeach object created from derived class from BASE can use the tracing methods to trace its execution.

- -

Any type of information can be passed to these tracing methods. See the following examples:

- -
self:E( "Hello" )
-
- -

Result in the word "Hello" in the dcs.log.

- -
local Array = { 1, nil, "h", { "a","b" }, "x" }
-self:E( Array )
-
- -

Results with the text [1]=1,[3]="h",[4]={[1]="a",[2]="b"},[5]="x"} in the dcs.log.

- -
local Object1 = "Object1"
-local Object2 = 3
-local Object3 = { Object 1, Object 2 }
-self:E( { Object1, Object2, Object3 } )
-
- -

Results with the text [1]={[1]="Object",[2]=3,[3]={[1]="Object",[2]=3}} in the dcs.log.

- -
local SpawnObject = SPAWN:New( "Plane" )
-local GroupObject = GROUP:FindByName( "Group" )
-self:E( { Spawn = SpawnObject, Group = GroupObject } )
-
- -

Results with the text [1]={Spawn={....),Group={...}} in the dcs.log.

- -

Below a more detailed explanation of the different method types for tracing.

- -

1.2.1) Tracing methods categories

- -

There are basically 3 types of tracing methods available:

- -
    -
  • BASE.F: Used to trace the entrance of a function and its given parameters. An F is indicated at column 44 in the DCS.log file.
  • -
  • BASE.T: Used to trace further logic within a function giving optional variables or parameters. A T is indicated at column 44 in the DCS.log file.
  • -
  • BASE.E: Used to always trace information giving optional variables or parameters. An E is indicated at column 44 in the DCS.log file.
  • -
- -

1.2.2) Tracing levels

- -

There are 3 tracing levels within MOOSE.
-These tracing levels were defined to avoid bulks of tracing to be generated by lots of objects.

- -

As such, the F and T methods have additional variants to trace level 2 and 3 respectively:

- -
    -
  • BASE.F2: Trace the beginning of a function and its given parameters with tracing level 2.
  • -
  • BASE.F3: Trace the beginning of a function and its given parameters with tracing level 3.
  • -
  • BASE.T2: Trace further logic within a function giving optional variables or parameters with tracing level 2.
  • -
  • BASE.T3: Trace further logic within a function giving optional variables or parameters with tracing level 3.
  • -
- -

1.2.3) Trace activation.

- -

Tracing can be activated in several ways:

- -
    -
  • Switch tracing on or off through the BASE.TraceOnOff() method.
  • -
  • Activate all tracing through the BASE.TraceAll() method.
  • -
  • Activate only the tracing of a certain class (name) through the BASE.TraceClass() method.
  • -
  • Activate only the tracing of a certain method of a certain class through the BASE.TraceClassMethod() method.
  • -
  • Activate only the tracing of a certain level through the BASE.TraceLevel() method.
  • -
- -

1.2.4) Check if tracing is on.

- -

The method BASE.IsTrace() will validate if tracing is activated or not.

- -

1.3 DCS simulator Event Handling

- -

The BASE class provides methods to catch DCS Events. These are events that are triggered from within the DCS simulator, -and handled through lua scripting. MOOSE provides an encapsulation to handle these events more efficiently.

- -

1.3.1 Subscribe / Unsubscribe to DCS Events

- -

At first, the mission designer will need to Subscribe to a specific DCS event for the class. -So, when the DCS event occurs, the class will be notified of that event. -There are two methods which you use to subscribe to or unsubscribe from an event.

- - - -

1.3.2 Event Handling of DCS Events

- -

Once the class is subscribed to the event, an Event Handling method on the object or class needs to be written that will be called -when the DCS event occurs. The Event Handling method receives an Event#EVENTDATA structure, which contains a lot of information -about the event that occurred.

- -

Find below an example of the prototype how to write an event handling function for two units:

- -
 local Tank1 = UNIT:FindByName( "Tank A" )
- local Tank2 = UNIT:FindByName( "Tank B" )
-
- -- Here we subscribe to the Dead events. So, if one of these tanks dies, the Tank1 or Tank2 objects will be notified.
- Tank1:HandleEvent( EVENTS.Dead )
- Tank2:HandleEvent( EVENTS.Dead )
-
- --- This function is an Event Handling function that will be called when Tank1 is Dead.
- -- @param Wrapper.Unit#UNIT self 
- -- @param Core.Event#EVENTDATA EventData
- function Tank1:OnEventDead( EventData )
-
-   self:SmokeGreen()
- end
-
- --- This function is an Event Handling function that will be called when Tank2 is Dead.
- -- @param Wrapper.Unit#UNIT self 
- -- @param Core.Event#EVENTDATA EventData
- function Tank2:OnEventDead( EventData )
-
-   self:SmokeBlue()
- end
-
- - - -

See the Event module for more information about event handling.

- -

1.4) Class identification methods

- -

BASE provides methods to get more information of each object:

- -
    -
  • BASE.GetClassID(): Gets the ID (number) of the object. Each object created is assigned a number, that is incremented by one.
  • -
  • BASE.GetClassName(): Gets the name of the object, which is the name of the class the object was instantiated from.
  • -
  • BASE.GetClassNameAndID(): Gets the name and ID of the object.
  • -
- -

1.5) All objects derived from BASE can have "States"

- -

A mechanism is in place in MOOSE, that allows to let the objects administer states.
-States are essentially properties of objects, which are identified by a Key and a Value.

- -

The method BASE.SetState() can be used to set a Value with a reference Key to the object.
-To read or retrieve a state Value based on a Key, use the BASE.GetState method.

- -

These two methods provide a very handy way to keep state at long lasting processes. -Values can be stored within the objects, and later retrieved or changed when needed. -There is one other important thing to note, the BASE.SetState() and BASE.GetState methods -receive as the first parameter the object for which the state needs to be set. -Thus, if the state is to be set for the same object as the object for which the method is used, then provide the same -object name to the method.

- -

1.10) Inheritance

- -

The following methods are available to implement inheritance

- -
    -
  • BASE.Inherit: Inherits from a class.
  • -
  • BASE.GetParent: Returns the parent object from the object it is handling, or nil if there is no parent object.
  • -
- -
- - -
-
-
-
- - #FORMATION - -FORMATION - -
-
- - - -
-
-

Type Base

- -

Type BASE

-

Field(s)

-
-
- - -BASE.ClassID - -
-
- -

The ID number of the class.

- -
-
-
-
- - -BASE.ClassName - -
-
- -

The name of the class.

- -
-
-
-
- - -BASE.ClassNameAndID - -
-
- -

The name of the class concatenated with the ID number of the class.

- -
-
-
-
- - -BASE:ClearState(Object, StateName) - -
-
- - - -

Parameters

-
    -
  • - -

    Object :

    - -
  • -
  • - -

    StateName :

    - -
  • -
-
-
-
-
- - -BASE:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) - -
-
- -

Creation of a Birth Event.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Time EventTime : -The time stamp of the event.

    - -
  • -
  • - -

    Dcs.DCSWrapper.Object#Object Initiator : -The initiating object of the event.

    - -
  • -
  • - -

    #string IniUnitName : -The initiating unit name.

    - -
  • -
  • - -

    place :

    - -
  • -
  • - -

    subplace :

    - -
  • -
-
-
-
-
- - -BASE:CreateEventCrash(EventTime, Initiator) - -
-
- -

Creation of a Crash Event.

- -

Parameters

- -
-
-
-
- - -BASE:E(Arguments) - -
-
- -

Log an exception which will be traced always.

- - -

Can be anywhere within the function logic.

- -

Parameter

-
    -
  • - -

    Arguments : -A #table or any field.

    - -
  • -
-
-
-
-
- - -BASE:EventDispatcher() - -
-
- -

Returns the event dispatcher

- -

Return value

- -

Core.Event#EVENT:

- - -
-
-
-
- - -BASE:EventRemoveAll() - -
-
- -

Remove all subscribed events

- -

Return value

- -

#BASE:

- - -
-
-
-
- - -BASE:F(Arguments) - -
-
- -

Trace a function call.

- - -

Must be at the beginning of the function logic.

- -

Parameter

-
    -
  • - -

    Arguments : -A #table or any field.

    - -
  • -
-
-
-
-
- - -BASE:F2(Arguments) - -
-
- -

Trace a function call level 2.

- - -

Must be at the beginning of the function logic.

- -

Parameter

-
    -
  • - -

    Arguments : -A #table or any field.

    - -
  • -
-
-
-
-
- - -BASE:F3(Arguments) - -
-
- -

Trace a function call level 3.

- - -

Must be at the beginning of the function logic.

- -

Parameter

-
    -
  • - -

    Arguments : -A #table or any field.

    - -
  • -
-
-
-
-
- - -BASE:GetClassID() - -
-
- -

Get the ClassID of the class instance.

- -

Return value

- -

#string: -The ClassID of the class instance.

- -
-
-
-
- - -BASE:GetClassName() - -
-
- -

Get the ClassName of the class instance.

- -

Return value

- -

#string: -The ClassName of the class instance.

- -
-
-
-
- - -BASE:GetClassNameAndID() - -
-
- -

Get the ClassName + ClassID of the class instance.

- - -

The ClassName + ClassID is formatted as '%s#%09d'.

- -

Return value

- -

#string: -The ClassName + ClassID of the class instance.

- -
-
-
-
- - -BASE:GetEventPriority() - -
-
- -

Get the Class Event processing Priority.

- - -

The Event processing Priority is a number from 1 to 10, -reflecting the order of the classes subscribed to the Event to be processed.

- -

Return value

- -

#number: -The Event processing Priority.

- -
-
-
-
- - -BASE:GetParent(Child) - -
-
- -

This is the worker method to retrieve the Parent class.

- - -

Note that the Parent class must be passed to call the parent class method.

- -
self:GetParent(self):ParentMethod()
-
-
-
- -

Parameter

-
    -
  • - -

    #BASE Child : -is the Child class from which the Parent class needs to be retrieved.

    - -
  • -
-

Return value

- -

#BASE:

- - -
-
-
-
- - -BASE:GetState(Object, Key, Value) - -
-
- -

Get a Value given a Key from the Object.

- - -

Note that if the Object is destroyed, nillified or garbage collected, then the Values and Keys will also be gone.

- -

Parameters

-
    -
  • - -

    Object : -The object that holds the Value set by the Key.

    - -
  • -
  • - -

    Key : -The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!

    - -
  • -
  • - -

    Value : -The value to is stored in the Object.

    - -
  • -
-

Return value

- - -

The Value retrieved.

- -
-
-
-
- - -BASE:HandleEvent(Event, EventFunction) - -
-
- -

Subscribe to a DCS Event.

- -

Parameters

-
    -
  • - -

    Core.Event#EVENTS Event :

    - -
  • -
  • - -

    #function EventFunction : -(optional) The function to be called when the event occurs for the unit.

    - -
  • -
-

Return value

- -

#BASE:

- - -
-
-
-
- - -BASE:Inherit(Child, Parent) - -
-
- -

This is the worker method to inherit from a parent class.

- -

Parameters

-
    -
  • - -

    Child : -is the Child class that inherits.

    - -
  • -
  • - -

    #BASE Parent : -is the Parent class that the Child inherits from.

    - -
  • -
-

Return value

- -

#BASE: -Child

- -
-
-
-
- - -BASE:IsTrace() - -
-
- -

Enquires if tracing is on (for the class).

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -BASE:New() - -
-
- -

BASE constructor.

- - - -

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

- -
function EVENT:New()
-  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
-  return self
-end
-  
-
- -

Return value

- -

#BASE:

- - -
-
-
-
- - -BASE:OnEvent(EventData) - -
-
- -

Occurs when an object is completely destroyed.

- - -

initiator : The unit that is was destroyed.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventBaseCaptured(EventData) - -
-
- -

Occurs when a ground unit captures either an airbase or a farp.

- - -

initiator : The unit that captured the base -place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventBirth(EventData) - -
-
- -

Occurs when any object is spawned into the mission.

- - -

initiator : The unit that was spawned

- -

Parameter

- -
-
-
-
- - -BASE:OnEventCrash(EventData) - -
-
- -

Occurs when any aircraft crashes into the ground and is completely destroyed.

- - -

initiator : The unit that has crashed

- -

Parameter

- -
-
-
-
- - -BASE:OnEventEjection(EventData) - -
-
- -

Occurs when a pilot ejects from an aircraft -initiator : The unit that has ejected

- -

Parameter

- -
-
-
-
- - -BASE:OnEventEngineShutdown(EventData) - -
-
- -

Occurs when any aircraft shuts down its engines.

- - -

initiator : The unit that is stopping its engines.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventEngineStartup(EventData) - -
-
- -

Occurs when any aircraft starts its engines.

- - -

initiator : The unit that is starting its engines.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventHit(EventData) - -
-
- -

Occurs whenever an object is hit by a weapon.

- - -

initiator : The unit object the fired the weapon -weapon: Weapon object that hit the target -target: The Object that was hit.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventHumanFailure(EventData) - -
-
- -

Occurs when any system fails on a human controlled aircraft.

- - -

initiator : The unit that had the failure

- -

Parameter

- -
-
-
-
- - -BASE:OnEventLand(EventData) - -
-
- -

Occurs when an aircraft lands at an airbase, farp or ship -initiator : The unit that has landed -place: Object that the unit landed on.

- - -

Can be an Airbase Object, FARP, or Ships

- -

Parameter

- -
-
-
-
- - -BASE:OnEventMissionEnd(EventData) - -
-
- -

Occurs when a mission ends

- -

Parameter

- -
-
-
-
- - -BASE:OnEventMissionStart(EventData) - -
-
- -

Occurs when a mission starts

- -

Parameter

- -
-
-
-
- - -BASE:OnEventPilotDead(EventData) - -
-
- -

Occurs when the pilot of an aircraft is killed.

- - -

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. -initiator : The unit that the pilot has died in.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventPlayerEnterUnit(EventData) - -
-
- -

Occurs when any player assumes direct control of a unit.

- - -

initiator : The unit that is being taken control of.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventPlayerLeaveUnit(EventData) - -
-
- -

Occurs when any player relieves control of a unit to the AI.

- - -

initiator : The unit that the player left.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventRefueling(EventData) - -
-
- -

Occurs when an aircraft connects with a tanker and begins taking on fuel.

- - -

initiator : The unit that is receiving fuel.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventRefuelingStop(EventData) - -
-
- -

Occurs when an aircraft is finished taking fuel.

- - -

initiator : The unit that was receiving fuel.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventShootingEnd(EventData) - -
-
- -

Occurs when any unit stops firing its weapon.

- - -

Event will always correspond with a shooting start event. -initiator : The unit that was doing the shooing.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventShootingStart(EventData) - -
-
- -

Occurs when any unit begins firing a weapon that has a high rate of fire.

- - -

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. -initiator : The unit that is doing the shooing. -target: The unit that is being targeted.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventShot(EventData) - -
-
- -

Occurs whenever any unit in a mission fires a weapon.

- - -

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart.

- -

Parameter

- -
-
-
-
- - -BASE:OnEventTakeoff(EventData) - -
-
- -

Occurs when an aircraft takes off from an airbase, farp, or ship.

- - -

initiator : The unit that tookoff -place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

- -

Parameter

- -
-
-
-
- - -BASE:SetEventPriority(EventPriority) - -
-
- -

Set the Class Event processing Priority.

- - -

The Event processing Priority is a number from 1 to 10, -reflecting the order of the classes subscribed to the Event to be processed.

- -

Parameter

-
    -
  • - -

    #number EventPriority : -The Event processing Priority.

    - -
  • -
-

Return value

- - -

self

- -
-
-
-
- - -BASE:SetState(Object, Key, Value) - -
-
- -

Set a state or property of the Object given a Key and a Value.

- - -

Note that if the Object is destroyed, nillified or garbage collected, then the Values and Keys will also be gone.

- -

Parameters

-
    -
  • - -

    Object : -The object that will hold the Value set by the Key.

    - -
  • -
  • - -

    Key : -The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!

    - -
  • -
  • - -

    Value : -The value to is stored in the object.

    - -
  • -
-

Return values

-
    -
  1. - - -

    The Value set.

    - -
  2. -
  3. - -

    #nil: -The Key was not found and thus the Value could not be retrieved.

    - -
  4. -
-
-
-
-
- - -BASE:T(Arguments) - -
-
- -

Trace a function logic level 1.

- - -

Can be anywhere within the function logic.

- -

Parameter

-
    -
  • - -

    Arguments : -A #table or any field.

    - -
  • -
-
-
-
-
- - -BASE:T2(Arguments) - -
-
- -

Trace a function logic level 2.

- - -

Can be anywhere within the function logic.

- -

Parameter

-
    -
  • - -

    Arguments : -A #table or any field.

    - -
  • -
-
-
-
-
- - -BASE:T3(Arguments) - -
-
- -

Trace a function logic level 3.

- - -

Can be anywhere within the function logic.

- -

Parameter

-
    -
  • - -

    Arguments : -A #table or any field.

    - -
  • -
-
-
-
-
- - -BASE:TraceAll(TraceAll) - -
-
- -

Trace all methods in MOOSE

- -

Parameter

-
    -
  • - -

    #boolean TraceAll : -true = trace all methods in MOOSE.

    - -
  • -
-
-
-
-
- - -BASE:TraceClass(Class) - -
-
- -

Set tracing for a class

- -

Parameter

-
    -
  • - -

    #string Class :

    - -
  • -
-
-
-
-
- - -BASE:TraceClassMethod(Class, Method) - -
-
- -

Set tracing for a specific method of class

- -

Parameters

-
    -
  • - -

    #string Class :

    - -
  • -
  • - -

    #string Method :

    - -
  • -
-
-
-
-
- - -BASE:TraceLevel(Level) - -
-
- -

Set trace level

- -

Parameter

-
    -
  • - -

    #number Level :

    - -
  • -
-
-
-
-
- - -BASE:TraceOnOff(TraceOnOff) - -
-
- -

Set trace on or off -Note that when trace is off, no debug statement is performed, increasing performance! -When Moose is loaded statically, (as one file), tracing is switched off by default.

- - -

So tracing must be switched on manually in your mission if you are using Moose statically. -When moose is loading dynamically (for moose class development), tracing is switched on by default.

- -

Parameter

-
    -
  • - -

    #boolean TraceOnOff : -Switch the tracing on or off.

    - -
  • -
-

Usage:

-
-- Switch the tracing On
-BASE:TraceOnOff( true )
-
--- Switch the tracing Off
-BASE:TraceOnOff( false )
- -
-
-
-
- - -BASE:UnHandleEvent(Event) - -
-
- -

UnSubscribe to a DCS event.

- -

Parameter

- -

Return value

- -

#BASE:

- - -
-
-
-
- - -BASE:_Destructor() - -
-
- - - -
-
-
-
- - -BASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) - -
-
- -

Trace a function call.

- - -

This function is private.

- -

Parameters

-
    -
  • - -

    Arguments : -A #table or any field.

    - -
  • -
  • - -

    DebugInfoCurrentParam :

    - -
  • -
  • - -

    DebugInfoFromParam :

    - -
  • -
-
-
-
-
- - -BASE:_SetDestructor() - -
-
- - - - -

THIS IS WHY WE NEED LUA 5.2 ...

- -
-
-
-
- - -BASE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) - -
-
- -

Trace a function logic.

- -

Parameters

-
    -
  • - -

    Arguments : -A #table or any field.

    - -
  • -
  • - -

    DebugInfoCurrentParam :

    - -
  • -
  • - -

    DebugInfoFromParam :

    - -
  • -
-
-
-
-
- - -BASE:onEvent(event) - -
-
- - - - -

TODO: Complete Dcs.DCSTypes#Event structure.
-- The main event handling function... This function captures all events generated for the class. - @param #BASE self - @param Dcs.DCSTypes#Event event

- -

Parameter

-
    -
  • - -

    event :

    - -
  • -
-
-
- -

Type FORMATION

- -

The Formation Class

- -

Field(s)

-
-
- - -FORMATION.Cone - -
-
- -

A cone formation.

- -
-
-
-
- - #string - -FORMATION.Vee - -
-
- - - -
-
- -
- -
- - diff --git a/docs/Documentation/Cargo.html b/docs/Documentation/Cargo.html deleted file mode 100644 index 19046ba83..000000000 --- a/docs/Documentation/Cargo.html +++ /dev/null @@ -1,3271 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Cargo

- -

Core -- Management of CARGO logistics, that can be transported from and to transportation carriers.

- - - -

Banner Image

- -
- -

Cargo can be of various forms, always are composed out of ONE object ( one unit or one static or one slingload crate ):

- -
    -
  • CARGO_UNIT, represented by a Unit in a singleton Group: Cargo can be represented by a Unit in a Group. a CARGO_UNIT is representable...
  • -
  • CARGO_GROUP, represented by a Group. A CARGO_GROUP is reportable...
  • -
- -
- -

Demo Missions

- -

CARGO Demo Missions source code

- -

CARGO Demo Missions, only for beta testers

- -

ALL Demo Missions pack of the last release

- -
- -

YouTube Channel

- -

SPAWNSTATIC YouTube Channel

- -
- -

This module is still under construction, but is described above works already, and will keep working ...

- - -

Global(s)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CARGO -

CARGO class, extends Fsm#FSM_PROCESS

- -

The CARGO class defines the core functions that defines a cargo object within MOOSE.

-
CARGOS - -
CARGO_GROUP -

CARGO_GROUP class

- -

The CARGO_GROUP class defines a cargo that is represented by a Group object within the simulator, and can be transported by a carrier.

-
CARGO_PACKAGE - -
CARGO_REPORTABLE - -
CARGO_REPRESENTABLE - -
CARGO_UNIT -

CARGO_UNIT class, extends #CARGO_REPRESENTABLE

- -

The CARGO_UNIT class defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier.

-
-

Type CARGO

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CARGO:Board(ToCarrier, NearRadius) -

Boards the cargo to a Carrier.

-
CARGO.CargoCarrier -

The alive DCS object carrying the cargo. This value can be nil, meaning, that the cargo is not contained anywhere...

-
CARGO.CargoObject -

The alive DCS object representing the cargo. This value can be nil, meaning, that the cargo is not represented anywhere...

-
CARGO.Containable -

This flag defines if the cargo can be contained within a DCS Unit.

-
CARGO:GetName() -

Get the name of the Cargo.

-
CARGO:GetPointVec2() -

Get the current PointVec2 of the cargo.

-
CARGO:GetType() -

Get the type of the Cargo.

-
CARGO:IsInZone(Zone) -

Check if Cargo is the given Zone.

-
CARGO:IsLoaded() -

Check if cargo is loaded.

-
CARGO:IsNear(PointVec2, NearRadius) -

Check if CargoCarrier is near the Cargo to be Loaded.

-
CARGO:IsUnLoaded() -

Check if cargo is unloaded.

-
CARGO:Load(ToCarrier) -

Loads the cargo to a Carrier.

-
CARGO.Moveable -

This flag defines if the cargo is moveable.

-
CARGO.Name -

A string defining the name of the cargo. The name is the unique identifier of the cargo.

-
CARGO.NearRadius -

(optional) A number defining the radius in meters when the cargo is near to a Carrier, so that it can be loaded.

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

CARGO Constructor.

-
CARGO:OnEnterBoarding(Controllable, NearRadius) - -
CARGO:OnEnterLoaded(Controllable) - -
CARGO:OnEnterUnBoarding(Controllable) - -
CARGO:OnEnterUnLoaded(Controllable) - -
CARGO:OnLeaveBoarding(Controllable) - -
CARGO:OnLeaveLoaded(Controllable) - -
CARGO:OnLeaveUnBoarding(Controllable) - -
CARGO:OnLeaveUnLoaded(Controllable) - -
CARGO.Representable -

This flag defines if the cargo can be represented by a DCS Unit.

-
CARGO:SetWeight(Weight) -

Set the weight of the cargo.

-
CARGO.Slingloadable -

This flag defines if the cargo can be slingloaded.

-
CARGO:Spawn(PointVec2) -

Template method to spawn a new representation of the CARGO in the simulator.

-
CARGO.Type -

A string defining the type of the cargo. eg. Engineers, Equipment, Screwdrivers.

-
CARGO:UnBoard(ToPointVec2) -

UnBoards the cargo to a Carrier.

-
CARGO:UnLoad(ToPointVec2) -

UnLoads the cargo to a Carrier.

-
CARGO.Weight -

A number defining the weight of the cargo. The weight is expressed in kg.

-
CARGO:__Board(DelaySeconds, ToCarrier, NearRadius) -

Boards the cargo to a Carrier.

-
CARGO:__Load(DelaySeconds, ToCarrier) -

Loads the cargo to a Carrier.

-
CARGO:__UnBoard(DelaySeconds, ToPointVec2) -

UnBoards the cargo to a Carrier.

-
CARGO:__UnLoad(DelaySeconds, ToPointVec2) -

UnLoads the cargo to a Carrier.

-
- -

Type CARGO_GROUP

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CARGO_GROUP.CargoCarrier - -
CARGO_GROUP.CargoSet - -
CARGO_GROUP:New(CargoGroup, Type, Name, ReportRadius, NearRadius) -

CARGO_GROUP constructor.

-
CARGO_GROUP:onafterUnBoarding(ToPointVec2, Event, From, To, NearRadius, ...) -

UnBoard Event.

-
CARGO_GROUP:onenterBoarding(CargoCarrier, Event, From, To, NearRadius, ...) -

Enter Boarding State.

-
CARGO_GROUP:onenterLoaded(CargoCarrier, Event, From, To, ...) -

Enter Loaded State.

-
CARGO_GROUP:onenterUnBoarding(ToPointVec2, Event, From, To, NearRadius, ...) -

Enter UnBoarding State.

-
CARGO_GROUP:onenterUnLoaded(Core, Event, From, To, ToPointVec2, ...) -

Enter UnLoaded State.

-
CARGO_GROUP:onleaveBoarding(CargoCarrier, Event, From, To, NearRadius, ...) -

Leave Boarding State.

-
CARGO_GROUP:onleaveUnBoarding(ToPointVec2, Event, From, To, NearRadius, ...) -

Leave UnBoarding State.

-
- -

Type CARGO_PACKAGE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CARGO_PACKAGE.CargoCarrier - -
CARGO_PACKAGE.CargoInAir - -
CARGO_PACKAGE.ClassName - -
CARGO_PACKAGE:IsNear(CargoCarrier) -

Check if CargoCarrier is near the Cargo to be Loaded.

-
CARGO_PACKAGE:New(CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius) -

CARGO_PACKAGE Constructor.

-
CARGO_PACKAGE:onafterLoad(Event, From, To, CargoCarrier, Speed, LoadDistance, Angle) -

Load Event.

-
CARGO_PACKAGE:onafterOnBoard(Event, From, To, CargoCarrier, Speed, BoardDistance, Angle, LoadDistance) -

Board Event.

-
CARGO_PACKAGE:onafterOnBoarded(Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle) -

Boarded Event.

-
CARGO_PACKAGE:onafterUnBoard(Event, From, To, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle, CargoCarrier) -

UnBoard Event.

-
CARGO_PACKAGE:onafterUnBoarded(Event, From, To, CargoCarrier, Speed) -

UnBoarded Event.

-
CARGO_PACKAGE:onafterUnLoad(Event, From, To, Distance, Angle, CargoCarrier, Speed) -

UnLoad Event.

-
- -

Type CARGO_REPORTABLE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CARGO_REPORTABLE.CargoObject - -
CARGO_REPORTABLE.ClassName - -
CARGO_REPORTABLE:GetBoardingRange() -

Get the range till cargo will board.

-
CARGO_REPORTABLE:IsInRadius(PointVec2) -

Check if CargoCarrier is in the ReportRadius for the Cargo to be Loaded.

-
CARGO_REPORTABLE:MessageToGroup(Message, TaskGroup, Name) -

Send a CC message to a GROUP.

-
CARGO_REPORTABLE:New(CargoObject, Type, Name, Weight, ReportRadius, NearRadius) -

CARGO_REPORTABLE Constructor.

-
CARGO_REPORTABLE.ReportRadius - -
- -

Type CARGO_REPRESENTABLE

- - - - - - - - - - - - - -
CARGO_REPRESENTABLE.ClassName - -
CARGO_REPRESENTABLE:New(CargoObject, Type, Name, Weight, ReportRadius, NearRadius) -

CARGO_REPRESENTABLE Constructor.

-
CARGO_REPRESENTABLE:RouteTo(ToPointVec2, Speed) -

Route a cargo unit to a PointVec2.

-
- -

Type CARGO_UNIT

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CARGO_UNIT.CargoCarrier - -
CARGO_UNIT.CargoInAir - -
CARGO_UNIT.CargoObject - -
CARGO_UNIT:Destroy() -

CARGO_UNIT Destructor.

-
CARGO_UNIT:New(CargoUnit, Type, Name, Weight, ReportRadius, NearRadius) -

CARGO_UNIT Constructor.

-
CARGO_UNIT.OnUnLoadedCallBack - -
CARGO_UNIT:onafterBoard(Event, From, To, CargoCarrier, NearRadius, ...) -

Board Event.

-
CARGO_UNIT:onafterUnBoarding(Event, From, To, ToPointVec2, NearRadius) -

UnBoard Event.

-
CARGO_UNIT:onenterBoarding(Event, From, To, CargoCarrier, NearRadius, ...) -

Enter Boarding State.

-
CARGO_UNIT:onenterLoaded(Event, From, To, CargoCarrier) -

Loaded State.

-
CARGO_UNIT:onenterUnBoarding(Event, From, To, ToPointVec2, NearRadius) -

Enter UnBoarding State.

-
CARGO_UNIT:onenterUnLoaded(Event, From, To, Core, ToPointVec2) -

Enter UnLoaded State.

-
CARGO_UNIT:onleaveBoarding(Event, From, To, CargoCarrier, NearRadius, ...) -

Leave Boarding State.

-
CARGO_UNIT:onleaveUnBoarding(Event, From, To, ToPointVec2, NearRadius) -

Leave UnBoarding State.

-
- -

Global(s)

-
-
- - #CARGO - -CARGO - -
-
- -

CARGO class, extends Fsm#FSM_PROCESS

- -

The CARGO class defines the core functions that defines a cargo object within MOOSE.

- - -

A cargo is a logical object defined that is available for transport, and has a life status within a simulation.

- -

The CARGO is a state machine: it manages the different events and states of the cargo. -All derived classes from CARGO follow the same state machine, expose the same cargo event functions, and provide the same cargo states.

- -

CARGO Events:

- -
    -
  • CARGO.Board( ToCarrier ): Boards the cargo to a carrier.
  • -
  • CARGO.Load( ToCarrier ): Loads the cargo into a carrier, regardless of its position.
  • -
  • CARGO.UnBoard( ToPointVec2 ): UnBoard the cargo from a carrier. This will trigger a movement of the cargo to the option ToPointVec2.
  • -
  • CARGO.UnLoad( ToPointVec2 ): UnLoads the cargo from a carrier.
  • -
  • CARGO.Dead( Controllable ): The cargo is dead. The cargo process will be ended.
  • -
- -

CARGO States:

- -
    -
  • UnLoaded: The cargo is unloaded from a carrier.
  • -
  • Boarding: The cargo is currently boarding (= running) into a carrier.
  • -
  • Loaded: The cargo is loaded into a carrier.
  • -
  • UnBoarding: The cargo is currently unboarding (=running) from a carrier.
  • -
  • Dead: The cargo is dead ...
  • -
  • End: The process has come to an end.
  • -
- -

CARGO state transition methods:

- -

State transition functions can be set by the mission designer customizing or improving the behaviour of the state. -There are 2 moments when state transition methods will be called by the state machine:

- -
    -
  • Leaving the state. - The state transition method needs to start with the name OnLeave + the name of the state. - If the state transition method returns false, then the processing of the state transition will not be done! - If you want to change the behaviour of the AIControllable at this event, return false, - but then you'll need to specify your own logic using the AIControllable!

  • -
  • Entering the state. - The state transition method needs to start with the name OnEnter + the name of the state. - These state transition methods need to provide a return value, which is specified at the function description.

  • -
- - -
-
-
-
- - - -CARGOS - -
-
- - - -
-
-
-
- - #CARGO_GROUP - -CARGO_GROUP - -
-
- -

CARGO_GROUP class

- -

The CARGO_GROUP class defines a cargo that is represented by a Group object within the simulator, and can be transported by a carrier.

- - -

Use the event functions as described above to Load, UnLoad, Board, UnBoard the CARGO_GROUP to and from carrier.

- - -
-
-
-
- - #CARGO_PACKAGE - -CARGO_PACKAGE - -
-
- - - -
-
-
-
- - #CARGO_REPORTABLE - -CARGO_REPORTABLE - -
-
- - - -
-
-
-
- - #CARGO_REPRESENTABLE - -CARGO_REPRESENTABLE - -
-
- - - -
-
-
-
- - #CARGO_UNIT - -CARGO_UNIT - -
-
- -

CARGO_UNIT class, extends #CARGO_REPRESENTABLE

- -

The CARGO_UNIT class defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier.

- - -

Use the event functions as described above to Load, UnLoad, Board, UnBoard the CARGO_UNIT objects to and from carriers.

- -
- - -
-
-

Type Cargo

- -

Type CARGO

-

Field(s)

-
-
- - -CARGO:Board(ToCarrier, NearRadius) - -
-
- -

Boards the cargo to a Carrier.

- - -

The event will create a movement (= running or driving) of the cargo to the Carrier. -The cargo must be in the UnLoaded state.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE ToCarrier : -The Carrier that will hold the cargo.

    - -
  • -
  • - -

    #number NearRadius : -The radius when the cargo will board the Carrier (to avoid collision).

    - -
  • -
-
-
-
-
- - Wrapper.Controllable#CONTROLLABLE - -CARGO.CargoCarrier - -
-
- -

The alive DCS object carrying the cargo. This value can be nil, meaning, that the cargo is not contained anywhere...

- -
-
-
-
- - Wrapper.Controllable#CONTROLLABLE - -CARGO.CargoObject - -
-
- -

The alive DCS object representing the cargo. This value can be nil, meaning, that the cargo is not represented anywhere...

- -
-
-
-
- - #boolean - -CARGO.Containable - -
-
- -

This flag defines if the cargo can be contained within a DCS Unit.

- -
-
-
-
- - -CARGO:GetName() - -
-
- -

Get the name of the Cargo.

- -

Return value

- -

#string: -The name of the Cargo.

- -
-
-
-
- - -CARGO:GetPointVec2() - -
-
- -

Get the current PointVec2 of the cargo.

- -

Return value

- -

Core.Point#POINT_VEC2:

- - -
-
-
-
- - -CARGO:GetType() - -
-
- -

Get the type of the Cargo.

- -

Return value

- -

#string: -The type of the Cargo.

- -
-
-
-
- - -CARGO:IsInZone(Zone) - -
-
- -

Check if Cargo is the given Zone.

- -

Parameter

- -

Return value

- -

#boolean: -true if cargo is in the Zone, false if cargo is not in the Zone.

- -
-
-
-
- - -CARGO:IsLoaded() - -
-
- -

Check if cargo is loaded.

- -

Return value

- -

#boolean: -true if loaded

- -
-
-
-
- - -CARGO:IsNear(PointVec2, NearRadius) - -
-
- -

Check if CargoCarrier is near the Cargo to be Loaded.

- -

Parameters

-
    -
  • - -

    Core.Point#POINT_VEC2 PointVec2 :

    - -
  • -
  • - -

    #number NearRadius : -The radius when the cargo will board the Carrier (to avoid collision).

    - -
  • -
-

Return value

- -

#boolean:

- - -
-
-
-
- - -CARGO:IsUnLoaded() - -
-
- -

Check if cargo is unloaded.

- -

Return value

- -

#boolean: -true if unloaded

- -
-
-
-
- - -CARGO:Load(ToCarrier) - -
-
- -

Loads the cargo to a Carrier.

- - -

The event will load the cargo into the Carrier regardless of its position. There will be no movement simulated of the cargo loading. -The cargo must be in the UnLoaded state.

- -

Parameter

- -
-
-
-
- - #boolean - -CARGO.Moveable - -
-
- -

This flag defines if the cargo is moveable.

- -
-
-
-
- - #string - -CARGO.Name - -
-
- -

A string defining the name of the cargo. The name is the unique identifier of the cargo.

- -
-
-
-
- - #number - -CARGO.NearRadius - -
-
- -

(optional) A number defining the radius in meters when the cargo is near to a Carrier, so that it can be loaded.

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

CARGO Constructor.

- - -

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

- -

Parameters

-
    -
  • - -

    #string Type :

    - -
  • -
  • - -

    #string Name :

    - -
  • -
  • - -

    #number Weight :

    - -
  • -
  • - -

    #number NearRadius : -(optional)

    - -
  • -
-

Return value

- -

#CARGO:

- - -
-
-
-
- - -CARGO:OnEnterBoarding(Controllable, NearRadius) - -
-
- - - -

Parameters

- -
-
-
-
- - -CARGO:OnEnterLoaded(Controllable) - -
-
- - - -

Parameter

- -
-
-
-
- - -CARGO:OnEnterUnBoarding(Controllable) - -
-
- - - -

Parameter

- -
-
-
-
- - -CARGO:OnEnterUnLoaded(Controllable) - -
-
- - - -

Parameter

- -
-
-
-
- - -CARGO:OnLeaveBoarding(Controllable) - -
-
- - - -

Parameter

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -CARGO:OnLeaveLoaded(Controllable) - -
-
- - - -

Parameter

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -CARGO:OnLeaveUnBoarding(Controllable) - -
-
- - - -

Parameter

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -CARGO:OnLeaveUnLoaded(Controllable) - -
-
- - - -

Parameter

- -

Return value

- -

#boolean:

- - -
-
-
-
- - #boolean - -CARGO.Representable - -
-
- -

This flag defines if the cargo can be represented by a DCS Unit.

- -
-
-
-
- - -CARGO:SetWeight(Weight) - -
-
- -

Set the weight of the cargo.

- -

Parameter

-
    -
  • - -

    #number Weight : -The weight in kg.

    - -
  • -
-

Return value

- -

#CARGO:

- - -
-
-
-
- - #boolean - -CARGO.Slingloadable - -
-
- -

This flag defines if the cargo can be slingloaded.

- -
-
-
-
- - -CARGO:Spawn(PointVec2) - -
-
- -

Template method to spawn a new representation of the CARGO in the simulator.

- -

Parameter

-
    -
  • - -

    PointVec2 :

    - -
  • -
-

Return value

- -

#CARGO:

- - -
-
-
-
- - #string - -CARGO.Type - -
-
- -

A string defining the type of the cargo. eg. Engineers, Equipment, Screwdrivers.

- -
-
-
-
- - -CARGO:UnBoard(ToPointVec2) - -
-
- -

UnBoards the cargo to a Carrier.

- - -

The event will create a movement (= running or driving) of the cargo from the Carrier. -The cargo must be in the Loaded state.

- -

Parameter

-
    -
  • - -

    Core.Point#POINT_VEC2 ToPointVec2 : -(optional) @{Point#POINT_VEC2) to where the cargo should run after onboarding. If not provided, the cargo will run to 60 meters behind the Carrier location.

    - -
  • -
-
-
-
-
- - -CARGO:UnLoad(ToPointVec2) - -
-
- -

UnLoads the cargo to a Carrier.

- - -

The event will unload the cargo from the Carrier. There will be no movement simulated of the cargo loading. -The cargo must be in the Loaded state.

- -

Parameter

-
    -
  • - -

    Core.Point#POINT_VEC2 ToPointVec2 : -(optional) @{Point#POINT_VEC2) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location.

    - -
  • -
-
-
-
-
- - #number - -CARGO.Weight - -
-
- -

A number defining the weight of the cargo. The weight is expressed in kg.

- -
-
-
-
- - -CARGO:__Board(DelaySeconds, ToCarrier, NearRadius) - -
-
- -

Boards the cargo to a Carrier.

- - -

The event will create a movement (= running or driving) of the cargo to the Carrier. -The cargo must be in the UnLoaded state.

- -

Parameters

-
    -
  • - -

    #number DelaySeconds : -The amount of seconds to delay the action.

    - -
  • -
  • - -

    Wrapper.Controllable#CONTROLLABLE ToCarrier : -The Carrier that will hold the cargo.

    - -
  • -
  • - -

    #number NearRadius : -The radius when the cargo will board the Carrier (to avoid collision).

    - -
  • -
-
-
-
-
- - -CARGO:__Load(DelaySeconds, ToCarrier) - -
-
- -

Loads the cargo to a Carrier.

- - -

The event will load the cargo into the Carrier regardless of its position. There will be no movement simulated of the cargo loading. -The cargo must be in the UnLoaded state.

- -

Parameters

-
    -
  • - -

    #number DelaySeconds : -The amount of seconds to delay the action.

    - -
  • -
  • - -

    Wrapper.Controllable#CONTROLLABLE ToCarrier : -The Carrier that will hold the cargo.

    - -
  • -
-
-
-
-
- - -CARGO:__UnBoard(DelaySeconds, ToPointVec2) - -
-
- -

UnBoards the cargo to a Carrier.

- - -

The event will create a movement (= running or driving) of the cargo from the Carrier. -The cargo must be in the Loaded state.

- -

Parameters

-
    -
  • - -

    #number DelaySeconds : -The amount of seconds to delay the action.

    - -
  • -
  • - -

    Core.Point#POINT_VEC2 ToPointVec2 : -(optional) @{Point#POINT_VEC2) to where the cargo should run after onboarding. If not provided, the cargo will run to 60 meters behind the Carrier location.

    - -
  • -
-
-
-
-
- - -CARGO:__UnLoad(DelaySeconds, ToPointVec2) - -
-
- -

UnLoads the cargo to a Carrier.

- - -

The event will unload the cargo from the Carrier. There will be no movement simulated of the cargo loading. -The cargo must be in the Loaded state.

- -

Parameters

-
    -
  • - -

    #number DelaySeconds : -The amount of seconds to delay the action.

    - -
  • -
  • - -

    Core.Point#POINT_VEC2 ToPointVec2 : -(optional) @{Point#POINT_VEC2) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location.

    - -
  • -
-
-
- -

Type CARGO.CargoObjects

- -

Type CARGO_GROUP

-

Field(s)

-
-
- - - -CARGO_GROUP.CargoCarrier - -
-
- - - -
-
-
-
- - - -CARGO_GROUP.CargoSet - -
-
- - - -
-
-
-
- - -CARGO_GROUP:New(CargoGroup, Type, Name, ReportRadius, NearRadius) - -
-
- -

CARGO_GROUP constructor.

- -

Parameters

-
    -
  • - -

    Wrapper.Group#GROUP CargoGroup :

    - -
  • -
  • - -

    #string Type :

    - -
  • -
  • - -

    #string Name :

    - -
  • -
  • - -

    #number ReportRadius : -(optional)

    - -
  • -
  • - -

    #number NearRadius : -(optional)

    - -
  • -
-

Return value

- -

#CARGO_GROUP:

- - -
-
-
-
- - -CARGO_GROUP:onafterUnBoarding(ToPointVec2, Event, From, To, NearRadius, ...) - -
-
- -

UnBoard Event.

- -

Parameters

-
    -
  • - -

    Core.Point#POINT_VEC2 ToPointVec2 :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    NearRadius :

    - -
  • -
  • - -

    ... :

    - -
  • -
-
-
-
-
- - -CARGO_GROUP:onenterBoarding(CargoCarrier, Event, From, To, NearRadius, ...) - -
-
- -

Enter Boarding State.

- -

Parameters

-
    -
  • - -

    Wrapper.Unit#UNIT CargoCarrier :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    NearRadius :

    - -
  • -
  • - -

    ... :

    - -
  • -
-
-
-
-
- - -CARGO_GROUP:onenterLoaded(CargoCarrier, Event, From, To, ...) - -
-
- -

Enter Loaded State.

- -

Parameters

-
    -
  • - -

    Wrapper.Unit#UNIT CargoCarrier :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    ... :

    - -
  • -
-
-
-
-
- - -CARGO_GROUP:onenterUnBoarding(ToPointVec2, Event, From, To, NearRadius, ...) - -
-
- -

Enter UnBoarding State.

- -

Parameters

-
    -
  • - -

    Core.Point#POINT_VEC2 ToPointVec2 :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    NearRadius :

    - -
  • -
  • - -

    ... :

    - -
  • -
-
-
-
-
- - -CARGO_GROUP:onenterUnLoaded(Core, Event, From, To, ToPointVec2, ...) - -
-
- -

Enter UnLoaded State.

- -

Parameters

-
    -
  • - -

    Core : -Point#POINT_VEC2

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    ToPointVec2 :

    - -
  • -
  • - -

    ... :

    - -
  • -
-
-
-
-
- - -CARGO_GROUP:onleaveBoarding(CargoCarrier, Event, From, To, NearRadius, ...) - -
-
- -

Leave Boarding State.

- -

Parameters

-
    -
  • - -

    Wrapper.Unit#UNIT CargoCarrier :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    NearRadius :

    - -
  • -
  • - -

    ... :

    - -
  • -
-
-
-
-
- - -CARGO_GROUP:onleaveUnBoarding(ToPointVec2, Event, From, To, NearRadius, ...) - -
-
- -

Leave UnBoarding State.

- -

Parameters

-
    -
  • - -

    Core.Point#POINT_VEC2 ToPointVec2 :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    NearRadius :

    - -
  • -
  • - -

    ... :

    - -
  • -
-
-
- -

Type CARGO_PACKAGE

-

Field(s)

-
-
- - - -CARGO_PACKAGE.CargoCarrier - -
-
- - - -
-
-
-
- - - -CARGO_PACKAGE.CargoInAir - -
-
- - - -
-
-
-
- - #string - -CARGO_PACKAGE.ClassName - -
-
- - - -
-
-
-
- - -CARGO_PACKAGE:IsNear(CargoCarrier) - -
-
- -

Check if CargoCarrier is near the Cargo to be Loaded.

- -

Parameter

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -CARGO_PACKAGE:New(CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius) - -
-
- -

CARGO_PACKAGE Constructor.

- -

Parameters

-
    -
  • - -

    Wrapper.Unit#UNIT CargoCarrier : -The UNIT carrying the package.

    - -
  • -
  • - -

    #string Type :

    - -
  • -
  • - -

    #string Name :

    - -
  • -
  • - -

    #number Weight :

    - -
  • -
  • - -

    #number ReportRadius : -(optional)

    - -
  • -
  • - -

    #number NearRadius : -(optional)

    - -
  • -
-

Return value

- -

#CARGO_PACKAGE:

- - -
-
-
-
- - -CARGO_PACKAGE:onafterLoad(Event, From, To, CargoCarrier, Speed, LoadDistance, Angle) - -
-
- -

Load Event.

- -

Parameters

-
    -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    Wrapper.Unit#UNIT CargoCarrier :

    - -
  • -
  • - -

    #number Speed :

    - -
  • -
  • - -

    #number LoadDistance :

    - -
  • -
  • - -

    #number Angle :

    - -
  • -
-
-
-
-
- - -CARGO_PACKAGE:onafterOnBoard(Event, From, To, CargoCarrier, Speed, BoardDistance, Angle, LoadDistance) - -
-
- -

Board Event.

- -

Parameters

-
    -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    Wrapper.Unit#UNIT CargoCarrier :

    - -
  • -
  • - -

    #number Speed :

    - -
  • -
  • - -

    #number BoardDistance :

    - -
  • -
  • - -

    #number Angle :

    - -
  • -
  • - -

    LoadDistance :

    - -
  • -
-
-
-
-
- - -CARGO_PACKAGE:onafterOnBoarded(Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle) - -
-
- -

Boarded Event.

- -

Parameters

-
    -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    Wrapper.Unit#UNIT CargoCarrier :

    - -
  • -
  • - -

    Speed :

    - -
  • -
  • - -

    BoardDistance :

    - -
  • -
  • - -

    LoadDistance :

    - -
  • -
  • - -

    Angle :

    - -
  • -
-
-
-
-
- - -CARGO_PACKAGE:onafterUnBoard(Event, From, To, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle, CargoCarrier) - -
-
- -

UnBoard Event.

- -

Parameters

-
    -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    #number Speed :

    - -
  • -
  • - -

    #number UnLoadDistance :

    - -
  • -
  • - -

    #number UnBoardDistance :

    - -
  • -
  • - -

    #number Radius :

    - -
  • -
  • - -

    #number Angle :

    - -
  • -
  • - -

    CargoCarrier :

    - -
  • -
-
-
-
-
- - -CARGO_PACKAGE:onafterUnBoarded(Event, From, To, CargoCarrier, Speed) - -
-
- -

UnBoarded Event.

- -

Parameters

-
    -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    Wrapper.Unit#UNIT CargoCarrier :

    - -
  • -
  • - -

    Speed :

    - -
  • -
-
-
-
-
- - -CARGO_PACKAGE:onafterUnLoad(Event, From, To, Distance, Angle, CargoCarrier, Speed) - -
-
- -

UnLoad Event.

- -

Parameters

-
    -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    #number Distance :

    - -
  • -
  • - -

    #number Angle :

    - -
  • -
  • - -

    CargoCarrier :

    - -
  • -
  • - -

    Speed :

    - -
  • -
-
-
- -

Type CARGO_REPORTABLE

-

Field(s)

-
-
- - - -CARGO_REPORTABLE.CargoObject - -
-
- - - -
-
-
-
- - #string - -CARGO_REPORTABLE.ClassName - -
-
- - - -
-
-
-
- - -CARGO_REPORTABLE:GetBoardingRange() - -
-
- -

Get the range till cargo will board.

- -

Return value

- -

#number: -The range till cargo will board.

- -
-
-
-
- - -CARGO_REPORTABLE:IsInRadius(PointVec2) - -
-
- -

Check if CargoCarrier is in the ReportRadius for the Cargo to be Loaded.

- -

Parameter

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -CARGO_REPORTABLE:MessageToGroup(Message, TaskGroup, Name) - -
-
- -

Send a CC message to a GROUP.

- -

Parameters

-
    -
  • - -

    #string Message :

    - -
  • -
  • - -

    Wrapper.Group#GROUP TaskGroup :

    - -
  • -
  • - -

    #sring Name : -(optional) The name of the Group used as a prefix for the message to the Group. If not provided, there will be nothing shown.

    - -
  • -
-
-
-
-
- - -CARGO_REPORTABLE:New(CargoObject, Type, Name, Weight, ReportRadius, NearRadius) - -
-
- -

CARGO_REPORTABLE Constructor.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#Controllable CargoObject :

    - -
  • -
  • - -

    #string Type :

    - -
  • -
  • - -

    #string Name :

    - -
  • -
  • - -

    #number Weight :

    - -
  • -
  • - -

    #number ReportRadius : -(optional)

    - -
  • -
  • - -

    #number NearRadius : -(optional)

    - -
  • -
-

Return value

- -

#CARGO_REPORTABLE:

- - -
-
-
-
- - -CARGO_REPORTABLE.ReportRadius - -
-
- - - -
-
- -

Type CARGO_REPRESENTABLE

-

Field(s)

-
-
- - #string - -CARGO_REPRESENTABLE.ClassName - -
-
- - - -
-
-
-
- - -CARGO_REPRESENTABLE:New(CargoObject, Type, Name, Weight, ReportRadius, NearRadius) - -
-
- -

CARGO_REPRESENTABLE Constructor.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#Controllable CargoObject :

    - -
  • -
  • - -

    #string Type :

    - -
  • -
  • - -

    #string Name :

    - -
  • -
  • - -

    #number Weight :

    - -
  • -
  • - -

    #number ReportRadius : -(optional)

    - -
  • -
  • - -

    #number NearRadius : -(optional)

    - -
  • -
-

Return value

- -

#CARGO_REPRESENTABLE:

- - -
-
-
-
- - -CARGO_REPRESENTABLE:RouteTo(ToPointVec2, Speed) - -
-
- -

Route a cargo unit to a PointVec2.

- -

Parameters

- -

Return value

- -

#CARGO_REPRESENTABLE:

- - -
-
- -

Type CARGO_UNIT

-

Field(s)

-
-
- - - -CARGO_UNIT.CargoCarrier - -
-
- - - -
-
-
-
- - - -CARGO_UNIT.CargoInAir - -
-
- - - -
-
-
-
- - - -CARGO_UNIT.CargoObject - -
-
- - - -
-
-
-
- - -CARGO_UNIT:Destroy() - -
-
- -

CARGO_UNIT Destructor.

- -

Return value

- -

#CARGO_UNIT:

- - -
-
-
-
- - -CARGO_UNIT:New(CargoUnit, Type, Name, Weight, ReportRadius, NearRadius) - -
-
- -

CARGO_UNIT Constructor.

- -

Parameters

-
    -
  • - -

    Wrapper.Unit#UNIT CargoUnit :

    - -
  • -
  • - -

    #string Type :

    - -
  • -
  • - -

    #string Name :

    - -
  • -
  • - -

    #number Weight :

    - -
  • -
  • - -

    #number ReportRadius : -(optional)

    - -
  • -
  • - -

    #number NearRadius : -(optional)

    - -
  • -
-

Return value

- -

#CARGO_UNIT:

- - -
-
-
-
- - -CARGO_UNIT.OnUnLoadedCallBack - -
-
- - - -
-
-
-
- - -CARGO_UNIT:onafterBoard(Event, From, To, CargoCarrier, NearRadius, ...) - -
-
- -

Board Event.

- -

Parameters

-
    -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    CargoCarrier :

    - -
  • -
  • - -

    NearRadius :

    - -
  • -
  • - -

    ... :

    - -
  • -
-
-
-
-
- - -CARGO_UNIT:onafterUnBoarding(Event, From, To, ToPointVec2, NearRadius) - -
-
- -

UnBoard Event.

- -

Parameters

-
    -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    Core.Point#POINT_VEC2 ToPointVec2 :

    - -
  • -
  • - -

    NearRadius :

    - -
  • -
-
-
-
-
- - -CARGO_UNIT:onenterBoarding(Event, From, To, CargoCarrier, NearRadius, ...) - -
-
- -

Enter Boarding State.

- -

Parameters

-
    -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    Wrapper.Unit#UNIT CargoCarrier :

    - -
  • -
  • - -

    NearRadius :

    - -
  • -
  • - -

    ... :

    - -
  • -
-
-
-
-
- - -CARGO_UNIT:onenterLoaded(Event, From, To, CargoCarrier) - -
-
- -

Loaded State.

- -

Parameters

-
    -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    Wrapper.Unit#UNIT CargoCarrier :

    - -
  • -
-
-
-
-
- - -CARGO_UNIT:onenterUnBoarding(Event, From, To, ToPointVec2, NearRadius) - -
-
- -

Enter UnBoarding State.

- -

Parameters

-
    -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    Core.Point#POINT_VEC2 ToPointVec2 :

    - -
  • -
  • - -

    NearRadius :

    - -
  • -
-
-
-
-
- - -CARGO_UNIT:onenterUnLoaded(Event, From, To, Core, ToPointVec2) - -
-
- -

Enter UnLoaded State.

- -

Parameters

-
    -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    Core : -Point#POINT_VEC2

    - -
  • -
  • - -

    ToPointVec2 :

    - -
  • -
-
-
-
-
- - -CARGO_UNIT:onleaveBoarding(Event, From, To, CargoCarrier, NearRadius, ...) - -
-
- -

Leave Boarding State.

- -

Parameters

-
    -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    Wrapper.Unit#UNIT CargoCarrier :

    - -
  • -
  • - -

    NearRadius :

    - -
  • -
  • - -

    ... :

    - -
  • -
-
-
-
-
- - -CARGO_UNIT:onleaveUnBoarding(Event, From, To, ToPointVec2, NearRadius) - -
-
- -

Leave UnBoarding State.

- -

Parameters

-
    -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    Core.Point#POINT_VEC2 ToPointVec2 :

    - -
  • -
  • - -

    NearRadius :

    - -
  • -
-
-
- -

Type COMMANDCENTER

- -

Type sring

- -
- -
- - diff --git a/docs/Documentation/Cas.html b/docs/Documentation/Cas.html deleted file mode 100644 index 4ed9fdf8c..000000000 --- a/docs/Documentation/Cas.html +++ /dev/null @@ -1,1549 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Cas

- -

SP:Y MP:Y AI:Y HU:N TYP:Air -- This module contains the AICASZONE class.

- - - -
- -

1) #AICASZONE class, extends Core.Fsm#FSM_CONTROLLABLE

-

The #AICASZONE class implements the core functions to CAS a Zone by an AIR Controllable Group.

- -

1.1) AICASZONE constructor:

- - - -

1.2) AICASZONE state machine:

-

The AICASZONE is a state machine: it manages the different events and states of the AIControllable it is controlling.

- -

1.2.1) AICASZONE Events:

- - - -

1.2.2) AICASZONE States:

- - -

1.2.3) AICASZONE state transition methods:

- - -

1.3) Manage the AICASZONE parameters:

-

The following methods are available to modify the parameters of an AICASZONE object:

- - - -
- -

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-01-12: Initial class and API.

- -
- -

AUTHORS and CONTRIBUTIONS

- -

Contributions:

- -
    -
  • Quax: Concept & Testing.
  • -
  • Pikey: Concept & Testing.
  • -
- -

Authors:

- -
    -
  • FlightControl: Concept, Design & Programming.
  • -
- - - -

Global(s)

- - - - - - - - - -
AI_CAS_ZONE - -
_NewEngageRoute(AIControllable) - -
-

Type AI_CAS_ZONE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AI_CAS_ZONE.AIControllable -

The Controllable patrolling.

-
AI_CAS_ZONE:Abort() -

Synchronous Event Trigger for Event Abort.

-
AI_CAS_ZONE:Accomplish() -

Synchronous Event Trigger for Event Accomplish.

-
AI_CAS_ZONE.Accomplished - -
AI_CAS_ZONE.CheckStatus - -
AI_CAS_ZONE.ClassName - -
AI_CAS_ZONE:Destroy() -

Synchronous Event Trigger for Event Destroy.

-
AI_CAS_ZONE.DetectUnits - -
AI_CAS_ZONE:Engage() -

Synchronous Event Trigger for Event Engage.

-
AI_CAS_ZONE.EngageZone - -
AI_CAS_ZONE:Fired() -

Synchronous Event Trigger for Event Fired.

-
AI_CAS_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageZone) -

Creates a new AICASZONE object

-
AI_CAS_ZONE:OnAfterAbort(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Abort.

-
AI_CAS_ZONE:OnAfterAccomplish(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Accomplish.

-
AI_CAS_ZONE:OnAfterDestroy(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Destroy.

-
AI_CAS_ZONE:OnAfterEngage(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Engage.

-
AI_CAS_ZONE:OnAfterFired(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Fired.

-
AI_CAS_ZONE:OnBeforeAbort(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Abort.

-
AI_CAS_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Accomplish.

-
AI_CAS_ZONE:OnBeforeDestroy(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Destroy.

-
AI_CAS_ZONE:OnBeforeEngage(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Engage.

-
AI_CAS_ZONE:OnBeforeFired(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Fired.

-
AI_CAS_ZONE:OnDead(EventData) - -
AI_CAS_ZONE:OnEnterEngaging(Controllable, From, Event, To) -

OnEnter Transition Handler for State Engaging.

-
AI_CAS_ZONE:OnLeaveEngaging(Controllable, From, Event, To) -

OnLeave Transition Handler for State Engaging.

-
AI_CAS_ZONE.TargetZone -

The Zone where the patrol needs to be executed.

-
AI_CAS_ZONE:__Abort(Delay) -

Asynchronous Event Trigger for Event Abort.

-
AI_CAS_ZONE:__Accomplish(Delay) -

Asynchronous Event Trigger for Event Accomplish.

-
AI_CAS_ZONE:__Destroy(Delay) -

Asynchronous Event Trigger for Event Destroy.

-
AI_CAS_ZONE:__Engage(Delay) -

Asynchronous Event Trigger for Event Engage.

-
AI_CAS_ZONE:__Fired(Delay) -

Asynchronous Event Trigger for Event Fired.

-
AI_CAS_ZONE:onafterAccomplish(Controllable, From, Event, To) - -
AI_CAS_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) - -
AI_CAS_ZONE:onafterEngage(Controllable, From, Event, To) - -
AI_CAS_ZONE:onafterRTB(Controllable, From, Event, To, EventData) - -
AI_CAS_ZONE:onafterStart(Controllable, From, Event, To) -

onafter State Transition for Event Start.

-
AI_CAS_ZONE:onbeforeEngage(Controllable, From, Event, To) - -
- -

Global(s)

-
-
- - #AI_CAS_ZONE - -AI_CAS_ZONE - -
-
- - - -
-
-
-
- - -_NewEngageRoute(AIControllable) - -
-
- - - -

Parameter

- -
-
-

Type Cas

- -

Type AI_CAS_ZONE

- -

AICASZONE class

- -

Field(s)

-
-
- - Wrapper.Controllable#CONTROLLABLE - -AI_CAS_ZONE.AIControllable - -
-
- -

The Controllable patrolling.

- -
-
-
-
- - -AI_CAS_ZONE:Abort() - -
-
- -

Synchronous Event Trigger for Event Abort.

- -
-
-
-
- - -AI_CAS_ZONE:Accomplish() - -
-
- -

Synchronous Event Trigger for Event Accomplish.

- -
-
-
-
- - #boolean - -AI_CAS_ZONE.Accomplished - -
-
- - - -
-
-
-
- - #boolean - -AI_CAS_ZONE.CheckStatus - -
-
- - - -
-
-
-
- - #string - -AI_CAS_ZONE.ClassName - -
-
- - - -
-
-
-
- - -AI_CAS_ZONE:Destroy() - -
-
- -

Synchronous Event Trigger for Event Destroy.

- -
-
-
-
- - #boolean - -AI_CAS_ZONE.DetectUnits - -
-
- - - -
-
-
-
- - -AI_CAS_ZONE:Engage() - -
-
- -

Synchronous Event Trigger for Event Engage.

- -
-
-
-
- - - -AI_CAS_ZONE.EngageZone - -
-
- - - -
-
-
-
- - -AI_CAS_ZONE:Fired() - -
-
- -

Synchronous Event Trigger for Event Fired.

- -
-
-
-
- - -AI_CAS_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageZone) - -
-
- -

Creates a new AICASZONE object

- -

Parameters

- -

Return value

- -

#AICASZONE: -self

- -
-
-
-
- - -AI_CAS_ZONE:OnAfterAbort(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Abort.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:OnAfterAccomplish(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Accomplish.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:OnAfterDestroy(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Destroy.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:OnAfterEngage(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Engage.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:OnAfterFired(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Fired.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:OnBeforeAbort(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Abort.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_CAS_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Accomplish.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_CAS_ZONE:OnBeforeDestroy(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Destroy.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_CAS_ZONE:OnBeforeEngage(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Engage.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_CAS_ZONE:OnBeforeFired(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Fired.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -AI_CAS_ZONE:OnDead(EventData) - -
-
- - - -

Parameter

- -
-
-
-
- - -AI_CAS_ZONE:OnEnterEngaging(Controllable, From, Event, To) - -
-
- -

OnEnter Transition Handler for State Engaging.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:OnLeaveEngaging(Controllable, From, Event, To) - -
-
- -

OnLeave Transition Handler for State Engaging.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - Core.Zone#ZONE_BASE - -AI_CAS_ZONE.TargetZone - -
-
- -

The Zone where the patrol needs to be executed.

- -
-
-
-
- - -AI_CAS_ZONE:__Abort(Delay) - -
-
- -

Asynchronous Event Trigger for Event Abort.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:__Accomplish(Delay) - -
-
- -

Asynchronous Event Trigger for Event Accomplish.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:__Destroy(Delay) - -
-
- -

Asynchronous Event Trigger for Event Destroy.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:__Engage(Delay) - -
-
- -

Asynchronous Event Trigger for Event Engage.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:__Fired(Delay) - -
-
- -

Asynchronous Event Trigger for Event Fired.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:onafterAccomplish(Controllable, From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
  • - -

    Core.Event#EVENTDATA EventData :

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:onafterEngage(Controllable, From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:onafterRTB(Controllable, From, Event, To, EventData) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
  • - -

    EventData :

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:onafterStart(Controllable, From, Event, To) - -
-
- -

onafter State Transition for Event Start.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -AI_CAS_ZONE:onbeforeEngage(Controllable, From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
- -
- -
- - diff --git a/docs/Documentation/CleanUp.html b/docs/Documentation/CleanUp.html deleted file mode 100644 index fa84131e1..000000000 --- a/docs/Documentation/CleanUp.html +++ /dev/null @@ -1,606 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module CleanUp

- -

The CLEANUP class keeps an area clean of crashing or colliding airplanes.

- - -

It also prevents airplanes from firing within this area.

- -

Global(s)

- - - - - -
CLEANUP - -
-

Type CLEANUP

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CLEANUP.ClassName - -
CLEANUP.CleanUpList - -
CLEANUP.CleanUpScheduler - -
CLEANUP:New(ZoneNames, TimeInterval) -

Creates the main object which is handling the cleaning of the debris within the given Zone Names.

-
CLEANUP.TimeInterval - -
CLEANUP.ZoneNames - -
CLEANUP:_AddForCleanUp(CleanUpUnit, CleanUpUnitName) -

Add the DCSWrapper.Unit#Unit to the CleanUpList for CleanUp.

-
CLEANUP:_CleanUpScheduler() -

At the defined time interval, CleanUp the Groups within the CleanUpList.

-
CLEANUP:_DestroyGroup(GroupObject, CleanUpGroupName) -

Destroys a group from the simulator, but checks first if it is still existing!

-
CLEANUP:_DestroyMissile(MissileObject) - -
CLEANUP:_DestroyUnit(CleanUpUnit, CleanUpUnitName) -

Destroys a DCSWrapper.Unit#Unit from the simulator, but checks first if it is still existing!

-
CLEANUP:_EventAddForCleanUp(event, Event) -

Detects if the Unit has an SEVENTENGINESHUTDOWN or an SEVENT_HIT within the given ZoneNames.

-
CLEANUP:_EventCrash(event, Event) -

Detects if a crash event occurs.

-
CLEANUP:_EventHitCleanUp(event, Event) -

Detects if the Unit has an SEVENTHIT within the given ZoneNames.

-
CLEANUP:_EventShot(event, Event) -

Detects if a unit shoots a missile.

-
CLEANUP:_OnEventBirth(EventData) - -
- -

Global(s)

-
-
- - #CLEANUP - -CLEANUP - -
-
- - - -
-
-

Type CleanUp

- -

Type CLEANUP

- -

The CLEANUP class.

- -

Field(s)

-
-
- - #string - -CLEANUP.ClassName - -
-
- - - -
-
-
-
- - - -CLEANUP.CleanUpList - -
-
- - - -
-
-
-
- - - -CLEANUP.CleanUpScheduler - -
-
- - - -
-
-
-
- - -CLEANUP:New(ZoneNames, TimeInterval) - -
-
- -

Creates the main object which is handling the cleaning of the debris within the given Zone Names.

- -

Parameters

-
    -
  • - -

    #table ZoneNames : -Is a table of zone names where the debris should be cleaned. Also a single string can be passed with one zone name.

    - -
  • -
  • - -

    #number TimeInterval : -The interval in seconds when the clean activity takes place. The default is 300 seconds, thus every 5 minutes.

    - -
  • -
-

Return value

- -

#CLEANUP:

- - -

Usage:

-
 -- Clean these Zones.
-CleanUpAirports = CLEANUP:New( { 'CLEAN Tbilisi', 'CLEAN Kutaisi' }, 150 )
-or
-CleanUpTbilisi = CLEANUP:New( 'CLEAN Tbilisi', 150 )
-CleanUpKutaisi = CLEANUP:New( 'CLEAN Kutaisi', 600 )
- -
-
-
-
- - - -CLEANUP.TimeInterval - -
-
- - - -
-
-
-
- - - -CLEANUP.ZoneNames - -
-
- - - -
-
-
-
- - -CLEANUP:_AddForCleanUp(CleanUpUnit, CleanUpUnitName) - -
-
- -

Add the DCSWrapper.Unit#Unit to the CleanUpList for CleanUp.

- -

Parameters

-
    -
  • - -

    CleanUpUnit :

    - -
  • -
  • - -

    CleanUpUnitName :

    - -
  • -
-
-
-
-
- - -CLEANUP:_CleanUpScheduler() - -
-
- -

At the defined time interval, CleanUp the Groups within the CleanUpList.

- -
-
-
-
- - -CLEANUP:_DestroyGroup(GroupObject, CleanUpGroupName) - -
-
- -

Destroys a group from the simulator, but checks first if it is still existing!

- -

Parameters

-
    -
  • - -

    Dcs.DCSWrapper.Group#Group GroupObject : -The object to be destroyed.

    - -
  • -
  • - -

    #string CleanUpGroupName : -The groupname...

    - -
  • -
-
-
-
-
- - -CLEANUP:_DestroyMissile(MissileObject) - -
-
- - - - -

TODO check Dcs.DCSTypes#Weapon -- Destroys a missile from the simulator, but checks first if it is still existing! - @param #CLEANUP self - @param Dcs.DCSTypes#Weapon MissileObject

- -

Parameter

-
    -
  • - -

    MissileObject :

    - -
  • -
-
-
-
-
- - -CLEANUP:_DestroyUnit(CleanUpUnit, CleanUpUnitName) - -
-
- -

Destroys a DCSWrapper.Unit#Unit from the simulator, but checks first if it is still existing!

- -

Parameters

-
    -
  • - -

    Dcs.DCSWrapper.Unit#Unit CleanUpUnit : -The object to be destroyed.

    - -
  • -
  • - -

    #string CleanUpUnitName : -The Unit name ...

    - -
  • -
-
-
-
-
- - -CLEANUP:_EventAddForCleanUp(event, Event) - -
-
- -

Detects if the Unit has an SEVENTENGINESHUTDOWN or an SEVENT_HIT within the given ZoneNames.

- - -

If this is the case, add the Group to the CLEANUP List.

- -

Parameters

- -
-
-
-
- - -CLEANUP:_EventCrash(event, Event) - -
-
- -

Detects if a crash event occurs.

- - -

Crashed units go into a CleanUpList for removal.

- -

Parameters

- -
-
-
-
- - -CLEANUP:_EventHitCleanUp(event, Event) - -
-
- -

Detects if the Unit has an SEVENTHIT within the given ZoneNames.

- - -

If this is the case, destroy the unit.

- -

Parameters

- -
-
-
-
- - -CLEANUP:_EventShot(event, Event) - -
-
- -

Detects if a unit shoots a missile.

- - -

If this occurs within one of the zones, then the weapon used must be destroyed.

- -

Parameters

- -
-
-
-
- - -CLEANUP:_OnEventBirth(EventData) - -
-
- - - -

Parameter

- -
-
- -
- -
- - diff --git a/docs/Documentation/Client.html b/docs/Documentation/Client.html deleted file mode 100644 index d4c925d9b..000000000 --- a/docs/Documentation/Client.html +++ /dev/null @@ -1,1128 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Client

- -

This module contains the CLIENT class.

- - - -

1) Client#CLIENT class, extends Unit#UNIT

-

Clients are those Units defined within the Mission Editor that have the skillset defined as Client or Player. -Note that clients are NOT the same as Units, they are NOT necessarily alive. -The Client#CLIENT class is a wrapper class to handle the DCS Unit objects that have the skillset defined as Client or Player:

- -
    -
  • Wraps the DCS Unit objects with skill level set to Player or Client.
  • -
  • Support all DCS Unit APIs.
  • -
  • Enhance with Unit specific APIs not in the DCS Group API set.
  • -
  • When player joins Unit, execute alive init logic.
  • -
  • Handles messages to players.
  • -
  • Manage the "state" of the DCS Unit.
  • -
- -

Clients are being used by the MISSION class to follow players and register their successes.

- -

1.1) CLIENT reference methods

-

For each DCS Unit having skill level Player or Client, a CLIENT wrapper object (instance) will be created within the _DATABASE object. -This is done at the beginning of the mission (when the mission starts).

- -

The CLIENT class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference -using the DCS Unit or the DCS UnitName.

- -

Another thing to know is that CLIENT objects do not "contain" the DCS Unit object. -The CLIENT methods will reference the DCS Unit object by name when it is needed during API execution. -If the DCS Unit object does not exist or is nil, the CLIENT methods will return nil and log an exception in the DCS.log file.

- -

The CLIENT class provides the following functions to retrieve quickly the relevant CLIENT instance:

- -
    -
  • CLIENT.Find(): Find a CLIENT instance from the _DATABASE object using a DCS Unit object.
  • -
  • CLIENT.FindByName(): Find a CLIENT instance from the _DATABASE object using a DCS Unit name.
  • -
- -

IMPORTANT: ONE SHOULD NEVER SANATIZE these CLIENT OBJECT REFERENCES! (make the CLIENT object references nil).

- - -

Global(s)

- - - - - -
CLIENT - -
-

Type CLIENT

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CLIENT:AddBriefing(ClientBriefing) -

AddBriefing adds a briefing to a CLIENT when a player joins a mission.

-
CLIENT:Alive(CallBackFunction, ...) -

Checks for a client alive event and calls a function on a continuous basis.

-
CLIENT.ClassName - -
CLIENT.ClientAlive - -
CLIENT.ClientAlive2 - -
CLIENT.ClientBriefing - -
CLIENT.ClientBriefingShown - -
CLIENT.ClientCallBack - -
CLIENT.ClientGroupID - -
CLIENT.ClientGroupName - -
CLIENT.ClientGroupUnit - -
CLIENT.ClientName - -
CLIENT.ClientParameters - -
CLIENT.ClientTransport - -
CLIENT:Find(ClientName, ClientBriefing, DCSUnit, Error) -

Finds a CLIENT from the _DATABASE using the relevant DCS Unit.

-
CLIENT:FindByName(ClientName, ClientBriefing, Error) -

Finds a CLIENT from the _DATABASE using the relevant Client Unit Name.

-
CLIENT:GetClientGroupDCSUnit() -

Returns the DCSUnit of the CLIENT.

-
CLIENT:GetClientGroupID() - -
CLIENT:GetClientGroupName() -

Get the name of the group of the client.

-
CLIENT:GetClientGroupUnit() -

Returns the UNIT of the CLIENT.

-
CLIENT:GetDCSGroup() -

Return the DCSGroup of a Client.

-
CLIENT:IsMultiSeated() -

Checks if the CLIENT is a multi-seated UNIT.

-
CLIENT:IsTransport() -

Evaluates if the CLIENT is a transport.

-
CLIENT:Message(Message, MessageDuration, MessageCategory, MessageInterval, MessageID) -

The main message driver for the CLIENT.

-
CLIENT.Messages - -
CLIENT.ONBOARDSIDE - -
CLIENT:Register(ClientName) - -
CLIENT:Reset(ClientName) -

Resets a CLIENT.

-
CLIENT:ShowBriefing() -

Show the briefing of a CLIENT.

-
CLIENT:ShowCargo() -

Shows the AI_Cargo#CARGO contained within the CLIENT to the player as a message.

-
CLIENT:ShowMissionBriefing(MissionBriefing) -

Show the mission briefing of a MISSION to the CLIENT.

-
CLIENT.SwitchMessages(PrmTable) - -
CLIENT:Transport() -

Transport defines that the Client is a Transport.

-
CLIENT:_AliveCheckScheduler(SchedulerName) - -
CLIENT._Menus - -
CLIENT._Tasks - -
- -

Global(s)

-
-
- - #CLIENT - -CLIENT - -
-
- - - -
-
-

Type Client

- -

Type CLIENT

- -

The CLIENT class

- -

Field(s)

-
-
- - -CLIENT:AddBriefing(ClientBriefing) - -
-
- -

AddBriefing adds a briefing to a CLIENT when a player joins a mission.

- -

Parameter

-
    -
  • - -

    #string ClientBriefing : -is the text defining the Mission briefing.

    - -
  • -
-

Return value

- -

#CLIENT: -self

- -
-
-
-
- - -CLIENT:Alive(CallBackFunction, ...) - -
-
- -

Checks for a client alive event and calls a function on a continuous basis.

- -

Parameters

-
    -
  • - -

    #function CallBackFunction : -Create a function that will be called when a player joins the slot.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#CLIENT:

- - -
-
-
-
- - #string - -CLIENT.ClassName - -
-
- - - -
-
-
-
- - #boolean - -CLIENT.ClientAlive - -
-
- - - -
-
-
-
- - #boolean - -CLIENT.ClientAlive2 - -
-
- - - -
-
-
-
- - - -CLIENT.ClientBriefing - -
-
- - - -
-
-
-
- - #boolean - -CLIENT.ClientBriefingShown - -
-
- - - -
-
-
-
- - - -CLIENT.ClientCallBack - -
-
- - - -
-
-
-
- - - -CLIENT.ClientGroupID - -
-
- - - -
-
-
-
- - - -CLIENT.ClientGroupName - -
-
- - - -
-
-
-
- - -CLIENT.ClientGroupUnit - -
-
- - - -
-
-
-
- - -CLIENT.ClientName - -
-
- - - -
-
-
-
- - - -CLIENT.ClientParameters - -
-
- - - -
-
-
-
- - #boolean - -CLIENT.ClientTransport - -
-
- - - -
-
-
-
- - -CLIENT:Find(ClientName, ClientBriefing, DCSUnit, Error) - -
-
- -

Finds a CLIENT from the _DATABASE using the relevant DCS Unit.

- -

Parameters

-
    -
  • - -

    #string ClientName : -Name of the DCS Unit as defined within the Mission Editor.

    - -
  • -
  • - -

    #string ClientBriefing : -Text that describes the briefing of the mission when a Player logs into the Client.

    - -
  • -
  • - -

    DCSUnit :

    - -
  • -
  • - -

    Error :

    - -
  • -
-

Return value

- -

#CLIENT:

- - -

Usage:

-
-- Create new Clients.
- local Mission = MISSIONSCHEDULER.AddMission( 'Russia Transport Troops SA-6', 'Operational', 'Transport troops from the control center to one of the SA-6 SAM sites to activate their operation.', 'Russia' )
- Mission:AddGoal( DeploySA6TroopsGoal )
-
- Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 1' ):Transport() )
- Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 3' ):Transport() )
- Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 2' ):Transport() )
- Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 4' ):Transport() )
- -
-
-
-
- - -CLIENT:FindByName(ClientName, ClientBriefing, Error) - -
-
- -

Finds a CLIENT from the _DATABASE using the relevant Client Unit Name.

- - -

As an optional parameter, a briefing text can be given also.

- -

Parameters

-
    -
  • - -

    #string ClientName : -Name of the DCS Unit as defined within the Mission Editor.

    - -
  • -
  • - -

    #string ClientBriefing : -Text that describes the briefing of the mission when a Player logs into the Client.

    - -
  • -
  • - -

    #boolean Error : -A flag that indicates whether an error should be raised if the CLIENT cannot be found. By default an error will be raised.

    - -
  • -
-

Return value

- -

#CLIENT:

- - -

Usage:

-
-- Create new Clients.
-	local Mission = MISSIONSCHEDULER.AddMission( 'Russia Transport Troops SA-6', 'Operational', 'Transport troops from the control center to one of the SA-6 SAM sites to activate their operation.', 'Russia' )
-	Mission:AddGoal( DeploySA6TroopsGoal )
-
-	Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 1' ):Transport() )
-	Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 3' ):Transport() )
-	Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 2' ):Transport() )
-	Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 4' ):Transport() )
- -
-
-
-
- - -CLIENT:GetClientGroupDCSUnit() - -
-
- -

Returns the DCSUnit of the CLIENT.

- -

Return value

- -

Dcs.DCSTypes#Unit:

- - -
-
-
-
- - -CLIENT:GetClientGroupID() - -
-
- - - - -

TODO: Check Dcs.DCSTypes#Group.ID -- Get the group ID of the client. - @param #CLIENT self - @return Dcs.DCSTypes#Group.ID

- -
-
-
-
- - -CLIENT:GetClientGroupName() - -
-
- -

Get the name of the group of the client.

- -

Return value

- -

#string:

- - -
-
-
-
- - -CLIENT:GetClientGroupUnit() - -
-
- -

Returns the UNIT of the CLIENT.

- -

Return value

- -

Wrapper.Unit#UNIT:

- - -
-
-
-
- - -CLIENT:GetDCSGroup() - -
-
- -

Return the DCSGroup of a Client.

- - -

This function is modified to deal with a couple of bugs in DCS 1.5.3

- -

Return value

- -

Dcs.DCSWrapper.Group#Group:

- - -
-
-
-
- - -CLIENT:IsMultiSeated() - -
-
- -

Checks if the CLIENT is a multi-seated UNIT.

- -

Return value

- -

#boolean: -true if multi-seated.

- -
-
-
-
- - -CLIENT:IsTransport() - -
-
- -

Evaluates if the CLIENT is a transport.

- -

Return value

- -

#boolean: -true is a transport.

- -
-
-
-
- - -CLIENT:Message(Message, MessageDuration, MessageCategory, MessageInterval, MessageID) - -
-
- -

The main message driver for the CLIENT.

- - -

This function displays various messages to the Player logged into the CLIENT through the DCS World Messaging system.

- -

Parameters

-
    -
  • - -

    #string Message : -is the text describing the message.

    - -
  • -
  • - -

    #number MessageDuration : -is the duration in seconds that the Message should be displayed.

    - -
  • -
  • - -

    #string MessageCategory : -is the category of the message (the title).

    - -
  • -
  • - -

    #number MessageInterval : -is the interval in seconds between the display of the Message#MESSAGE when the CLIENT is in the air.

    - -
  • -
  • - -

    #string MessageID : -is the identifier of the message when displayed with intervals.

    - -
  • -
-
-
-
-
- - - -CLIENT.Messages - -
-
- - - -
-
-
-
- - - -CLIENT.ONBOARDSIDE - -
-
- - - -
-
-
-
- - -CLIENT:Register(ClientName) - -
-
- - - -

Parameter

-
    -
  • - -

    ClientName :

    - -
  • -
-
-
-
-
- - -CLIENT:Reset(ClientName) - -
-
- -

Resets a CLIENT.

- -

Parameter

-
    -
  • - -

    #string ClientName : -Name of the Group as defined within the Mission Editor. The Group must have a Unit with the type Client.

    - -
  • -
-
-
-
-
- - -CLIENT:ShowBriefing() - -
-
- -

Show the briefing of a CLIENT.

- -

Return value

- -

#CLIENT: -self

- -
-
-
-
- - -CLIENT:ShowCargo() - -
-
- -

Shows the AI_Cargo#CARGO contained within the CLIENT to the player as a message.

- - -

The AI_Cargo#CARGO is shown using the Message#MESSAGE distribution system.

- -
-
-
-
- - -CLIENT:ShowMissionBriefing(MissionBriefing) - -
-
- -

Show the mission briefing of a MISSION to the CLIENT.

- -

Parameter

-
    -
  • - -

    #string MissionBriefing :

    - -
  • -
-

Return value

- -

#CLIENT: -self

- -
-
-
-
- - -CLIENT.SwitchMessages(PrmTable) - -
-
- - - - -

TODO (1) I urgently need to revise this. -- A local function called by the DCS World Menu system to switch off messages.

- -

Parameter

-
    -
  • - -

    PrmTable :

    - -
  • -
-
-
-
-
- - -CLIENT:Transport() - -
-
- -

Transport defines that the Client is a Transport.

- - -

Transports show cargo.

- -

Return value

- -

#CLIENT:

- - -
-
-
-
- - -CLIENT:_AliveCheckScheduler(SchedulerName) - -
-
- - - -

Parameter

-
    -
  • - -

    SchedulerName :

    - -
  • -
-
-
-
-
- - - -CLIENT._Menus - -
-
- - - -
-
-
-
- - - -CLIENT._Tasks - -
-
- - - -
-
- -
- -
- - diff --git a/docs/Documentation/CommandCenter.html b/docs/Documentation/CommandCenter.html deleted file mode 100644 index c3e048507..000000000 --- a/docs/Documentation/CommandCenter.html +++ /dev/null @@ -1,846 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module CommandCenter

- -

A COMMANDCENTER is the owner of multiple missions within MOOSE.

- - -

A COMMANDCENTER governs multiple missions, the tasking and the reporting.

- -

Global(s)

- - - - - - - - - -
COMMANDCENTER - -
REPORT - -
-

Type COMMANDCENTER

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COMMANDCENTER:AddMission(Mission) -

Add a MISSION to be governed by the HQ command center.

-
COMMANDCENTER.ClassName - -
COMMANDCENTER.CommandCenterCoalition - -
COMMANDCENTER.CommandCenterMenu - -
COMMANDCENTER.CommandCenterName - -
COMMANDCENTER.CommandCenterPositionable - -
COMMANDCENTER:GetMenu() -

Gets the commandcenter menu structure governed by the HQ command center.

-
COMMANDCENTER:GetMissions() -

Get the Missions governed by the HQ command center.

-
COMMANDCENTER:GetName() -

Gets the name of the HQ command center.

-
COMMANDCENTER:GetPositionable() -

Gets the POSITIONABLE of the HQ command center.

-
COMMANDCENTER.HQ - -
COMMANDCENTER:HasGroup(Wrapper, MissionGroup) -

Checks of the COMMANDCENTER has a GROUP.

-
COMMANDCENTER:MessageToAll(Message) -

Send a CC message to the coalition of the CC.

-
COMMANDCENTER:MessageToCoalition(Message) -

Send a CC message to the coalition of the CC.

-
COMMANDCENTER:MessageToGroup(Message, TaskGroup, Name) -

Send a CC message to a GROUP.

-
COMMANDCENTER.Name - -
COMMANDCENTER:New(CommandCenterPositionable, CommandCenterName) -

The constructor takes an IDENTIFIABLE as the HQ command center.

-
COMMANDCENTER:RemoveMission(Mission) -

Removes a MISSION to be governed by the HQ command center.

-
COMMANDCENTER:ReportDetails(ReportGroup, Task) -

Report the status of a Task to a Group.

-
COMMANDCENTER:ReportSummary(ReportGroup) -

Report the status of all MISSIONs to a GROUP.

-
COMMANDCENTER:SetMenu() -

Sets the menu structure of the Missions governed by the HQ command center.

-
- -

Type REPORT

- - - - - - - - - - - - - - - - - -
REPORT:Add(Text) -

Add a new line to a REPORT.

-
REPORT.ClassName - -
REPORT:New(Title) -

Create a new REPORT.

-
REPORT:Text(Delimiter) -

Produces the text of the report, taking into account an optional delimeter, which is \n by default.

-
- -

Global(s)

-
-
- - #COMMANDCENTER - -COMMANDCENTER - -
-
- - - -
-
-
-
- - #REPORT - -REPORT - -
-
- - - -
-
-

Type CommandCenter

- -

Type COMMANDCENTER

- -

The COMMANDCENTER class

- -

Field(s)

-
-
- - -COMMANDCENTER:AddMission(Mission) - -
-
- -

Add a MISSION to be governed by the HQ command center.

- -

Parameter

- -

Return value

- -

Tasking.Mission#MISSION:

- - -
-
-
-
- - #string - -COMMANDCENTER.ClassName - -
-
- - - -
-
-
-
- - Dcs.DCSCoalitionWrapper.Object#coalition - -COMMANDCENTER.CommandCenterCoalition - -
-
- - - -
-
-
-
- - -COMMANDCENTER.CommandCenterMenu - -
-
- - - -
-
-
-
- - #string - -COMMANDCENTER.CommandCenterName - -
-
- - - -
-
-
-
- - -COMMANDCENTER.CommandCenterPositionable - -
-
- - - -
-
-
-
- - -COMMANDCENTER:GetMenu() - -
-
- -

Gets the commandcenter menu structure governed by the HQ command center.

- -

Return value

- -

Core.Menu#MENU_COALITION:

- - -
-
-
-
- - -COMMANDCENTER:GetMissions() - -
-
- -

Get the Missions governed by the HQ command center.

- -

Return value

- -

#list: -Tasking.Mission#MISSION>

- -
-
-
-
- - -COMMANDCENTER:GetName() - -
-
- -

Gets the name of the HQ command center.

- -

Return value

- -

#string:

- - -
-
-
-
- - -COMMANDCENTER:GetPositionable() - -
-
- -

Gets the POSITIONABLE of the HQ command center.

- -

Return value

- -

Wrapper.Positionable#POSITIONABLE:

- - -
-
-
-
- - Wrapper.Group#GROUP - -COMMANDCENTER.HQ - -
-
- - - -
-
-
-
- - -COMMANDCENTER:HasGroup(Wrapper, MissionGroup) - -
-
- -

Checks of the COMMANDCENTER has a GROUP.

- -

Parameters

-
    -
  • - -

    Wrapper : -Group#GROUP

    - -
  • -
  • - -

    MissionGroup :

    - -
  • -
-

Return value

- -

#boolean:

- - -
-
-
-
- - -COMMANDCENTER:MessageToAll(Message) - -
-
- -

Send a CC message to the coalition of the CC.

- -

Parameter

-
    -
  • - -

    Message :

    - -
  • -
-
-
-
-
- - -COMMANDCENTER:MessageToCoalition(Message) - -
-
- -

Send a CC message to the coalition of the CC.

- -

Parameter

-
    -
  • - -

    Message :

    - -
  • -
-
-
-
-
- - -COMMANDCENTER:MessageToGroup(Message, TaskGroup, Name) - -
-
- -

Send a CC message to a GROUP.

- -

Parameters

-
    -
  • - -

    #string Message :

    - -
  • -
  • - -

    Wrapper.Group#GROUP TaskGroup :

    - -
  • -
  • - -

    #sring Name : -(optional) The name of the Group used as a prefix for the message to the Group. If not provided, there will be nothing shown.

    - -
  • -
-
-
-
-
- - #string - -COMMANDCENTER.Name - -
-
- - - -
-
-
-
- - -COMMANDCENTER:New(CommandCenterPositionable, CommandCenterName) - -
-
- -

The constructor takes an IDENTIFIABLE as the HQ command center.

- -

Parameters

- -

Return value

- -

#COMMANDCENTER:

- - -
-
-
-
- - -COMMANDCENTER:RemoveMission(Mission) - -
-
- -

Removes a MISSION to be governed by the HQ command center.

- - -

The given Mission is not nilified.

- -

Parameter

- -

Return value

- -

Tasking.Mission#MISSION:

- - -
-
-
-
- - -COMMANDCENTER:ReportDetails(ReportGroup, Task) - -
-
- -

Report the status of a Task to a Group.

- - -

Report the details of a Mission, listing the Mission, and all the Task details.

- -

Parameters

-
    -
  • - -

    ReportGroup :

    - -
  • -
  • - -

    Task :

    - -
  • -
-
-
-
-
- - -COMMANDCENTER:ReportSummary(ReportGroup) - -
-
- -

Report the status of all MISSIONs to a GROUP.

- - -

Each Mission is listed, with an indication how many Tasks are still to be completed.

- -

Parameter

-
    -
  • - -

    ReportGroup :

    - -
  • -
-
-
-
-
- - -COMMANDCENTER:SetMenu() - -
-
- -

Sets the menu structure of the Missions governed by the HQ command center.

- -
-
- -

Type REPORT

- -

The REPORT class

- -

Field(s)

-
-
- - -REPORT:Add(Text) - -
-
- -

Add a new line to a REPORT.

- -

Parameter

-
    -
  • - -

    #string Text :

    - -
  • -
-

Return value

- -

#REPORT:

- - -
-
-
-
- - #string - -REPORT.ClassName - -
-
- - - -
-
-
-
- - -REPORT:New(Title) - -
-
- -

Create a new REPORT.

- -

Parameter

-
    -
  • - -

    #string Title :

    - -
  • -
-

Return value

- -

#REPORT:

- - -
-
-
-
- - -REPORT:Text(Delimiter) - -
-
- -

Produces the text of the report, taking into account an optional delimeter, which is \n by default.

- -

Parameter

-
    -
  • - -

    #string Delimiter : -(optional) A delimiter text.

    - -
  • -
-

Return value

- -

#string: -The report text.

- -
-
- -

Type TASK

- -

Type list

- -

Type sring

- -
- -
- - diff --git a/docs/Documentation/Controllable.html b/docs/Documentation/Controllable.html deleted file mode 100644 index 2aeac8f53..000000000 --- a/docs/Documentation/Controllable.html +++ /dev/null @@ -1,3222 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Controllable

- -

This module contains the CONTROLLABLE class.

- - - -

1) Controllable#CONTROLLABLE class, extends Positionable#POSITIONABLE

-

The Controllable#CONTROLLABLE class is a wrapper class to handle the DCS Controllable objects:

- -
    -
  • Support all DCS Controllable APIs.
  • -
  • Enhance with Controllable specific APIs not in the DCS Controllable API set.
  • -
  • Handle local Controllable Controller.
  • -
  • Manage the "state" of the DCS Controllable.
  • -
- -

1.1) CONTROLLABLE constructor

-

The CONTROLLABLE class provides the following functions to construct a CONTROLLABLE instance:

- - - -

1.2) CONTROLLABLE task methods

-

Several controllable task methods are available that help you to prepare tasks. -These methods return a string consisting of the task description, which can then be given to either a Controllable#CONTROLLABLE.PushTask or Controllable#SetTask method to assign the task to the CONTROLLABLE. -Tasks are specific for the category of the CONTROLLABLE, more specific, for AIR, GROUND or AIR and GROUND. -Each task description where applicable indicates for which controllable category the task is valid. -There are 2 main subdivisions of tasks: Assigned tasks and EnRoute tasks.

- -

1.2.1) Assigned task methods

- -

Assigned task methods make the controllable execute the task where the location of the (possible) targets of the task are known before being detected. -This is different from the EnRoute tasks, where the targets of the task need to be detected before the task can be executed.

- -

Find below a list of the assigned task methods:

- - - -

1.2.2) EnRoute task methods

- -

EnRoute tasks require the targets of the task need to be detected by the controllable (using its sensors) before the task can be executed:

- - - -

1.2.3) Preparation task methods

- -

There are certain task methods that allow to tailor the task behaviour:

- - - -

1.2.4) Obtain the mission from controllable templates

- -

Controllable templates contain complete mission descriptions. Sometimes you want to copy a complete mission from a controllable and assign it to another:

- - - -

1.3) CONTROLLABLE Command methods

-

Controllable command methods prepare the execution of commands using the CONTROLLABLE.SetCommand method:

- - - -

1.4) CONTROLLABLE Option methods

-

Controllable Option methods change the behaviour of the Controllable while being alive.

- -

1.4.1) Rule of Engagement:

- - - -

To check whether an ROE option is valid for a specific controllable, use:

- - - -

1.4.2) Rule on thread:

- - - -

To test whether an ROT option is valid for a specific controllable, use:

- - - -
- - -

Global(s)

- - - - - -
CONTROLLABLE - -
-

Type CONTROLLABLE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CONTROLLABLE.ClassName - -
CONTROLLABLE:ClearTasks() -

Clear all tasks from the controllable.

-
CONTROLLABLE:CommandDoScript(DoScript) -

Do Script command

-
CONTROLLABLE:CommandStopRoute(StopRoute) -

Create a stop route command, which returns a string containing the command.

-
CONTROLLABLE:CommandSwitchWayPoint(FromWayPoint, ToWayPoint) -

Perform a switch waypoint command

-
CONTROLLABLE.ControllableName -

The name of the controllable.

-
CONTROLLABLE:CopyRoute(Begin, End, Randomize, Radius) -

Return the route of a controllable by using the Database#DATABASE class.

-
CONTROLLABLE.DCSControllable -

The DCS controllable class.

-
CONTROLLABLE:EnRouteTaskAWACS() -

(AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts).

-
CONTROLLABLE:EnRouteTaskEWR() -

(GROUND) Ground unit (EW-radar) will act as an EWR for friendly units (will provide them with information about contacts).

-
CONTROLLABLE:EnRouteTaskEngageGroup(AttackGroup, Priority, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit) -

(AIR) Engaging a controllable.

-
CONTROLLABLE:EnRouteTaskEngageTargets(Distance, TargetTypes, Priority) -

(AIR) Engaging targets of defined types.

-
CONTROLLABLE:EnRouteTaskEngageUnit(EngageUnit, Priority, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, ControllableAttack) -

(AIR) Search and attack the Unit.

-
CONTROLLABLE:EnRouteTaskFAC(Radius, Priority) -

(AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose a targets (enemy ground controllable) around as well as other assigned targets.

-
CONTROLLABLE:EnRouteTaskFAC_EngageGroup(AttackGroup, Priority, WeaponType, Designation, Datalink) -

(AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose the target (enemy ground controllable) as well as other assigned targets.

-
CONTROLLABLE:EnRouteTaskTanker() -

(AIR) Aircraft will act as a tanker for friendly units.

-
CONTROLLABLE:GetDetectedTargets(DetectVisual, DetectOptical, DetectRadar, DetectIRST, DetectRWR, DetectDLINK) -

Return the detected targets of the controllable.

-
CONTROLLABLE:GetLife() -

Returns the health.

-
CONTROLLABLE:GetTaskMission() -

Return the mission template of the controllable.

-
CONTROLLABLE:GetTaskRoute() -

Return the mission route of the controllable.

-
CONTROLLABLE:GetUnits() -

Returns the UNITs wrappers of the DCS Units of the Controllable (default is a GROUP).

-
CONTROLLABLE:GetWayPoints() -

Get the current WayPoints set with the WayPoint functions( Note that the WayPoints can be nil, although there ARE waypoints).

-
CONTROLLABLE:IsTargetDetected(DCSObject) - -
CONTROLLABLE:New(ControllableName) -

Create a new CONTROLLABLE from a DCSControllable

-
CONTROLLABLE:OptionROEHoldFire() -

Holding weapons.

-
CONTROLLABLE:OptionROEHoldFirePossible() -

Can the CONTROLLABLE hold their weapons?

-
CONTROLLABLE:OptionROEOpenFire() -

Openfire.

-
CONTROLLABLE:OptionROEOpenFirePossible() -

Can the CONTROLLABLE attack designated targets?

-
CONTROLLABLE:OptionROEReturnFire() -

Return fire.

-
CONTROLLABLE:OptionROEReturnFirePossible() -

Can the CONTROLLABLE attack returning on enemy fire?

-
CONTROLLABLE:OptionROEWeaponFree() -

Weapon free.

-
CONTROLLABLE:OptionROEWeaponFreePossible() -

Can the CONTROLLABLE attack targets of opportunity?

-
CONTROLLABLE:OptionROTEvadeFire() -

Evade on fire.

-
CONTROLLABLE:OptionROTEvadeFirePossible() -

Can the CONTROLLABLE evade on enemy fire?

-
CONTROLLABLE:OptionROTNoReaction() -

No evasion on enemy threats.

-
CONTROLLABLE:OptionROTNoReactionPossible() -

Can the CONTROLLABLE ignore enemy fire?

-
CONTROLLABLE:OptionROTPassiveDefense() -

Evasion passive defense.

-
CONTROLLABLE:OptionROTPassiveDefensePossible() -

Can the CONTROLLABLE evade using passive defenses?

-
CONTROLLABLE:OptionROTVertical() -

Evade on fire using vertical manoeuvres.

-
CONTROLLABLE:OptionROTVerticalPossible() -

Can the CONTROLLABLE evade on fire using vertical manoeuvres?

-
CONTROLLABLE:PopCurrentTask() -

Popping current Task from the controllable.

-
CONTROLLABLE:PushTask(DCSTask, WaitTime) -

Pushing Task on the queue from the controllable.

-
CONTROLLABLE:Route(GoPoints) -

Make the controllable to follow a given route.

-
CONTROLLABLE:RouteToVec2(Point, Speed) -

(AIR + GROUND) Make the Controllable move to fly to a given point.

-
CONTROLLABLE:RouteToVec3(Point, Speed) -

(AIR + GROUND) Make the Controllable move to a given point.

-
CONTROLLABLE:SetCommand(DCSCommand) -

Executes a command action

-
CONTROLLABLE:SetTask(DCSTask, WaitTime) -

Clearing the Task Queue and Setting the Task on the queue from the controllable.

-
CONTROLLABLE:TaskAttackGroup(AttackGroup, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit) -

(AIR) Attack a Controllable.

-
CONTROLLABLE:TaskAttackMapObject(Vec2, WeaponType, WeaponExpend, AttackQty, Direction, ControllableAttack) -

(AIR) Attacking the map object (building, structure, e.t.c).

-
CONTROLLABLE:TaskAttackUnit(AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, WeaponType) -

(AIR) Attack the Unit.

-
CONTROLLABLE:TaskBombing(Vec2, WeaponType, WeaponExpend, AttackQty, Direction, ControllableAttack) -

(AIR) Delivering weapon at the point on the ground.

-
CONTROLLABLE:TaskBombingRunway(Airbase, WeaponType, WeaponExpend, AttackQty, Direction, ControllableAttack) -

(AIR) Delivering weapon on the runway.

-
CONTROLLABLE:TaskCombo(DCSTasks) -

Return a Combo Task taking an array of Tasks.

-
CONTROLLABLE:TaskCondition(time, userFlag, userFlagValue, condition, duration, lastWayPoint) -

Return a condition section for a controlled task.

-
CONTROLLABLE:TaskControlled(DCSTask, DCSStopCondition) -

Return a Controlled Task taking a Task and a TaskCondition.

-
CONTROLLABLE:TaskEmbarkToTransport(Point, Radius) -

Move to a defined Vec2 Point, and embark to a controllable when arrived within a defined Radius.

-
CONTROLLABLE:TaskEmbarking(Point, Duration, EmbarkingControllable) -

(AIR) Move the controllable to a Vec2 Point, wait for a defined duration and embark a controllable.

-
CONTROLLABLE:TaskEscort(EscortControllable, Vec3, LastWaypointIndex, EngagementDistanceMax, TargetTypes, FollowControllable, EngagementDistance) -

(AIR) Escort another airborne controllable.

-
CONTROLLABLE:TaskFAC_AttackGroup(AttackGroup, WeaponType, Designation, Datalink) -

(AIR + GROUND) The task makes the controllable/unit a FAC and orders the FAC to control the target (enemy ground controllable) destruction.

-
CONTROLLABLE:TaskFireAtPoint(Vec2, Radius, AmmoCount) -

(GROUND) Fire at a VEC2 point until ammunition is finished.

-
CONTROLLABLE:TaskFollow(FollowControllable, Vec3, LastWaypointIndex) -

(AIR) Following another airborne controllable.

-
CONTROLLABLE:TaskFunction(WayPoint, WayPointIndex, FunctionString, FunctionArguments) - -
CONTROLLABLE:TaskHold() -

(GROUND) Hold ground controllable from moving.

-
CONTROLLABLE:TaskHoldPosition(Duration) -

(AIR) Hold position at the current position of the first unit of the controllable.

-
CONTROLLABLE:TaskLandAtVec2(Point, Duration) -

(AIR HELICOPTER) Landing at the ground.

-
CONTROLLABLE:TaskLandAtZone(Zone, Duration, RandomPoint) -

(AIR) Land the controllable at a @{Zone#ZONE_RADIUS).

-
CONTROLLABLE:TaskMission(TaskMission) -

(AIR + GROUND) Return a mission task from a mission template.

-
CONTROLLABLE:TaskOrbitCircle(Altitude, Speed) -

(AIR) Orbit at the current position of the first unit of the controllable at a specified alititude.

-
CONTROLLABLE:TaskOrbitCircleAtVec2(Point, Altitude, Speed) -

(AIR) Orbit at a specified position at a specified alititude during a specified duration with a specified speed.

-
CONTROLLABLE:TaskRefueling() -

(AIR) Refueling from the nearest tanker.

-
CONTROLLABLE:TaskRoute(Points) -

Return a Misson task to follow a given route defined by Points.

-
CONTROLLABLE:TaskRouteToZone(Zone, Randomize, Speed, Formation) -

(AIR + GROUND) Route the controllable to a given zone.

-
CONTROLLABLE:TaskWrappedAction(DCSCommand, Index) -

Return a WrappedAction Task taking a Command.

-
CONTROLLABLE:WayPointExecute(WayPoint, WaitTime) -

Executes the WayPoint plan.

-
CONTROLLABLE:WayPointFunction(WayPoint, WayPointIndex, WayPointFunction, ...) -

Registers a waypoint function that will be executed when the controllable moves over the WayPoint.

-
CONTROLLABLE.WayPointFunctions - -
CONTROLLABLE:WayPointInitialize(WayPoints) -

Retrieve the controllable mission and allow to place function hooks within the mission waypoint plan.

-
CONTROLLABLE.WayPoints - -
CONTROLLABLE:_GetController() -

Get the controller for the CONTROLLABLE.

-
- -

Global(s)

-
-
- - #CONTROLLABLE - -CONTROLLABLE - -
-
- - - -
-
-

Type Controllable

- -

Type CONTROLLABLE

- -

The CONTROLLABLE class

- -

Field(s)

-
-
- - #string - -CONTROLLABLE.ClassName - -
-
- - - -
-
-
-
- - -CONTROLLABLE:ClearTasks() - -
-
- -

Clear all tasks from the controllable.

- -

Return value

- -

#CONTROLLABLE:

- - -
-
-
-
- - -CONTROLLABLE:CommandDoScript(DoScript) - -
-
- -

Do Script command

- -

Parameter

-
    -
  • - -

    #string DoScript :

    - -
  • -
-

Return value

- -

#DCSCommand:

- - -
-
-
-
- - -CONTROLLABLE:CommandStopRoute(StopRoute) - -
-
- -

Create a stop route command, which returns a string containing the command.

- - -

Use the result in the method CONTROLLABLE.SetCommand(). -A value of true will make the ground group stop, a value of false will make it continue. -Note that this can only work on GROUP level, although individual UNITs can be commanded, the whole GROUP will react.

- -

Example missions:

- -
    -
  • GRP-310 -
  • -
- -

Parameter

-
    -
  • - -

    #boolean StopRoute : -true if the ground unit needs to stop, false if it needs to continue to move.

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task:

- - -
-
-
-
- - -CONTROLLABLE:CommandSwitchWayPoint(FromWayPoint, ToWayPoint) - -
-
- -

Perform a switch waypoint command

- -

Parameters

-
    -
  • - -

    #number FromWayPoint :

    - -
  • -
  • - -

    #number ToWayPoint :

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task:

- - -

Usage:

-
--- This test demonstrates the use(s) of the SwitchWayPoint method of the GROUP class.
-HeliGroup = GROUP:FindByName( "Helicopter" )
-
---- Route the helicopter back to the FARP after 60 seconds.
--- We use the SCHEDULER class to do this.
-SCHEDULER:New( nil,
-  function( HeliGroup )
-   local CommandRTB = HeliGroup:CommandSwitchWayPoint( 2, 8 )
-   HeliGroup:SetCommand( CommandRTB )
- end, { HeliGroup }, 90 
-)
- -
-
-
-
- - #string - -CONTROLLABLE.ControllableName - -
-
- -

The name of the controllable.

- -
-
-
-
- - -CONTROLLABLE:CopyRoute(Begin, End, Randomize, Radius) - -
-
- -

Return the route of a controllable by using the Database#DATABASE class.

- -

Parameters

-
    -
  • - -

    #number Begin : -The route point from where the copy will start. The base route point is 0.

    - -
  • -
  • - -

    #number End : -The route point where the copy will end. The End point is the last point - the End point. The last point has base 0.

    - -
  • -
  • - -

    #boolean Randomize : -Randomization of the route, when true.

    - -
  • -
  • - -

    #number Radius : -When randomization is on, the randomization is within the radius.

    - -
  • -
-
-
-
-
- - Dcs.DCSWrapper.Controllable#Controllable - -CONTROLLABLE.DCSControllable - -
-
- -

The DCS controllable class.

- -
-
-
-
- - -CONTROLLABLE:EnRouteTaskAWACS() - -
-
- -

(AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts).

- - -

No parameters.

- -

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:EnRouteTaskEWR() - -
-
- -

(GROUND) Ground unit (EW-radar) will act as an EWR for friendly units (will provide them with information about contacts).

- - -

No parameters.

- -

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:EnRouteTaskEngageGroup(AttackGroup, Priority, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit) - -
-
- -

(AIR) Engaging a controllable.

- - -

The task does not assign the target controllable to the unit/controllable to attack now; it just allows the unit/controllable to engage the target controllable as well as other assigned targets.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE AttackGroup : -The Controllable to be attacked.

    - -
  • -
  • - -

    #number Priority : -All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

    - -
  • -
  • - -

    #number WeaponType : -(optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

    - -
  • -
  • - -

    Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : -(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    - -
  • -
  • - -

    #number AttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    - -
  • -
  • - -

    Dcs.DCSTypes#Azimuth Direction : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    - -
  • -
  • - -

    Dcs.DCSTypes#Distance Altitude : -(optional) Desired attack start altitude. Controllable/aircraft will make its attacks from the altitude. If the altitude is too low or too high to use weapon aircraft/controllable will choose closest altitude to the desired attack start altitude. If the desired altitude is defined controllable/aircraft will not attack from safe altitude.

    - -
  • -
  • - -

    #boolean AttackQtyLimit : -(optional) The flag determines how to interpret attackQty parameter. If the flag is true then attackQty is a limit on maximal attack quantity for "AttackGroup" and "AttackUnit" tasks. If the flag is false then attackQty is a desired attack quantity for "Bombing" and "BombingRunway" tasks.

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:EnRouteTaskEngageTargets(Distance, TargetTypes, Priority) - -
-
- -

(AIR) Engaging targets of defined types.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Distance Distance : -Maximal distance from the target to a route leg. If the target is on a greater distance it will be ignored.

    - -
  • -
  • - -

    Dcs.DCSTypes#AttributeNameArray TargetTypes : -Array of target categories allowed to engage.

    - -
  • -
  • - -

    #number Priority : -All enroute tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:EnRouteTaskEngageUnit(EngageUnit, Priority, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, ControllableAttack) - -
-
- -

(AIR) Search and attack the Unit.

- -

Parameters

-
    -
  • - -

    Wrapper.Unit#UNIT EngageUnit : -The UNIT.

    - -
  • -
  • - -

    #number Priority : -(optional) All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

    - -
  • -
  • - -

    #boolean GroupAttack : -(optional) If true, all units in the group will attack the Unit when found.

    - -
  • -
  • - -

    Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : -(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    - -
  • -
  • - -

    #number AttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    - -
  • -
  • - -

    Dcs.DCSTypes#Azimuth Direction : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    - -
  • -
  • - -

    Dcs.DCSTypes#Distance Altitude : -(optional) Desired altitude to perform the unit engagement.

    - -
  • -
  • - -

    #boolean Visible : -(optional) Unit must be visible.

    - -
  • -
  • - -

    #boolean ControllableAttack : -(optional) Flag indicates that the target must be engaged by all aircrafts of the controllable. Has effect only if the task is assigned to a controllable, not to a single aircraft.

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:EnRouteTaskFAC(Radius, Priority) - -
-
- -

(AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose a targets (enemy ground controllable) around as well as other assigned targets.

- - -

The killer is player-controlled allied CAS-aircraft that is in contact with the FAC. -If the task is assigned to the controllable lead unit will be a FAC.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Distance Radius : - The maximal distance from the FAC to a target.

    - -
  • -
  • - -

    #number Priority : -All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:EnRouteTaskFAC_EngageGroup(AttackGroup, Priority, WeaponType, Designation, Datalink) - -
-
- -

(AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose the target (enemy ground controllable) as well as other assigned targets.

- - -

The killer is player-controlled allied CAS-aircraft that is in contact with the FAC. -If the task is assigned to the controllable lead unit will be a FAC.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE AttackGroup : -Target CONTROLLABLE.

    - -
  • -
  • - -

    #number Priority : -All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

    - -
  • -
  • - -

    #number WeaponType : -Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

    - -
  • -
  • - -

    Dcs.DCSTypes#AI.Task.Designation Designation : -(optional) Designation type.

    - -
  • -
  • - -

    #boolean Datalink : -(optional) Allows to use datalink to send the target information to attack aircraft. Enabled by default.

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:EnRouteTaskTanker() - -
-
- -

(AIR) Aircraft will act as a tanker for friendly units.

- - -

No parameters.

- -

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:GetDetectedTargets(DetectVisual, DetectOptical, DetectRadar, DetectIRST, DetectRWR, DetectDLINK) - -
-
- -

Return the detected targets of the controllable.

- - -

The optional parametes specify the detection methods that can be applied. -If no detection method is given, the detection will use all the available methods by default.

- -

Parameters

-
    -
  • - -

    #boolean DetectVisual : -(optional)

    - -
  • -
  • - -

    #boolean DetectOptical : -(optional)

    - -
  • -
  • - -

    #boolean DetectRadar : -(optional)

    - -
  • -
  • - -

    #boolean DetectIRST : -(optional)

    - -
  • -
  • - -

    #boolean DetectRWR : -(optional)

    - -
  • -
  • - -

    #boolean DetectDLINK : -(optional)

    - -
  • -
-

Return value

- -

#table: -DetectedTargets

- -
-
-
-
- - -CONTROLLABLE:GetLife() - -
-
- -

Returns the health.

- - -

Dead controllables have health <= 1.0.

- -

Return values

-
    -
  1. - -

    #number: -The controllable health value (unit or group average).

    - -
  2. -
  3. - -

    #nil: -The controllable is not existing or alive.

    - -
  4. -
-
-
-
-
- - -CONTROLLABLE:GetTaskMission() - -
-
- -

Return the mission template of the controllable.

- -

Return value

- -

#table: -The MissionTemplate -TODO: Rework the method how to retrieve a template ...

- -
-
-
-
- - -CONTROLLABLE:GetTaskRoute() - -
-
- -

Return the mission route of the controllable.

- -

Return value

- -

#table: -The mission route defined by points.

- -
-
-
-
- - -CONTROLLABLE:GetUnits() - -
-
- -

Returns the UNITs wrappers of the DCS Units of the Controllable (default is a GROUP).

- -

Return value

- -

#list: -Wrapper.Unit#UNIT> The UNITs wrappers.

- -
-
-
-
- - -CONTROLLABLE:GetWayPoints() - -
-
- -

Get the current WayPoints set with the WayPoint functions( Note that the WayPoints can be nil, although there ARE waypoints).

- -

Return value

- -

#table: -WayPoints If WayPoints is given, then return the WayPoints structure.

- -
-
-
-
- - -CONTROLLABLE:IsTargetDetected(DCSObject) - -
-
- - - -

Parameter

-
    -
  • - -

    DCSObject :

    - -
  • -
-
-
-
-
- - -CONTROLLABLE:New(ControllableName) - -
-
- -

Create a new CONTROLLABLE from a DCSControllable

- -

Parameter

- -

Return value

- -

#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:OptionROEHoldFire() - -
-
- -

Holding weapons.

- -

Return value

- -

Wrapper.Controllable#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:OptionROEHoldFirePossible() - -
-
- -

Can the CONTROLLABLE hold their weapons?

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -CONTROLLABLE:OptionROEOpenFire() - -
-
- -

Openfire.

- -

Return value

- -

#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:OptionROEOpenFirePossible() - -
-
- -

Can the CONTROLLABLE attack designated targets?

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -CONTROLLABLE:OptionROEReturnFire() - -
-
- -

Return fire.

- -

Return value

- -

#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:OptionROEReturnFirePossible() - -
-
- -

Can the CONTROLLABLE attack returning on enemy fire?

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -CONTROLLABLE:OptionROEWeaponFree() - -
-
- -

Weapon free.

- -

Return value

- -

#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:OptionROEWeaponFreePossible() - -
-
- -

Can the CONTROLLABLE attack targets of opportunity?

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -CONTROLLABLE:OptionROTEvadeFire() - -
-
- -

Evade on fire.

- -

Return value

- -

#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:OptionROTEvadeFirePossible() - -
-
- -

Can the CONTROLLABLE evade on enemy fire?

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -CONTROLLABLE:OptionROTNoReaction() - -
-
- -

No evasion on enemy threats.

- -

Return value

- -

#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:OptionROTNoReactionPossible() - -
-
- -

Can the CONTROLLABLE ignore enemy fire?

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -CONTROLLABLE:OptionROTPassiveDefense() - -
-
- -

Evasion passive defense.

- -

Return value

- -

#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:OptionROTPassiveDefensePossible() - -
-
- -

Can the CONTROLLABLE evade using passive defenses?

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -CONTROLLABLE:OptionROTVertical() - -
-
- -

Evade on fire using vertical manoeuvres.

- -

Return value

- -

#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:OptionROTVerticalPossible() - -
-
- -

Can the CONTROLLABLE evade on fire using vertical manoeuvres?

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -CONTROLLABLE:PopCurrentTask() - -
-
- -

Popping current Task from the controllable.

- -

Return value

- -

Wrapper.Controllable#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:PushTask(DCSTask, WaitTime) - -
-
- -

Pushing Task on the queue from the controllable.

- -

Parameters

-
    -
  • - -

    DCSTask :

    - -
  • -
  • - -

    WaitTime :

    - -
  • -
-

Return value

- -

Wrapper.Controllable#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:Route(GoPoints) - -
-
- -

Make the controllable to follow a given route.

- -

Parameter

-
    -
  • - -

    #table GoPoints : -A table of Route Points.

    - -
  • -
-

Return value

- -

#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:RouteToVec2(Point, Speed) - -
-
- -

(AIR + GROUND) Make the Controllable move to fly to a given point.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Vec3 Point : -The destination point in Vec3 format.

    - -
  • -
  • - -

    #number Speed : -The speed to travel.

    - -
  • -
-

Return value

- -

#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:RouteToVec3(Point, Speed) - -
-
- -

(AIR + GROUND) Make the Controllable move to a given point.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Vec3 Point : -The destination point in Vec3 format.

    - -
  • -
  • - -

    #number Speed : -The speed to travel.

    - -
  • -
-

Return value

- -

#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:SetCommand(DCSCommand) - -
-
- -

Executes a command action

- -

Parameter

- -

Return value

- -

#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:SetTask(DCSTask, WaitTime) - -
-
- -

Clearing the Task Queue and Setting the Task on the queue from the controllable.

- -

Parameters

-
    -
  • - -

    DCSTask :

    - -
  • -
  • - -

    WaitTime :

    - -
  • -
-

Return value

- -

Wrapper.Controllable#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:TaskAttackGroup(AttackGroup, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit) - -
-
- -

(AIR) Attack a Controllable.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE AttackGroup : -The Controllable to be attacked.

    - -
  • -
  • - -

    #number WeaponType : -(optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

    - -
  • -
  • - -

    Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : -(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    - -
  • -
  • - -

    #number AttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    - -
  • -
  • - -

    Dcs.DCSTypes#Azimuth Direction : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    - -
  • -
  • - -

    Dcs.DCSTypes#Distance Altitude : -(optional) Desired attack start altitude. Controllable/aircraft will make its attacks from the altitude. If the altitude is too low or too high to use weapon aircraft/controllable will choose closest altitude to the desired attack start altitude. If the desired altitude is defined controllable/aircraft will not attack from safe altitude.

    - -
  • -
  • - -

    #boolean AttackQtyLimit : -(optional) The flag determines how to interpret attackQty parameter. If the flag is true then attackQty is a limit on maximal attack quantity for "AttackGroup" and "AttackUnit" tasks. If the flag is false then attackQty is a desired attack quantity for "Bombing" and "BombingRunway" tasks.

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:TaskAttackMapObject(Vec2, WeaponType, WeaponExpend, AttackQty, Direction, ControllableAttack) - -
-
- -

(AIR) Attacking the map object (building, structure, e.t.c).

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Vec2 Vec2 : -2D-coordinates of the point the map object is closest to. The distance between the point and the map object must not be greater than 2000 meters. Object id is not used here because Mission Editor doesn't support map object identificators.

    - -
  • -
  • - -

    #number WeaponType : -(optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

    - -
  • -
  • - -

    Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : -(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    - -
  • -
  • - -

    #number AttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    - -
  • -
  • - -

    Dcs.DCSTypes#Azimuth Direction : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    - -
  • -
  • - -

    #boolean ControllableAttack : -(optional) Flag indicates that the target must be engaged by all aircrafts of the controllable. Has effect only if the task is assigned to a controllable, not to a single aircraft.

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:TaskAttackUnit(AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, WeaponType) - -
-
- -

(AIR) Attack the Unit.

- -

Parameters

-
    -
  • - -

    Wrapper.Unit#UNIT AttackUnit : -The UNIT.

    - -
  • -
  • - -

    #boolean GroupAttack : -(optional) If true, all units in the group will attack the Unit when found.

    - -
  • -
  • - -

    Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : -(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    - -
  • -
  • - -

    #number AttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    - -
  • -
  • - -

    Dcs.DCSTypes#Azimuth Direction : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    - -
  • -
  • - -

    #number Altitude : -(optional) The altitude from where to attack.

    - -
  • -
  • - -

    #boolean Visible : -(optional) not a clue.

    - -
  • -
  • - -

    #number WeaponType : -(optional) The WeaponType.

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:TaskBombing(Vec2, WeaponType, WeaponExpend, AttackQty, Direction, ControllableAttack) - -
-
- -

(AIR) Delivering weapon at the point on the ground.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Vec2 Vec2 : -2D-coordinates of the point to deliver weapon at.

    - -
  • -
  • - -

    #number WeaponType : -(optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

    - -
  • -
  • - -

    Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : -(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    - -
  • -
  • - -

    #number AttackQty : -(optional) Desired quantity of passes. The parameter is not the same in AttackGroup and AttackUnit tasks.

    - -
  • -
  • - -

    Dcs.DCSTypes#Azimuth Direction : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    - -
  • -
  • - -

    #boolean ControllableAttack : -(optional) Flag indicates that the target must be engaged by all aircrafts of the controllable. Has effect only if the task is assigned to a controllable, not to a single aircraft.

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:TaskBombingRunway(Airbase, WeaponType, WeaponExpend, AttackQty, Direction, ControllableAttack) - -
-
- -

(AIR) Delivering weapon on the runway.

- -

Parameters

-
    -
  • - -

    Wrapper.Airbase#AIRBASE Airbase : -Airbase to attack.

    - -
  • -
  • - -

    #number WeaponType : -(optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

    - -
  • -
  • - -

    Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : -(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    - -
  • -
  • - -

    #number AttackQty : -(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    - -
  • -
  • - -

    Dcs.DCSTypes#Azimuth Direction : -(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    - -
  • -
  • - -

    #boolean ControllableAttack : -(optional) Flag indicates that the target must be engaged by all aircrafts of the controllable. Has effect only if the task is assigned to a controllable, not to a single aircraft.

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:TaskCombo(DCSTasks) - -
-
- -

Return a Combo Task taking an array of Tasks.

- -

Parameter

- -

Return value

- -

Dcs.DCSTasking.Task#Task:

- - -
-
-
-
- - -CONTROLLABLE:TaskCondition(time, userFlag, userFlagValue, condition, duration, lastWayPoint) - -
-
- -

Return a condition section for a controlled task.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTime#Time time :

    - -
  • -
  • - -

    #string userFlag :

    - -
  • -
  • - -

    #boolean userFlagValue :

    - -
  • -
  • - -

    #string condition :

    - -
  • -
  • - -

    Dcs.DCSTime#Time duration :

    - -
  • -
  • - -

    #number lastWayPoint : -return Dcs.DCSTasking.Task#Task

    - -
  • -
-
-
-
-
- - -CONTROLLABLE:TaskControlled(DCSTask, DCSStopCondition) - -
-
- -

Return a Controlled Task taking a Task and a TaskCondition.

- -

Parameters

- -

Return value

- -

Dcs.DCSTasking.Task#Task:

- - -
-
-
-
- - -CONTROLLABLE:TaskEmbarkToTransport(Point, Radius) - -
-
- -

Move to a defined Vec2 Point, and embark to a controllable when arrived within a defined Radius.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Vec2 Point : -The point where to wait.

    - -
  • -
  • - -

    #number Radius : -The radius of the embarking zone around the Point.

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:TaskEmbarking(Point, Duration, EmbarkingControllable) - -
-
- -

(AIR) Move the controllable to a Vec2 Point, wait for a defined duration and embark a controllable.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Vec2 Point : -The point where to wait.

    - -
  • -
  • - -

    #number Duration : -The duration in seconds to wait.

    - -
  • -
  • - -

    #CONTROLLABLE EmbarkingControllable : -The controllable to be embarked.

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure

- -
-
-
-
- - -CONTROLLABLE:TaskEscort(EscortControllable, Vec3, LastWaypointIndex, EngagementDistanceMax, TargetTypes, FollowControllable, EngagementDistance) - -
-
- -

(AIR) Escort another airborne controllable.

- - -

The unit / controllable will follow lead unit of another controllable, wingmens of both controllables will continue following their leaders. -The unit / controllable will also protect that controllable from threats of specified types.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE EscortControllable : -The controllable to be escorted.

    - -
  • -
  • - -

    Dcs.DCSTypes#Vec3 Vec3 : -Position of the unit / lead unit of the controllable relative lead unit of another controllable in frame reference oriented by course of lead unit of another controllable. If another controllable is on land the unit / controllable will orbit around.

    - -
  • -
  • - -

    #number LastWaypointIndex : -Detach waypoint of another controllable. Once reached the unit / controllable Follow task is finished.

    - -
  • -
  • - -

    #number EngagementDistanceMax : -Maximal distance from escorted controllable to threat. If the threat is already engaged by escort escort will disengage if the distance becomes greater than 1.5 * engagementDistMax.

    - -
  • -
  • - -

    Dcs.DCSTypes#AttributeNameArray TargetTypes : -Array of AttributeName that is contains threat categories allowed to engage.

    - -
  • -
  • - -

    FollowControllable :

    - -
  • -
  • - -

    EngagementDistance :

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:TaskFAC_AttackGroup(AttackGroup, WeaponType, Designation, Datalink) - -
-
- -

(AIR + GROUND) The task makes the controllable/unit a FAC and orders the FAC to control the target (enemy ground controllable) destruction.

- - -

The killer is player-controlled allied CAS-aircraft that is in contact with the FAC. -If the task is assigned to the controllable lead unit will be a FAC.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE AttackGroup : -Target CONTROLLABLE.

    - -
  • -
  • - -

    #number WeaponType : -Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

    - -
  • -
  • - -

    Dcs.DCSTypes#AI.Task.Designation Designation : -(optional) Designation type.

    - -
  • -
  • - -

    #boolean Datalink : -(optional) Allows to use datalink to send the target information to attack aircraft. Enabled by default.

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:TaskFireAtPoint(Vec2, Radius, AmmoCount) - -
-
- -

(GROUND) Fire at a VEC2 point until ammunition is finished.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Vec2 Vec2 : -The point to fire at.

    - -
  • -
  • - -

    Dcs.DCSTypes#Distance Radius : -The radius of the zone to deploy the fire at.

    - -
  • -
  • - -

    #number AmmoCount : -(optional) Quantity of ammunition to expand (omit to fire until ammunition is depleted).

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:TaskFollow(FollowControllable, Vec3, LastWaypointIndex) - -
-
- -

(AIR) Following another airborne controllable.

- - -

The unit / controllable will follow lead unit of another controllable, wingmens of both controllables will continue following their leaders. -If another controllable is on land the unit / controllable will orbit around.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE FollowControllable : -The controllable to be followed.

    - -
  • -
  • - -

    Dcs.DCSTypes#Vec3 Vec3 : -Position of the unit / lead unit of the controllable relative lead unit of another controllable in frame reference oriented by course of lead unit of another controllable. If another controllable is on land the unit / controllable will orbit around.

    - -
  • -
  • - -

    #number LastWaypointIndex : -Detach waypoint of another controllable. Once reached the unit / controllable Follow task is finished.

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:TaskFunction(WayPoint, WayPointIndex, FunctionString, FunctionArguments) - -
-
- - - -

Parameters

-
    -
  • - -

    WayPoint :

    - -
  • -
  • - -

    WayPointIndex :

    - -
  • -
  • - -

    FunctionString :

    - -
  • -
  • - -

    FunctionArguments :

    - -
  • -
-
-
-
-
- - -CONTROLLABLE:TaskHold() - -
-
- -

(GROUND) Hold ground controllable from moving.

- -

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:TaskHoldPosition(Duration) - -
-
- -

(AIR) Hold position at the current position of the first unit of the controllable.

- -

Parameter

-
    -
  • - -

    #number Duration : -The maximum duration in seconds to hold the position.

    - -
  • -
-

Return value

- -

#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:TaskLandAtVec2(Point, Duration) - -
-
- -

(AIR HELICOPTER) Landing at the ground.

- - -

For helicopters only.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Vec2 Point : -The point where to land.

    - -
  • -
  • - -

    #number Duration : -The duration in seconds to stay on the ground.

    - -
  • -
-

Return value

- -

#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:TaskLandAtZone(Zone, Duration, RandomPoint) - -
-
- -

(AIR) Land the controllable at a @{Zone#ZONE_RADIUS).

- -

Parameters

-
    -
  • - -

    Core.Zone#ZONE Zone : -The zone where to land.

    - -
  • -
  • - -

    #number Duration : -The duration in seconds to stay on the ground.

    - -
  • -
  • - -

    RandomPoint :

    - -
  • -
-

Return value

- -

#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:TaskMission(TaskMission) - -
-
- -

(AIR + GROUND) Return a mission task from a mission template.

- -

Parameter

-
    -
  • - -

    #table TaskMission : -A table containing the mission task.

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task:

- - -
-
-
-
- - -CONTROLLABLE:TaskOrbitCircle(Altitude, Speed) - -
-
- -

(AIR) Orbit at the current position of the first unit of the controllable at a specified alititude.

- -

Parameters

-
    -
  • - -

    #number Altitude : -The altitude to hold the position.

    - -
  • -
  • - -

    #number Speed : -The speed flying when holding the position.

    - -
  • -
-

Return value

- -

#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:TaskOrbitCircleAtVec2(Point, Altitude, Speed) - -
-
- -

(AIR) Orbit at a specified position at a specified alititude during a specified duration with a specified speed.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Vec2 Point : -The point to hold the position.

    - -
  • -
  • - -

    #number Altitude : -The altitude to hold the position.

    - -
  • -
  • - -

    #number Speed : -The speed flying when holding the position.

    - -
  • -
-

Return value

- -

#CONTROLLABLE: -self

- -
-
-
-
- - -CONTROLLABLE:TaskRefueling() - -
-
- -

(AIR) Refueling from the nearest tanker.

- - -

No parameters.

- -

Return value

- -

Dcs.DCSTasking.Task#Task: -The DCS task structure.

- -
-
-
-
- - -CONTROLLABLE:TaskRoute(Points) - -
-
- -

Return a Misson task to follow a given route defined by Points.

- -

Parameter

-
    -
  • - -

    #table Points : -A table of route points.

    - -
  • -
-

Return value

- -

Dcs.DCSTasking.Task#Task:

- - -
-
-
-
- - -CONTROLLABLE:TaskRouteToZone(Zone, Randomize, Speed, Formation) - -
-
- -

(AIR + GROUND) Route the controllable to a given zone.

- - -

The controllable final destination point can be randomized. -A speed can be given in km/h. -A given formation can be given.

- -

Parameters

-
    -
  • - -

    Core.Zone#ZONE Zone : -The zone where to route to.

    - -
  • -
  • - -

    #boolean Randomize : -Defines whether to target point gets randomized within the Zone.

    - -
  • -
  • - -

    #number Speed : -The speed.

    - -
  • -
  • - -

    Base#FORMATION Formation : -The formation string.

    - -
  • -
-
-
-
-
- - -CONTROLLABLE:TaskWrappedAction(DCSCommand, Index) - -
-
- -

Return a WrappedAction Task taking a Command.

- -

Parameters

- -

Return value

- -

Dcs.DCSTasking.Task#Task:

- - -
-
-
-
- - -CONTROLLABLE:WayPointExecute(WayPoint, WaitTime) - -
-
- -

Executes the WayPoint plan.

- - -

The function gets a WayPoint parameter, that you can use to restart the mission at a specific WayPoint. -Note that when the WayPoint parameter is used, the new start mission waypoint of the controllable will be 1!

- -

Parameters

-
    -
  • - -

    #number WayPoint : -The WayPoint from where to execute the mission.

    - -
  • -
  • - -

    #number WaitTime : -The amount seconds to wait before initiating the mission.

    - -
  • -
-

Return value

- -

#CONTROLLABLE:

- - -
-
-
-
- - -CONTROLLABLE:WayPointFunction(WayPoint, WayPointIndex, WayPointFunction, ...) - -
-
- -

Registers a waypoint function that will be executed when the controllable moves over the WayPoint.

- -

Parameters

-
    -
  • - -

    #number WayPoint : -The waypoint number. Note that the start waypoint on the route is WayPoint 1!

    - -
  • -
  • - -

    #number WayPointIndex : -When defining multiple WayPoint functions for one WayPoint, use WayPointIndex to set the sequence of actions.

    - -
  • -
  • - -

    #function WayPointFunction : -The waypoint function to be called when the controllable moves over the waypoint. The waypoint function takes variable parameters.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#CONTROLLABLE:

- - -
-
-
-
- - - -CONTROLLABLE.WayPointFunctions - -
-
- - - -
-
-
-
- - -CONTROLLABLE:WayPointInitialize(WayPoints) - -
-
- -

Retrieve the controllable mission and allow to place function hooks within the mission waypoint plan.

- - -

Use the method Controllable#CONTROLLABLE to define the hook functions for specific waypoints. - Use the method @{Controllable@CONTROLLABLE:WayPointExecute) to start the execution of the new mission plan. - Note that when WayPointInitialize is called, the Mission of the controllable is RESTARTED!

- -

Parameter

-
    -
  • - -

    #table WayPoints : -If WayPoints is given, then use the route.

    - -
  • -
-

Return value

- -

#CONTROLLABLE:

- - -
-
-
-
- - - -CONTROLLABLE.WayPoints - -
-
- - - -
-
-
-
- - -CONTROLLABLE:_GetController() - -
-
- -

Get the controller for the CONTROLLABLE.

- -

Return value

- -

Dcs.DCSController#Controller:

- - -
-
- -

Type DCSCommand

- -

Type DCSStopCondition

- -

Type list

- -
- -
- - diff --git a/docs/Documentation/DCSAirbase.html b/docs/Documentation/DCSAirbase.html deleted file mode 100644 index bcd075f7d..000000000 --- a/docs/Documentation/DCSAirbase.html +++ /dev/null @@ -1,475 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module DCSAirbase

- - - -

Global(s)

- - - - - -
Airbase - -
-

Type Airbase

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Airbase.Category -

enum contains identifiers of airbase categories.

-
Airbase.Desc -

Airbase descriptor. Airdromes are unique and their types are unique, but helipads and ships are not always unique and may have the same type.

-
Airbase.ID -

Identifier of an airbase. It assigned to an airbase by the Mission Editor automatically. This identifier is used in AI tasks to refer an airbase that exists (spawned and not dead) or not.

-
Airbase.getByName(name) -

Returns airbase by its name.

-
Airbase:getCallsign() -

Returns the airbase's callsign - the localized string.

-
Airbase:getDesc() -

Returns descriptor of the airbase.

-
Airbase.getDescByName(typeName) -

Returns airbase descriptor by type name.

-
Airbase:getID() -

Returns identifier of the airbase.

-
Airbase:getUnit() -

Returns Unit that is corresponded to the airbase.

-
- -

Type Airbase.Category

- - - - - - - - - - - - - -
Airbase.Category.AIRDROME - -
Airbase.Category.HELIPAD - -
Airbase.Category.SHIP - -
- -

Type Airbase.Desc

- - - - - -
Airbase.Desc.category -

Category of the airbase type.

-
- -

Global(s)

-
-
- - #Airbase - -Airbase - -
-
- - - -
-
-

Type DCSAirbase

- -

Type Airbase

- -

Represents airbases: airdromes, helipads and ships with flying decks or landing pads.

- - -

- -

Field(s)

-
-
- - #Airbase.Category - -Airbase.Category - -
-
- -

enum contains identifiers of airbase categories.

- -
-
-
-
- - #Airbase.Desc - -Airbase.Desc - -
-
- -

Airbase descriptor. Airdromes are unique and their types are unique, but helipads and ships are not always unique and may have the same type.

- -
-
-
-
- - #Airbase.ID - -Airbase.ID - -
-
- -

Identifier of an airbase. It assigned to an airbase by the Mission Editor automatically. This identifier is used in AI tasks to refer an airbase that exists (spawned and not dead) or not.

- -
-
-
-
- - -Airbase.getByName(name) - -
-
- -

Returns airbase by its name.

- - -

If no airbase found the function will return nil.

- -

Parameter

-
    -
  • - -

    #string name :

    - -
  • -
-

Return value

- -

#Airbase:

- - -
-
-
-
- - -Airbase:getCallsign() - -
-
- -

Returns the airbase's callsign - the localized string.

- -

Return value

- -

#string:

- - -
-
-
-
- - -Airbase:getDesc() - -
-
- -

Returns descriptor of the airbase.

- -

Return value

- -

#Airbase.Desc:

- - -
-
-
-
- - -Airbase.getDescByName(typeName) - -
-
- -

Returns airbase descriptor by type name.

- - -

If no descriptor is found the function will return nil.

- -

Parameter

-
    -
  • - -

    #TypeName typeName : -Airbase type name.

    - -
  • -
-

Return value

- -

#Airbase.Desc:

- - -
-
-
-
- - -Airbase:getID() - -
-
- -

Returns identifier of the airbase.

- -

Return value

- -

#Airbase.ID:

- - -
-
-
-
- - -Airbase:getUnit() - -
-
- -

Returns Unit that is corresponded to the airbase.

- - -

Works only for ships.

- -

Return value

- -

Wrapper.Unit#Unit:

- - -
-
- -

Type Airbase.Category

- -

Enum contains identifiers of airbase categories.

- -

Field(s)

-
-
- - -Airbase.Category.AIRDROME - -
-
- - - -
-
-
-
- - -Airbase.Category.HELIPAD - -
-
- - - -
-
-
-
- - -Airbase.Category.SHIP - -
-
- - - -
-
- -

Type Airbase.Desc

- -

Airbase descriptor.

- - -

Airdromes are unique and their types are unique, but helipads and ships are not always unique and may have the same type.

- -

Field(s)

-
-
- - #Airbase.Category - -Airbase.Desc.category - -
-
- -

Category of the airbase type.

- -
-
- -

Type Airbase.ID

- -

Type TypeName

- -
- -
- - diff --git a/docs/Documentation/DCSCoalitionObject.html b/docs/Documentation/DCSCoalitionObject.html deleted file mode 100644 index ab1cd3fc9..000000000 --- a/docs/Documentation/DCSCoalitionObject.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module DCSCoalitionObject

- - - -

Global(s)

- - - - - - - - - -
CoalitionObject - -
coalition - -
-

Type CoalitionObject

- - - - - - - - - -
CoalitionObject:getCoalition() -

Returns coalition of the object.

-
CoalitionObject:getCountry() -

Returns object country.

-
- -

Global(s)

-
-
- - #CoalitionObject - -CoalitionObject - -
-
- - - -
-
-
-
- - #coalition - -coalition - -
-
- - - -
-
-

Type DCSCoalitionObject

- -

Type CoalitionObject

-

Field(s)

-
-
- - -CoalitionObject:getCoalition() - -
-
- -

Returns coalition of the object.

- -

Return value

- -

Dcs.DCSTypes#coalition.side:

- - -
-
-
-
- - -CoalitionObject:getCountry() - -
-
- -

Returns object country.

- -

Return value

- -

#country.id:

- - -
-
- -

Type coalition

- -

Type country.id

- -
- -
- - diff --git a/docs/Documentation/DCSCommand.html b/docs/Documentation/DCSCommand.html deleted file mode 100644 index 8f1be1fb1..000000000 --- a/docs/Documentation/DCSCommand.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - -
-
- -
-
-
- - - diff --git a/docs/Documentation/DCSController.html b/docs/Documentation/DCSController.html deleted file mode 100644 index 180e4d977..000000000 --- a/docs/Documentation/DCSController.html +++ /dev/null @@ -1,750 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module DCSController

- - - -

Global(s)

- - - - - -
Controller - -
-

Type Controller

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Controller.Detection -

Enum contains identifiers of surface types.

-
Controller:getDetectedTargets(detection) -

Returns list of detected targets.

-
Controller:hasTask() -

Returns true if the controller has a task.

-
Controller:isTargetDetected(target, detection) -

Checks if the target is detected or not.

-
Controller:knowTarget(object, type, distance) -

Know a target.

-
Controller:popTask() -

Pops current (front) task from the queue and makes active next task in the queue (if exists).

-
Controller:pushTask(task) -

Pushes the task to the front of the queue and makes the task active.

-
Controller:resetTask() -

Resets current task of the controller.

-
Controller:setOnOff(value) -

Enables and disables the controller.

-
Controller:setOption(optionId, optionValue) -

Sets the option to the controller.

-
Controller:setTask(task) -

Resets current task and then sets the task to the controller.

-
- -

Type Controller.Detection

- - - - - - - - - - - - - - - - - - - - - - - - - -
Controller.Detection.DLINK - -
Controller.Detection.IRST - -
Controller.Detection.OPTIC - -
Controller.Detection.RADAR - -
Controller.Detection.RWR - -
Controller.Detection.VISUAL - -
- -

Type DetectedTarget

- - - - - - - - - - - - - - - - - -
DetectedTarget.distance -

Distance to the target is known

-
DetectedTarget.object -

The target

-
DetectedTarget.type -

The target type is known

-
DetectedTarget.visible -

The target is visible

-
- -

Global(s)

-
-
- - #Controller - -Controller - -
-
- - - -
-
-

Type DCSController

- -

Type Controller

- -

Controller is an object that performs A.I.-routines.

- - -

Other words controller is an instance of A.I.. Controller stores current main task, active enroute tasks and behavior options. Controller performs commands. Please, read DCS A-10C GUI Manual EN.pdf chapter "Task Planning for Unit Groups", page 91 to understand A.I. system of DCS:A-10C.

- -

This class has 2 types of functions:

- -
    -
  • Tasks
  • -
  • Commands: Commands are instant actions those required zero time to perform. Commands may be used both for control unit/group behavior and control game mechanics.
  • -
- -

Field(s)

-
-
- - #Controller.Detection - -Controller.Detection - -
-
- -

Enum contains identifiers of surface types.

- -
-
-
-
- - -Controller:getDetectedTargets(detection) - -
-
- -

Returns list of detected targets.

- - -

If one or more detection method is specified the function will return targets which were detected by at least one of these methods. If no detection methods are specified the function will return targets which were detected by any method.

- -

Parameter

-
    -
  • - -

    #Controller.Detection detection : -Controller.Detection detection1, Controller.Detection detection2, ... Controller.Detection detectionN

    - -
  • -
-

Return value

- -

#list:

-

DetectedTarget> array of DetectedTarget

- -
-
-
-
- - -Controller:hasTask() - -
-
- -

Returns true if the controller has a task.

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -Controller:isTargetDetected(target, detection) - -
-
- -

Checks if the target is detected or not.

- - -

If one or more detection method is specified the function will return true if the target is detected by at least one of these methods. If no detection methods are specified the function will return true if the target is detected by any method.

- -

Parameters

- -

Return values

-
    -
  1. - -

    #boolean: -detected True if the target is detected.

    - -
  2. -
  3. - -

    #boolean: -visible Has effect only if detected is true. True if the target is visible now.

    - -
  4. -
  5. - -

    #ModelTime: -lastTime Has effect only if visible is false. Last time when target was seen.

    - -
  6. -
  7. - -

    #boolean: -type Has effect only if detected is true. True if the target type is known.

    - -
  8. -
  9. - -

    #boolean: -distance Has effect only if detected is true. True if the distance to the target is known.

    - -
  10. -
  11. - -

    #Vec3: -lastPos Has effect only if visible is false. Last position of the target when it was seen.

    - -
  12. -
  13. - -

    #Vec3: -lastVel Has effect only if visible is false. Last velocity of the target when it was seen.

    - -
  14. -
-
-
-
-
- - -Controller:knowTarget(object, type, distance) - -
-
- -

Know a target.

- -

Parameters

-
    -
  • - -

    Wrapper.Object#Object object : -The target.

    - -
  • -
  • - -

    #boolean type : -Target type is known.

    - -
  • -
  • - -

    #boolean distance : -Distance to target is known.

    - -
  • -
-
-
-
-
- - -Controller:popTask() - -
-
- -

Pops current (front) task from the queue and makes active next task in the queue (if exists).

- - -

If no more tasks in the queue the function works like function Controller.resetTask() function. Does nothing if the queue is empty.

- -
-
-
-
- - -Controller:pushTask(task) - -
-
- -

Pushes the task to the front of the queue and makes the task active.

- - -

Further call of function Controller.setTask() function will stop current task, clear the queue and set the new task active. If the task queue is empty the function will work like function Controller.setTask() function.

- -

Parameter

-
    -
  • - -

    #Task task :

    - -
  • -
-
-
-
-
- - -Controller:resetTask() - -
-
- -

Resets current task of the controller.

- -
-
-
-
- - -Controller:setOnOff(value) - -
-
- -

Enables and disables the controller.

- - -

Note: Now it works only for ground / naval groups!

- -

Parameter

-
    -
  • - -

    #boolean value : -Enable / Disable.

    - -
  • -
-
-
-
-
- - -Controller:setOption(optionId, optionValue) - -
-
- -

Sets the option to the controller.

- - -

Option is a pair of identifier and value. Behavior options are global parameters those affect controller behavior in all tasks it performs. -Option identifiers and values are stored in table AI.Option in subtables Air, Ground and Naval.

- -

OptionId = AI.Option.Air.id or AI.Option.Ground.id or AI.Option.Naval.id -OptionValue = AI.Option.Air.val[optionName] or AI.Option.Ground.val[optionName] or AI.Option.Naval.val[optionName]

- - -

Parameters

-
    -
  • - -

    #OptionId optionId : -Option identifier.

    - -
  • -
  • - -

    #OptionValue optionValue : -Value of the option.

    - -
  • -
-
-
-
-
- - -Controller:setTask(task) - -
-
- -

Resets current task and then sets the task to the controller.

- - -

Task is a table that contains task identifier and task parameters.

- -

Parameter

-
    -
  • - -

    #Task task :

    - -
  • -
-
-
- -

Type Controller.Detection

- -

Enum contains identifiers of surface types.

- -

Field(s)

-
-
- - -Controller.Detection.DLINK - -
-
- - - -
-
-
-
- - -Controller.Detection.IRST - -
-
- - - -
-
-
-
- - -Controller.Detection.OPTIC - -
-
- - - -
-
-
-
- - -Controller.Detection.RADAR - -
-
- - - -
-
-
-
- - -Controller.Detection.RWR - -
-
- - - -
-
-
-
- - -Controller.Detection.VISUAL - -
-
- - - -
-
- -

Type DetectedTarget

- -

Detected target.

- -

Field(s)

-
-
- - #boolean - -DetectedTarget.distance - -
-
- -

Distance to the target is known

- -
-
-
-
- - Wrapper.Object#Object - -DetectedTarget.object - -
-
- -

The target

- -
-
-
-
- - #boolean - -DetectedTarget.type - -
-
- -

The target type is known

- -
-
-
-
- - #boolean - -DetectedTarget.visible - -
-
- -

The target is visible

- -
-
- -

Type ModelTime

- -

Type OptionId

- -

Type OptionValue

- -

Type Task

- -

Type Vec3

- -

Type list

- -
- -
- - diff --git a/docs/Documentation/DCSGroup.html b/docs/Documentation/DCSGroup.html deleted file mode 100644 index 958ed0031..000000000 --- a/docs/Documentation/DCSGroup.html +++ /dev/null @@ -1,582 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module DCSGroup

- - - -

Global(s)

- - - - - -
Group - -
-

Type Group

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Group.Category -

Enum contains identifiers of group types.

-
Group.ID -

Identifier of a group. It is assigned to a group by Mission Editor automatically.

-
Group:destroy() -

Destroys the group and all of its units.

-
Group.getByName(name) -

Returns group by the name assigned to the group in Mission Editor.

-
Group:getCategory() -

Returns category of the group.

-
Group:getCoalition() -

Returns the coalition of the group.

-
Group:getController() -

Returns controller of the group.

-
Group:getID() -

Returns the group identifier.

-
Group:getInitialSize() -

Returns initial size of the group.

-
Group:getName() -

Returns the group's name.

-
Group:getSize() -

Returns current size of the group.

-
Group:getUnit(unitNumber) -

Returns the unit with number unitNumber.

-
Group:getUnits() -

Returns array of the units present in the group now.

-
Group:isExist() -

returns true if the group exist or false otherwise.

-
- -

Type Group.Category

- - - - - - - - - - - - - - - - - -
Group.Category.AIRPLANE - -
Group.Category.GROUND - -
Group.Category.HELICOPTER - -
Group.Category.SHIP - -
- -

Global(s)

-
-
- - #Group - -Group - -
-
- - - -
-
-

Type DCSGroup

- -

Type Group

- -

Represents group of Units.

- -

Field(s)

-
-
- - #Group.Category - -Group.Category - -
-
- -

Enum contains identifiers of group types.

- -
-
-
-
- - #ID - -Group.ID - -
-
- -

Identifier of a group. It is assigned to a group by Mission Editor automatically.

- -
-
-
-
- - -Group:destroy() - -
-
- -

Destroys the group and all of its units.

- -
-
-
-
- - -Group.getByName(name) - -
-
- -

Returns group by the name assigned to the group in Mission Editor.

- -

Parameter

-
    -
  • - -

    #string name :

    - -
  • -
-

Return value

- -

#Group:

- - -
-
-
-
- - -Group:getCategory() - -
-
- -

Returns category of the group.

- -

Return value

- -

#Group.Category:

- - -
-
-
-
- - -Group:getCoalition() - -
-
- -

Returns the coalition of the group.

- -

Return value

- -

Dcs.DCSCoalitionWrapper.Object#coalition.side:

- - -
-
-
-
- - -Group:getController() - -
-
- -

Returns controller of the group.

- -

Return value

- -

Controller#Controller:

- - -
-
-
-
- - -Group:getID() - -
-
- -

Returns the group identifier.

- -

Return value

- -

#ID:

- - -
-
-
-
- - -Group:getInitialSize() - -
-
- -

Returns initial size of the group.

- - -

If some of the units will be destroyed, initial size of the group will not be changed. Initial size limits the unitNumber parameter for Group.getUnit() function.

- -

Return value

- -

#number:

- - -
-
-
-
- - -Group:getName() - -
-
- -

Returns the group's name.

- - -

This is the same name assigned to the group in Mission Editor.

- -

Return value

- -

#string:

- - -
-
-
-
- - -Group:getSize() - -
-
- -

Returns current size of the group.

- - -

If some of the units will be destroyed, As units are destroyed the size of the group will be changed.

- -

Return value

- -

#number:

- - -
-
-
-
- - -Group:getUnit(unitNumber) - -
-
- -

Returns the unit with number unitNumber.

- - -

If the unit is not exists the function will return nil.

- -

Parameter

-
    -
  • - -

    #number unitNumber :

    - -
  • -
-

Return value

- -

Dcs.DCSWrapper.Unit#Unit:

- - -
-
-
-
- - -Group:getUnits() - -
-
- -

Returns array of the units present in the group now.

- - -

Destroyed units will not be enlisted at all.

- -

Return value

- -

#list: -Dcs.DCSWrapper.Unit#Unit> array of Units

- -
-
-
-
- - -Group:isExist() - -
-
- -

returns true if the group exist or false otherwise.

- -

Return value

- -

#boolean:

- - -
-
- -

Type Group.Category

- -

Enum contains identifiers of group types.

- -

Field(s)

-
-
- - -Group.Category.AIRPLANE - -
-
- - - -
-
-
-
- - -Group.Category.GROUND - -
-
- - - -
-
-
-
- - -Group.Category.HELICOPTER - -
-
- - - -
-
-
-
- - -Group.Category.SHIP - -
-
- - - -
-
- -

Type ID

- -

Type list

- -
- -
- - diff --git a/docs/Documentation/DCSObject.html b/docs/Documentation/DCSObject.html deleted file mode 100644 index 88b67d3a5..000000000 --- a/docs/Documentation/DCSObject.html +++ /dev/null @@ -1,603 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module DCSObject

- - - -

Global(s)

- - - - - -
Object - -
-

Type Object

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Object.Category - -
Object.Desc - -
Object:destroy() - -
Object:getCategory() - -
Object:getDesc() -

Returns object descriptor.

-
Object:getName() -

Returns name of the object.

-
Object:getPoint() -

Returns object coordinates for current time.

-
Object:getPosition() -

Returns object position for current time.

-
Object:getTypeName() -

Returns type name of the Object.

-
Object:getVelocity() -

Returns the unit's velocity vector.

-
Object:hasAttribute(attributeName) -

Returns true if the object belongs to the category.

-
Object:inAir() -

Returns true if the unit is in air.

-
Object:isExist() - -
- -

Type Object.Category

- - - - - - - - - - - - - - - - - - - - - -
Object.Category.BASE - -
Object.Category.SCENERY - -
Object.Category.STATIC - -
Object.Category.UNIT - -
Object.Category.WEAPON - -
- -

Type Object.Desc

- - - - - - - - - -
Object.Desc.box -

bounding box of collision geometry

-
Object.Desc.life -

initial life level

-
- -

Global(s)

-
-
- - #Object - -Object - -
-
- - - -
-
-

Type DCSObject

- -

Type AttributeName

- -

Type Box3

- -

Type Object

-

Field(s)

-
-
- - #Object.Category - -Object.Category - -
-
- - - -
-
-
-
- - #Object.Desc - -Object.Desc - -
-
- - - -
-
-
-
- - -Object:destroy() - -
-
- - - -
-
-
-
- - -Object:getCategory() - -
-
- - - -

Return value

- -

#Object.Category:

- - -
-
-
-
- - -Object:getDesc() - -
-
- -

Returns object descriptor.

- -

Return value

- -

#Object.Desc:

- - -
-
-
-
- - -Object:getName() - -
-
- -

Returns name of the object.

- - -

This is the name that is assigned to the object in the Mission Editor.

- -

Return value

- -

#string:

- - -
-
-
-
- - -Object:getPoint() - -
-
- -

Returns object coordinates for current time.

- -

Return value

- -

#Vec3:

- - -
-
-
-
- - -Object:getPosition() - -
-
- -

Returns object position for current time.

- -

Return value

- -

#Position3:

- - -
-
-
-
- - -Object:getTypeName() - -
-
- -

Returns type name of the Object.

- -

Return value

- -

#string:

- - -
-
-
-
- - -Object:getVelocity() - -
-
- -

Returns the unit's velocity vector.

- -

Return value

- -

#Vec3:

- - -
-
-
-
- - -Object:hasAttribute(attributeName) - -
-
- -

Returns true if the object belongs to the category.

- -

Parameter

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -Object:inAir() - -
-
- -

Returns true if the unit is in air.

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -Object:isExist() - -
-
- - - -

Return value

- -

#boolean:

- - -
-
- -

Type Object.Category

-

Field(s)

-
-
- - -Object.Category.BASE - -
-
- - - -
-
-
-
- - -Object.Category.SCENERY - -
-
- - - -
-
-
-
- - -Object.Category.STATIC - -
-
- - - -
-
-
-
- - -Object.Category.UNIT - -
-
- - - -
-
-
-
- - -Object.Category.WEAPON - -
-
- - - -
-
- -

Type Object.Desc

-

Field(s)

-
-
- - #Box3 - -Object.Desc.box - -
-
- -

bounding box of collision geometry

- -
-
-
-
- - #number - -Object.Desc.life - -
-
- -

initial life level

- -
-
- -

Type Position3

- -

Type Vec3

- -
- -
- - diff --git a/docs/Documentation/DCSTask.html b/docs/Documentation/DCSTask.html deleted file mode 100644 index 32a1bd5a7..000000000 --- a/docs/Documentation/DCSTask.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module DCSTask

- - - -

Type Task

- - - - - - - - - -
Task.id - -
Task.param - -
- -

Type DCSTask

- -

Type Task

- -

A task descriptor (internal structure for DCS World)

- -

Field(s)

-
-
- - #string - -Task.id - -
-
- - - -
-
-
-
- - #Task.param - -Task.param - -
-
- - - -
-
- -

Type Task.param

- -

Type TaskArray

- -

List of #Task

- - -
- -
- - diff --git a/docs/Documentation/DCSTypes.html b/docs/Documentation/DCSTypes.html deleted file mode 100644 index eac45e2ae..000000000 --- a/docs/Documentation/DCSTypes.html +++ /dev/null @@ -1,2518 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module DCSTypes

- - - -

Global(s)

- - - - - -
AI - -
-

Type AI

- - - - - - - - - - - - - -
AI.Option - -
AI.Skill - -
AI.Task - -
- -

Type AI.Option

- - - - - - - - - - - - - -
AI.Option.Air - -
AI.Option.Ground - -
AI.Option.Naval - -
- -

Type AI.Option.Air

- - - - - - - - - -
AI.Option.Air.id - -
AI.Option.Air.val - -
- -

Type AI.Option.Air.val

- - - - - - - - - - - - - - - - - -
AI.Option.Air.val.FLARE_USING - -
AI.Option.Air.val.RADAR_USING - -
AI.Option.Air.val.REACTION_ON_THREAT - -
AI.Option.Air.val.ROE - -
- -

Type AI.Option.Air.val.FLARE_USING

- - - - - - - - - - - - - - - - - -
AI.Option.Air.val.FLARE_USING.AGAINST_FIRED_MISSILE - -
AI.Option.Air.val.FLARE_USING.NEVER - -
AI.Option.Air.val.FLARE_USING.WHEN_FLYING_IN_SAM_WEZ - -
AI.Option.Air.val.FLARE_USING.WHEN_FLYING_NEAR_ENEMIES - -
- -

Type AI.Option.Air.val.RADAR_USING

- - - - - - - - - - - - - - - - - -
AI.Option.Air.val.RADAR_USING.FOR_ATTACK_ONLY - -
AI.Option.Air.val.RADAR_USING.FOR_CONTINUOUS_SEARCH - -
AI.Option.Air.val.RADAR_USING.FOR_SEARCH_IF_REQUIRED - -
AI.Option.Air.val.RADAR_USING.NEVER - -
- -

Type AI.Option.Air.val.REACTION_ON_THREAT

- - - - - - - - - - - - - - - - - - - - - -
AI.Option.Air.val.REACTION_ON_THREAT.ALLOW_ABORT_MISSION - -
AI.Option.Air.val.REACTION_ON_THREAT.BYPASS_AND_ESCAPE - -
AI.Option.Air.val.REACTION_ON_THREAT.EVADE_FIRE - -
AI.Option.Air.val.REACTION_ON_THREAT.NO_REACTION - -
AI.Option.Air.val.REACTION_ON_THREAT.PASSIVE_DEFENCE - -
- -

Type AI.Option.Air.val.ROE

- - - - - - - - - - - - - - - - - - - - - -
AI.Option.Air.val.ROE.OPEN_FIRE - -
AI.Option.Air.val.ROE.OPEN_FIRE_WEAPON_FREE - -
AI.Option.Air.val.ROE.RETURN_FIRE - -
AI.Option.Air.val.ROE.WEAPON_FREE - -
AI.Option.Air.val.ROE.WEAPON_HOLD - -
- -

Type AI.Option.Ground

- - - - - - - - - -
AI.Option.Ground.id - -
AI.Option.Ground.val - -
- -

Type AI.Option.Ground.id

- - - - - - - - - - - - - - - - - -
AI.Option.Ground.id.ALARM_STATE -

AI.Option.Ground.val.ALARM_STATE

-
AI.Option.Ground.id.DISPERSE_ON_ATTACK -

true or false

-
AI.Option.Ground.id.NO_OPTION - -
AI.Option.Ground.id.ROE -

AI.Option.Ground.val.ROE

-
- -

Type AI.Option.Ground.val

- - - - - - - - - -
AI.Option.Ground.val.ALARM_STATE - -
AI.Option.Ground.val.ROE - -
- -

Type AI.Option.Ground.val.ALARM_STATE

- - - - - - - - - - - - - -
AI.Option.Ground.val.ALARM_STATE.AUTO - -
AI.Option.Ground.val.ALARM_STATE.GREEN - -
AI.Option.Ground.val.ALARM_STATE.RED - -
- -

Type AI.Option.Ground.val.ROE

- - - - - - - - - - - - - -
AI.Option.Ground.val.ROE.OPEN_FIRE - -
AI.Option.Ground.val.ROE.RETURN_FIRE - -
AI.Option.Ground.val.ROE.WEAPON_HOLD - -
- -

Type AI.Option.Naval

- - - - - - - - - -
AI.Option.Naval.id - -
AI.Option.Naval.val - -
- -

Type AI.Option.Naval.id

- - - - - - - - - -
AI.Option.Naval.id.NO_OPTION - -
AI.Option.Naval.id.ROE - -
- -

Type AI.Option.Naval.val

- - - - - -
AI.Option.Naval.val.ROE - -
- -

Type AI.Option.Naval.val.ROE

- - - - - - - - - - - - - -
AI.Option.Naval.val.ROE.OPEN_FIRE - -
AI.Option.Naval.val.ROE.RETURN_FIRE - -
AI.Option.Naval.val.ROE.WEAPON_HOLD - -
- -

Type AI.Skill

- - - - - - - - - - - - - - - - - - - - - - - - - -
AI.Skill.AVERAGE - -
AI.Skill.CLIENT - -
AI.Skill.EXCELLENT - -
AI.Skill.GOOD - -
AI.Skill.HIGH - -
AI.Skill.PLAYER - -
- -

Type AI.Task

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AI.Task.AltitudeType - -
AI.Task.Designation - -
AI.Task.OrbitPattern - -
AI.Task.TurnMethod - -
AI.Task.VehicleFormation - -
AI.Task.WaypointType - -
AI.Task.WeaponExpend - -
- -

Type AI.Task.AltitudeType

- - - - - - - - - -
AI.Task.AltitudeType.BARO - -
AI.Task.AltitudeType.RADIO - -
- -

Type AI.Task.Designation

- - - - - - - - - - - - - - - - - - - - - -
AI.Task.Designation.AUTO - -
AI.Task.Designation.IR_POINTER - -
AI.Task.Designation.LASER - -
AI.Task.Designation.NO - -
AI.Task.Designation.WP - -
- -

Type AI.Task.OrbitPattern

- - - - - - - - - -
AI.Task.OrbitPattern.CIRCLE - -
AI.Task.OrbitPattern.RACE_TRACK - -
- -

Type AI.Task.TurnMethod

- - - - - - - - - -
AI.Task.TurnMethod.FIN_POINT - -
AI.Task.TurnMethod.FLY_OVER_POINT - -
- -

Type AI.Task.VehicleFormation

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AI.Task.VehicleFormation.CONE - -
AI.Task.VehicleFormation.DIAMOND - -
AI.Task.VehicleFormation.ECHELON_LEFT - -
AI.Task.VehicleFormation.ECHELON_RIGHT - -
AI.Task.VehicleFormation.OFF_ROAD - -
AI.Task.VehicleFormation.ON_ROAD - -
AI.Task.VehicleFormation.RANK - -
AI.Task.VehicleFormation.VEE - -
- -

Type AI.Task.WaypointType

- - - - - - - - - - - - - - - - - -
AI.Task.WaypointType.LAND - -
AI.Task.WaypointType.TAKEOFF - -
AI.Task.WaypointType.TAKEOFF_PARKING - -
AI.Task.WaypointType.TURNING_POINT - -
- -

Type AI.Task.WeaponExpend

- - - - - - - - - - - - - - - - - - - - - - - - - -
AI.Task.WeaponExpend.ALL - -
AI.Task.WeaponExpend.FOUR - -
AI.Task.WeaponExpend.HALF - -
AI.Task.WeaponExpend.ONE - -
AI.Task.WeaponExpend.QUARTER - -
AI.Task.WeaponExpend.TWO - -
- -

Type Box3

- - - - - - - - - -
Box3.max - -
Box3.min - -
- -

Type Desc

- - - - - - - - - - - - - -
Desc.attributes -

object type attributes

-
Desc.displayName -

localized display name

-
Desc.typeName -

type name

-
- -

Type Position3

- - - - - - - - - - - - - - - - - -
Position3.p - -
Position3.x - -
Position3.y - -
Position3.z - -
- -

Type Vec2

- - - - - - - - - -
Vec2.x -

Vec2.x = Vec3.x

-
Vec2.y -

Vec2.y = Vec3.z

-
- -

Type Vec3

- - - - - - - - - - - - - -
Vec3.x -

is directed to the north

-
Vec3.y -

is directed up

-
Vec3.z -

is directed to the east

-
- -

Global(s)

-
-
- - #AI - -AI - -
-
- - - -
-
-

Type DCSTypes

- -

Type AI

-

Field(s)

-
-
- - #AI.Option - -AI.Option - -
-
- - - -
-
-
-
- - #AI.Skill - -AI.Skill - -
-
- - - -
-
-
-
- - #AI.Task - -AI.Task - -
-
- - - -
-
- -

Type AI.Option

-

Field(s)

-
-
- - #AI.Option.Air - -AI.Option.Air - -
-
- - - -
-
-
-
- - #AI.Option.Ground - -AI.Option.Ground - -
-
- - - -
-
-
-
- - #AI.Option.Naval - -AI.Option.Naval - -
-
- - - -
-
- -

Type AI.Option.Air

-

Field(s)

-
-
- - #AI.Option.Air.id - -AI.Option.Air.id - -
-
- - - -
-
-
-
- - #AI.Option.Air.val - -AI.Option.Air.val - -
-
- - - -
-
- -

Type AI.Option.Air.id

- -

Type AI.Option.Air.val

-

Field(s)

-
-
- - #AI.Option.Air.val.FLARE_USING - -AI.Option.Air.val.FLARE_USING - -
-
- - - -
-
-
-
- - #AI.Option.Air.val.RADAR_USING - -AI.Option.Air.val.RADAR_USING - -
-
- - - -
-
-
-
- - #AI.Option.Air.val.REACTION_ON_THREAT - -AI.Option.Air.val.REACTION_ON_THREAT - -
-
- - - -
-
-
-
- - #AI.Option.Air.val.ROE - -AI.Option.Air.val.ROE - -
-
- - - -
-
- -

Type AI.Option.Air.val.FLARE_USING

-

Field(s)

-
-
- - -AI.Option.Air.val.FLARE_USING.AGAINST_FIRED_MISSILE - -
-
- - - -
-
-
-
- - -AI.Option.Air.val.FLARE_USING.NEVER - -
-
- - - -
-
-
-
- - -AI.Option.Air.val.FLARE_USING.WHEN_FLYING_IN_SAM_WEZ - -
-
- - - -
-
-
-
- - -AI.Option.Air.val.FLARE_USING.WHEN_FLYING_NEAR_ENEMIES - -
-
- - - -
-
- -

Type AI.Option.Air.val.RADAR_USING

-

Field(s)

-
-
- - -AI.Option.Air.val.RADAR_USING.FOR_ATTACK_ONLY - -
-
- - - -
-
-
-
- - -AI.Option.Air.val.RADAR_USING.FOR_CONTINUOUS_SEARCH - -
-
- - - -
-
-
-
- - -AI.Option.Air.val.RADAR_USING.FOR_SEARCH_IF_REQUIRED - -
-
- - - -
-
-
-
- - -AI.Option.Air.val.RADAR_USING.NEVER - -
-
- - - -
-
- -

Type AI.Option.Air.val.REACTION_ON_THREAT

-

Field(s)

-
-
- - -AI.Option.Air.val.REACTION_ON_THREAT.ALLOW_ABORT_MISSION - -
-
- - - -
-
-
-
- - -AI.Option.Air.val.REACTION_ON_THREAT.BYPASS_AND_ESCAPE - -
-
- - - -
-
-
-
- - -AI.Option.Air.val.REACTION_ON_THREAT.EVADE_FIRE - -
-
- - - -
-
-
-
- - -AI.Option.Air.val.REACTION_ON_THREAT.NO_REACTION - -
-
- - - -
-
-
-
- - -AI.Option.Air.val.REACTION_ON_THREAT.PASSIVE_DEFENCE - -
-
- - - -
-
- -

Type AI.Option.Air.val.ROE

-

Field(s)

-
-
- - -AI.Option.Air.val.ROE.OPEN_FIRE - -
-
- - - -
-
-
-
- - -AI.Option.Air.val.ROE.OPEN_FIRE_WEAPON_FREE - -
-
- - - -
-
-
-
- - -AI.Option.Air.val.ROE.RETURN_FIRE - -
-
- - - -
-
-
-
- - -AI.Option.Air.val.ROE.WEAPON_FREE - -
-
- - - -
-
-
-
- - -AI.Option.Air.val.ROE.WEAPON_HOLD - -
-
- - - -
-
- -

Type AI.Option.Ground

-

Field(s)

-
-
- - #AI.Option.Ground.id - -AI.Option.Ground.id - -
-
- - - -
-
-
-
- - #AI.Option.Ground.val - -AI.Option.Ground.val - -
-
- - - -
-
- -

Type AI.Option.Ground.id

-

Field(s)

-
-
- - -AI.Option.Ground.id.ALARM_STATE - -
-
- -

AI.Option.Ground.val.ALARM_STATE

- -
-
-
-
- - -AI.Option.Ground.id.DISPERSE_ON_ATTACK - -
-
- -

true or false

- -
-
-
-
- - -AI.Option.Ground.id.NO_OPTION - -
-
- - - -
-
-
-
- - -AI.Option.Ground.id.ROE - -
-
- -

AI.Option.Ground.val.ROE

- -
-
- -

Type AI.Option.Ground.val

-

Field(s)

-
-
- - #AI.Option.Ground.val.ALARM_STATE - -AI.Option.Ground.val.ALARM_STATE - -
-
- - - -
-
-
-
- - #AI.Option.Ground.val.ROE - -AI.Option.Ground.val.ROE - -
-
- - - -
-
- -

Type AI.Option.Ground.val.ALARM_STATE

-

Field(s)

-
-
- - -AI.Option.Ground.val.ALARM_STATE.AUTO - -
-
- - - -
-
-
-
- - -AI.Option.Ground.val.ALARM_STATE.GREEN - -
-
- - - -
-
-
-
- - -AI.Option.Ground.val.ALARM_STATE.RED - -
-
- - - -
-
- -

Type AI.Option.Ground.val.ROE

-

Field(s)

-
-
- - -AI.Option.Ground.val.ROE.OPEN_FIRE - -
-
- - - -
-
-
-
- - -AI.Option.Ground.val.ROE.RETURN_FIRE - -
-
- - - -
-
-
-
- - -AI.Option.Ground.val.ROE.WEAPON_HOLD - -
-
- - - -
-
- -

Type AI.Option.Naval

-

Field(s)

-
-
- - #AI.Option.Naval.id - -AI.Option.Naval.id - -
-
- - - -
-
-
-
- - #AI.Option.Naval.val - -AI.Option.Naval.val - -
-
- - - -
-
- -

Type AI.Option.Naval.id

-

Field(s)

-
-
- - -AI.Option.Naval.id.NO_OPTION - -
-
- - - -
-
-
-
- - -AI.Option.Naval.id.ROE - -
-
- - - -
-
- -

Type AI.Option.Naval.val

-

Field(s)

-
-
- - #AI.Option.Naval.val.ROE - -AI.Option.Naval.val.ROE - -
-
- - - -
-
- -

Type AI.Option.Naval.val.ROE

-

Field(s)

-
-
- - -AI.Option.Naval.val.ROE.OPEN_FIRE - -
-
- - - -
-
-
-
- - -AI.Option.Naval.val.ROE.RETURN_FIRE - -
-
- - - -
-
-
-
- - -AI.Option.Naval.val.ROE.WEAPON_HOLD - -
-
- - - -
-
- -

Type AI.Skill

-

Field(s)

-
-
- - -AI.Skill.AVERAGE - -
-
- - - -
-
-
-
- - -AI.Skill.CLIENT - -
-
- - - -
-
-
-
- - -AI.Skill.EXCELLENT - -
-
- - - -
-
-
-
- - -AI.Skill.GOOD - -
-
- - - -
-
-
-
- - -AI.Skill.HIGH - -
-
- - - -
-
-
-
- - -AI.Skill.PLAYER - -
-
- - - -
-
- -

Type AI.Task

-

Field(s)

-
-
- - #AI.Task.AltitudeType - -AI.Task.AltitudeType - -
-
- - - -
-
-
-
- - #AI.Task.Designation - -AI.Task.Designation - -
-
- - - -
-
-
-
- - #AI.Task.OrbitPattern - -AI.Task.OrbitPattern - -
-
- - - -
-
-
-
- - #AI.Task.TurnMethod - -AI.Task.TurnMethod - -
-
- - - -
-
-
-
- - #AI.Task.VehicleFormation - -AI.Task.VehicleFormation - -
-
- - - -
-
-
-
- - #AI.Task.WaypointType - -AI.Task.WaypointType - -
-
- - - -
-
-
-
- - #AI.Task.WeaponExpend - -AI.Task.WeaponExpend - -
-
- - - -
-
- -

Type AI.Task.AltitudeType

-

Field(s)

-
-
- - -AI.Task.AltitudeType.BARO - -
-
- - - -
-
-
-
- - -AI.Task.AltitudeType.RADIO - -
-
- - - -
-
- -

Type AI.Task.Designation

-

Field(s)

-
-
- - -AI.Task.Designation.AUTO - -
-
- - - -
-
-
-
- - -AI.Task.Designation.IR_POINTER - -
-
- - - -
-
-
-
- - -AI.Task.Designation.LASER - -
-
- - - -
-
-
-
- - -AI.Task.Designation.NO - -
-
- - - -
-
-
-
- - -AI.Task.Designation.WP - -
-
- - - -
-
- -

Type AI.Task.OrbitPattern

-

Field(s)

-
-
- - -AI.Task.OrbitPattern.CIRCLE - -
-
- - - -
-
-
-
- - -AI.Task.OrbitPattern.RACE_TRACK - -
-
- - - -
-
- -

Type AI.Task.TurnMethod

-

Field(s)

-
-
- - -AI.Task.TurnMethod.FIN_POINT - -
-
- - - -
-
-
-
- - -AI.Task.TurnMethod.FLY_OVER_POINT - -
-
- - - -
-
- -

Type AI.Task.VehicleFormation

-

Field(s)

-
-
- - -AI.Task.VehicleFormation.CONE - -
-
- - - -
-
-
-
- - -AI.Task.VehicleFormation.DIAMOND - -
-
- - - -
-
-
-
- - -AI.Task.VehicleFormation.ECHELON_LEFT - -
-
- - - -
-
-
-
- - -AI.Task.VehicleFormation.ECHELON_RIGHT - -
-
- - - -
-
-
-
- - -AI.Task.VehicleFormation.OFF_ROAD - -
-
- - - -
-
-
-
- - -AI.Task.VehicleFormation.ON_ROAD - -
-
- - - -
-
-
-
- - -AI.Task.VehicleFormation.RANK - -
-
- - - -
-
-
-
- - -AI.Task.VehicleFormation.VEE - -
-
- - - -
-
- -

Type AI.Task.WaypointType

-

Field(s)

-
-
- - -AI.Task.WaypointType.LAND - -
-
- - - -
-
-
-
- - -AI.Task.WaypointType.TAKEOFF - -
-
- - - -
-
-
-
- - -AI.Task.WaypointType.TAKEOFF_PARKING - -
-
- - - -
-
-
-
- - -AI.Task.WaypointType.TURNING_POINT - -
-
- - - -
-
- -

Type AI.Task.WeaponExpend

-

Field(s)

-
-
- - -AI.Task.WeaponExpend.ALL - -
-
- - - -
-
-
-
- - -AI.Task.WeaponExpend.FOUR - -
-
- - - -
-
-
-
- - -AI.Task.WeaponExpend.HALF - -
-
- - - -
-
-
-
- - -AI.Task.WeaponExpend.ONE - -
-
- - - -
-
-
-
- - -AI.Task.WeaponExpend.QUARTER - -
-
- - - -
-
-
-
- - -AI.Task.WeaponExpend.TWO - -
-
- - - -
-
- -

Type Angle

- -

An angle type

- - -

Type AttributeName

- -

AttributeName = string -Each object type may have attributes.

- - -

Attributes are enlisted in ./Scripts/Database/db_attributes.Lua. -To know what attributes the object type has, look for the unit type script in sub-directories planes/, helicopter/s, vehicles, navy/ of ./Scripts/Database/ directory.

- - -

Type AttributeNameArray

- -

List of #AttributeName

- - -

Type Azimuth

- -

Azimuth is an angle of rotation around world axis y counter-clockwise.

- - -

Type Box3

- -

3-dimensional box.

- -

Field(s)

-
-
- - #Vec3 - -Box3.max - -
-
- - - -
-
-
-
- - #Vec3 - -Box3.min - -
-
- - - -
-
- -

Type Desc

-

Field(s)

-
-
- - #table - -Desc.attributes - -
-
- -

object type attributes

- -
-
-
-
- - #string - -Desc.displayName - -
-
- -

localized display name

- -
-
-
-
- - #TypeName - -Desc.typeName - -
-
- -

type name

- -
-
- -

Type Distance

- -

A distance type

- - -

Type Mass

- -

Mass is given in kilograms.

- - -

Type MissionTime

- -

Mission time is a model time plus time of the mission start.

- - -

Type ModelTime

- -

Model time is the time that drives the simulation.

- - -

Model time may be stopped, accelerated and decelerated relative real time.

- - -

Type Position3

- -

Position is a composite structure.

- - -

It consists of both coordinate vector and orientation matrix. Position3 (also known as "Pos3" for short) is a table that has following format:

- -

Field(s)

-
-
- - #Vec3 - -Position3.p - -
-
- - - -
-
-
-
- - #Vec3 - -Position3.x - -
-
- - - -
-
-
-
- - #Vec3 - -Position3.y - -
-
- - - -
-
-
-
- - #Vec3 - -Position3.z - -
-
- - - -
-
- -

Type Time

- -

Time is given in seconds.

- - -

Type TypeName

- -

Each object belongs to a type.

- - -

Object type is a named couple of properties those independent of mission and common for all units of the same type. Name of unit type is a string. Samples of unit type: "Su-27", "KAMAZ" and "M2 Bradley".

- - -

Type Vec2

- -

Vec2 is a 2D-vector for the ground plane as a reference plane.

- -

Field(s)

-
-
- - #Distance - -Vec2.x - -
-
- -

Vec2.x = Vec3.x

- -
-
-
-
- - #Distance - -Vec2.y - -
-
- -

Vec2.y = Vec3.z

- -
-
- -

Type Vec3

- -

Vec3 type is a 3D-vector.

- - -

DCS world has 3-dimensional coordinate system. DCS ground is an infinite plain.

- -

Field(s)

-
-
- - #Distance - -Vec3.x - -
-
- -

is directed to the north

- -
-
-
-
- - #Distance - -Vec3.y - -
-
- -

is directed up

- -
-
-
-
- - #Distance - -Vec3.z - -
-
- -

is directed to the east

- -
-
- -
- -
- - diff --git a/docs/Documentation/DCSUnit.html b/docs/Documentation/DCSUnit.html deleted file mode 100644 index 27f223811..000000000 --- a/docs/Documentation/DCSUnit.html +++ /dev/null @@ -1,2080 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module DCSUnit

- - - -

Global(s)

- - - - - -
Unit - -
-

Type Unit

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Unit.< -

Unit.AmmoItem> Ammo

-
Unit.AmmoItem - -
Unit.Category - -
Unit.Desc - -
Unit.DescAircraft - -
Unit.DescAirplane - -
Unit.DescHelicopter - -
Unit.DescShip - -
Unit.DescVehicle - -
Unit.ID -

Identifier of an unit. It assigned to an unit by the Mission Editor automatically.

-
Unit.IRST - -
Unit.Optic - -
Unit.OpticType - -
Unit.Radar - -
Unit.RadarType - -
Unit.RefuelingSystem - -
Unit.Sensor - -
Unit.SensorType - -
Unit:getAmmo() -

Returns the unit ammunition.

-
Unit.getByName(name) -

Returns unit object by the name assigned to the unit in Mission Editor.

-
Unit:getCallsign() -

Returns the unit's callsign - the localized string.

-
Unit:getController() -

Returns controller of the unit if it exist and nil otherwise

-
Unit:getDesc() -

Returns unit descriptor.

-
Unit:getFuel() -

Returns relative amount of fuel (from 0.0 to 1.0) the unit has in its internal tanks.

-
Unit:getGroup() -

Returns the unit's group if it exist and nil otherwise

-
Unit:getID() -

returns the unit's unique identifier.

-
Unit:getLife() -

Returns the unit's health.

-
Unit:getLife0() -

returns the unit's initial health.

-
Unit:getNumber() -

Returns the unit's number in the group.

-
Unit:getPlayerName() -

Returns name of the player that control the unit or nil if the unit is controlled by A.I.

-
Unit:getRadar() -

returns two values: -First value indicates if at least one of the unit's radar(s) is on.

-
Unit:getSensors() -

Returns the unit sensors.

-
Unit:hasSensors(sensorType, ...) -

Returns true if the unit has specified types of sensors.

-
Unit:isActive() -

Returns if the unit is activated.

-
- -

Type Unit.AmmoItem

- - - - - - - - - -
Unit.AmmoItem.count -

ammunition count

-
Unit.AmmoItem.desc -

ammunition descriptor

-
- -

Type Unit.Category

- - - - - - - - - - - - - - - - - - - - - -
Unit.Category.AIRPLANE - -
Unit.Category.GROUND_UNIT - -
Unit.Category.HELICOPTER - -
Unit.Category.SHIP - -
Unit.Category.STRUCTURE - -
- -

Type Unit.Desc

- - - - - - - - - - - - - -
Unit.Desc.category -

Unit Category

-
Unit.Desc.massEmpty -

mass of empty unit

-
Unit.Desc.speedMax -

istance / Time, --maximal velocity

-
- -

Type Unit.DescAircraft

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Unit.DescAircraft.Hmax -

Ceiling

-
Unit.DescAircraft.NyMax -

maximal safe acceleration

-
Unit.DescAircraft.NyMin -

minimal safe acceleration

-
Unit.DescAircraft.VyMax -

#Distance / #Time, --maximal climb rate

-
Unit.DescAircraft.fuelMassMax -

maximal inner fuel mass

-
Unit.DescAircraft.range -

Operational range

-
Unit.DescAircraft.tankerType -

refueling system type

-
- -

Type Unit.DescAirplane

- - - - - - - - - -
Unit.DescAirplane.speedMax0 -

Distance / Time maximal TAS at ground level

-
Unit.DescAirplane.speedMax10K -

Distance / Time maximal TAS at altitude of 10 km

-
- -

Type Unit.DescHelicopter

- - - - - -
Unit.DescHelicopter.HmaxStat -

static ceiling

-
- -

Type Unit.DescVehicle

- - - - - - - - - -
Unit.DescVehicle.maxSlopeAngle -

maximal slope angle

-
Unit.DescVehicle.riverCrossing -

can the vehicle cross a rivers

-
- -

Type Unit.Optic

- - - - - -
Unit.Optic.opticType - -
- -

Type Unit.OpticType

- - - - - - - - - - - - - -
Unit.OpticType.IR -

Infra-Red optic sensor

-
Unit.OpticType.LLTV -

Low-level TV-sensor

-
Unit.OpticType.TV -

TV-sensor

-
- -

Type Unit.Radar

- - - - - - - - - - - - - -
Unit.Radar.detectionDistanceAir -

detection distance for RCS=1m^2 airborne target, nil if radar doesn't support air search

-
Unit.Radar.detectionDistanceHRM -

detection distance for RCS=1m^2 in high-resolution mapping mode, nil if radar has no HRM

-
Unit.Radar.detectionDistanceRBM -

detection distance for RCS=1m^2 in real-beam mapping mode, nil if radar doesn't support surface/land search

-
- -

Type Unit.Radar.detectionDistanceAir

- - - - - - - - - -
Unit.Radar.detectionDistanceAir.lowerHemisphere - -
Unit.Radar.detectionDistanceAir.upperHemisphere - -
- -

Type Unit.Radar.detectionDistanceAir.lowerHemisphere

- - - - - - - - - -
Unit.Radar.detectionDistanceAir.lowerHemisphere.headOn - -
Unit.Radar.detectionDistanceAir.lowerHemisphere.tailOn - -
- -

Type Unit.Radar.detectionDistanceAir.upperHemisphere

- - - - - - - - - -
Unit.Radar.detectionDistanceAir.upperHemisphere.headOn - -
Unit.Radar.detectionDistanceAir.upperHemisphere.tailOn - -
- -

Type Unit.RadarType

- - - - - - - - - -
Unit.RadarType.AS -

air search radar

-
Unit.RadarType.SS -

surface/land search radar

-
- -

Type Unit.RefuelingSystem

- - - - - - - - - -
Unit.RefuelingSystem.BOOM_AND_RECEPTACLE - -
Unit.RefuelingSystem.PROBE_AND_DROGUE - -
- -

Type Unit.Sensor

- - - - - - - - - -
Unit.Sensor.type - -
Unit.Sensor.typeName - -
- -

Type Unit.SensorType

- - - - - - - - - - - - - - - - - -
Unit.SensorType.IRST - -
Unit.SensorType.OPTIC - -
Unit.SensorType.RADAR - -
Unit.SensorType.RWR - -
- -

Type Wrapper.Unit

- - - - - - - - - - - - - -
Wrapper.Unit.detectionDistanceAfterburner -

..., engines are in afterburner mode

-
Wrapper.Unit.detectionDistanceIdle -

detection of tail-on target with heat signature = 1 in upper hemisphere, engines are in idle

-
Wrapper.Unit.detectionDistanceMaximal -

..., engines are in maximal mode

-
- -

Global(s)

-
-
- - #Unit - -Unit - -
-
- - - -
-
-

Type DCSUnit

- -

Type Angle

- -

Type Controller

- -

Type Distance

- -

Type Mass

- -

Type TypeName

- -

Type Unit

-

Field(s)

-
-
- - #list - -Unit.< - -
-
- -

Unit.AmmoItem> Ammo

- -
-
-
-
- - #Unit.AmmoItem - -Unit.AmmoItem - -
-
- - - -
-
-
-
- - #Unit.Category - -Unit.Category - -
-
- - - -
-
-
-
- - #Unit.Desc - -Unit.Desc - -
-
- - - -
-
-
-
- - #Unit.DescAircraft - -Unit.DescAircraft - -
-
- - - -
-
-
-
- - #Unit.DescAirplane - -Unit.DescAirplane - -
-
- - - -
-
-
-
- - #Unit.DescHelicopter - -Unit.DescHelicopter - -
-
- - - -
-
-
-
- - #Unit.DescShip - -Unit.DescShip - -
-
- - - -
-
-
-
- - #Unit.DescVehicle - -Unit.DescVehicle - -
-
- - - -
-
-
-
- - -Unit.ID - -
-
- -

Identifier of an unit. It assigned to an unit by the Mission Editor automatically.

- -
-
-
-
- - #Unit.IRST - -Unit.IRST - -
-
- - - -
-
-
-
- - #Unit.Optic - -Unit.Optic - -
-
- - - -
-
-
-
- - #Unit.OpticType - -Unit.OpticType - -
-
- - - -
-
-
-
- - #Unit.Radar - -Unit.Radar - -
-
- - - -
-
-
-
- - #Unit.RadarType - -Unit.RadarType - -
-
- - - -
-
-
-
- - #Unit.RefuelingSystem - -Unit.RefuelingSystem - -
-
- - - -
-
-
-
- - #Unit.Sensor - -Unit.Sensor - -
-
- - - -
-
-
-
- - #Unit.SensorType - -Unit.SensorType - -
-
- - - -
-
-
-
- - -Unit:getAmmo() - -
-
- -

Returns the unit ammunition.

- -

Return value

- -

#Unit.Ammo:

- - -
-
-
-
- - -Unit.getByName(name) - -
-
- -

Returns unit object by the name assigned to the unit in Mission Editor.

- - -

If there is unit with such name or the unit is destroyed the function will return nil. The function provides access to non-activated units too.

- -

Parameter

-
    -
  • - -

    #string name :

    - -
  • -
-

Return value

- -

#Unit:

- - -
-
-
-
- - -Unit:getCallsign() - -
-
- -

Returns the unit's callsign - the localized string.

- -

Return value

- -

#string:

- - -
-
-
-
- - -Unit:getController() - -
-
- -

Returns controller of the unit if it exist and nil otherwise

- -

Return value

- -

#Controller:

- - -
-
-
-
- - -Unit:getDesc() - -
-
- -

Returns unit descriptor.

- - -

Descriptor type depends on unit category.

- -

Return value

- -

#Unit.Desc:

- - -
-
-
-
- - -Unit:getFuel() - -
-
- -

Returns relative amount of fuel (from 0.0 to 1.0) the unit has in its internal tanks.

- - -

If there are additional fuel tanks the value may be greater than 1.0.

- -

Return value

- -

#number:

- - -
-
-
-
- - -Unit:getGroup() - -
-
- -

Returns the unit's group if it exist and nil otherwise

- -

Return value

- -

Dcs.DCSWrapper.Group#Group:

- - -
-
-
-
- - -Unit:getID() - -
-
- -

returns the unit's unique identifier.

- -

Return value

- -

#Unit.ID:

- - -
-
-
-
- - -Unit:getLife() - -
-
- -

Returns the unit's health.

- - -

Dead units has health <= 1.0

- -

Return value

- -

#number:

- - -
-
-
-
- - -Unit:getLife0() - -
-
- -

returns the unit's initial health.

- -

Return value

- -

#number:

- - -
-
-
-
- - -Unit:getNumber() - -
-
- -

Returns the unit's number in the group.

- - -

The number is the same number the unit has in ME. It may not be changed during the mission. If any unit in the group is destroyed, the numbers of another units will not be changed.

- -

Return value

- -

#number:

- - -
-
-
-
- - -Unit:getPlayerName() - -
-
- -

Returns name of the player that control the unit or nil if the unit is controlled by A.I.

- -

Return value

- -

#string:

- - -
-
-
-
- - -Unit:getRadar() - -
-
- -

returns two values: -First value indicates if at least one of the unit's radar(s) is on.

- - -

Second value is the object of the radar's interest. Not nil only if at least one radar of the unit is tracking a target.

- -

Return value

- -

#boolean, Wrapper.Object#Object:

- - -
-
-
-
- - -Unit:getSensors() - -
-
- -

Returns the unit sensors.

- -

Return value

- -

#Unit.Sensors:

- - -
-
-
-
- - -Unit:hasSensors(sensorType, ...) - -
-
- -

Returns true if the unit has specified types of sensors.

- - -

This function is more preferable than Unit.getSensors() if you don't want to get information about all the unit's sensors, and just want to check if the unit has specified types of sensors.

- -

Parameters

-
    -
  • - -

    #Unit.SensorType sensorType : -(= nil) Sensor type.

    - -
  • -
  • - -

    ... : -Additional parameters.

    - -
  • -
-

Return value

- -

#boolean:

- - -

Usage:

-
If sensorType is Unit.SensorType.OPTIC, additional parameters are optic sensor types. Following example checks if the unit has LLTV or IR optics:
-unit:hasSensors(Unit.SensorType.OPTIC, Unit.OpticType.LLTV, Unit.OpticType.IR)
-If sensorType is Unit.SensorType.RADAR, additional parameters are radar types. Following example checks if the unit has air search radars:
-unit:hasSensors(Unit.SensorType.RADAR, Unit.RadarType.AS)
-If no additional parameters are specified the function returns true if the unit has at least one sensor of specified type.
-If sensor type is not specified the function returns true if the unit has at least one sensor of any type.
-
- -
-
-
-
- - -Unit:isActive() - -
-
- -

Returns if the unit is activated.

- -

Return value

- -

#boolean:

- - -
-
- -

Type Unit.Ammo

- -

Type Unit.AmmoItem

- -

ammunition item: "type-count" pair.

- -

Field(s)

-
-
- - #number - -Unit.AmmoItem.count - -
-
- -

ammunition count

- -
-
-
-
- - #Weapon.Desc - -Unit.AmmoItem.desc - -
-
- -

ammunition descriptor

- -
-
- -

Type Unit.Category

- -

Enum that stores unit categories.

- -

Field(s)

-
-
- - -Unit.Category.AIRPLANE - -
-
- - - -
-
-
-
- - -Unit.Category.GROUND_UNIT - -
-
- - - -
-
-
-
- - -Unit.Category.HELICOPTER - -
-
- - - -
-
-
-
- - -Unit.Category.SHIP - -
-
- - - -
-
-
-
- - -Unit.Category.STRUCTURE - -
-
- - - -
-
- -

Type Unit.Desc

- -

A unit descriptor.

- -

Field(s)

-
-
- - #Unit.Category - -Unit.Desc.category - -
-
- -

Unit Category

- -
-
-
-
- - #Mass - -Unit.Desc.massEmpty - -
-
- -

mass of empty unit

- -
-
-
-
- - #number - -Unit.Desc.speedMax - -
-
- -

istance / Time, --maximal velocity

- -
-
- -

Type Unit.DescAircraft

- -

An aircraft descriptor.

- -

Field(s)

-
-
- - #Distance - -Unit.DescAircraft.Hmax - -
-
- -

Ceiling

- -
-
-
-
- - #number - -Unit.DescAircraft.NyMax - -
-
- -

maximal safe acceleration

- -
-
-
-
- - #number - -Unit.DescAircraft.NyMin - -
-
- -

minimal safe acceleration

- -
-
-
-
- - #number - -Unit.DescAircraft.VyMax - -
-
- -

#Distance / #Time, --maximal climb rate

- -
-
-
-
- - #Mass - -Unit.DescAircraft.fuelMassMax - -
-
- -

maximal inner fuel mass

- -
-
-
-
- - #Distance - -Unit.DescAircraft.range - -
-
- -

Operational range

- -
-
-
-
- - #Unit.RefuelingSystem - -Unit.DescAircraft.tankerType - -
-
- -

refueling system type

- -
-
- -

Type Unit.DescAirplane

- -

An airplane descriptor.

- -

Field(s)

-
-
- - #number - -Unit.DescAirplane.speedMax0 - -
-
- -

Distance / Time maximal TAS at ground level

- -
-
-
-
- - #number - -Unit.DescAirplane.speedMax10K - -
-
- -

Distance / Time maximal TAS at altitude of 10 km

- -
-
- -

Type Unit.DescHelicopter

- -

A helicopter descriptor.

- -

Field(s)

-
-
- - #Distance - -Unit.DescHelicopter.HmaxStat - -
-
- -

static ceiling

- -
-
- -

Type Unit.DescShip

- -

A ship descriptor.

- - -

Type Unit.DescVehicle

- -

A vehicle descriptor.

- -

Field(s)

-
-
- - #Angle - -Unit.DescVehicle.maxSlopeAngle - -
-
- -

maximal slope angle

- -
-
-
-
- - #boolean - -Unit.DescVehicle.riverCrossing - -
-
- -

can the vehicle cross a rivers

- -
-
- -

Type Unit.ID

- -

Type Unit.IRST

- -

Type Unit.Optic

- -

An optic sensor.

- -

Field(s)

-
-
- - #Unit.OpticType - -Unit.Optic.opticType - -
-
- - - -
-
- -

Type Unit.OpticType

- -

Enum that stores types of optic sensors.

- -

Field(s)

-
-
- - -Unit.OpticType.IR - -
-
- -

Infra-Red optic sensor

- -
-
-
-
- - -Unit.OpticType.LLTV - -
-
- -

Low-level TV-sensor

- -
-
-
-
- - -Unit.OpticType.TV - -
-
- -

TV-sensor

- -
-
- -

Type Unit.RWR

- -

An RWR.

- - -

Type Unit.Radar

- -

A radar.

- -

Field(s)

-
-
- - #Unit.Radar.detectionDistanceAir - -Unit.Radar.detectionDistanceAir - -
-
- -

detection distance for RCS=1m^2 airborne target, nil if radar doesn't support air search

- -
-
-
-
- - #Distance - -Unit.Radar.detectionDistanceHRM - -
-
- -

detection distance for RCS=1m^2 in high-resolution mapping mode, nil if radar has no HRM

- -
-
-
-
- - #Distance - -Unit.Radar.detectionDistanceRBM - -
-
- -

detection distance for RCS=1m^2 in real-beam mapping mode, nil if radar doesn't support surface/land search

- -
-
- -

Type Unit.Radar.detectionDistanceAir

-

Field(s)

-
-
- - #Unit.Radar.detectionDistanceAir.lowerHemisphere - -Unit.Radar.detectionDistanceAir.lowerHemisphere - -
-
- - - -
-
-
-
- - #Unit.Radar.detectionDistanceAir.upperHemisphere - -Unit.Radar.detectionDistanceAir.upperHemisphere - -
-
- - - -
-
- -

Type Unit.Radar.detectionDistanceAir.lowerHemisphere

-

Field(s)

-
-
- - #Distance - -Unit.Radar.detectionDistanceAir.lowerHemisphere.headOn - -
-
- - - -
-
-
-
- - #Distance - -Unit.Radar.detectionDistanceAir.lowerHemisphere.tailOn - -
-
- - - -
-
- -

Type Unit.Radar.detectionDistanceAir.upperHemisphere

-

Field(s)

-
-
- - #Distance - -Unit.Radar.detectionDistanceAir.upperHemisphere.headOn - -
-
- - - -
-
-
-
- - #Distance - -Unit.Radar.detectionDistanceAir.upperHemisphere.tailOn - -
-
- - - -
-
- -

Type Unit.RadarType

- -

Enum that stores radar types.

- -

Field(s)

-
-
- - -Unit.RadarType.AS - -
-
- -

air search radar

- -
-
-
-
- - -Unit.RadarType.SS - -
-
- -

surface/land search radar

- -
-
- -

Type Unit.RefuelingSystem

- -

Enum that stores aircraft refueling system types.

- -

Field(s)

-
-
- - -Unit.RefuelingSystem.BOOM_AND_RECEPTACLE - -
-
- - - -
-
-
-
- - -Unit.RefuelingSystem.PROBE_AND_DROGUE - -
-
- - - -
-
- -

Type Unit.Sensor

- -

A unit sensor.

- -

Field(s)

-
-
- - #Unit.SensorType - -Unit.Sensor.type - -
-
- - - -
-
-
-
- - #TypeName - -Unit.Sensor.typeName - -
-
- - - -
-
- -

Type Unit.SensorType

- -

Enum that stores sensor types.

- -

Field(s)

-
-
- - -Unit.SensorType.IRST - -
-
- - - -
-
-
-
- - -Unit.SensorType.OPTIC - -
-
- - - -
-
-
-
- - -Unit.SensorType.RADAR - -
-
- - - -
-
-
-
- - -Unit.SensorType.RWR - -
-
- - - -
-
- -

Type Unit.Sensors

- -

Type Weapon.Desc

- -

Type Wrapper.Unit

- -

An IRST.

- -

Field(s)

-
-
- - #Distance - -Wrapper.Unit.detectionDistanceAfterburner - -
-
- -

..., engines are in afterburner mode

- -
-
-
-
- - #Distance - -Wrapper.Unit.detectionDistanceIdle - -
-
- -

detection of tail-on target with heat signature = 1 in upper hemisphere, engines are in idle

- -
-
-
-
- - #Distance - -Wrapper.Unit.detectionDistanceMaximal - -
-
- -

..., engines are in maximal mode

- -
-
- -

Type list

- -
- -
- - diff --git a/docs/Documentation/DCSVec3.html b/docs/Documentation/DCSVec3.html deleted file mode 100644 index 16c845eb4..000000000 --- a/docs/Documentation/DCSVec3.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module DCSVec3

- - - -

Global(s)

- - - - - -
Vec3 - -
-

Type Vec3

- - - - - - - - - - - - - -
Vec3.x - -
Vec3.y - -
Vec3.z - -
- -

Global(s)

-
-
- - #Vec3 - -Vec3 - -
-
- - - -
-
-

Type DCSVec3

- -

Type Vec3

-

Field(s)

-
-
- - #number - -Vec3.x - -
-
- - - -
-
-
-
- - #number - -Vec3.y - -
-
- - - -
-
-
-
- - #number - -Vec3.z - -
-
- - - -
-
- -
- -
- - diff --git a/docs/Documentation/DCSWorld.html b/docs/Documentation/DCSWorld.html deleted file mode 100644 index b4188357b..000000000 --- a/docs/Documentation/DCSWorld.html +++ /dev/null @@ -1,637 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module DCSWorld

- - - -

Global(s)

- - - - - -
world - -
-

Type world

- - - - - -
world.event - -
- -

Type world.event

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
world.event.S_EVENT_BASE_CAPTURED - -
world.event.S_EVENT_BIRTH - -
world.event.S_EVENT_CRASH - -
world.event.S_EVENT_DEAD - -
world.event.S_EVENT_EJECTION - -
world.event.S_EVENT_ENGINE_SHUTDOWN - -
world.event.S_EVENT_ENGINE_STARTUP - -
world.event.S_EVENT_HIT - -
world.event.S_EVENT_HUMAN_FAILURE - -
world.event.S_EVENT_INVALID - -
world.event.S_EVENT_LAND - -
world.event.S_EVENT_MAX - -
world.event.S_EVENT_MISSION_END - -
world.event.S_EVENT_MISSION_START - -
world.event.S_EVENT_PILOT_DEAD - -
world.event.S_EVENT_PLAYER_COMMENT - -
world.event.S_EVENT_PLAYER_ENTER_UNIT - -
world.event.S_EVENT_PLAYER_LEAVE_UNIT - -
world.event.S_EVENT_REFUELING - -
world.event.S_EVENT_REFUELING_STOP - -
world.event.S_EVENT_SHOOTING_END - -
world.event.S_EVENT_SHOOTING_START - -
world.event.S_EVENT_SHOT - -
world.event.S_EVENT_TAKEOFF - -
world.event.S_EVENT_TOOK_CONTROL - -
- -

Global(s)

-
-
- - #world - -world - -
-
- - - -
-
-

Type DCSWorld

- -

Type world

-

Field(s)

-
-
- - #world.event - -world.event - -
-
- - - -
-
- -

Type world.event

-

Field(s)

-
-
- - -world.event.S_EVENT_BASE_CAPTURED - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_BIRTH - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_CRASH - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_DEAD - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_EJECTION - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_ENGINE_SHUTDOWN - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_ENGINE_STARTUP - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_HIT - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_HUMAN_FAILURE - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_INVALID - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_LAND - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_MAX - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_MISSION_END - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_MISSION_START - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_PILOT_DEAD - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_PLAYER_COMMENT - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_PLAYER_ENTER_UNIT - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_PLAYER_LEAVE_UNIT - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_REFUELING - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_REFUELING_STOP - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_SHOOTING_END - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_SHOOTING_START - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_SHOT - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_TAKEOFF - -
-
- - - -
-
-
-
- - -world.event.S_EVENT_TOOK_CONTROL - -
-
- - - -
-
- -
- -
- - diff --git a/docs/Documentation/DCSZone.html b/docs/Documentation/DCSZone.html deleted file mode 100644 index 97af5943c..000000000 --- a/docs/Documentation/DCSZone.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - -
-
- -
-
-
- - - diff --git a/docs/Documentation/DCScountry.html b/docs/Documentation/DCScountry.html deleted file mode 100644 index e62671d74..000000000 --- a/docs/Documentation/DCScountry.html +++ /dev/null @@ -1,523 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module DCScountry

- - - -

Global(s)

- - - - - -
country - -
-

Type country

- - - - - -
country.id - -
- -

Type country.id

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
country.id.ABKHAZIA - -
country.id.BELGIUM - -
country.id.CANADA - -
country.id.DENMARK - -
country.id.FRANCE - -
country.id.GEORGIA - -
country.id.GERMANY - -
country.id.INSURGENTS - -
country.id.ISRAEL - -
country.id.ITALY - -
country.id.NORWAY - -
country.id.RUSSIA - -
country.id.SOUTH_OSETIA - -
country.id.SPAIN - -
country.id.THE_NETHERLANDS - -
country.id.TURKEY - -
country.id.UK - -
country.id.UKRAINE - -
country.id.USA - -
- -

Global(s)

-
-
- - #country - -country - -
-
- - - -
-
-

Type DCScountry

- -

Type country

-

Field(s)

-
-
- - #country.id - -country.id - -
-
- - - -
-
- -

Type country.id

-

Field(s)

-
-
- - -country.id.ABKHAZIA - -
-
- - - -
-
-
-
- - -country.id.BELGIUM - -
-
- - - -
-
-
-
- - -country.id.CANADA - -
-
- - - -
-
-
-
- - -country.id.DENMARK - -
-
- - - -
-
-
-
- - -country.id.FRANCE - -
-
- - - -
-
-
-
- - -country.id.GEORGIA - -
-
- - - -
-
-
-
- - -country.id.GERMANY - -
-
- - - -
-
-
-
- - -country.id.INSURGENTS - -
-
- - - -
-
-
-
- - -country.id.ISRAEL - -
-
- - - -
-
-
-
- - -country.id.ITALY - -
-
- - - -
-
-
-
- - -country.id.NORWAY - -
-
- - - -
-
-
-
- - -country.id.RUSSIA - -
-
- - - -
-
-
-
- - -country.id.SOUTH_OSETIA - -
-
- - - -
-
-
-
- - -country.id.SPAIN - -
-
- - - -
-
-
-
- - -country.id.THE_NETHERLANDS - -
-
- - - -
-
-
-
- - -country.id.TURKEY - -
-
- - - -
-
-
-
- - -country.id.UK - -
-
- - - -
-
-
-
- - -country.id.UKRAINE - -
-
- - - -
-
-
-
- - -country.id.USA - -
-
- - - -
-
- -
- -
- - diff --git a/docs/Documentation/DCStimer.html b/docs/Documentation/DCStimer.html deleted file mode 100644 index d4d84f593..000000000 --- a/docs/Documentation/DCStimer.html +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module DCStimer

- - - -

Global(s)

- - - - - -
timer - -
-

Type timer

- - - - - - - - - - - - - - - - - - - - - - - - - -
timer.getAbsTime() -

Returns mission time in seconds.

-
timer.getTime() -

Returns model time in seconds.

-
timer.getTime0() -

Returns mission start time in seconds.

-
timer.removeFunction(functionId) -

Removes the function from schedule.

-
timer.scheduleFunction(functionToCall, functionArgument, time) -

Schedules function to call at desired model time.

-
timer.setFunctionTime(functionId, time) -

Re-schedules function to call at another model time.

-
- -

Global(s)

-
-
- - #timer - -timer - -
-
- - - -
-
-

Type DCStimer

- -

Type FunctionToCall

- -

Type Time

- -

Type timer

-

Field(s)

-
-
- - -timer.getAbsTime() - -
-
- -

Returns mission time in seconds.

- -

Return value

- -

#Time:

- - -
-
-
-
- - -timer.getTime() - -
-
- -

Returns model time in seconds.

- -

Return value

- -

#Time: -

- -
-
-
-
- - -timer.getTime0() - -
-
- -

Returns mission start time in seconds.

- -

Return value

- -

#Time:

- - -
-
-
-
- - -timer.removeFunction(functionId) - -
-
- -

Removes the function from schedule.

- -

Parameter

-
    -
  • - -

    functionId : -Function identifier to remove from schedule

    - -
  • -
-
-
-
-
- - -timer.scheduleFunction(functionToCall, functionArgument, time) - -
-
- -

Schedules function to call at desired model time.

- - -

Time function FunctionToCall(any argument, Time time)

- -

...

- -

return ...

- -

end

- -

Must return model time of next call or nil. Note that the DCS scheduler calls the function in protected mode and any Lua errors in the called function will be trapped and not reported. If the function triggers a Lua error then it will be terminated and not scheduled to run again.

- -

Parameters

-
    -
  • - -

    #FunctionToCall functionToCall : -Lua-function to call. Must have prototype of FunctionToCall.

    - -
  • -
  • - -

    functionArgument : -Function argument of any type to pass to functionToCall.

    - -
  • -
  • - -

    #Time time : -Model time of the function call.

    - -
  • -
-

Return value

- - -

functionId

- -
-
-
-
- - -timer.setFunctionTime(functionId, time) - -
-
- -

Re-schedules function to call at another model time.

- -

Parameters

-
    -
  • - -

    functionId : -Lua-function to call. Must have prototype of FunctionToCall.

    - -
  • -
  • - -

    #Time time : -Model time of the function call.

    - -
  • -
-
-
- -
- -
- - diff --git a/docs/Documentation/DCStrigger.html b/docs/Documentation/DCStrigger.html deleted file mode 100644 index 06e11aa76..000000000 --- a/docs/Documentation/DCStrigger.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - -
-
- -
-
-
- - - diff --git a/docs/Documentation/Database.html b/docs/Documentation/Database.html deleted file mode 100644 index dfc8a9bb5..000000000 --- a/docs/Documentation/Database.html +++ /dev/null @@ -1,2026 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Database

- -

This module contains the DATABASE class, managing the database of mission objects.

- - - -
- -

1) #DATABASE class, extends Base#BASE

-

Mission designers can use the DATABASE class to refer to:

- -
    -
  • STATICS
  • -
  • UNITS
  • -
  • GROUPS
  • -
  • CLIENTS
  • -
  • AIRBASES
  • -
  • PLAYERSJOINED
  • -
  • PLAYERS
  • -
  • CARGOS
  • -
- -

On top, for internal MOOSE administration purposes, the DATBASE administers the Unit and Group TEMPLATES as defined within the Mission Editor.

- -

Moose will automatically create one instance of the DATABASE class into the global object _DATABASE. -Moose refers to _DATABASE within the framework extensively, but you can also refer to the _DATABASE object within your missions if required.

- -

1.1) DATABASE iterators

-

You can iterate the database with the available iterator methods. -The iterator methods will walk the DATABASE set, and call for each element within the set a function that you provide. -The following iterator methods are currently available within the DATABASE:

- - - -
- - -

Global(s)

- - - - - -
DATABASE - -
-

Type DATABASE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DATABASE.AIRBASES - -
DATABASE:AddAirbase(AirbaseName) -

Adds a Airbase based on the Airbase Name in the DATABASE.

-
DATABASE:AddCargo(CargoName, Cargo) -

Adds a Cargo based on the Cargo Name in the DATABASE.

-
DATABASE:AddClient(ClientName) -

Adds a CLIENT based on the ClientName in the DATABASE.

-
DATABASE:AddGroup(GroupName) -

Adds a GROUP based on the GroupName in the DATABASE.

-
DATABASE:AddPlayer(UnitName, PlayerName) -

Adds a player based on the Player Name in the DATABASE.

-
DATABASE:AddStatic(DCSStaticName) -

Adds a Static based on the Static Name in the DATABASE.

-
DATABASE:AddUnit(DCSUnitName) -

Adds a Unit based on the Unit Name in the DATABASE.

-
DATABASE.CARGOS - -
DATABASE.CLIENTS - -
DATABASE.COUNTRY_ID - -
DATABASE.COUNTRY_NAME - -
DATABASE.ClassName - -
DATABASE:DeleteAirbase(AirbaseName) -

Deletes a Airbase from the DATABASE based on the Airbase Name.

-
DATABASE:DeleteCargo(CargoName) -

Deletes a Cargo from the DATABASE based on the Cargo Name.

-
DATABASE:DeletePlayer(PlayerName) -

Deletes a player from the DATABASE based on the Player Name.

-
DATABASE:DeleteStatic(DCSStaticName) -

Deletes a Static from the DATABASE based on the Static Name.

-
DATABASE:DeleteUnit(DCSUnitName) -

Deletes a Unit from the DATABASE based on the Unit Name.

-
DATABASE:FindAirbase(AirbaseName) -

Finds an AIRBASE based on the AirbaseName.

-
DATABASE:FindCargo(CargoName) -

Finds an CARGO based on the CargoName.

-
DATABASE:FindClient(ClientName) -

Finds a CLIENT based on the ClientName.

-
DATABASE:FindGroup(GroupName) -

Finds a GROUP based on the GroupName.

-
DATABASE:FindStatic(StaticName) -

Finds a STATIC based on the StaticName.

-
DATABASE:FindUnit(UnitName) -

Finds a Unit based on the Unit Name.

-
DATABASE:ForEach(IteratorFunction, FinalizeFunction, arg, Set) -

Iterate the DATABASE and call an iterator function for the given set, providing the Object for each element within the set and optional parameters.

-
DATABASE:ForEachCargo(IteratorFunction, ...) -

Iterate the DATABASE and call an iterator function for each CARGO, providing the CARGO object to the function and optional parameters.

-
DATABASE:ForEachClient(IteratorFunction, ...) -

Iterate the DATABASE and call an iterator function for each CLIENT, providing the CLIENT to the function and optional parameters.

-
DATABASE:ForEachGroup(IteratorFunction, ...) -

Iterate the DATABASE and call an iterator function for each alive GROUP, providing the GROUP and optional parameters.

-
DATABASE:ForEachPlayer(IteratorFunction, ...) -

Iterate the DATABASE and call an iterator function for each ALIVE player, providing the player name and optional parameters.

-
DATABASE:ForEachPlayerJoined(IteratorFunction, ...) -

Iterate the DATABASE and call an iterator function for each player who has joined the mission, providing the Unit of the player and optional parameters.

-
DATABASE:ForEachUnit(IteratorFunction, FinalizeFunction, ...) -

Iterate the DATABASE and call an iterator function for each alive UNIT, providing the UNIT and optional parameters.

-
DATABASE.GROUPS - -
DATABASE:GetCategoryFromAirbase(AirbaseName) - -
DATABASE:GetCategoryFromClientTemplate(ClientName) - -
DATABASE:GetCoalitionFromAirbase(AirbaseName) - -
DATABASE:GetCoalitionFromClientTemplate(ClientName) - -
DATABASE:GetCountryFromClientTemplate(ClientName) - -
DATABASE:GetGroupNameFromUnitName(UnitName) - -
DATABASE:GetGroupTemplate(GroupName) - -
DATABASE:GetGroupTemplateFromUnitName(UnitName) - -
DATABASE:GetStaticUnitTemplate(StaticName) - -
DATABASE:GetStatusGroup(GroupName) -

Get a status to a Group within the Database, this to check crossing events for example.

-
DATABASE.NavPoints - -
DATABASE.Navpoints - -
DATABASE:New() -

Creates a new DATABASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

-
DATABASE:OnEventDeleteCargo(EventData) -

Handles the OnEventDeleteCargo.

-
DATABASE:OnEventNewCargo(EventData) -

Handles the OnEventNewCargo event.

-
DATABASE.PLAYERS - -
DATABASE.PLAYERSJOINED - -
DATABASE.STATICS - -
DATABASE:SetStatusGroup(GroupName, Status) -

Set a status to a Group within the Database, this to check crossing events for example.

-
DATABASE:Spawn(SpawnTemplate) -

Instantiate new Groups within the DCSRTE.

-
DATABASE.Templates - -
DATABASE.UNITS - -
DATABASE:_EventOnBirth(Event) -

Handles the OnBirth event for the alive units set.

-
DATABASE:_EventOnDeadOrCrash(Event) -

Handles the OnDead or OnCrash event for alive units set.

-
DATABASE:_EventOnPlayerEnterUnit(Event) -

Handles the OnPlayerEnterUnit event to fill the active players table (with the unit filter applied).

-
DATABASE:_EventOnPlayerLeaveUnit(Event) -

Handles the OnPlayerLeaveUnit event to clean the active players table.

-
DATABASE:_RegisterAirbases() - -
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.

-
DATABASE:_RegisterGroupsAndUnits() -

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

-
DATABASE:_RegisterPlayers() -

Private method that registers all alive players in the mission.

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

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

-
DATABASE:_RegisterStatics() - -
DATABASE:_RegisterTemplates() - -
- -

Global(s)

-
-
- - #DATABASE - -DATABASE - -
-
- - - -
-
-

Type Database

- -

Type DATABASE

- -

DATABASE class

- -

Field(s)

-
-
- - - -DATABASE.AIRBASES - -
-
- - - -
-
-
-
- - -DATABASE:AddAirbase(AirbaseName) - -
-
- -

Adds a Airbase based on the Airbase Name in the DATABASE.

- -

Parameter

-
    -
  • - -

    #string AirbaseName : -The name of the airbase

    - -
  • -
-
-
-
-
- - -DATABASE:AddCargo(CargoName, Cargo) - -
-
- -

Adds a Cargo based on the Cargo Name in the DATABASE.

- -

Parameters

-
    -
  • - -

    #string CargoName : -The name of the airbase

    - -
  • -
  • - -

    Cargo :

    - -
  • -
-
-
-
-
- - -DATABASE:AddClient(ClientName) - -
-
- -

Adds a CLIENT based on the ClientName in the DATABASE.

- -

Parameter

-
    -
  • - -

    ClientName :

    - -
  • -
-
-
-
-
- - -DATABASE:AddGroup(GroupName) - -
-
- -

Adds a GROUP based on the GroupName in the DATABASE.

- -

Parameter

-
    -
  • - -

    GroupName :

    - -
  • -
-
-
-
-
- - -DATABASE:AddPlayer(UnitName, PlayerName) - -
-
- -

Adds a player based on the Player Name in the DATABASE.

- -

Parameters

-
    -
  • - -

    UnitName :

    - -
  • -
  • - -

    PlayerName :

    - -
  • -
-
-
-
-
- - -DATABASE:AddStatic(DCSStaticName) - -
-
- -

Adds a Static based on the Static Name in the DATABASE.

- -

Parameter

-
    -
  • - -

    DCSStaticName :

    - -
  • -
-
-
-
-
- - -DATABASE:AddUnit(DCSUnitName) - -
-
- -

Adds a Unit based on the Unit Name in the DATABASE.

- -

Parameter

-
    -
  • - -

    DCSUnitName :

    - -
  • -
-
-
-
-
- - - -DATABASE.CARGOS - -
-
- - - -
-
-
-
- - - -DATABASE.CLIENTS - -
-
- - - -
-
-
-
- - - -DATABASE.COUNTRY_ID - -
-
- - - -
-
-
-
- - - -DATABASE.COUNTRY_NAME - -
-
- - - -
-
-
-
- - #string - -DATABASE.ClassName - -
-
- - - -
-
-
-
- - -DATABASE:DeleteAirbase(AirbaseName) - -
-
- -

Deletes a Airbase from the DATABASE based on the Airbase Name.

- -

Parameter

-
    -
  • - -

    #string AirbaseName : -The name of the airbase

    - -
  • -
-
-
-
-
- - -DATABASE:DeleteCargo(CargoName) - -
-
- -

Deletes a Cargo from the DATABASE based on the Cargo Name.

- -

Parameter

-
    -
  • - -

    #string CargoName : -The name of the airbase

    - -
  • -
-
-
-
-
- - -DATABASE:DeletePlayer(PlayerName) - -
-
- -

Deletes a player from the DATABASE based on the Player Name.

- -

Parameter

-
    -
  • - -

    PlayerName :

    - -
  • -
-
-
-
-
- - -DATABASE:DeleteStatic(DCSStaticName) - -
-
- -

Deletes a Static from the DATABASE based on the Static Name.

- -

Parameter

-
    -
  • - -

    DCSStaticName :

    - -
  • -
-
-
-
-
- - -DATABASE:DeleteUnit(DCSUnitName) - -
-
- -

Deletes a Unit from the DATABASE based on the Unit Name.

- -

Parameter

-
    -
  • - -

    DCSUnitName :

    - -
  • -
-
-
-
-
- - -DATABASE:FindAirbase(AirbaseName) - -
-
- -

Finds an AIRBASE based on the AirbaseName.

- -

Parameter

-
    -
  • - -

    #string AirbaseName :

    - -
  • -
-

Return value

- -

Wrapper.Airbase#AIRBASE: -The found AIRBASE.

- -
-
-
-
- - -DATABASE:FindCargo(CargoName) - -
-
- -

Finds an CARGO based on the CargoName.

- -

Parameter

-
    -
  • - -

    #string CargoName :

    - -
  • -
-

Return value

- -

Wrapper.Cargo#CARGO: -The found CARGO.

- -
-
-
-
- - -DATABASE:FindClient(ClientName) - -
-
- -

Finds a CLIENT based on the ClientName.

- -

Parameter

-
    -
  • - -

    #string ClientName :

    - -
  • -
-

Return value

- -

Wrapper.Client#CLIENT: -The found CLIENT.

- -
-
-
-
- - -DATABASE:FindGroup(GroupName) - -
-
- -

Finds a GROUP based on the GroupName.

- -

Parameter

-
    -
  • - -

    #string GroupName :

    - -
  • -
-

Return value

- -

Wrapper.Group#GROUP: -The found GROUP.

- -
-
-
-
- - -DATABASE:FindStatic(StaticName) - -
-
- -

Finds a STATIC based on the StaticName.

- -

Parameter

-
    -
  • - -

    #string StaticName :

    - -
  • -
-

Return value

- -

Wrapper.Static#STATIC: -The found STATIC.

- -
-
-
-
- - -DATABASE:FindUnit(UnitName) - -
-
- -

Finds a Unit based on the Unit Name.

- -

Parameter

-
    -
  • - -

    #string UnitName :

    - -
  • -
-

Return value

- -

Wrapper.Unit#UNIT: -The found Unit.

- -
-
-
-
- - -DATABASE:ForEach(IteratorFunction, FinalizeFunction, arg, Set) - -
-
- -

Iterate the DATABASE and call an iterator function for the given set, providing the Object for each element within the set and optional parameters.

- -

Parameters

-
    -
  • - -

    #function IteratorFunction : -The function that will be called when there is an alive player in the database.

    - -
  • -
  • - -

    FinalizeFunction :

    - -
  • -
  • - -

    arg :

    - -
  • -
  • - -

    Set :

    - -
  • -
-

Return value

- -

#DATABASE: -self

- -
-
-
-
- - -DATABASE:ForEachCargo(IteratorFunction, ...) - -
-
- -

Iterate the DATABASE and call an iterator function for each CARGO, providing the CARGO object to the function and optional parameters.

- -

Parameters

-
    -
  • - -

    #function IteratorFunction : -The function that will be called for each object in the database. The function needs to accept a CLIENT parameter.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#DATABASE: -self

- -
-
-
-
- - -DATABASE:ForEachClient(IteratorFunction, ...) - -
-
- -

Iterate the DATABASE and call an iterator function for each CLIENT, providing the CLIENT to the function and optional parameters.

- -

Parameters

-
    -
  • - -

    #function IteratorFunction : -The function that will be called object in the database. The function needs to accept a CLIENT parameter.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#DATABASE: -self

- -
-
-
-
- - -DATABASE:ForEachGroup(IteratorFunction, ...) - -
-
- -

Iterate the DATABASE and call an iterator function for each alive GROUP, providing the GROUP and optional parameters.

- -

Parameters

-
    -
  • - -

    #function IteratorFunction : -The function that will be called for each object in the database. The function needs to accept a GROUP parameter.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#DATABASE: -self

- -
-
-
-
- - -DATABASE:ForEachPlayer(IteratorFunction, ...) - -
-
- -

Iterate the DATABASE and call an iterator function for each ALIVE player, providing the player name and optional parameters.

- -

Parameters

-
    -
  • - -

    #function IteratorFunction : -The function that will be called for each object in the database. The function needs to accept the player name.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#DATABASE: -self

- -
-
-
-
- - -DATABASE:ForEachPlayerJoined(IteratorFunction, ...) - -
-
- -

Iterate the DATABASE and call an iterator function for each player who has joined the mission, providing the Unit of the player and optional parameters.

- -

Parameters

-
    -
  • - -

    #function IteratorFunction : -The function that will be called for each object in the database. The function needs to accept a UNIT parameter.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#DATABASE: -self

- -
-
-
-
- - -DATABASE:ForEachUnit(IteratorFunction, FinalizeFunction, ...) - -
-
- -

Iterate the DATABASE and call an iterator function for each alive UNIT, providing the UNIT and optional parameters.

- -

Parameters

-
    -
  • - -

    #function IteratorFunction : -The function that will be called for each object in the database. The function needs to accept a UNIT parameter.

    - -
  • -
  • - -

    FinalizeFunction :

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#DATABASE: -self

- -
-
-
-
- - - -DATABASE.GROUPS - -
-
- - - -
-
-
-
- - -DATABASE:GetCategoryFromAirbase(AirbaseName) - -
-
- - - -

Parameter

-
    -
  • - -

    AirbaseName :

    - -
  • -
-
-
-
-
- - -DATABASE:GetCategoryFromClientTemplate(ClientName) - -
-
- - - -

Parameter

-
    -
  • - -

    ClientName :

    - -
  • -
-
-
-
-
- - -DATABASE:GetCoalitionFromAirbase(AirbaseName) - -
-
- - - -

Parameter

-
    -
  • - -

    AirbaseName :

    - -
  • -
-
-
-
-
- - -DATABASE:GetCoalitionFromClientTemplate(ClientName) - -
-
- - - -

Parameter

-
    -
  • - -

    ClientName :

    - -
  • -
-
-
-
-
- - -DATABASE:GetCountryFromClientTemplate(ClientName) - -
-
- - - -

Parameter

-
    -
  • - -

    ClientName :

    - -
  • -
-
-
-
-
- - -DATABASE:GetGroupNameFromUnitName(UnitName) - -
-
- - - -

Parameter

-
    -
  • - -

    UnitName :

    - -
  • -
-
-
-
-
- - -DATABASE:GetGroupTemplate(GroupName) - -
-
- - - -

Parameter

-
    -
  • - -

    GroupName :

    - -
  • -
-
-
-
-
- - -DATABASE:GetGroupTemplateFromUnitName(UnitName) - -
-
- - - -

Parameter

-
    -
  • - -

    UnitName :

    - -
  • -
-
-
-
-
- - -DATABASE:GetStaticUnitTemplate(StaticName) - -
-
- - - -

Parameter

-
    -
  • - -

    StaticName :

    - -
  • -
-
-
-
-
- - -DATABASE:GetStatusGroup(GroupName) - -
-
- -

Get a status to a Group within the Database, this to check crossing events for example.

- -

Parameter

-
    -
  • - -

    GroupName :

    - -
  • -
-
-
-
-
- - - -DATABASE.NavPoints - -
-
- - - -
-
-
-
- - - -DATABASE.Navpoints - -
-
- - - -
-
-
-
- - -DATABASE:New() - -
-
- -

Creates a new DATABASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

- -

Return value

- -

#DATABASE:

- - -

Usage:

-
-- Define a new DATABASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
-DBObject = DATABASE:New()
- -
-
-
-
- - -DATABASE:OnEventDeleteCargo(EventData) - -
-
- -

Handles the OnEventDeleteCargo.

- -

Parameter

- -
-
-
-
- - -DATABASE:OnEventNewCargo(EventData) - -
-
- -

Handles the OnEventNewCargo event.

- -

Parameter

- -
-
-
-
- - - -DATABASE.PLAYERS - -
-
- - - -
-
-
-
- - - -DATABASE.PLAYERSJOINED - -
-
- - - -
-
-
-
- - - -DATABASE.STATICS - -
-
- - - -
-
-
-
- - -DATABASE:SetStatusGroup(GroupName, Status) - -
-
- -

Set a status to a Group within the Database, this to check crossing events for example.

- -

Parameters

-
    -
  • - -

    GroupName :

    - -
  • -
  • - -

    Status :

    - -
  • -
-
-
-
-
- - -DATABASE:Spawn(SpawnTemplate) - -
-
- -

Instantiate new Groups within the DCSRTE.

- - -

This method expects EXACTLY the same structure as a structure within the ME, and needs 2 additional fields defined: -SpawnCountryID, SpawnCategoryID -This method is used by the SPAWN class.

- -

Parameter

-
    -
  • - -

    #table SpawnTemplate :

    - -
  • -
-

Return value

- -

#DATABASE: -self

- -
-
-
-
- - - -DATABASE.Templates - -
-
- - - -
-
-
-
- - - -DATABASE.UNITS - -
-
- - - -
-
-
-
- - -DATABASE:_EventOnBirth(Event) - -
-
- -

Handles the OnBirth event for the alive units set.

- -

Parameter

- -
-
-
-
- - -DATABASE:_EventOnDeadOrCrash(Event) - -
-
- -

Handles the OnDead or OnCrash event for alive units set.

- -

Parameter

- -
-
-
-
- - -DATABASE:_EventOnPlayerEnterUnit(Event) - -
-
- -

Handles the OnPlayerEnterUnit event to fill the active players table (with the unit filter applied).

- -

Parameter

- -
-
-
-
- - -DATABASE:_EventOnPlayerLeaveUnit(Event) - -
-
- -

Handles the OnPlayerLeaveUnit event to clean the active players table.

- -

Parameter

- -
-
-
-
- - -DATABASE:_RegisterAirbases() - -
-
- - - -
-
-
-
- - -DATABASE:_RegisterClients() - -
-
- -

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

- -

Return value

- -

#DATABASE: -self

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

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

- -

Parameters

-
    -
  • - -

    #table GroupTemplate :

    - -
  • -
  • - -

    CoalitionID :

    - -
  • -
  • - -

    CategoryID :

    - -
  • -
  • - -

    CountryID :

    - -
  • -
-

Return value

- -

#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() - -
-
- - - -
-
-
-
- - -DATABASE:_RegisterTemplates() - -
-
- - - -
-
- -
- -
- - diff --git a/docs/Documentation/Detection.html b/docs/Documentation/Detection.html deleted file mode 100644 index c17360e5a..000000000 --- a/docs/Documentation/Detection.html +++ /dev/null @@ -1,4554 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Detection

- -

Functional - DETECTION_ classes model the detection of enemy units by FACs or RECCEs and group them according various methods.

- - - -

Banner Image

- -
- -

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.

- -

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:

- -
    -
  • Mechanist : Early concept of DETECTION_AREAS.
  • -
- -

Authors:

- -
    -
  • FlightControl : Analysis, Design, Programming, Testing
  • -
- - -

Global(s)

- - - - - - - - - - - - - - - - - -
DETECTION_AREAS - -
DETECTION_BASE -

DETECTION_BASE class, extends Fsm#FSM

- -

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

-
DETECTION_TYPES - -
DETECTION_UNITS - -
-

Type DETECTION_AREAS

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DETECTION_AREAS:BoundDetectedZones() -

Bound the detected zones

-
DETECTION_AREAS:CalculateThreatLevelA2G(DetectedItem) -

Calculate the maxium A2G threat level of the DetectedItem.

-
DETECTION_AREAS.ClassName - -
DETECTION_AREAS:CreateDetectionSets() -

Make a DetectionSet table.

-
DETECTION_AREAS:DetectedItemReportSummary(Index) -

Report summary of a detected item using a given numeric index.

-
DETECTION_AREAS.DetectedItems -

A list of areas containing the set of Units, Zones, the center Unit within the zone, and ID of each area that was detected within a DetectionZoneRange.

-
DETECTION_AREAS.DetectionZoneRange -

The range till which targets are grouped upon the first detected target.

-
DETECTION_AREAS:FlareDetectedUnits() -

Flare the detected units

-
DETECTION_AREAS:FlareDetectedZones() -

Flare the detected zones

-
DETECTION_AREAS:GetChangeText(DetectedItem) -

Make text documenting the changes of the detected zone.

-
DETECTION_AREAS:GetTreatLevelA2G(DetectedItem) -

Returns the A2G threat level of the units in the DetectedItem

-
DETECTION_AREAS:IsFriendliesNearBy(DetectedItem) -

Returns if there are friendlies nearby the FAC units ...

-
DETECTION_AREAS:NearestFAC(DetectedItem) -

Find the nearest FAC of the DetectedItem.

-
DETECTION_AREAS:New(DetectionSetGroup, DetectionZoneRange) -

DETECTION_AREAS constructor.

-
DETECTION_AREAS:SmokeDetectedUnits() -

Smoke the detected units

-
DETECTION_AREAS:SmokeDetectedZones() -

Smoke the detected zones

-
DETECTION_AREAS._BoundDetectedZones - -
DETECTION_AREAS._FlareDetectedUnits - -
DETECTION_AREAS._FlareDetectedZones - -
DETECTION_AREAS._SmokeDetectedUnits - -
DETECTION_AREAS._SmokeDetectedZones - -
- -

Type DETECTION_BASE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DETECTION_BASE:AcceptChanges(DetectedItem) -

Accepts changes from the detected item.

-
DETECTION_BASE.AcceptRange - -
DETECTION_BASE.AcceptZones - -
DETECTION_BASE:AddChangeItem(DetectedItem, ChangeCode, ItemUnitType) -

Add a change to the detected zone.

-
DETECTION_BASE:AddChangeUnit(DetectedItem, ChangeCode, ChangeUnitType) -

Add a change to the detected zone.

-
DETECTION_BASE:AddDetectedItem(DetectedItemIndex, Set) -

Adds a new DetectedItem to the DetectedItems list.

-
DETECTION_BASE:AddDetectedItemZone(DetectedItemIndex, Set, Zone) -

Adds a new DetectedItem to the DetectedItems list.

-
DETECTION_BASE.AlphaAngleProbability - -
DETECTION_BASE.CountryID - -
DETECTION_BASE:CreateDetectionSets() -

Make a DetectionSet table.

-
DETECTION_BASE:Detect() -

Synchronous Event Trigger for Event Detect.

-
DETECTION_BASE.DetectDLINK - -
DETECTION_BASE.DetectIRST - -
DETECTION_BASE.DetectOptical - -
DETECTION_BASE.DetectRWR - -
DETECTION_BASE.DetectRadar - -
DETECTION_BASE.DetectVisual - -
DETECTION_BASE:Detected() -

Synchronous Event Trigger for Event Detected.

-
DETECTION_BASE.DetectedItemCount - -
DETECTION_BASE.DetectedItemMax - -
DETECTION_BASE:DetectedItemReportSummary(Index) -

Report summary of a detected item using a given numeric index.

-
DETECTION_BASE.DetectedItems - -
DETECTION_BASE.DetectedObjects -

The list of detected objects.

-
DETECTION_BASE.DetectedObjectsIdentified -

Map of the DetectedObjects identified.

-
DETECTION_BASE:DetectedReportDetailed() -

Report detailed of a detectedion result.

-
DETECTION_BASE.DetectionCount - -
DETECTION_BASE.DetectionInterval - -
DETECTION_BASE.DetectionRange -

The range till which targets are accepted to be detected.

-
DETECTION_BASE.DetectionRun - -
DETECTION_BASE.DetectionScheduler - -
DETECTION_BASE.DetectionSetGroup -

The Set of GROUPs in the Forward Air Controller role.

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

-
DETECTION_BASE:GetDetectedItem(Index) -

Get a detected item using a given numeric index.

-
DETECTION_BASE:GetDetectedItems() -

Get the detected Set#SET_BASEs.

-
DETECTION_BASE:GetDetectedItemsCount() -

Get the amount of SETs with detected objects.

-
DETECTION_BASE:GetDetectedObject(ObjectName) -

Gets a detected object with a given name.

-
DETECTION_BASE:GetDetectedSet(Index) -

Get the Set#SET_UNIT of a detecttion area using a given numeric index.

-
DETECTION_BASE:GetDetectedZone(Index) -

Get the Zone#ZONE_UNIT of a detection area using a given numeric index.

-
DETECTION_BASE:GetDetectionSetGroup() -

Get the detection Groups.

-
DETECTION_BASE:IdentifyDetectedObject(DetectedObject) -

Identifies a detected object during detection processing.

-
DETECTION_BASE:InitDetectDLINK(DetectDLINK) -

Detect DLINK.

-
DETECTION_BASE:InitDetectIRST(DetectIRST) -

Detect IRST.

-
DETECTION_BASE:InitDetectOptical(DetectOptical) -

Detect Optical.

-
DETECTION_BASE:InitDetectRWR(DetectRWR) -

Detect RWR.

-
DETECTION_BASE:InitDetectRadar(DetectRadar) -

Detect Radar.

-
DETECTION_BASE:InitDetectVisual(DetectVisual) -

Detect Visual.

-
DETECTION_BASE:IsDetectedObjectIdentified(DetectedObject) -

Determines if a detected object has already been identified during detection processing.

-
DETECTION_BASE:IsFriendliesNearBy(DetectedItem) -

Returns if there are friendlies nearby the FAC units ...

-
DETECTION_BASE:New(DetectionSetGroup) -

DETECTION constructor.

-
DETECTION_BASE:OnAfterDetect(From, Event, To) -

OnAfter Transition Handler for Event Detect.

-
DETECTION_BASE:OnAfterDetected(From, Event, To) -

OnAfter Transition Handler for Event Detected.

-
DETECTION_BASE:OnAfterStart(From, Event, To) -

OnAfter Transition Handler for Event Start.

-
DETECTION_BASE:OnAfterStop(From, Event, To) -

OnAfter Transition Handler for Event Stop.

-
DETECTION_BASE:OnBeforeDetect(From, Event, To) -

OnBefore Transition Handler for Event Detect.

-
DETECTION_BASE:OnBeforeDetected(From, Event, To) -

OnBefore Transition Handler for Event Detected.

-
DETECTION_BASE:OnBeforeStart(From, Event, To) -

OnBefore Transition Handler for Event Start.

-
DETECTION_BASE:OnBeforeStop(From, Event, To) -

OnBefore Transition Handler for Event Stop.

-
DETECTION_BASE:OnEnterDetecting(From, Event, To) -

OnEnter Transition Handler for State Detecting.

-
DETECTION_BASE:OnEnterStopped(From, Event, To) -

OnEnter Transition Handler for State Stopped.

-
DETECTION_BASE:OnLeaveDetecting(From, Event, To) -

OnLeave Transition Handler for State Detecting.

-
DETECTION_BASE:OnLeaveStopped(From, Event, To) -

OnLeave Transition Handler for State Stopped.

-
DETECTION_BASE.RejectZones - -
DETECTION_BASE:RemoveDetectedItem(DetectedItemIndex) -

Removes an existing DetectedItem from the DetectedItems list.

-
DETECTION_BASE:ReportFriendliesNearBy(ReportGroupData) -

Background worker function to determine if there are friendlies nearby ...

-
DETECTION_BASE:Schedule(DelayTime, RepeatInterval) -

Schedule the DETECTION construction.

-
DETECTION_BASE.ScheduleDelayTime - -
DETECTION_BASE.ScheduleRepeatInterval - -
DETECTION_BASE:SetAcceptRange(AcceptRange) -

Accept detections if within a range in meters.

-
DETECTION_BASE:SetAcceptZones(AcceptZones) -

Accept detections if within the specified zone(s).

-
DETECTION_BASE:SetAlphaAngleProbability(AlphaAngleProbability) -

Upon a visual detection, the higher the unit is during the detecting process, the more likely the detected unit is to be detected properly.

-
DETECTION_BASE:SetDetectionInterval(DetectionInterval) -

Set the detection interval time in seconds.

-
DETECTION_BASE:SetDistanceProbability(DistanceProbability) -

Upon a visual detection, the further away a detected object is, the less likely it is to be detected properly.

-
DETECTION_BASE:SetRejectZones(RejectZones) -

Reject detections if within the specified zone(s).

-
DETECTION_BASE:SetZoneProbability(ZoneArray) -

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.

-
DETECTION_BASE:Start() -

Synchronous Event Trigger for Event Start.

-
DETECTION_BASE:Stop() -

Synchronous Event Trigger for Event Stop.

-
DETECTION_BASE:UnIdentifyAllDetectedObjects() -

UnIdentify all detected objects during detection processing.

-
DETECTION_BASE:UnIdentifyDetectedObject(DetectedObject) -

UnIdentify a detected object during detection processing.

-
DETECTION_BASE.ZoneProbability - -
DETECTION_BASE:__Detect(Delay) -

Asynchronous Event Trigger for Event Detect.

-
DETECTION_BASE:__Detected(Delay) -

Asynchronous Event Trigger for Event Detected.

-
DETECTION_BASE:__Start(Delay) -

Asynchronous Event Trigger for Event Start.

-
DETECTION_BASE:__Stop(Delay) -

Asynchronous Event Trigger for Event Stop.

-
DETECTION_BASE:onafterDetect(From, Event, To) - -
DETECTION_BASE:onafterDetectionGroup(From, Event, To, DetectionGroup) - -
DETECTION_BASE:onafterStart(From, Event, To) - -
- -

Type DETECTION_BASE.DetectedItem

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DETECTION_BASE.DetectedItem.Changed -

Documents if the detected area has changes.

-
DETECTION_BASE.DetectedItem.Changes -

A list of the changes reported on the detected area. (It is up to the user of the detected area to consume those changes).

-
DETECTION_BASE.DetectedItem.FriendliesNearBy -

Indicates if there are friendlies within the detected area.

-
DETECTION_BASE.DetectedItem.ItemID -

-- The identifier of the detected area.

-
DETECTION_BASE.DetectedItem.MaxThreatLevelA2G - -
DETECTION_BASE.DetectedItem.NearestFAC -

The nearest FAC near the Area.

-
DETECTION_BASE.DetectedItem.Set -

-- The Set of Units in the detected area.

-
DETECTION_BASE.DetectedItem.Zone -

-- The Zone of the detected area.

-
- -

Type DETECTION_BASE.DetectedObject

- - - - - - - - - - - - - - - - - - - - - -
DETECTION_BASE.DetectedObject.Distance - -
DETECTION_BASE.DetectedObject.Identified - -
DETECTION_BASE.DetectedObject.Name - -
DETECTION_BASE.DetectedObject.Type - -
DETECTION_BASE.DetectedObject.Visible - -
- -

Type DETECTION_TYPES

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DETECTION_TYPES.ClassName - -
DETECTION_TYPES:CreateDetectionSets() -

Create the DetectedItems list from the DetectedObjects table.

-
DETECTION_TYPES:DetectedItemReportSummary(Index, DetectedTypeName) -

Report summary of a DetectedItem using a given numeric index.

-
DETECTION_TYPES:DetectedReportDetailed() -

Report detailed of a detection result.

-
DETECTION_TYPES.DetectionRange - -
DETECTION_TYPES:GetChangeText(DetectedItem) -

Make text documenting the changes of the detected zone.

-
DETECTION_TYPES:New(DetectionSetGroup) -

DETECTION_TYPES constructor.

-
DETECTION_TYPES._BoundDetectedZones - -
DETECTION_TYPES._FlareDetectedUnits - -
DETECTION_TYPES._FlareDetectedZones - -
DETECTION_TYPES._SmokeDetectedUnits - -
DETECTION_TYPES._SmokeDetectedZones - -
- -

Type DETECTION_UNITS

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DETECTION_UNITS.ClassName - -
DETECTION_UNITS:CreateDetectionSets() -

Create the DetectedItems list from the DetectedObjects table.

-
DETECTION_UNITS:DetectedItemReportSummary(Index) -

Report summary of a DetectedItem using a given numeric index.

-
DETECTION_UNITS:DetectedReportDetailed() -

Report detailed of a detection result.

-
DETECTION_UNITS.DetectionRange -

The range till which targets are detected.

-
DETECTION_UNITS:GetChangeText(DetectedItem) -

Make text documenting the changes of the detected zone.

-
DETECTION_UNITS:New(DetectionSetGroup) -

DETECTION_UNITS constructor.

-
DETECTION_UNITS._BoundDetectedZones - -
DETECTION_UNITS._FlareDetectedUnits - -
DETECTION_UNITS._FlareDetectedZones - -
DETECTION_UNITS._SmokeDetectedUnits - -
DETECTION_UNITS._SmokeDetectedZones - -
- -

Global(s)

-
-
- - #DETECTION_AREAS - -DETECTION_AREAS - -
-
- - - -
-
-
-
- - #DETECTION_BASE - -DETECTION_BASE - -
-
- -

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:

- - - -

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

- -

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 ).
  • -
- -

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. -
  • -
- -
-
-
-
- - #DETECTION_TYPES - -DETECTION_TYPES - -
-
- - - -
-
-
-
- - #DETECTION_UNITS - -DETECTION_UNITS - -
-
- - - -
-
-

Type Detection

- -

Type DETECTION_AREAS

- -

# 4) DETECTION_AREAS class, extends Detection#DETECTION_BASE

- -

The DETECTION_AREAS class will detect units within the battle zone for a list of Groups detecting targets following (a) detection method(s), - and will build a list (table) of Set#SET_UNITs containing the Unit#UNITs detected.

- - -

The class is group the detected units within zones given a DetectedZoneRange parameter. - A set with multiple detected zones will be created as there are groups of units detected.

- -

## 4.1) Retrieve the Detected Unit Sets and Detected Zones

- -

The methods to manage the DetectedItems[].Set(s) are implemented in Detection#DECTECTION_BASE and - the methods to manage the DetectedItems[].Zone(s) is implemented in Detection#DETECTION_AREAS.

- -

Retrieve the DetectedItems[].Set with the method Detection#DETECTION_BASE.GetDetectedSet(). A Set#SET_UNIT object will be returned.

- -

Retrieve the formed Zones as a result of the grouping the detected units within the DetectionZoneRange, use the method Detection#DETECTION_BASE.GetDetectionZones(). - To understand the amount of zones created, use the method Detection#DETECTION_BASE.GetDetectionZoneCount(). - If you want to obtain a specific zone from the DetectedZones, use the method Detection#DETECTION_BASE.GetDetectionZone() with a given index.

- -

## 4.4) Flare or Smoke detected units

- -

Use the methods Detection#DETECTION_AREAS.FlareDetectedUnits() or Detection#DETECTION_AREAS.SmokeDetectedUnits() to flare or smoke the detected units when a new detection has taken place.

- -

## 4.5) Flare or Smoke or Bound detected zones

- -

Use the methods:

- - - -

the detected zones when a new detection has taken place. -

- -

Field(s)

-
-
- - -DETECTION_AREAS:BoundDetectedZones() - -
-
- -

Bound the detected zones

- -

Return value

- -

#DETECTION_AREAS: -self

- -
-
-
-
- - -DETECTION_AREAS:CalculateThreatLevelA2G(DetectedItem) - -
-
- -

Calculate the maxium A2G threat level of the DetectedItem.

- -

Parameter

- -
-
-
-
- - #string - -DETECTION_AREAS.ClassName - -
-
- - - -
-
-
-
- - -DETECTION_AREAS:CreateDetectionSets() - -
-
- -

Make a DetectionSet table.

- - -

This function will be overridden in the derived clsses.

- -

Return value

- -

#DETECTION_AREAS: -self

- -
-
-
-
- - -DETECTION_AREAS:DetectedItemReportSummary(Index) - -
-
- -

Report summary of a detected item using a given numeric index.

- -

Parameter

-
    -
  • - -

    Index :

    - -
  • -
-

Return value

- -

#string:

- - -
-
-
-
- - #DETECTION_BASE.DetectedItems - -DETECTION_AREAS.DetectedItems - -
-
- -

A list of areas containing the set of Units, Zones, the center Unit within the zone, and ID of each area that was detected within a DetectionZoneRange.

- -
-
-
-
- - Dcs.DCSTypes#Distance - -DETECTION_AREAS.DetectionZoneRange - -
-
- -

The range till which targets are grouped upon the first detected target.

- -
-
-
-
- - -DETECTION_AREAS:FlareDetectedUnits() - -
-
- -

Flare the detected units

- -

Return value

- -

#DETECTION_AREAS: -self

- -
-
-
-
- - -DETECTION_AREAS:FlareDetectedZones() - -
-
- -

Flare the detected zones

- -

Return value

- -

#DETECTION_AREAS: -self

- -
-
-
-
- - -DETECTION_AREAS:GetChangeText(DetectedItem) - -
-
- -

Make text documenting the changes of the detected zone.

- -

Parameter

- -

Return value

- -

#string: -The Changes text

- -
-
-
-
- - -DETECTION_AREAS:GetTreatLevelA2G(DetectedItem) - -
-
- -

Returns the A2G threat level of the units in the DetectedItem

- -

Parameter

- -

Return value

- -

#number: -a scale from 0 to 10.

- -
-
-
-
- - -DETECTION_AREAS:IsFriendliesNearBy(DetectedItem) - -
-
- -

Returns if there are friendlies nearby the FAC units ...

- -

Parameter

-
    -
  • - -

    DetectedItem :

    - -
  • -
-

Return value

- -

#boolean: -trhe if there are friendlies nearby

- -
-
-
-
- - -DETECTION_AREAS:NearestFAC(DetectedItem) - -
-
- -

Find the nearest FAC of the DetectedItem.

- -

Parameter

- -

Return value

- -

Wrapper.Unit#UNIT: -The nearest FAC unit

- -
-
-
-
- - -DETECTION_AREAS:New(DetectionSetGroup, DetectionZoneRange) - -
-
- -

DETECTION_AREAS constructor.

- -

Parameters

-
    -
  • - -

    Core.Set#SET_GROUP DetectionSetGroup : -The Set of GROUPs in the Forward Air Controller role.

    - -
  • -
  • - -

    Dcs.DCSTypes#Distance DetectionZoneRange : -The range till which targets are grouped upon the first detected target.

    - -
  • -
-

Return value

- -

#DETECTION_AREAS:

- - -
-
-
-
- - -DETECTION_AREAS:SmokeDetectedUnits() - -
-
- -

Smoke the detected units

- -

Return value

- -

#DETECTION_AREAS: -self

- -
-
-
-
- - -DETECTION_AREAS:SmokeDetectedZones() - -
-
- -

Smoke the detected zones

- -

Return value

- -

#DETECTION_AREAS: -self

- -
-
-
-
- - #boolean - -DETECTION_AREAS._BoundDetectedZones - -
-
- - - -
-
-
-
- - #boolean - -DETECTION_AREAS._FlareDetectedUnits - -
-
- - - -
-
-
-
- - #boolean - -DETECTION_AREAS._FlareDetectedZones - -
-
- - - -
-
-
-
- - #boolean - -DETECTION_AREAS._SmokeDetectedUnits - -
-
- - - -
-
-
-
- - #boolean - -DETECTION_AREAS._SmokeDetectedZones - -
-
- - - -
-
- -

Type DETECTION_BASE

-

Field(s)

-
-
- - -DETECTION_BASE:AcceptChanges(DetectedItem) - -
-
- -

Accepts changes from the detected item.

- -

Parameter

- -

Return value

- -

#DETECTION_BASE: -self

- -
-
-
-
- - - -DETECTION_BASE.AcceptRange - -
-
- - - -
-
-
-
- - - -DETECTION_BASE.AcceptZones - -
-
- - - -
-
-
-
- - -DETECTION_BASE:AddChangeItem(DetectedItem, ChangeCode, ItemUnitType) - -
-
- -

Add a change to the detected zone.

- -

Parameters

- -

Return value

- -

#DETECTION_BASE: -self

- -
-
-
-
- - -DETECTION_BASE:AddChangeUnit(DetectedItem, ChangeCode, ChangeUnitType) - -
-
- -

Add a change to the detected zone.

- -

Parameters

- -

Return value

- -

#DETECTION_BASE: -self

- -
-
-
-
- - -DETECTION_BASE:AddDetectedItem(DetectedItemIndex, Set) - -
-
- -

Adds a new DetectedItem to the DetectedItems list.

- - -

The DetectedItem is a table and contains a SET_UNIT in the field Set.

- -

Parameters

-
    -
  • - -

    #string DetectedItemIndex : -The index of the DetectedItem.

    - -
  • -
  • - -

    Core.Set#SET_UNIT Set : -(optional) The Set of Units to be added.

    - -
  • -
-

Return value

- -

#DETECTION_BASE.DetectedItem:

- - -
-
-
-
- - -DETECTION_BASE:AddDetectedItemZone(DetectedItemIndex, Set, Zone) - -
-
- -

Adds a new DetectedItem to the DetectedItems list.

- - -

The DetectedItem is a table and contains a SET_UNIT in the field Set.

- -

Parameters

-
    -
  • - -

    #string DetectedItemIndex : -The index of the DetectedItem.

    - -
  • -
  • - -

    Core.Set#SET_UNIT Set : -(optional) The Set of Units to be added.

    - -
  • -
  • - -

    Core.Zone#ZONE_UNIT Zone : -(optional) The Zone to be added where the Units are located.

    - -
  • -
-

Return value

- -

#DETECTION_BASE.DetectedItem:

- - -
-
-
-
- - - -DETECTION_BASE.AlphaAngleProbability - -
-
- - - -
-
-
-
- - - -DETECTION_BASE.CountryID - -
-
- - - -
-
-
-
- - -DETECTION_BASE:CreateDetectionSets() - -
-
- -

Make a DetectionSet table.

- - -

This function will be overridden in the derived clsses.

- -

Return value

- -

#DETECTION_BASE: -self

- -
-
-
-
- - -DETECTION_BASE:Detect() - -
-
- -

Synchronous Event Trigger for Event Detect.

- -
-
-
-
- - - -DETECTION_BASE.DetectDLINK - -
-
- - - -
-
-
-
- - - -DETECTION_BASE.DetectIRST - -
-
- - - -
-
-
-
- - - -DETECTION_BASE.DetectOptical - -
-
- - - -
-
-
-
- - - -DETECTION_BASE.DetectRWR - -
-
- - - -
-
-
-
- - - -DETECTION_BASE.DetectRadar - -
-
- - - -
-
-
-
- - - -DETECTION_BASE.DetectVisual - -
-
- - - -
-
-
-
- - -DETECTION_BASE:Detected() - -
-
- -

Synchronous Event Trigger for Event Detected.

- -
-
-
-
- - -DETECTION_BASE.DetectedItemCount - -
-
- - - -
-
-
-
- - -DETECTION_BASE.DetectedItemMax - -
-
- - - -
-
-
-
- - -DETECTION_BASE:DetectedItemReportSummary(Index) - -
-
- -

Report summary of a detected item using a given numeric index.

- -

Parameter

-
    -
  • - -

    Index :

    - -
  • -
-

Return value

- -

#string:

- - -
-
-
-
- - - -DETECTION_BASE.DetectedItems - -
-
- - - -
-
-
-
- - #DETECTION_BASE.DetectedObjects - -DETECTION_BASE.DetectedObjects - -
-
- -

The list of detected objects.

- -
-
-
-
- - #table - -DETECTION_BASE.DetectedObjectsIdentified - -
-
- -

Map of the DetectedObjects identified.

- -
-
-
-
- - -DETECTION_BASE:DetectedReportDetailed() - -
-
- -

Report detailed of a detectedion result.

- -

Return value

- -

#string:

- - -
-
-
-
- - #number - -DETECTION_BASE.DetectionCount - -
-
- - - -
-
-
-
- - - -DETECTION_BASE.DetectionInterval - -
-
- - - -
-
-
-
- - Dcs.DCSTypes#Distance - -DETECTION_BASE.DetectionRange - -
-
- -

The range till which targets are accepted to be detected.

- -
-
-
-
- - #number - -DETECTION_BASE.DetectionRun - -
-
- - - -
-
-
-
- - - -DETECTION_BASE.DetectionScheduler - -
-
- - - -
-
-
-
- - Core.Set#SET_GROUP - -DETECTION_BASE.DetectionSetGroup - -
-
- -

The Set of GROUPs in the Forward Air Controller role.

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

- - - -

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

- -
-
-
-
- - -DETECTION_BASE:GetDetectedItem(Index) - -
-
- -

Get a detected item using a given numeric index.

- -

Parameter

-
    -
  • - -

    #number Index :

    - -
  • -
-

Return value

- -

#DETECTION_BASE.DetectedItem:

- - -
-
-
-
- - -DETECTION_BASE:GetDetectedItems() - -
-
- -

Get the detected Set#SET_BASEs.

- -

Return value

- -

#DETECTION_BASE.DetectedItems:

- - -
-
-
-
- - -DETECTION_BASE:GetDetectedItemsCount() - -
-
- -

Get the amount of SETs with detected objects.

- -

Return value

- -

#number: -Count

- -
-
-
-
- - -DETECTION_BASE:GetDetectedObject(ObjectName) - -
-
- -

Gets a detected object with a given name.

- -

Parameter

-
    -
  • - -

    #string ObjectName :

    - -
  • -
-

Return value

- -

#DETECTION_BASE.DetectedObject:

- - -
-
-
-
- - -DETECTION_BASE:GetDetectedSet(Index) - -
-
- -

Get the Set#SET_UNIT of a detecttion area using a given numeric index.

- -

Parameter

-
    -
  • - -

    #number Index :

    - -
  • -
-

Return value

- -

Core.Set#SET_UNIT: -DetectedSet

- -
-
-
-
- - -DETECTION_BASE:GetDetectedZone(Index) - -
-
- -

Get the Zone#ZONE_UNIT of a detection area using a given numeric index.

- -

Parameter

-
    -
  • - -

    #number Index :

    - -
  • -
-

Return value

- -

Core.Zone#ZONE_UNIT: -DetectedZone

- -
-
-
-
- - -DETECTION_BASE:GetDetectionSetGroup() - -
-
- -

Get the detection Groups.

- -

Return value

- -

Wrapper.Group#GROUP:

- - -
-
-
-
- - -DETECTION_BASE:IdentifyDetectedObject(DetectedObject) - -
-
- -

Identifies a detected object during detection processing.

- -

Parameter

- -
-
-
-
- - -DETECTION_BASE:InitDetectDLINK(DetectDLINK) - -
-
- -

Detect DLINK.

- -

Parameter

-
    -
  • - -

    #boolean DetectDLINK :

    - -
  • -
-

Return value

- -

#DETECTION_BASE: -self

- -
-
-
-
- - -DETECTION_BASE:InitDetectIRST(DetectIRST) - -
-
- -

Detect IRST.

- -

Parameter

-
    -
  • - -

    #boolean DetectIRST :

    - -
  • -
-

Return value

- -

#DETECTION_BASE: -self

- -
-
-
-
- - -DETECTION_BASE:InitDetectOptical(DetectOptical) - -
-
- -

Detect Optical.

- -

Parameter

-
    -
  • - -

    #boolean DetectOptical :

    - -
  • -
-

Return value

- -

#DETECTION_BASE: -self

- -
-
-
-
- - -DETECTION_BASE:InitDetectRWR(DetectRWR) - -
-
- -

Detect RWR.

- -

Parameter

-
    -
  • - -

    #boolean DetectRWR :

    - -
  • -
-

Return value

- -

#DETECTION_BASE: -self

- -
-
-
-
- - -DETECTION_BASE:InitDetectRadar(DetectRadar) - -
-
- -

Detect Radar.

- -

Parameter

-
    -
  • - -

    #boolean DetectRadar :

    - -
  • -
-

Return value

- -

#DETECTION_BASE: -self

- -
-
-
-
- - -DETECTION_BASE:InitDetectVisual(DetectVisual) - -
-
- -

Detect Visual.

- -

Parameter

-
    -
  • - -

    #boolean DetectVisual :

    - -
  • -
-

Return value

- -

#DETECTION_BASE: -self

- -
-
-
-
- - -DETECTION_BASE:IsDetectedObjectIdentified(DetectedObject) - -
-
- -

Determines if a detected object has already been identified during detection processing.

- -

Parameter

- -

Return value

- -

#boolean: -true if already identified.

- -
-
-
-
- - -DETECTION_BASE:IsFriendliesNearBy(DetectedItem) - -
-
- -

Returns if there are friendlies nearby the FAC units ...

- -

Parameter

-
    -
  • - -

    DetectedItem :

    - -
  • -
-

Return value

- -

#boolean: -trhe if there are friendlies nearby

- -
-
-
-
- - -DETECTION_BASE:New(DetectionSetGroup) - -
-
- -

DETECTION constructor.

- -

Parameter

-
    -
  • - -

    Core.Set#SET_GROUP DetectionSetGroup : -The Set of GROUPs in the Forward Air Controller role.

    - -
  • -
-

Return value

- -

#DETECTION_BASE: -self

- -
-
-
-
- - -DETECTION_BASE:OnAfterDetect(From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Detect.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -DETECTION_BASE:OnAfterDetected(From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Detected.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -DETECTION_BASE:OnAfterStart(From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Start.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -DETECTION_BASE:OnAfterStop(From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Stop.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -DETECTION_BASE:OnBeforeDetect(From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Detect.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -DETECTION_BASE:OnBeforeDetected(From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Detected.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -DETECTION_BASE:OnBeforeStart(From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Start.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -DETECTION_BASE:OnBeforeStop(From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Stop.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -DETECTION_BASE:OnEnterDetecting(From, Event, To) - -
-
- -

OnEnter Transition Handler for State Detecting.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -DETECTION_BASE:OnEnterStopped(From, Event, To) - -
-
- -

OnEnter Transition Handler for State Stopped.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -DETECTION_BASE:OnLeaveDetecting(From, Event, To) - -
-
- -

OnLeave Transition Handler for State Detecting.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -DETECTION_BASE:OnLeaveStopped(From, Event, To) - -
-
- -

OnLeave Transition Handler for State Stopped.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - - -DETECTION_BASE.RejectZones - -
-
- - - -
-
-
-
- - -DETECTION_BASE:RemoveDetectedItem(DetectedItemIndex) - -
-
- -

Removes an existing DetectedItem from the DetectedItems list.

- - -

The DetectedItem is a table and contains a SET_UNIT in the field Set.

- -

Parameter

-
    -
  • - -

    #number DetectedItemIndex : -The index or position in the DetectedItems list where the item needs to be removed.

    - -
  • -
-
-
-
-
- - -DETECTION_BASE:ReportFriendliesNearBy(ReportGroupData) - -
-
- -

Background worker function to determine if there are friendlies nearby ...

- -

Parameter

-
    -
  • - -

    ReportGroupData :

    - -
  • -
-
-
-
-
- - -DETECTION_BASE:Schedule(DelayTime, RepeatInterval) - -
-
- -

Schedule the DETECTION construction.

- -

Parameters

-
    -
  • - -

    #number DelayTime : -The delay in seconds to wait the reporting.

    - -
  • -
  • - -

    #number RepeatInterval : -The repeat interval in seconds for the reporting to happen repeatedly.

    - -
  • -
-

Return value

- -

#DETECTION_BASE: -self

- -
-
-
-
- - - -DETECTION_BASE.ScheduleDelayTime - -
-
- - - -
-
-
-
- - - -DETECTION_BASE.ScheduleRepeatInterval - -
-
- - - -
-
-
-
- - -DETECTION_BASE:SetAcceptRange(AcceptRange) - -
-
- -

Accept detections if within a range in meters.

- -

Parameter

-
    -
  • - -

    #number AcceptRange : -Accept a detection if the unit is within the AcceptRange in meters.

    - -
  • -
-

Return value

- -

#DETECTION_BASE: -self

- -
-
-
-
- - -DETECTION_BASE:SetAcceptZones(AcceptZones) - -
-
- -

Accept detections if within the specified zone(s).

- -

Parameter

-
    -
  • - -

    AcceptZones : -Can be a list or ZONEBASE objects, or a single ZONEBASE object.

    - -
  • -
-

Return value

- -

#DETECTION_BASE: -self

- -
-
-
-
- - -DETECTION_BASE:SetAlphaAngleProbability(AlphaAngleProbability) - -
-
- -

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%

- -

Parameter

-
    -
  • - -

    AlphaAngleProbability : -The probability factor.

    - -
  • -
-

Return value

- -

#DETECTION_BASE: -self

- -
-
-
-
- - -DETECTION_BASE:SetDetectionInterval(DetectionInterval) - -
-
- -

Set the detection interval time in seconds.

- -

Parameter

-
    -
  • - -

    #number DetectionInterval : -Interval in seconds.

    - -
  • -
-

Return value

- -

#DETECTION_BASE: -self

- -
-
-
-
- - -DETECTION_BASE:SetDistanceProbability(DistanceProbability) - -
-
- -

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

- -

Parameter

-
    -
  • - -

    DistanceProbability : -The probability factor.

    - -
  • -
-

Return value

- -

#DETECTION_BASE: -self

- -
-
-
-
- - -DETECTION_BASE:SetRejectZones(RejectZones) - -
-
- -

Reject detections if within the specified zone(s).

- -

Parameter

-
    -
  • - -

    RejectZones : -Can be a list or ZONEBASE objects, or a single ZONEBASE object.

    - -
  • -
-

Return value

- -

#DETECTION_BASE: -self

- -
-
-
-
- - -DETECTION_BASE:SetZoneProbability(ZoneArray) - -
-
- -

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.

- -

Parameter

-
    -
  • - -

    ZoneArray : -Aray of a The ZONE_BASE object and a ZoneProbability pair..

    - -
  • -
-

Return value

- -

#DETECTION_BASE: -self

- -
-
-
-
- - -DETECTION_BASE:Start() - -
-
- -

Synchronous Event Trigger for Event Start.

- -
-
-
-
- - -DETECTION_BASE:Stop() - -
-
- -

Synchronous Event Trigger for Event Stop.

- -
-
-
-
- - -DETECTION_BASE:UnIdentifyAllDetectedObjects() - -
-
- -

UnIdentify all detected objects during detection processing.

- -
-
-
-
- - -DETECTION_BASE:UnIdentifyDetectedObject(DetectedObject) - -
-
- -

UnIdentify a detected object during detection processing.

- -

Parameter

- -
-
-
-
- - - -DETECTION_BASE.ZoneProbability - -
-
- - - -
-
-
-
- - -DETECTION_BASE:__Detect(Delay) - -
-
- -

Asynchronous Event Trigger for Event Detect.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -DETECTION_BASE:__Detected(Delay) - -
-
- -

Asynchronous Event Trigger for Event Detected.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -DETECTION_BASE:__Start(Delay) - -
-
- -

Asynchronous Event Trigger for Event Start.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -DETECTION_BASE:__Stop(Delay) - -
-
- -

Asynchronous Event Trigger for Event Stop.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -DETECTION_BASE:onafterDetect(From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -DETECTION_BASE:onafterDetectionGroup(From, Event, To, DetectionGroup) - -
-
- - - -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
  • - -

    Wrapper.Group#GROUP DetectionGroup : -The Group detecting.

    - -
  • -
-
-
-
-
- - -DETECTION_BASE:onafterStart(From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
- -

Type DETECTION_BASE.DetectedItem

-

Field(s)

-
-
- - #boolean - -DETECTION_BASE.DetectedItem.Changed - -
-
- -

Documents if the detected area has changes.

- -
-
-
-
- - #table - -DETECTION_BASE.DetectedItem.Changes - -
-
- -

A list of the changes reported on the detected area. (It is up to the user of the detected area to consume those changes).

- -
-
-
-
- - #boolean - -DETECTION_BASE.DetectedItem.FriendliesNearBy - -
-
- -

Indicates if there are friendlies within the detected area.

- -
-
-
-
- - #number - -DETECTION_BASE.DetectedItem.ItemID - -
-
- -

-- The identifier of the detected area.

- -
-
-
-
- - - -DETECTION_BASE.DetectedItem.MaxThreatLevelA2G - -
-
- - - -
-
-
-
- - Wrapper.Unit#UNIT - -DETECTION_BASE.DetectedItem.NearestFAC - -
-
- -

The nearest FAC near the Area.

- -
-
-
-
- - Core.Set#SET_UNIT - -DETECTION_BASE.DetectedItem.Set - -
-
- -

-- The Set of Units in the detected area.

- -
-
-
-
- - Core.Zone#ZONE_UNIT - -DETECTION_BASE.DetectedItem.Zone - -
-
- -

-- The Zone of the detected area.

- -
-
- -

Type DETECTION_BASE.DetectedItems

- -

Type DETECTION_BASE.DetectedObject

-

Field(s)

-
-
- - #number - -DETECTION_BASE.DetectedObject.Distance - -
-
- - - -
-
-
-
- - #boolean - -DETECTION_BASE.DetectedObject.Identified - -
-
- - - -
-
-
-
- - #string - -DETECTION_BASE.DetectedObject.Name - -
-
- - - -
-
-
-
- - #string - -DETECTION_BASE.DetectedObject.Type - -
-
- - - -
-
-
-
- - #boolean - -DETECTION_BASE.DetectedObject.Visible - -
-
- - - -
-
- -

Type DETECTION_BASE.DetectedObjects

- -

Type DETECTION_TYPES

- -

3) DETECTION_TYPES class, extends Detection#DETECTION_BASE

- -

The DETECTION_TYPES class will detect units within the battle zone.

- - -

It will build a DetectedItems[] list filled with DetectedItems, grouped by the type of units detected. -Each DetectedItem will contain a field Set, which contains a Set#SET_UNIT containing ONE UNIT object reference. -Beware that when the amount of different types detected is large, the DetectedItems[] list will be large also.

- - -

Field(s)

-
-
- - #string - -DETECTION_TYPES.ClassName - -
-
- - - -
-
-
-
- - -DETECTION_TYPES:CreateDetectionSets() - -
-
- -

Create the DetectedItems list from the DetectedObjects table.

- - -

For each DetectedItem, a one field array is created containing the Unit detected.

- -

Return value

- -

#DETECTION_TYPES: -self

- -
-
-
-
- - -DETECTION_TYPES:DetectedItemReportSummary(Index, DetectedTypeName) - -
-
- -

Report summary of a DetectedItem using a given numeric index.

- -

Parameters

-
    -
  • - -

    Index :

    - -
  • -
  • - -

    DetectedTypeName :

    - -
  • -
-

Return value

- -

#string:

- - -
-
-
-
- - -DETECTION_TYPES:DetectedReportDetailed() - -
-
- -

Report detailed of a detection result.

- -

Return value

- -

#string:

- - -
-
-
-
- - -DETECTION_TYPES.DetectionRange - -
-
- - - -
-
-
-
- - -DETECTION_TYPES:GetChangeText(DetectedItem) - -
-
- -

Make text documenting the changes of the detected zone.

- -

Parameter

- -

Return value

- -

#string: -The Changes text

- -
-
-
-
- - -DETECTION_TYPES:New(DetectionSetGroup) - -
-
- -

DETECTION_TYPES constructor.

- -

Parameter

- -

Return value

- -

Functional.Detection#DETECTION_TYPES: -self

- -
-
-
-
- - #boolean - -DETECTION_TYPES._BoundDetectedZones - -
-
- - - -
-
-
-
- - #boolean - -DETECTION_TYPES._FlareDetectedUnits - -
-
- - - -
-
-
-
- - #boolean - -DETECTION_TYPES._FlareDetectedZones - -
-
- - - -
-
-
-
- - #boolean - -DETECTION_TYPES._SmokeDetectedUnits - -
-
- - - -
-
-
-
- - #boolean - -DETECTION_TYPES._SmokeDetectedZones - -
-
- - - -
-
- -

Type DETECTION_TYPES.DetectedItem

- -

Type DETECTION_UNITS

- -

2) DETECTION_UNITS class, extends Detection#DETECTION_BASE

- -

The DETECTION_UNITS class will detect units within the battle zone.

- - -

It will build a DetectedItems list filled with DetectedItems. Each DetectedItem will contain a field Set, which contains a Set#SET_UNIT containing ONE UNIT object reference. -Beware that when the amount of units detected is large, the DetectedItems list will be large also.

- - -

Field(s)

-
-
- - #string - -DETECTION_UNITS.ClassName - -
-
- - - -
-
-
-
- - -DETECTION_UNITS:CreateDetectionSets() - -
-
- -

Create the DetectedItems list from the DetectedObjects table.

- - -

For each DetectedItem, a one field array is created containing the Unit detected.

- -

Return value

- -

#DETECTION_UNITS: -self

- -
-
-
-
- - -DETECTION_UNITS:DetectedItemReportSummary(Index) - -
-
- -

Report summary of a DetectedItem using a given numeric index.

- -

Parameter

-
    -
  • - -

    Index :

    - -
  • -
-

Return value

- -

#string:

- - -
-
-
-
- - -DETECTION_UNITS:DetectedReportDetailed() - -
-
- -

Report detailed of a detection result.

- -

Return value

- -

#string:

- - -
-
-
-
- - Dcs.DCSTypes#Distance - -DETECTION_UNITS.DetectionRange - -
-
- -

The range till which targets are detected.

- -
-
-
-
- - -DETECTION_UNITS:GetChangeText(DetectedItem) - -
-
- -

Make text documenting the changes of the detected zone.

- -

Parameter

- -

Return value

- -

#string: -The Changes text

- -
-
-
-
- - -DETECTION_UNITS:New(DetectionSetGroup) - -
-
- -

DETECTION_UNITS constructor.

- -

Parameter

-
    -
  • - -

    Core.Set#SET_GROUP DetectionSetGroup : -The Set of GROUPs in the Forward Air Controller role.

    - -
  • -
-

Return value

- -

Functional.Detection#DETECTION_UNITS: -self

- -
-
-
-
- - #boolean - -DETECTION_UNITS._BoundDetectedZones - -
-
- - - -
-
-
-
- - #boolean - -DETECTION_UNITS._FlareDetectedUnits - -
-
- - - -
-
-
-
- - #boolean - -DETECTION_UNITS._FlareDetectedZones - -
-
- - - -
-
-
-
- - #boolean - -DETECTION_UNITS._SmokeDetectedUnits - -
-
- - - -
-
-
-
- - #boolean - -DETECTION_UNITS._SmokeDetectedZones - -
-
- - - -
-
- -

Type DETECTION_UNITS.DetectedItem

- -

Type list

- -
- -
- - diff --git a/docs/Documentation/DetectionManager.html b/docs/Documentation/DetectionManager.html deleted file mode 100644 index f44b7a2a7..000000000 --- a/docs/Documentation/DetectionManager.html +++ /dev/null @@ -1,708 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module DetectionManager

- -

This module contains the DETECTION_MANAGER class and derived classes.

- - - -
- -

1) DetectionManager#DETECTION_MANAGER class, extends Fsm#FSM

-

The DetectionManager#DETECTION_MANAGER class defines the core functions to report detected objects to groups. -Reportings can be done in several manners, and it is up to the derived classes if DETECTION_MANAGER to model the reporting behaviour.

- -

1.1) DETECTION_MANAGER constructor:

-

* DetectionManager#DETECTION_MANAGER.New(): Create a new DETECTION_MANAGER instance.

- -

1.2) DETECTION_MANAGER reporting:

-

Derived DETECTION_MANAGER classes will reports detected units using the method DetectionManager#DETECTION_MANAGER.ReportDetected(). This method implements polymorphic behaviour.

- -

The time interval in seconds of the reporting can be changed using the methods DetectionManager#DETECTION_MANAGER.SetReportInterval(). -To control how long a reporting message is displayed, use DetectionManager#DETECTION_MANAGER.SetReportDisplayTime(). -Derived classes need to implement the method DetectionManager#DETECTION_MANAGER.GetReportDisplayTime() to use the correct display time for displayed messages during a report.

- -

Reporting can be started and stopped using the methods DetectionManager#DETECTION_MANAGER.StartReporting() and DetectionManager#DETECTION_MANAGER.StopReporting() respectively. -If an ad-hoc report is requested, use the method DetectionManager#DETECTION_MANAGER().

- -

The default reporting interval is every 60 seconds. The reporting messages are displayed 15 seconds.

- -
- -

2) DetectionManager#DETECTION_REPORTING class, extends DetectionManager#DETECTION_MANAGER

-

The DetectionManager#DETECTION_REPORTING class implements detected units reporting. Reporting can be controlled using the reporting methods available in the DetectionManager#DETECTION_MANAGER class.

- -

2.1) DETECTION_REPORTING constructor:

-

The DetectionManager#DETECTION_REPORTING.New() method creates a new DETECTION_REPORTING instance.

- - -
- -

Contributions: Mechanist, Prof_Hilactic, FlightControl - Concept & Testing

-

Author: FlightControl - Framework Design & Programming

- - -

Global(s)

- - - - - - - - - -
DETECTION_MANAGER - -
DETECTION_REPORTING - -
-

Type DETECTION_MANAGER

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DETECTION_MANAGER.ClassName - -
DETECTION_MANAGER.Detection -

The DETECTION_BASE object that is used to report the detected objects.

-
DETECTION_MANAGER:GetReportDisplayTime() -

Get the reporting message display time.

-
DETECTION_MANAGER:New(SetGroup, Detection) -

FAC constructor.

-
DETECTION_MANAGER:ProcessDetected(Detection) -

Reports the detected items to the Set#SET_GROUP.

-
DETECTION_MANAGER.SetGroup -

The groups to which the FAC will report to.

-
DETECTION_MANAGER:SetReportDisplayTime(ReportDisplayTime) -

Set the reporting message display time.

-
DETECTION_MANAGER:SetReportInterval(ReportInterval) -

Set the reporting time interval.

-
DETECTION_MANAGER._ReportDisplayTime - -
DETECTION_MANAGER._ReportInterval - -
DETECTION_MANAGER:onafterReport(From, Event, To) - -
DETECTION_MANAGER:onafterStart(From, Event, To) - -
- -

Type DETECTION_REPORTING

- - - - - - - - - - - - - - - - - - - - - - - - - -
DETECTION_REPORTING.ClassName - -
DETECTION_REPORTING.Detection -

The DETECTION_BASE object that is used to report the detected objects.

-
DETECTION_REPORTING:GetDetectedItemsText(DetectedSet) -

Creates a string of the detected items in a Detection.

-
DETECTION_REPORTING:New(SetGroup, Detection) -

DETECTION_REPORTING constructor.

-
DETECTION_REPORTING:ProcessDetected(Group, Detection) -

Reports the detected items to the Set#SET_GROUP.

-
DETECTION_REPORTING.SetGroup -

The groups to which the FAC will report to.

-
- -

Global(s)

-
-
- - #DETECTION_MANAGER - -DETECTION_MANAGER - -
-
- - - -
-
-
-
- - #DETECTION_REPORTING - -DETECTION_REPORTING - -
-
- - - -
-
-

Type DetectionManager

- -

Type DETECTION_MANAGER

- -

DETECTION_MANAGER class.

- -

Field(s)

-
-
- - #string - -DETECTION_MANAGER.ClassName - -
-
- - - -
-
-
-
- - Functional.Detection#DETECTION_BASE - -DETECTION_MANAGER.Detection - -
-
- -

The DETECTION_BASE object that is used to report the detected objects.

- -
-
-
-
- - -DETECTION_MANAGER:GetReportDisplayTime() - -
-
- -

Get the reporting message display time.

- -

Return value

- -

#number: -ReportDisplayTime The display time in seconds when a report needs to be done.

- -
-
-
-
- - -DETECTION_MANAGER:New(SetGroup, Detection) - -
-
- -

FAC constructor.

- -

Parameters

- -

Return value

- -

#DETECTION_MANAGER: -self

- -
-
-
-
- - -DETECTION_MANAGER:ProcessDetected(Detection) - -
-
- -

Reports the detected items to the Set#SET_GROUP.

- -

Parameter

- -

Return value

- -

#DETECTION_MANAGER: -self

- -
-
-
-
- - Set#SET_GROUP - -DETECTION_MANAGER.SetGroup - -
-
- -

The groups to which the FAC will report to.

- -
-
-
-
- - -DETECTION_MANAGER:SetReportDisplayTime(ReportDisplayTime) - -
-
- -

Set the reporting message display time.

- -

Parameter

-
    -
  • - -

    #number ReportDisplayTime : -The display time in seconds when a report needs to be done.

    - -
  • -
-

Return value

- -

#DETECTION_MANAGER: -self

- -
-
-
-
- - -DETECTION_MANAGER:SetReportInterval(ReportInterval) - -
-
- -

Set the reporting time interval.

- -

Parameter

-
    -
  • - -

    #number ReportInterval : -The interval in seconds when a report needs to be done.

    - -
  • -
-

Return value

- -

#DETECTION_MANAGER: -self

- -
-
-
-
- - - -DETECTION_MANAGER._ReportDisplayTime - -
-
- - - -
-
-
-
- - - -DETECTION_MANAGER._ReportInterval - -
-
- - - -
-
-
-
- - -DETECTION_MANAGER:onafterReport(From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    From :

    - -
  • -
  • - -

    Event :

    - -
  • -
  • - -

    To :

    - -
  • -
-
-
-
-
- - -DETECTION_MANAGER:onafterStart(From, Event, To) - -
-
- - - -

Parameters

-
    -
  • - -

    From :

    - -
  • -
  • - -

    Event :

    - -
  • -
  • - -

    To :

    - -
  • -
-
-
- -

Type DETECTION_REPORTING

- -

DETECTION_REPORTING class.

- -

Field(s)

-
-
- - #string - -DETECTION_REPORTING.ClassName - -
-
- - - -
-
-
-
- - Functional.Detection#DETECTION_BASE - -DETECTION_REPORTING.Detection - -
-
- -

The DETECTION_BASE object that is used to report the detected objects.

- -
-
-
-
- - -DETECTION_REPORTING:GetDetectedItemsText(DetectedSet) - -
-
- -

Creates a string of the detected items in a Detection.

- -

Parameter

- -

Return value

- -

#DETECTION_MANAGER: -self

- -
-
-
-
- - -DETECTION_REPORTING:New(SetGroup, Detection) - -
-
- -

DETECTION_REPORTING constructor.

- -

Parameters

- -

Return value

- -

#DETECTION_REPORTING: -self

- -
-
-
-
- - -DETECTION_REPORTING:ProcessDetected(Group, Detection) - -
-
- -

Reports the detected items to the Set#SET_GROUP.

- -

Parameters

- -

Return value

- -

#boolean: -Return true if you want the reporting to continue... false will cancel the reporting loop.

- -
-
-
-
- - Set#SET_GROUP - -DETECTION_REPORTING.SetGroup - -
-
- -

The groups to which the FAC will report to.

- -
-
- -
- -
- - diff --git a/docs/Documentation/Escort.html b/docs/Documentation/Escort.html deleted file mode 100644 index 52cc36d94..000000000 --- a/docs/Documentation/Escort.html +++ /dev/null @@ -1,2689 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Escort

- -

Taking the lead of AI escorting your flight.

- - - -

#ESCORT class

-

The #ESCORT class allows you to interact with escorting AI on your flight and take the lead. -Each escorting group can be commanded with a whole set of radio commands (radio menu in your flight, and then F10).

- -

The radio commands will vary according the category of the group. The richest set of commands are with Helicopters and AirPlanes. -Ships and Ground troops will have a more limited set, but they can provide support through the bombing of targets designated by the other escorts.

- -

RADIO MENUs that can be created:

-

Find a summary below of the current available commands:

- -

Navigation ...:

-

Escort group navigation functions:

- -
    -
  • "Join-Up and Follow at x meters": The escort group fill follow you at about x meters, and they will follow you.
  • -
  • "Flare": Provides menu commands to let the escort group shoot a flare in the air in a color.
  • -
  • "Smoke": Provides menu commands to let the escort group smoke the air in a color. Note that smoking is only available for ground and naval troops.
  • -
- -

Hold position ...:

-

Escort group navigation functions:

- -
    -
  • "At current location": Stops the escort group and they will hover 30 meters above the ground at the position they stopped.
  • -
  • "At client location": Stops the escort group and they will hover 30 meters above the ground at the position they stopped.
  • -
- -

Report targets ...:

-

Report targets will make the escort group to report any target that it identifies within a 8km range. Any detected target can be attacked using the 4. Attack nearby targets function. (see below).

- -
    -
  • "Report now": Will report the current detected targets.
  • -
  • "Report targets on": Will make the escort group to report detected targets and will fill the "Attack nearby targets" menu list.
  • -
  • "Report targets off": Will stop detecting targets.
  • -
- -

Scan targets ...:

-

Menu items to pop-up the escort group for target scanning. After scanning, the escort group will resume with the mission or defined task.

- -
    -
  • "Scan targets 30 seconds": Scan 30 seconds for targets.
  • -
  • "Scan targets 60 seconds": Scan 60 seconds for targets.
  • -
- -

Attack targets ...:

-

This menu item will list all detected targets within a 15km range. Depending on the level of detection (known/unknown) and visuality, the targets type will also be listed.

- -

Request assistance from ...:

-

This menu item will list all detected targets within a 15km range, as with the menu item Attack Targets. -This menu item allows to request attack support from other escorts supporting the current client group. -eg. the function allows a player to request support from the Ship escort to attack a target identified by the Plane escort with its Tomahawk missiles. -eg. the function allows a player to request support from other Planes escorting to bomb the unit with illumination missiles or bombs, so that the main plane escort can attack the area.

- -

ROE ...:

-

Sets the Rules of Engagement (ROE) of the escort group when in flight.

- -
    -
  • "Hold Fire": The escort group will hold fire.
  • -
  • "Return Fire": The escort group will return fire.
  • -
  • "Open Fire": The escort group will open fire on designated targets.
  • -
  • "Weapon Free": The escort group will engage with any target.
  • -
- -

Evasion ...:

-

Will define the evasion techniques that the escort group will perform during flight or combat.

- -
    -
  • "Fight until death": The escort group will have no reaction to threats.
  • -
  • "Use flares, chaff and jammers": The escort group will use passive defense using flares and jammers. No evasive manoeuvres are executed.
  • -
  • "Evade enemy fire": The rescort group will evade enemy fire before firing.
  • -
  • "Go below radar and evade fire": The escort group will perform evasive vertical manoeuvres.
  • -
- -

Resume Mission ...:

-

Escort groups can have their own mission. This menu item will allow the escort group to resume their Mission from a given waypoint. -Note that this is really fantastic, as you now have the dynamic of taking control of the escort groups, and allowing them to resume their path or mission.

- -

ESCORT construction methods.

-

Create a new SPAWN object with the ESCORT.New method:

- - - -

ESCORT initialization methods.

-

The following menus are created within the RADIO MENU (F10) of an active unit hosted by a player:

- - - - - -

Usage:

-
-- Declare a new EscortPlanes object as follows:
-
--- First find the GROUP object and the CLIENT object.
-local EscortClient = CLIENT:FindByName( "Unit Name" ) -- The Unit Name is the name of the unit flagged with the skill Client in the mission editor.
-local EscortGroup = GROUP:FindByName( "Group Name" ) -- The Group Name is the name of the group that will escort the Escort Client.
-
--- Now use these 2 objects to construct the new EscortPlanes object.
-EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the mission. You are escorted by a plane with code name 'Desert', which can be instructed through the F10 radio menu." )
-
-
-
- -

Global(s)

- - - - - - - - - -
ESCORT - -
_Resume(EscortGroup) - -
-

Type ESCORT

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ESCORT.CT1 - -
ESCORT.ClassName - -
ESCORT.Detection - -
ESCORT.EscortBriefing - -
ESCORT.EscortClient - -
ESCORT.EscortGroup - -
ESCORT.EscortMenu - -
ESCORT.EscortMenuAttackNearbyTargets - -
ESCORT.EscortMenuEvasion - -
ESCORT.EscortMenuEvasionEvadeFire - -
ESCORT.EscortMenuEvasionNoReaction - -
ESCORT.EscortMenuEvasionPassiveDefense - -
ESCORT.EscortMenuFlare - -
ESCORT.EscortMenuFlareGreen - -
ESCORT.EscortMenuFlareRed - -
ESCORT.EscortMenuFlareWhite - -
ESCORT.EscortMenuFlareYellow - -
ESCORT.EscortMenuHold - -
ESCORT.EscortMenuHoldAtLeaderPosition - -
ESCORT.EscortMenuHoldPosition - -
ESCORT.EscortMenuJoinUpAndFollow - -
ESCORT.EscortMenuOptionEvasionVertical - -
ESCORT.EscortMenuROE - -
ESCORT.EscortMenuROEHoldFire - -
ESCORT.EscortMenuROEOpenFire - -
ESCORT.EscortMenuROEReturnFire - -
ESCORT.EscortMenuROEWeaponFree - -
ESCORT.EscortMenuReportNavigation - -
ESCORT.EscortMenuReportNearbyTargets - -
ESCORT.EscortMenuReportNearbyTargetsNow - -
ESCORT.EscortMenuReportNearbyTargetsOff - -
ESCORT.EscortMenuReportNearbyTargetsOn - -
ESCORT.EscortMenuResumeMission - -
ESCORT.EscortMenuScan - -
ESCORT.EscortMenuScanForTargets - -
ESCORT.EscortMenuSmoke - -
ESCORT.EscortMenuSmokeBlue - -
ESCORT.EscortMenuSmokeGreen - -
ESCORT.EscortMenuSmokeOrange - -
ESCORT.EscortMenuSmokeRed - -
ESCORT.EscortMenuSmokeWhite - -
ESCORT.EscortMenuTargetAssistance - -
ESCORT.EscortMode -

The mode the escort is in.

-
ESCORT.EscortName - -
ESCORT.EscortSetGroup - -
ESCORT.FollowDistance -

The current follow distance.

-
ESCORT.FollowScheduler -

The instance of the SCHEDULER class.

-
ESCORT.GT1 - -
ESCORT:JoinUpAndFollow(EscortGroup, EscortClient, Distance) -

JoinsUp and Follows a CLIENT.

-
ESCORT.MODE - -
ESCORT:MenuAssistedAttack() -

Defines a menu slot to let the escort attack its detected targets using assisted attack from another escort joined also with the client.

-
ESCORT:MenuEvasion(MenuTextFormat) -

Defines a menu to let the escort set its evasion when under threat.

-
ESCORT:MenuFlare(MenuTextFormat) -

Defines a menu slot to let the escort disperse a flare in a certain color.

-
ESCORT:MenuFollowAt(Distance) -

Defines a menu slot to let the escort Join and Follow you at a certain distance.

-
ESCORT:MenuHoldAtEscortPosition(Height, Seconds, MenuTextFormat) -

Defines a menu slot to let the escort hold at their current position and stay low with a specified height during a specified time in seconds.

-
ESCORT:MenuHoldAtLeaderPosition(Height, Seconds, MenuTextFormat) -

Defines a menu slot to let the escort hold at the client position and stay low with a specified height during a specified time in seconds.

-
ESCORT:MenuROE(MenuTextFormat) -

Defines a menu to let the escort set its rules of engagement.

-
ESCORT:MenuReportTargets(Seconds) -

Defines a menu slot to let the escort report their current detected targets with a specified time interval in seconds.

-
ESCORT:MenuResumeMission() -

Defines a menu to let the escort resume its mission from a waypoint on its route.

-
ESCORT:MenuScanForTargets(Height, Seconds, MenuTextFormat) -

Defines a menu slot to let the escort scan for targets at a certain height for a certain time in seconds.

-
ESCORT:MenuSmoke(MenuTextFormat) -

Defines a menu slot to let the escort disperse a smoke in a certain color.

-
ESCORT:Menus() -

Defines the default menus

-
ESCORT:New(EscortClient, EscortGroup, EscortName, EscortBriefing) -

ESCORT class constructor for an AI group

-
ESCORT.OptionROE - -
ESCORT.OptionReactionOnThreat -

Which REACTIONONTHREAT is set to the EscortGroup.

-
ESCORT:RegisterRoute() -

Registers the waypoints

-
ESCORT.ReportTargets -

If true, nearby targets are reported.

-
ESCORT.ReportTargetsScheduler - -
ESCORT:SetDetection(Detection) -

Set a Detection method for the EscortClient to be reported upon.

-
ESCORT.SmokeDirectionVector - -
ESCORT.Targets - -
ESCORT.TaskPoints - -
ESCORT:TestSmokeDirectionVector(SmokeDirection) -

This function is for test, it will put on the frequency of the FollowScheduler a red smoke at the direction vector calculated for the escort to fly to.

-
ESCORT._AssistTarget(DetectedItemID, self, EscortGroupAttack) - -
ESCORT:_AttackTarget(DetectedItemID) - -
ESCORT._Flare(MenuParam, self, Color, Message) - -
ESCORT:_FollowScheduler() - -
ESCORT._HoldPosition(MenuParam, self, OrbitGroup, OrbitHeight, OrbitSeconds) - -
ESCORT._JoinUpAndFollow(MenuParam, self, Distance) - -
ESCORT._ROE(MenuParam, self, EscortROEFunction, EscortROEMessage) - -
ESCORT._ROT(MenuParam, self, EscortROTFunction, EscortROTMessage) - -
ESCORT._ReportNearbyTargetsNow(MenuParam, self) - -
ESCORT:_ReportTargetsScheduler() -

Report Targets Scheduler.

-
ESCORT._ResumeMission(MenuParam, self, WayPoint) - -
ESCORT._ScanTargets(MenuParam, self, ScanDuration) - -
ESCORT._Smoke(MenuParam, self, Color, Message) - -
ESCORT:_SwitchReportNearbyTargets(ReportTargets) - -
- -

Type ESCORT.MODE

- - - - - - - - - -
ESCORT.MODE.FOLLOW - -
ESCORT.MODE.MISSION - -
- -

Type MENUPARAM

- - - - - - - - - - - - - - - - - - - - - -
MENUPARAM.Distance - -
MENUPARAM.ParamDistance - -
MENUPARAM.ParamFunction - -
MENUPARAM.ParamMessage - -
MENUPARAM.ParamSelf - -
- -

Global(s)

-
-
- - #ESCORT - -ESCORT - -
-
- - - -
-
-
-
- - -_Resume(EscortGroup) - -
-
- - - -

Parameter

- -
-
-

Type Escort

- -

Type Distance

- -

Type ESCORT

- -

ESCORT class

- -

Field(s)

-
-
- - #number - -ESCORT.CT1 - -
-
- - - -
-
-
-
- - #string - -ESCORT.ClassName - -
-
- - - -
-
-
-
- - Functional.Detection#DETECTION_BASE - -ESCORT.Detection - -
-
- - - -
-
-
-
- - - -ESCORT.EscortBriefing - -
-
- - - -
-
-
-
- - Wrapper.Client#CLIENT - -ESCORT.EscortClient - -
-
- - - -
-
-
-
- - Wrapper.Group#GROUP - -ESCORT.EscortGroup - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenu - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuAttackNearbyTargets - -
-
- - - - -

Attack Targets

- -
-
-
-
- - - -ESCORT.EscortMenuEvasion - -
-
- - - - -

Reaction to Threats

- -
-
-
-
- - - -ESCORT.EscortMenuEvasionEvadeFire - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuEvasionNoReaction - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuEvasionPassiveDefense - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuFlare - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuFlareGreen - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuFlareRed - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuFlareWhite - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuFlareYellow - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuHold - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuHoldAtLeaderPosition - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuHoldPosition - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuJoinUpAndFollow - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuOptionEvasionVertical - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuROE - -
-
- - - - -

Rules of Engagement

- -
-
-
-
- - - -ESCORT.EscortMenuROEHoldFire - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuROEOpenFire - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuROEReturnFire - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuROEWeaponFree - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuReportNavigation - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuReportNearbyTargets - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuReportNearbyTargetsNow - -
-
- - - - -

Report Targets

- -
-
-
-
- - - -ESCORT.EscortMenuReportNearbyTargetsOff - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuReportNearbyTargetsOn - -
-
- - - -
-
-
-
- - Core.Menu#MENU_CLIENT - -ESCORT.EscortMenuResumeMission - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuScan - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuScanForTargets - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuSmoke - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuSmokeBlue - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuSmokeGreen - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuSmokeOrange - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuSmokeRed - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuSmokeWhite - -
-
- - - -
-
-
-
- - - -ESCORT.EscortMenuTargetAssistance - -
-
- - - - -

Request assistance from other escorts. - This is very useful to let f.e. an escorting ship attack a target detected by an escorting plane...

- -
-
-
-
- - #ESCORT.MODE - -ESCORT.EscortMode - -
-
- -

The mode the escort is in.

- -
-
-
-
- - #string - -ESCORT.EscortName - -
-
- - - -
-
-
-
- - - -ESCORT.EscortSetGroup - -
-
- - - -
-
-
-
- - #number - -ESCORT.FollowDistance - -
-
- -

The current follow distance.

- -
-
-
-
- - Core.Scheduler#SCHEDULER - -ESCORT.FollowScheduler - -
-
- -

The instance of the SCHEDULER class.

- -
-
-
-
- - #number - -ESCORT.GT1 - -
-
- - - -
-
-
-
- - -ESCORT:JoinUpAndFollow(EscortGroup, EscortClient, Distance) - -
-
- -

JoinsUp and Follows a CLIENT.

- -

Parameters

- -
-
-
-
- - - -ESCORT.MODE - -
-
- - - -
-
-
-
- - -ESCORT:MenuAssistedAttack() - -
-
- -

Defines a menu slot to let the escort attack its detected targets using assisted attack from another escort joined also with the client.

- - -

This menu will appear under Request assistance from. -Note that this method needs to be preceded with the method MenuReportTargets.

- -

Return value

- -

#ESCORT:

- - -
-
-
-
- - -ESCORT:MenuEvasion(MenuTextFormat) - -
-
- -

Defines a menu to let the escort set its evasion when under threat.

- - -

All rules of engagement will appear under the menu Evasion.

- -

Parameter

-
    -
  • - -

    MenuTextFormat :

    - -
  • -
-

Return value

- -

#ESCORT:

- - -
-
-
-
- - -ESCORT:MenuFlare(MenuTextFormat) - -
-
- -

Defines a menu slot to let the escort disperse a flare in a certain color.

- - -

This menu will appear under Navigation. -The flare will be fired from the first unit in the group.

- -

Parameter

-
    -
  • - -

    #string MenuTextFormat : -Optional parameter that shows the menu option text. If no text is given, the default text will be displayed.

    - -
  • -
-

Return value

- -

#ESCORT:

- - -
-
-
-
- - -ESCORT:MenuFollowAt(Distance) - -
-
- -

Defines a menu slot to let the escort Join and Follow you at a certain distance.

- - -

This menu will appear under Navigation.

- -

Parameter

-
    -
  • - -

    Dcs.DCSTypes#Distance Distance : -The distance in meters that the escort needs to follow the client.

    - -
  • -
-

Return value

- -

#ESCORT:

- - -
-
-
-
- - -ESCORT:MenuHoldAtEscortPosition(Height, Seconds, MenuTextFormat) - -
-
- -

Defines a menu slot to let the escort hold at their current position and stay low with a specified height during a specified time in seconds.

- - -

This menu will appear under Hold position.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Distance Height : -Optional parameter that sets the height in meters to let the escort orbit at the current location. The default value is 30 meters.

    - -
  • -
  • - -

    Dcs.DCSTypes#Time Seconds : -Optional parameter that lets the escort orbit at the current position for a specified time. (not implemented yet). The default value is 0 seconds, meaning, that the escort will orbit forever until a sequent command is given.

    - -
  • -
  • - -

    #string MenuTextFormat : -Optional parameter that shows the menu option text. The text string is formatted, and should contain two %d tokens in the string. The first for the Height, the second for the Time (if given). If no text is given, the default text will be displayed.

    - -
  • -
-

Return value

- -

#ESCORT: -TODO: Implement Seconds parameter. Challenge is to first develop the "continue from last activity" function.

- -
-
-
-
- - -ESCORT:MenuHoldAtLeaderPosition(Height, Seconds, MenuTextFormat) - -
-
- -

Defines a menu slot to let the escort hold at the client position and stay low with a specified height during a specified time in seconds.

- - -

This menu will appear under Navigation.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Distance Height : -Optional parameter that sets the height in meters to let the escort orbit at the current location. The default value is 30 meters.

    - -
  • -
  • - -

    Dcs.DCSTypes#Time Seconds : -Optional parameter that lets the escort orbit at the current position for a specified time. (not implemented yet). The default value is 0 seconds, meaning, that the escort will orbit forever until a sequent command is given.

    - -
  • -
  • - -

    #string MenuTextFormat : -Optional parameter that shows the menu option text. The text string is formatted, and should contain one or two %d tokens in the string. The first for the Height, the second for the Time (if given). If no text is given, the default text will be displayed.

    - -
  • -
-

Return value

- -

#ESCORT: -TODO: Implement Seconds parameter. Challenge is to first develop the "continue from last activity" function.

- -
-
-
-
- - -ESCORT:MenuROE(MenuTextFormat) - -
-
- -

Defines a menu to let the escort set its rules of engagement.

- - -

All rules of engagement will appear under the menu ROE.

- -

Parameter

-
    -
  • - -

    MenuTextFormat :

    - -
  • -
-

Return value

- -

#ESCORT:

- - -
-
-
-
- - -ESCORT:MenuReportTargets(Seconds) - -
-
- -

Defines a menu slot to let the escort report their current detected targets with a specified time interval in seconds.

- - -

This menu will appear under Report targets. -Note that if a report targets menu is not specified, no targets will be detected by the escort, and the attack and assisted attack menus will not be displayed.

- -

Parameter

-
    -
  • - -

    Dcs.DCSTypes#Time Seconds : -Optional parameter that lets the escort report their current detected targets after specified time interval in seconds. The default time is 30 seconds.

    - -
  • -
-

Return value

- -

#ESCORT:

- - -
-
-
-
- - -ESCORT:MenuResumeMission() - -
-
- -

Defines a menu to let the escort resume its mission from a waypoint on its route.

- - -

All rules of engagement will appear under the menu Resume mission from.

- -

Return value

- -

#ESCORT:

- - -
-
-
-
- - -ESCORT:MenuScanForTargets(Height, Seconds, MenuTextFormat) - -
-
- -

Defines a menu slot to let the escort scan for targets at a certain height for a certain time in seconds.

- - -

This menu will appear under Scan targets.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Distance Height : -Optional parameter that sets the height in meters to let the escort orbit at the current location. The default value is 30 meters.

    - -
  • -
  • - -

    Dcs.DCSTypes#Time Seconds : -Optional parameter that lets the escort orbit at the current position for a specified time. (not implemented yet). The default value is 0 seconds, meaning, that the escort will orbit forever until a sequent command is given.

    - -
  • -
  • - -

    #string MenuTextFormat : -Optional parameter that shows the menu option text. The text string is formatted, and should contain one or two %d tokens in the string. The first for the Height, the second for the Time (if given). If no text is given, the default text will be displayed.

    - -
  • -
-

Return value

- -

#ESCORT:

- - -
-
-
-
- - -ESCORT:MenuSmoke(MenuTextFormat) - -
-
- -

Defines a menu slot to let the escort disperse a smoke in a certain color.

- - -

This menu will appear under Navigation. -Note that smoke menu options will only be displayed for ships and ground units. Not for air units. -The smoke will be fired from the first unit in the group.

- -

Parameter

-
    -
  • - -

    #string MenuTextFormat : -Optional parameter that shows the menu option text. If no text is given, the default text will be displayed.

    - -
  • -
-

Return value

- -

#ESCORT:

- - -
-
-
-
- - -ESCORT:Menus() - -
-
- -

Defines the default menus

- -

Return value

- -

#ESCORT:

- - -
-
-
-
- - -ESCORT:New(EscortClient, EscortGroup, EscortName, EscortBriefing) - -
-
- -

ESCORT class constructor for an AI group

- -

Parameters

-
    -
  • - -

    Wrapper.Client#CLIENT EscortClient : -The client escorted by the EscortGroup.

    - -
  • -
  • - -

    Wrapper.Group#GROUP EscortGroup : -The group AI escorting the EscortClient.

    - -
  • -
  • - -

    #string EscortName : -Name of the escort.

    - -
  • -
  • - -

    #string EscortBriefing : -A text showing the ESCORT briefing to the player. Note that if no EscortBriefing is provided, the default briefing will be shown.

    - -
  • -
-

Return value

- -

#ESCORT: -self

- -

Usage:

-
-- Declare a new EscortPlanes object as follows:
-
--- First find the GROUP object and the CLIENT object.
-local EscortClient = CLIENT:FindByName( "Unit Name" ) -- The Unit Name is the name of the unit flagged with the skill Client in the mission editor.
-local EscortGroup = GROUP:FindByName( "Group Name" ) -- The Group Name is the name of the group that will escort the Escort Client.
-
--- Now use these 2 objects to construct the new EscortPlanes object.
-EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the mission. You are escorted by a plane with code name 'Desert', which can be instructed through the F10 radio menu." )
- -
-
-
-
- - - -ESCORT.OptionROE - -
-
- - - -
-
-
-
- - Dcs.DCSTypes#AI.Option.Air.val.REACTION_ON_THREAT - -ESCORT.OptionReactionOnThreat - -
-
- -

Which REACTIONONTHREAT is set to the EscortGroup.

- -
-
-
-
- - -ESCORT:RegisterRoute() - -
-
- -

Registers the waypoints

- -

Return value

- -

#table:

- - -
-
-
-
- - #boolean - -ESCORT.ReportTargets - -
-
- -

If true, nearby targets are reported.

- -
-
-
-
- - - -ESCORT.ReportTargetsScheduler - -
-
- - - -
-
-
-
- - -ESCORT:SetDetection(Detection) - -
-
- -

Set a Detection method for the EscortClient to be reported upon.

- - -

Detection methods are based on the derived classes from DETECTION_BASE.

- -

Parameter

- -
-
-
-
- - -ESCORT.SmokeDirectionVector - -
-
- - - -
-
-
-
- - - -ESCORT.Targets - -
-
- - - -
-
-
-
- - - -ESCORT.TaskPoints - -
-
- - - -
-
-
-
- - -ESCORT:TestSmokeDirectionVector(SmokeDirection) - -
-
- -

This function is for test, it will put on the frequency of the FollowScheduler a red smoke at the direction vector calculated for the escort to fly to.

- - -

This allows to visualize where the escort is flying to.

- -

Parameter

-
    -
  • - -

    #boolean SmokeDirection : -If true, then the direction vector will be smoked.

    - -
  • -
-
-
-
-
- - -ESCORT._AssistTarget(DetectedItemID, self, EscortGroupAttack) - -
-
- - - -

Parameters

-
    -
  • - -

    #number DetectedItemID :

    - -
  • -
  • - -

    self :

    - -
  • -
  • - -

    EscortGroupAttack :

    - -
  • -
-
-
-
-
- - -ESCORT:_AttackTarget(DetectedItemID) - -
-
- - - -

Parameter

-
    -
  • - -

    #number DetectedItemID :

    - -
  • -
-
-
-
-
- - -ESCORT._Flare(MenuParam, self, Color, Message) - -
-
- - - -

Parameters

-
    -
  • - -

    #MENUPARAM MenuParam :

    - -
  • -
  • - -

    self :

    - -
  • -
  • - -

    Color :

    - -
  • -
  • - -

    Message :

    - -
  • -
-
-
-
-
- - -ESCORT:_FollowScheduler() - -
-
- - - -
-
-
-
- - -ESCORT._HoldPosition(MenuParam, self, OrbitGroup, OrbitHeight, OrbitSeconds) - -
-
- - - -

Parameters

-
    -
  • - -

    #MENUPARAM MenuParam :

    - -
  • -
  • - -

    self :

    - -
  • -
  • - -

    OrbitGroup :

    - -
  • -
  • - -

    OrbitHeight :

    - -
  • -
  • - -

    OrbitSeconds :

    - -
  • -
-
-
-
-
- - -ESCORT._JoinUpAndFollow(MenuParam, self, Distance) - -
-
- - - -

Parameters

-
    -
  • - -

    #MENUPARAM MenuParam :

    - -
  • -
  • - -

    self :

    - -
  • -
  • - -

    Distance :

    - -
  • -
-
-
-
-
- - -ESCORT._ROE(MenuParam, self, EscortROEFunction, EscortROEMessage) - -
-
- - - -

Parameters

-
    -
  • - -

    #MENUPARAM MenuParam :

    - -
  • -
  • - -

    self :

    - -
  • -
  • - -

    EscortROEFunction :

    - -
  • -
  • - -

    EscortROEMessage :

    - -
  • -
-
-
-
-
- - -ESCORT._ROT(MenuParam, self, EscortROTFunction, EscortROTMessage) - -
-
- - - -

Parameters

-
    -
  • - -

    #MENUPARAM MenuParam :

    - -
  • -
  • - -

    self :

    - -
  • -
  • - -

    EscortROTFunction :

    - -
  • -
  • - -

    EscortROTMessage :

    - -
  • -
-
-
-
-
- - -ESCORT._ReportNearbyTargetsNow(MenuParam, self) - -
-
- - - -

Parameters

-
    -
  • - -

    #MENUPARAM MenuParam :

    - -
  • -
  • - -

    self :

    - -
  • -
-
-
-
-
- - -ESCORT:_ReportTargetsScheduler() - -
-
- -

Report Targets Scheduler.

- -
-
-
-
- - -ESCORT._ResumeMission(MenuParam, self, WayPoint) - -
-
- - - -

Parameters

-
    -
  • - -

    #MENUPARAM MenuParam :

    - -
  • -
  • - -

    self :

    - -
  • -
  • - -

    WayPoint :

    - -
  • -
-
-
-
-
- - -ESCORT._ScanTargets(MenuParam, self, ScanDuration) - -
-
- - - -

Parameters

-
    -
  • - -

    #MENUPARAM MenuParam :

    - -
  • -
  • - -

    self :

    - -
  • -
  • - -

    ScanDuration :

    - -
  • -
-
-
-
-
- - -ESCORT._Smoke(MenuParam, self, Color, Message) - -
-
- - - -

Parameters

-
    -
  • - -

    #MENUPARAM MenuParam :

    - -
  • -
  • - -

    self :

    - -
  • -
  • - -

    Color :

    - -
  • -
  • - -

    Message :

    - -
  • -
-
-
-
-
- - -ESCORT:_SwitchReportNearbyTargets(ReportTargets) - -
-
- - - -

Parameter

-
    -
  • - -

    ReportTargets :

    - -
  • -
-
-
- -

Type ESCORT.MODE

- -

ESCORT.Mode class

- -

Field(s)

-
-
- - #number - -ESCORT.MODE.FOLLOW - -
-
- - - -
-
-
-
- - #number - -ESCORT.MODE.MISSION - -
-
- - - -
-
- -

Type MENUPARAM

- -

MENUPARAM type

- -

Field(s)

-
-
- - - -MENUPARAM.Distance - -
-
- - - -
-
-
-
- - #Distance - -MENUPARAM.ParamDistance - -
-
- - - -
-
-
-
- - #function - -MENUPARAM.ParamFunction - -
-
- - - -
-
-
-
- - #string - -MENUPARAM.ParamMessage - -
-
- - - -
-
-
-
- - #ESCORT - -MENUPARAM.ParamSelf - -
-
- - - -
-
- -
- -
- - diff --git a/docs/Documentation/Event.html b/docs/Documentation/Event.html deleted file mode 100644 index 5de725053..000000000 --- a/docs/Documentation/Event.html +++ /dev/null @@ -1,2607 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Event

- -

Core - EVENT models DCS event dispatching using a publish-subscribe model.

- - - -

Banner Image

- -
- -

1) Event Handling Overview

- -

Objects

- -

Within a running mission, various DCS events occur. Units are dynamically created, crash, die, shoot stuff, get hit etc. -This module provides a mechanism to dispatch those events occuring within your running mission, to the different objects orchestrating your mission.

- -

Objects

- -

Objects can subscribe to different events. The Event dispatcher will publish the received DCS events to the subscribed MOOSE objects, in a specified order. -In this way, the subscribed MOOSE objects are kept in sync with your evolving running mission.

- -

1.1) Event Dispatching

- -

Objects

- -

The _EVENTDISPATCHER object is automatically created within MOOSE, -and handles the dispatching of DCS Events occurring -in the simulator to the subscribed objects -in the correct processing order.

- -

Objects

- -

There are 5 levels of kind of objects that the _EVENTDISPATCHER services:

- -
    -
  • _DATABASE object: The core of the MOOSE objects. Any object that is created, deleted or updated, is done in this database.
  • -
  • SET_ derived classes: Subsets of the _DATABASE object. These subsets are updated by the _EVENTDISPATCHER as the second priority.
  • -
  • UNIT objects: UNIT objects can subscribe to DCS events. Each DCS event will be directly published to teh subscribed UNIT object.
  • -
  • GROUP objects: GROUP objects can subscribe to DCS events. Each DCS event will be directly published to the subscribed GROUP object.
  • -
  • Any other object: Various other objects can subscribe to DCS events. Each DCS event triggered will be published to each subscribed object.
  • -
- -

Objects

- -

For most DCS events, the above order of updating will be followed.

- -

Objects

- -

But for some DCS events, the publishing order is reversed. This is due to the fact that objects need to be erased instead of added.

- -

1.2) Event Handling

- -

Objects

- -

The actual event subscribing and handling is not facilitated through the _EVENTDISPATCHER, but it is done through the BASE class, UNIT class and GROUP class. -The _EVENTDISPATCHER is a component that is quietly working in the background of MOOSE.

- -

Objects

- -

The BASE class provides methods to catch DCS Events. These are events that are triggered from within the DCS simulator, -and handled through lua scripting. MOOSE provides an encapsulation to handle these events more efficiently.

- -

1.2.1 Subscribe / Unsubscribe to DCS Events

- -

At first, the mission designer will need to Subscribe to a specific DCS event for the class. -So, when the DCS event occurs, the class will be notified of that event. -There are two functions which you use to subscribe to or unsubscribe from an event.

- - - -

Note that for a UNIT, the event will be handled for that UNIT only! -Note that for a GROUP, the event will be handled for all the UNITs in that GROUP only!

- -

For all objects of other classes, the subscribed events will be handled for all UNITs within the Mission! -So if a UNIT within the mission has the subscribed event for that object, -then the object event handler will receive the event for that UNIT!

- -

1.3.2 Event Handling of DCS Events

- -

Once the class is subscribed to the event, an Event Handling method on the object or class needs to be written that will be called -when the DCS event occurs. The Event Handling method receives an Event#EVENTDATA structure, which contains a lot of information -about the event that occurred.

- -

Find below an example of the prototype how to write an event handling function for two units:

- -
 local Tank1 = UNIT:FindByName( "Tank A" )
- local Tank2 = UNIT:FindByName( "Tank B" )
-
- -- Here we subscribe to the Dead events. So, if one of these tanks dies, the Tank1 or Tank2 objects will be notified.
- Tank1:HandleEvent( EVENTS.Dead )
- Tank2:HandleEvent( EVENTS.Dead )
-
- --- This function is an Event Handling function that will be called when Tank1 is Dead.
- -- @param Wrapper.Unit#UNIT self 
- -- @param Core.Event#EVENTDATA EventData
- function Tank1:OnEventDead( EventData )
-
-   self:SmokeGreen()
- end
-
- --- This function is an Event Handling function that will be called when Tank2 is Dead.
- -- @param Wrapper.Unit#UNIT self 
- -- @param Core.Event#EVENTDATA EventData
- function Tank2:OnEventDead( EventData )
-
-   self:SmokeBlue()
- end
-
- -

1.3.3 Event Handling methods that are automatically called upon subscribed DCS events

- -

Objects

- -

The following list outlines which EVENTS item in the structure corresponds to which Event Handling method. -Always ensure that your event handling methods align with the events being subscribed to, or nothing will be executed.

- -

2) EVENTS type

- -

The EVENTS structure contains names for all the different DCS events that objects can subscribe to using the -Base#BASE.HandleEvent() method.

- -

3) EVENTDATA type

- -

The Event#EVENTDATA structure contains all the fields that are populated with event information before -an Event Handler method is being called by the event dispatcher. -The Event Handler received the EVENTDATA object as a parameter, and can be used to investigate further the different events. -There are basically 4 main categories of information stored in the EVENTDATA structure:

- -
    -
  • Initiator Unit data: Several fields documenting the initiator unit related to the event.

  • -
  • Target Unit data: Several fields documenting the target unit related to the event.

  • -
  • Weapon data: Certain events populate weapon information.

  • -
  • Place data: Certain events populate place information.

    - -

    --- This function is an Event Handling function that will be called when Tank1 is Dead. - -- EventData is an EVENTDATA structure. - -- We use the EventData.IniUnit to smoke the tank Green. - -- @param Wrapper.Unit#UNIT self - -- @param Core.Event#EVENTDATA EventData - function Tank1:OnEventDead( EventData )

    - -

    EventData.IniUnit:SmokeGreen() - end

  • -
- - -

Find below an overview which events populate which information categories:

- -

Objects

- -

IMPORTANT NOTE: Some events can involve not just UNIT objects, but also STATIC objects!!! -In that case the initiator or target unit fields will refer to a STATIC object! -In case a STATIC object is involved, the documentation indicates which fields will and won't not be populated. -The fields IniObjectCategory and TgtObjectCategory contain the indicator which kind of object is involved in the event. -You can use the enumerator Object.Category.UNIT and Object.Category.STATIC to check on IniObjectCategory and TgtObjectCategory. -Example code snippet:

- -
 if Event.IniObjectCategory == Object.Category.UNIT then
-  ...
- end
- if Event.IniObjectCategory == Object.Category.STATIC then
-  ...
- end 
-
- -

When a static object is involved in the event, the Group and Player fields won't be populated.

- -
- -

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

YYYY-MM-DD: CLASS:NewFunction( Params ) replaces CLASS:OldFunction( Params ) -YYYY-MM-DD: CLASS:NewFunction( Params ) added

- -

Hereby the change log:

- -
    -
  • 2017-03-07: Added the correct event dispatching in case the event is subscribed by a GROUP.

  • -
  • 2017-02-07: Did a complete revision of the Event Handing API and underlying mechanisms.

  • -
- -
- -

AUTHORS and CONTRIBUTIONS

- -

Contributions:

- -

Authors:

- - - - -

Global(s)

- - - - - - - - - - - - - -
EVENT - -
EVENTHANDLER - -
EVENTS - -
-

Type EVENT

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EVENT.ClassID - -
EVENT.ClassName - -
EVENT:CreateEventDeleteCargo(Cargo) -

Creation of a Cargo Deletion Event.

-
EVENT:CreateEventNewCargo(Cargo) -

Creation of a New Cargo Event.

-
EVENT.Events - -
EVENT.EventsDead - -
EVENT:Init(EventID, EventClass) -

Initializes the Events structure for the event

-
EVENT:New() - -
EVENT:OnBirthForTemplate(EventGroup, EventFunction, EventClass, EventTemplate) -

Create an OnBirth event handler for a group

-
EVENT:OnCrashForTemplate(EventGroup, EventFunction, EventClass, EventTemplate) -

Create an OnCrash event handler for a group

-
EVENT:OnDeadForTemplate(EventGroup, EventFunction, EventClass, EventTemplate) -

Create an OnDead event handler for a group

-
EVENT:OnEngineShutDownForTemplate(EventTemplate, EventFunction, EventClass) -

Create an OnDead event handler for a group

-
EVENT:OnEventForGroup(GroupName, EventFunction, EventClass, EventID) -

Set a new listener for an SEVENTX event for a GROUP.

-
EVENT:OnEventForTemplate(EventTemplate, EventFunction, EventClass, OnEventFunction, EventID) -

Create an OnDead event handler for a group

-
EVENT:OnEventForUnit(UnitName, EventFunction, EventClass, EventID) -

Set a new listener for an SEVENTX event for a UNIT.

-
EVENT:OnEventGeneric(EventFunction, EventClass, EventID) -

Set a new listener for an SEVENTX event independent from a unit or a weapon.

-
EVENT:OnLandForTemplate(EventTemplate, EventFunction, EventClass) - -
EVENT:OnTakeOffForTemplate(EventTemplate, EventFunction, EventClass) - -
EVENT:Remove(EventClass, EventID) -

Removes a subscription

-
EVENT:RemoveAll(EventObject) -

Clears all event subscriptions for a Base#BASE derived object.

-
EVENT:Reset(EventClass, EventID, EventObject) -

Resets subscriptions

-
EVENT:onEvent(Event) - -
- -

Type EVENT.Events

- - - - - -
EVENT.Events.IniUnit - -
- -

Type EVENTDATA

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EVENTDATA.Cargo - -
EVENTDATA.CargoName - -
EVENTDATA.IniCategory -

(UNIT) The category of the initiator.

-
EVENTDATA.IniCoalition -

(UNIT) The coalition of the initiator.

-
EVENTDATA.IniDCSGroup -

(UNIT) The initiating {DCSGroup#Group}.

-
EVENTDATA.IniDCSGroupName -

(UNIT) The initiating Group name.

-
EVENTDATA.IniDCSUnit -

(UNIT/STATIC) The initiating DCSUnit#Unit or DCSStaticObject#StaticObject.

-
EVENTDATA.IniDCSUnitName -

(UNIT/STATIC) The initiating Unit name.

-
EVENTDATA.IniGroup -

(UNIT) The initiating MOOSE wrapper Group#GROUP of the initiator Group object.

-
EVENTDATA.IniGroupName -

UNIT) The initiating GROUP name (same as IniDCSGroupName).

-
EVENTDATA.IniObjectCategory -

(UNIT/STATIC/SCENERY) The initiator object category ( Object.Category.UNIT or Object.Category.STATIC ).

-
EVENTDATA.IniPlayerName -

(UNIT) The name of the initiating player in case the Unit is a client or player slot.

-
EVENTDATA.IniTypeName -

(UNIT) The type name of the initiator.

- -
EVENTDATA.IniUnit -

(UNIT/STATIC) The initiating MOOSE wrapper Unit#UNIT of the initiator Unit object.

-
EVENTDATA.IniUnitName -

(UNIT/STATIC) The initiating UNIT name (same as IniDCSUnitName).

-
EVENTDATA.TgtCategory -

(UNIT) The category of the target.

-
EVENTDATA.TgtCoalition -

(UNIT) The coalition of the target.

-
EVENTDATA.TgtDCSGroup -

(UNIT) The target {DCSGroup#Group}.

-
EVENTDATA.TgtDCSGroupName -

(UNIT) The target Group name.

-
EVENTDATA.TgtDCSUnit -

(UNIT/STATIC) The target DCSUnit#Unit or DCSStaticObject#StaticObject.

-
EVENTDATA.TgtDCSUnitName -

(UNIT/STATIC) The target Unit name.

-
EVENTDATA.TgtGroup -

(UNIT) The target MOOSE wrapper Group#GROUP of the target Group object.

-
EVENTDATA.TgtGroupName -

(UNIT) The target GROUP name (same as TgtDCSGroupName).

-
EVENTDATA.TgtObjectCategory -

(UNIT/STATIC) The target object category ( Object.Category.UNIT or Object.Category.STATIC ).

-
EVENTDATA.TgtPlayerName -

(UNIT) The name of the target player in case the Unit is a client or player slot.

-
EVENTDATA.TgtTypeName -

(UNIT) The type name of the target.

- -
EVENTDATA.TgtUnit -

(UNIT/STATIC) The target MOOSE wrapper Unit#UNIT of the target Unit object.

-
EVENTDATA.TgtUnitName -

(UNIT/STATIC) The target UNIT name (same as TgtDCSUnitName).

-
EVENTDATA.Weapon - -
EVENTDATA.WeaponCategory - -
EVENTDATA.WeaponCoalition - -
EVENTDATA.WeaponName - -
EVENTDATA.WeaponPlayerName - -
EVENTDATA.WeaponTgtDCSUnit - -
EVENTDATA.WeaponTypeName - -
EVENTDATA.WeaponUNIT - -
EVENTDATA.id -

The identifier of the event.

- -
EVENTDATA.initiator -

(UNIT/STATIC/SCENERY) The initiating Dcs.DCSUnit#Unit or Dcs.DCSStaticObject#StaticObject.

-
EVENTDATA.target -

(UNIT/STATIC) The target Dcs.DCSUnit#Unit or DCSStaticObject#StaticObject.

-
EVENTDATA.weapon -

The weapon used during the event.

-
- -

Type EVENTHANDLER

- - - - - - - - - - - - - -
EVENTHANDLER.ClassID - -
EVENTHANDLER.ClassName - -
EVENTHANDLER:New() -

The EVENTHANDLER constructor

-
- -

Type EVENTS

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EVENTS.BaseCaptured - -
EVENTS.Birth - -
EVENTS.Crash - -
EVENTS.Dead - -
EVENTS.DeleteCargo - -
EVENTS.Ejection - -
EVENTS.EngineShutdown - -
EVENTS.EngineStartup - -
EVENTS.Hit - -
EVENTS.HumanFailure - -
EVENTS.Land - -
EVENTS.MissionEnd - -
EVENTS.MissionStart - -
EVENTS.NewCargo - -
EVENTS.PilotDead - -
EVENTS.PlayerComment - -
EVENTS.PlayerEnterUnit - -
EVENTS.PlayerLeaveUnit - -
EVENTS.Refueling - -
EVENTS.RefuelingStop - -
EVENTS.ShootingEnd - -
EVENTS.ShootingStart - -
EVENTS.Shot - -
EVENTS.Takeoff - -
EVENTS.TookControl - -
- -

Global(s)

-
-
- - #EVENT - -EVENT - -
-
- - - -
-
-
-
- - #EVENTHANDLER - -EVENTHANDLER - -
-
- - - -
-
-
-
- - #EVENTS - -EVENTS - -
-
- - - -
-
-

Type Event

- -

Type EVENT

- -

The EVENT structure

- -

Field(s)

-
-
- - #number - -EVENT.ClassID - -
-
- - - -
-
-
-
- - #string - -EVENT.ClassName - -
-
- - - -
-
-
-
- - -EVENT:CreateEventDeleteCargo(Cargo) - -
-
- -

Creation of a Cargo Deletion Event.

- -

Parameter

- -
-
-
-
- - -EVENT:CreateEventNewCargo(Cargo) - -
-
- -

Creation of a New Cargo Event.

- -

Parameter

- -
-
-
-
- - #EVENT.Events - -EVENT.Events - -
-
- - - -
-
-
-
- - -EVENT.EventsDead - -
-
- - - -
-
-
-
- - -EVENT:Init(EventID, EventClass) - -
-
- -

Initializes the Events structure for the event

- -

Parameters

- -

Return value

- -

#EVENT.Events:

- - -
-
-
-
- - -EVENT:New() - -
-
- - - -
-
-
-
- - -EVENT:OnBirthForTemplate(EventGroup, EventFunction, EventClass, EventTemplate) - -
-
- -

Create an OnBirth event handler for a group

- -

Parameters

-
    -
  • - -

    Wrapper.Group#GROUP EventGroup :

    - -
  • -
  • - -

    #function EventFunction : -The function to be called when the event occurs for the unit.

    - -
  • -
  • - -

    EventClass : -The self instance of the class for which the event is.

    - -
  • -
  • - -

    EventTemplate :

    - -
  • -
-

Return value

- -

#EVENT:

- - -
-
-
-
- - -EVENT:OnCrashForTemplate(EventGroup, EventFunction, EventClass, EventTemplate) - -
-
- -

Create an OnCrash event handler for a group

- -

Parameters

-
    -
  • - -

    Wrapper.Group#GROUP EventGroup :

    - -
  • -
  • - -

    #function EventFunction : -The function to be called when the event occurs for the unit.

    - -
  • -
  • - -

    EventClass : -The self instance of the class for which the event is.

    - -
  • -
  • - -

    EventTemplate :

    - -
  • -
-

Return value

- -

#EVENT:

- - -
-
-
-
- - -EVENT:OnDeadForTemplate(EventGroup, EventFunction, EventClass, EventTemplate) - -
-
- -

Create an OnDead event handler for a group

- -

Parameters

-
    -
  • - -

    Wrapper.Group#GROUP EventGroup :

    - -
  • -
  • - -

    #function EventFunction : -The function to be called when the event occurs for the unit.

    - -
  • -
  • - -

    EventClass : -The self instance of the class for which the event is.

    - -
  • -
  • - -

    EventTemplate :

    - -
  • -
-

Return value

- -

#EVENT:

- - -
-
-
-
- - -EVENT:OnEngineShutDownForTemplate(EventTemplate, EventFunction, EventClass) - -
-
- -

Create an OnDead event handler for a group

- -

Parameters

-
    -
  • - -

    #table EventTemplate :

    - -
  • -
  • - -

    #function EventFunction : -The function to be called when the event occurs for the unit.

    - -
  • -
  • - -

    EventClass : -The self instance of the class for which the event is.

    - -
  • -
-

Return value

- -

#EVENT:

- - -
-
-
-
- - -EVENT:OnEventForGroup(GroupName, EventFunction, EventClass, EventID) - -
-
- -

Set a new listener for an SEVENTX event for a GROUP.

- -

Parameters

-
    -
  • - -

    #string GroupName : -The name of the GROUP.

    - -
  • -
  • - -

    #function EventFunction : -The function to be called when the event occurs for the GROUP.

    - -
  • -
  • - -

    Core.Base#BASE EventClass : -The self instance of the class for which the event is.

    - -
  • -
  • - -

    EventID :

    - -
  • -
-

Return value

- -

#EVENT:

- - -
-
-
-
- - -EVENT:OnEventForTemplate(EventTemplate, EventFunction, EventClass, OnEventFunction, EventID) - -
-
- -

Create an OnDead event handler for a group

- -

Parameters

-
    -
  • - -

    #table EventTemplate :

    - -
  • -
  • - -

    #function EventFunction : -The function to be called when the event occurs for the unit.

    - -
  • -
  • - -

    EventClass : -The instance of the class for which the event is.

    - -
  • -
  • - -

    #function OnEventFunction :

    - -
  • -
  • - -

    EventID :

    - -
  • -
-

Return value

- -

#EVENT:

- - -
-
-
-
- - -EVENT:OnEventForUnit(UnitName, EventFunction, EventClass, EventID) - -
-
- -

Set a new listener for an SEVENTX event for a UNIT.

- -

Parameters

-
    -
  • - -

    #string UnitName : -The name of the UNIT.

    - -
  • -
  • - -

    #function EventFunction : -The function to be called when the event occurs for the GROUP.

    - -
  • -
  • - -

    Core.Base#BASE EventClass : -The self instance of the class for which the event is.

    - -
  • -
  • - -

    EventID :

    - -
  • -
-

Return value

- -

#EVENT:

- - -
-
-
-
- - -EVENT:OnEventGeneric(EventFunction, EventClass, EventID) - -
-
- -

Set a new listener for an SEVENTX event independent from a unit or a weapon.

- -

Parameters

-
    -
  • - -

    #function EventFunction : -The function to be called when the event occurs for the unit.

    - -
  • -
  • - -

    Core.Base#BASE EventClass : -The self instance of the class for which the event is captured. When the event happens, the event process will be called in this class provided.

    - -
  • -
  • - -

    EventID :

    - -
  • -
-

Return value

- -

#EVENT:

- - -
-
-
-
- - -EVENT:OnLandForTemplate(EventTemplate, EventFunction, EventClass) - -
-
- - - -

Parameters

-
    -
  • - -

    EventTemplate :

    - -
  • -
  • - -

    EventFunction :

    - -
  • -
  • - -

    EventClass :

    - -
  • -
-
-
-
-
- - -EVENT:OnTakeOffForTemplate(EventTemplate, EventFunction, EventClass) - -
-
- - - -

Parameters

-
    -
  • - -

    EventTemplate :

    - -
  • -
  • - -

    EventFunction :

    - -
  • -
  • - -

    EventClass :

    - -
  • -
-
-
-
-
- - -EVENT:Remove(EventClass, EventID) - -
-
- -

Removes a subscription

- -

Parameters

- -

Return value

- -

#EVENT.Events:

- - -
-
-
-
- - -EVENT:RemoveAll(EventObject) - -
-
- -

Clears all event subscriptions for a Base#BASE derived object.

- -

Parameter

- -
-
-
-
- - -EVENT:Reset(EventClass, EventID, EventObject) - -
-
- -

Resets subscriptions

- -

Parameters

- -

Return value

- -

#EVENT.Events:

- - -
-
-
-
- - -EVENT:onEvent(Event) - -
-
- - - -

Parameter

- -
-
- -

Type EVENT.Events

- -

The Events structure

- -

Field(s)

-
-
- - #number - -EVENT.Events.IniUnit - -
-
- - - -
-
- -

Type EVENTDATA

- -

The Event structure -Note that at the beginning of each field description, there is an indication which field will be populated depending on the object type involved in the Event:

- -
    -
  • A (Object.Category.)UNIT : A UNIT object type is involved in the Event.
  • -
- - -
    -
  • A (Object.Category.)STATIC : A STATIC object type is involved in the Event.µ -
  • -
- -

Field(s)

-
-
- - - -EVENTDATA.Cargo - -
-
- - - -
-
-
-
- - - -EVENTDATA.CargoName - -
-
- - - -
-
-
-
- - Dcs.DCSUnit#Unit.Category - -EVENTDATA.IniCategory - -
-
- -

(UNIT) The category of the initiator.

- -
-
-
-
- - Dcs.DCScoalition#coalition.side - -EVENTDATA.IniCoalition - -
-
- -

(UNIT) The coalition of the initiator.

- -
-
-
-
- - Dcs.DCSGroup#Group - -EVENTDATA.IniDCSGroup - -
-
- -

(UNIT) The initiating {DCSGroup#Group}.

- -
-
-
-
- - #string - -EVENTDATA.IniDCSGroupName - -
-
- -

(UNIT) The initiating Group name.

- -
-
-
-
- - Dcs.DCSUnit#Unit - -EVENTDATA.IniDCSUnit - -
-
- -

(UNIT/STATIC) The initiating DCSUnit#Unit or DCSStaticObject#StaticObject.

- -
-
-
-
- - #string - -EVENTDATA.IniDCSUnitName - -
-
- -

(UNIT/STATIC) The initiating Unit name.

- -
-
-
-
- - Wrapper.Group#GROUP - -EVENTDATA.IniGroup - -
-
- -

(UNIT) The initiating MOOSE wrapper Group#GROUP of the initiator Group object.

- -
-
-
-
- - #string - -EVENTDATA.IniGroupName - -
-
- -

UNIT) The initiating GROUP name (same as IniDCSGroupName).

- -
-
-
-
- - Dcs.DCSObject#Object.Category - -EVENTDATA.IniObjectCategory - -
-
- -

(UNIT/STATIC/SCENERY) The initiator object category ( Object.Category.UNIT or Object.Category.STATIC ).

- -
-
-
-
- - #string - -EVENTDATA.IniPlayerName - -
-
- -

(UNIT) The name of the initiating player in case the Unit is a client or player slot.

- -
-
-
-
- - #string - -EVENTDATA.IniTypeName - -
-
- -

(UNIT) The type name of the initiator.

- - -
-
-
-
- - Wrapper.Unit#UNIT - -EVENTDATA.IniUnit - -
-
- -

(UNIT/STATIC) The initiating MOOSE wrapper Unit#UNIT of the initiator Unit object.

- -
-
-
-
- - #string - -EVENTDATA.IniUnitName - -
-
- -

(UNIT/STATIC) The initiating UNIT name (same as IniDCSUnitName).

- -
-
-
-
- - Dcs.DCSUnit#Unit.Category - -EVENTDATA.TgtCategory - -
-
- -

(UNIT) The category of the target.

- -
-
-
-
- - Dcs.DCScoalition#coalition.side - -EVENTDATA.TgtCoalition - -
-
- -

(UNIT) The coalition of the target.

- -
-
-
-
- - Dcs.DCSGroup#Group - -EVENTDATA.TgtDCSGroup - -
-
- -

(UNIT) The target {DCSGroup#Group}.

- -
-
-
-
- - #string - -EVENTDATA.TgtDCSGroupName - -
-
- -

(UNIT) The target Group name.

- -
-
-
-
- - Dcs.DCSUnit#Unit - -EVENTDATA.TgtDCSUnit - -
-
- -

(UNIT/STATIC) The target DCSUnit#Unit or DCSStaticObject#StaticObject.

- -
-
-
-
- - #string - -EVENTDATA.TgtDCSUnitName - -
-
- -

(UNIT/STATIC) The target Unit name.

- -
-
-
-
- - Wrapper.Group#GROUP - -EVENTDATA.TgtGroup - -
-
- -

(UNIT) The target MOOSE wrapper Group#GROUP of the target Group object.

- -
-
-
-
- - #string - -EVENTDATA.TgtGroupName - -
-
- -

(UNIT) The target GROUP name (same as TgtDCSGroupName).

- -
-
-
-
- - Dcs.DCSObject#Object.Category - -EVENTDATA.TgtObjectCategory - -
-
- -

(UNIT/STATIC) The target object category ( Object.Category.UNIT or Object.Category.STATIC ).

- -
-
-
-
- - #string - -EVENTDATA.TgtPlayerName - -
-
- -

(UNIT) The name of the target player in case the Unit is a client or player slot.

- -
-
-
-
- - #string - -EVENTDATA.TgtTypeName - -
-
- -

(UNIT) The type name of the target.

- - -
-
-
-
- - Wrapper.Unit#UNIT - -EVENTDATA.TgtUnit - -
-
- -

(UNIT/STATIC) The target MOOSE wrapper Unit#UNIT of the target Unit object.

- -
-
-
-
- - #string - -EVENTDATA.TgtUnitName - -
-
- -

(UNIT/STATIC) The target UNIT name (same as TgtDCSUnitName).

- -
-
-
-
- - -EVENTDATA.Weapon - -
-
- - - -
-
-
-
- - -EVENTDATA.WeaponCategory - -
-
- - - -
-
-
-
- - -EVENTDATA.WeaponCoalition - -
-
- - - -
-
-
-
- - -EVENTDATA.WeaponName - -
-
- - - -
-
-
-
- - -EVENTDATA.WeaponPlayerName - -
-
- - - -
-
-
-
- - -EVENTDATA.WeaponTgtDCSUnit - -
-
- - - -
-
-
-
- - -EVENTDATA.WeaponTypeName - -
-
- - - -
-
-
-
- - - -EVENTDATA.WeaponUNIT - -
-
- - - - -

Sometimes, the weapon is a player unit!

- -
-
-
-
- - #number - -EVENTDATA.id - -
-
- -

The identifier of the event.

- - -
-
-
-
- - Dcs.DCSUnit#Unit - -EVENTDATA.initiator - -
-
- -

(UNIT/STATIC/SCENERY) The initiating Dcs.DCSUnit#Unit or Dcs.DCSStaticObject#StaticObject.

- -
-
-
-
- - Dcs.DCSUnit#Unit - -EVENTDATA.target - -
-
- -

(UNIT/STATIC) The target Dcs.DCSUnit#Unit or DCSStaticObject#StaticObject.

- -
-
-
-
- - -EVENTDATA.weapon - -
-
- -

The weapon used during the event.

- -
-
- -

Type EVENTHANDLER

- -

The EVENTHANDLER structure

- -

Field(s)

-
-
- - #number - -EVENTHANDLER.ClassID - -
-
- - - -
-
-
-
- - #string - -EVENTHANDLER.ClassName - -
-
- - - -
-
-
-
- - -EVENTHANDLER:New() - -
-
- -

The EVENTHANDLER constructor

- -

Return value

- -

#EVENTHANDLER:

- - -
-
- -

Type EVENTS

- -

The different types of events supported by MOOSE.

- - -

Use this structure to subscribe to events using the Base#BASE.HandleEvent() method.

- -

Field(s)

-
-
- - - -EVENTS.BaseCaptured - -
-
- - - -
-
-
-
- - - -EVENTS.Birth - -
-
- - - -
-
-
-
- - - -EVENTS.Crash - -
-
- - - -
-
-
-
- - - -EVENTS.Dead - -
-
- - - -
-
-
-
- - - -EVENTS.DeleteCargo - -
-
- - - -
-
-
-
- - - -EVENTS.Ejection - -
-
- - - -
-
-
-
- - - -EVENTS.EngineShutdown - -
-
- - - -
-
-
-
- - - -EVENTS.EngineStartup - -
-
- - - -
-
-
-
- - - -EVENTS.Hit - -
-
- - - -
-
-
-
- - - -EVENTS.HumanFailure - -
-
- - - -
-
-
-
- - - -EVENTS.Land - -
-
- - - -
-
-
-
- - - -EVENTS.MissionEnd - -
-
- - - -
-
-
-
- - - -EVENTS.MissionStart - -
-
- - - -
-
-
-
- - - -EVENTS.NewCargo - -
-
- - - -
-
-
-
- - - -EVENTS.PilotDead - -
-
- - - -
-
-
-
- - - -EVENTS.PlayerComment - -
-
- - - -
-
-
-
- - - -EVENTS.PlayerEnterUnit - -
-
- - - -
-
-
-
- - - -EVENTS.PlayerLeaveUnit - -
-
- - - -
-
-
-
- - - -EVENTS.Refueling - -
-
- - - -
-
-
-
- - - -EVENTS.RefuelingStop - -
-
- - - -
-
-
-
- - - -EVENTS.ShootingEnd - -
-
- - - -
-
-
-
- - - -EVENTS.ShootingStart - -
-
- - - -
-
-
-
- - - -EVENTS.Shot - -
-
- - - -
-
-
-
- - - -EVENTS.Takeoff - -
-
- - - -
-
-
-
- - - -EVENTS.TookControl - -
-
- - - -
-
- -
- -
- - diff --git a/docs/Documentation/Fsm.html b/docs/Documentation/Fsm.html deleted file mode 100644 index 47a295893..000000000 --- a/docs/Documentation/Fsm.html +++ /dev/null @@ -1,2875 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Fsm

- -

Core - The FSM (Finite State Machine) class and derived FSM_ classes -are design patterns allowing efficient (long-lasting) processes and workflows.

- - - -

Banner Image

- -
- -

A FSM can only be in one of a finite number of states. -The machine is in only one state at a time; the state it is in at any given time is called the current state. -It can change from one state to another when initiated by an internal or external triggering event, which is called a transition. -An FSM implementation is defined by a list of its states, its initial state, and the triggering events for each possible transition. -An FSM implementation is composed out of two parts, a set of state transition rules, and an implementation set of state transition handlers, implementing those transitions.

- -

The FSM class supports a hierarchical implementation of a Finite State Machine, -that is, it allows to embed existing FSM implementations in a master FSM. -FSM hierarchies allow for efficient FSM re-use, not having to re-invent the wheel every time again when designing complex processes.

- -

Workflow Example

- -

The above diagram shows a graphical representation of a FSM implementation for a Task, which guides a Human towards a Zone, -orders him to destroy x targets and account the results. -Other examples of ready made FSM could be:

- -
    -
  • route a plane to a zone flown by a human
  • -
  • detect targets by an AI and report to humans
  • -
  • account for destroyed targets by human players
  • -
  • handle AI infantry to deploy from or embark to a helicopter or airplane or vehicle
  • -
  • let an AI patrol a zone
  • -
- -

The MOOSE framework uses extensively the FSM class and derived FSM_ classes, -because the goal of MOOSE is to simplify mission design complexity for mission building. -By efficiently utilizing the FSM class and derived classes, MOOSE allows mission designers to quickly build processes. -Ready made FSM-based implementations classes exist within the MOOSE framework that can easily be re-used, -and tailored by mission designers through the implementation of Transition Handlers. -Each of these FSM implementation classes start either with:

- -
    -
  • an acronym AI_, which indicates an FSM implementation directing AI controlled GROUP and/or UNIT. These AI_ classes derive the #FSM_CONTROLLABLE class.
  • -
  • an acronym TASK_, which indicates an FSM implementation executing a TASK executed by Groups of players. These TASK_ classes derive the #FSM_TASK class.
  • -
  • an acronym ACT_, which indicates an Sub-FSM implementation, directing Humans actions that need to be done in a TASK, seated in a CLIENT (slot) or a UNIT (CA join). These ACT_ classes derive the #FSM_PROCESS class.
  • -
- -

Detailed explanations and API specifics are further below clarified and FSM derived class specifics are described in those class documentation sections.

- -

Dislaimer:

-

The FSM class development is based on a finite state machine implementation made by Conroy Kyle. -The state machine can be found on github -I've reworked this development (taken the concept), and created a hierarchical state machine out of it, embedded within the DCS simulator. -Additionally, I've added extendability and created an API that allows seamless FSM implementation.

- -

The following derived classes are available in the MOOSE framework, that implement a specialised form of a FSM:

- - - -
- -

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

YYYY-MM-DD: CLASS:NewFunction( Params ) replaces CLASS:OldFunction( Params ) -YYYY-MM-DD: CLASS:NewFunction( Params ) added

- -

Hereby the change log:

- -
    -
  • 2016-12-18: Released.
  • -
- -
- -

AUTHORS and CONTRIBUTIONS

- -

Contributions:

- -
    -
  • Pikey: Review of documentation & advice for improvements.
  • -
- -

Authors:

- - - - -

Global(s)

- - - - - - - - - - - - - - - - - - - - - -
FSM -

1) FSM class, extends Base#BASE

- -

Transition Rules and Transition Handlers and Event Triggers

- -

The FSM class is the base class of all FSM_ derived classes.

-
FSM_CONTROLLABLE -

FSM_CONTROLLABLE, extends #FSM

- -

FSM_CONTROLLABLE class models Finite State Machines for Controllables, which are Groups, Units, Clients.

-
FSM_PROCESS -

FSM_PROCESS, extends #FSM

- -

FSM_PROCESS class models Finite State Machines for Task actions, which control Clients.

-
FSM_SET -

FSM_SET, extends #FSM

- -

FSM_SET class models Finite State Machines for Sets.

-
FSM_TASK -

FSM_TASK, extends #FSM

- -

FSM_TASK class models Finite State Machines for Tasks.

-
-

Type FSM

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FSM:AddEndState(State) -

Adds an End state.

-
FSM:AddProcess(From, Event, Process, ReturnEvents) -

Set the default Process template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Controllable by the task.

-
FSM:AddScore(State, ScoreText, Score) -

Adds a score for the FSM to be achieved.

-
FSM:AddScoreProcess(From, Event, State, ScoreText, Score) -

Adds a score for the FSM_PROCESS to be achieved.

-
FSM:AddTransition(From, Event, To) -

Add a new transition rule to the FSM.

-
FSM.CallScheduler - -
FSM.Events - -
FSM:GetEndStates() -

Returns the End states.

-
FSM:GetProcess(From, Event) - -
FSM:GetProcesses() -

Returns a table of the SubFSM rules defined within the FSM.

-
FSM:GetScores() -

Returns a table with the scores defined.

-
FSM:GetStartState() -

Returns the start state of the FSM.

-
FSM:GetState() - -
FSM:GetSubs() -

Returns a table with the Subs defined.

-
FSM:GetTransitions() -

Returns a table of the transition rules defined within the FSM.

-
FSM:Is(State) - -
FSM:LoadCallBacks(CallBackTable) - -
FSM:New(FsmT) -

Creates a new FSM object.

-
FSM.Scores - -
FSM:SetStartState(State) -

Sets the start state of the FSM.

-
FSM._EndStates - -
FSM._EventSchedules - -
FSM._Processes - -
FSM._Scores - -
FSM._StartState - -
FSM._Transitions - -
FSM:_add_to_map(Map, Event) - -
FSM:_call_handler(handler, params, EventName) - -
FSM:_create_transition(EventName) - -
FSM:_delayed_transition(EventName) - -
FSM:_eventmap(Events, EventStructure) - -
FSM:_gosub(ParentFrom, ParentEvent) - -
FSM:_handler(EventName, ...) - -
FSM:_isendstate(Current) - -
FSM:_submap(subs, sub, name) - -
FSM:can(e) - -
FSM:cannot(e) - -
FSM.current - -
FSM.endstates - -
FSM:is(state) - -
FSM.options - -
FSM.subs - -
- -

Type FSM_CONTROLLABLE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FSM_CONTROLLABLE.Controllable - -
FSM_CONTROLLABLE:GetControllable() -

Gets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

-
FSM_CONTROLLABLE:New(FSMT, Controllable) -

Creates a new FSM_CONTROLLABLE object.

-
FSM_CONTROLLABLE:OnAfterStop(Controllable, From, Event, To) -

OnAfter Transition Handler for Event Stop.

-
FSM_CONTROLLABLE:OnBeforeStop(Controllable, From, Event, To) -

OnBefore Transition Handler for Event Stop.

-
FSM_CONTROLLABLE:OnEnterStopped(Controllable, From, Event, To) -

OnEnter Transition Handler for State Stopped.

-
FSM_CONTROLLABLE:OnLeaveStopped(Controllable, From, Event, To) -

OnLeave Transition Handler for State Stopped.

-
FSM_CONTROLLABLE:SetControllable(FSMControllable) -

Sets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

-
FSM_CONTROLLABLE:Stop() -

Synchronous Event Trigger for Event Stop.

-
FSM_CONTROLLABLE:__Stop(Delay) -

Asynchronous Event Trigger for Event Stop.

-
FSM_CONTROLLABLE:_call_handler(handler, params, EventName) - -
- -

Type FSM_PROCESS

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FSM_PROCESS:Assign(Task, ProcessUnit) -

Assign the process to a Unit and activate the process.

-
FSM_PROCESS:Copy(Controllable, Task) -

Creates a new FSMPROCESS object based on this FSMPROCESS.

-
FSM_PROCESS:GetCommandCenter() -

Gets the mission of the process.

-
FSM_PROCESS:GetMission() -

Gets the mission of the process.

-
FSM_PROCESS:GetTask() -

Gets the task of the process.

-
FSM_PROCESS:Init(FsmProcess) - -
FSM_PROCESS:Message(Message) -

Send a message of the Task to the Group of the Unit.

-
FSM_PROCESS:New(Controllable, Task) -

Creates a new FSM_PROCESS object.

-
FSM_PROCESS:Remove() -

Removes an FSM_PROCESS object.

-
FSM_PROCESS:SetTask(Task) -

Sets the task of the process.

-
FSM_PROCESS.Task - -
FSM_PROCESS:_call_handler(handler, params, EventName) - -
FSM_PROCESS:onenterAssigned(ProcessUnit) - -
FSM_PROCESS:onenterFailed(ProcessUnit) - -
FSM_PROCESS:onenterSuccess(ProcessUnit) - -
FSM_PROCESS:onstatechange(ProcessUnit, Event, From, To, Task, Dummy) -

StateMachine callback function for a FSM_PROCESS

-
- -

Type FSM_SET

- - - - - - - - - - - - - - - - - -
FSM_SET:Get() -

Gets the SETBASE object that the FSMSET governs.

-
FSM_SET:New(FSMT, Set_SET_BASE, FSMSet) -

Creates a new FSM_SET object.

-
FSM_SET.Set - -
FSM_SET:_call_handler(handler, params, EventName) - -
- -

Type FSM_TASK

- - - - - - - - - - - - - -
FSM_TASK:New(FSMT, Task, TaskUnit) -

Creates a new FSM_TASK object.

-
FSM_TASK.Task - -
FSM_TASK:_call_handler(handler, params, EventName) - -
- -

Global(s)

-
-
- - #FSM - -FSM - -
-
- -

1) FSM class, extends Base#BASE

- -

Transition Rules and Transition Handlers and Event Triggers

- -

The FSM class is the base class of all FSM_ derived classes.

- - -

It implements the main functionality to define and execute Finite State Machines. -The derived FSM_ classes extend the Finite State Machine functionality to run a workflow process for a specific purpose or component.

- -

Finite State Machines have Transition Rules, Transition Handlers and Event Triggers.

- -

The Transition Rules define the "Process Flow Boundaries", that is, -the path that can be followed hopping from state to state upon triggered events. -If an event is triggered, and there is no valid path found for that event, -an error will be raised and the FSM will stop functioning.

- -

The Transition Handlers are special methods that can be defined by the mission designer, following a defined syntax. -If the FSM object finds a method of such a handler, then the method will be called by the FSM, passing specific parameters. -The method can then define its own custom logic to implement the FSM workflow, and to conduct other actions.

- -

The Event Triggers are methods that are defined by the FSM, which the mission designer can use to implement the workflow. -Most of the time, these Event Triggers are used within the Transition Handler methods, so that a workflow is created running through the state machine.

- -

As explained above, a FSM supports Linear State Transitions and Hierarchical State Transitions, and both can be mixed to make a comprehensive FSM implementation. -The below documentation has a seperate chapter explaining both transition modes, taking into account the Transition Rules, Transition Handlers and Event Triggers.

- -

1.1) FSM Linear Transitions

- -

Linear Transitions are Transition Rules allowing an FSM to transition from one or multiple possible From state(s) towards a To state upon a Triggered Event. -The Lineair transition rule evaluation will always be done from the current state of the FSM. -If no valid Transition Rule can be found in the FSM, the FSM will log an error and stop.

- -

1.1.1) FSM Transition Rules

- -

The FSM has transition rules that it follows and validates, as it walks the process. -These rules define when an FSM can transition from a specific state towards an other specific state upon a triggered event.

- -

The method FSM.AddTransition() specifies a new possible Transition Rule for the FSM.

- -

The initial state can be defined using the method FSM.SetStartState(). The default start state of an FSM is "None".

- -

Find below an example of a Linear Transition Rule definition for an FSM.

- -
 local Fsm3Switch = FSM:New() -- #FsmDemo
- FsmSwitch:SetStartState( "Off" )
- FsmSwitch:AddTransition( "Off", "SwitchOn", "On" )
- FsmSwitch:AddTransition( "Off", "SwitchMiddle", "Middle" )
- FsmSwitch:AddTransition( "On", "SwitchOff", "Off" )
- FsmSwitch:AddTransition( "Middle", "SwitchOff", "Off" )
-
- -

The above code snippet models a 3-way switch Linear Transition:

- -
    -
  • It can be switched On by triggering event SwitchOn.
  • -
  • It can be switched to the Middle position, by triggering event SwitchMiddle.
  • -
  • It can be switched Off by triggering event SwitchOff.
  • -
  • Note that once the Switch is On or Middle, it can only be switched Off.
  • -
- -

Some additional comments:

- -

Note that Linear Transition Rules can be declared in a few variations:

- -
    -
  • The From states can be a table of strings, indicating that the transition rule will be valid if the current state of the FSM will be one of the given From states.
  • -
  • The From state can be a "*", indicating that the transition rule will always be valid, regardless of the current state of the FSM.
  • -
- -

The below code snippet shows how the two last lines can be rewritten and consensed.

- -
 FsmSwitch:AddTransition( { "On",  "Middle" }, "SwitchOff", "Off" )
-
- -

1.1.2) Transition Handling

- -

Transition Handlers

- -

An FSM transitions in 4 moments when an Event is being triggered and processed.
-The mission designer can define for each moment specific logic within methods implementations following a defined API syntax.
-These methods define the flow of the FSM process; because in those methods the FSM Internal Events will be triggered.

- -
    -
  • To handle State transition moments, create methods starting with OnLeave or OnEnter concatenated with the State name.
  • -
  • To handle Event transition moments, create methods starting with OnBefore or OnAfter concatenated with the Event name.
  • -
- -

The OnLeave and OnBefore transition methods may return false, which will cancel the transition!

- -

Transition Handler methods need to follow the above specified naming convention, but are also passed parameters from the FSM. -These parameters are on the correct order: From, Event, To:

- -
    -
  • From = A string containing the From state.
  • -
  • Event = A string containing the Event name that was triggered.
  • -
  • To = A string containing the To state.
  • -
- -

On top, each of these methods can have a variable amount of parameters passed. See the example in section 1.1.3.

- -

1.1.3) Event Triggers

- -

Event Triggers

- -

The FSM creates for each Event two Event Trigger methods.
-There are two modes how Events can be triggered, which is synchronous and asynchronous:

- -
    -
  • The method FSM:Event() triggers an Event that will be processed synchronously or immediately.
  • -
  • The method FSM:Event( __seconds ) triggers an Event that will be processed asynchronously over time, waiting x seconds.
  • -
- -

The destinction between these 2 Event Trigger methods are important to understand. An asynchronous call will "log" the Event Trigger to be executed at a later time. -Processing will just continue. Synchronous Event Trigger methods are useful to change states of the FSM immediately, but may have a larger processing impact.

- -

The following example provides a little demonstration on the difference between synchronous and asynchronous Event Triggering.

- -
  function FSM:OnAfterEvent( From, Event, To, Amount )
-    self:T( { Amount = Amount } ) 
-  end
-
-  local Amount = 1
-  FSM:__Event( 5, Amount ) 
-
-  Amount = Amount + 1
-  FSM:Event( Text, Amount )
-
- -

In this example, the :OnAfterEvent() Transition Handler implementation will get called when Event is being triggered. -Before we go into more detail, let's look at the last 4 lines of the example. -The last line triggers synchronously the Event, and passes Amount as a parameter. -The 3rd last line of the example triggers asynchronously Event. -Event will be processed after 5 seconds, and Amount is given as a parameter.

- -

The output of this little code fragment will be:

- -
    -
  • Amount = 2
  • -
  • Amount = 2
  • -
- -

Because ... When Event was asynchronously processed after 5 seconds, Amount was set to 2. So be careful when processing and passing values and objects in asynchronous processing!

- -

1.1.4) Linear Transition Example

- -

This example is fully implemented in the MOOSE test mission on GITHUB: FSM-100 - Transition Explanation

- -

It models a unit standing still near Batumi, and flaring every 5 seconds while switching between a Green flare and a Red flare. -The purpose of this example is not to show how exciting flaring is, but it demonstrates how a Linear Transition FSM can be build. -Have a look at the source code. The source code is also further explained below in this section.

- -

The example creates a new FsmDemo object from class FSM. -It will set the start state of FsmDemo to state Green. -Two Linear Transition Rules are created, where upon the event Switch, -the FsmDemo will transition from state Green to Red and from Red back to Green.

- -

Transition Example

- -
 local FsmDemo = FSM:New() -- #FsmDemo
- FsmDemo:SetStartState( "Green" )
- FsmDemo:AddTransition( "Green", "Switch", "Red" )
- FsmDemo:AddTransition( "Red", "Switch", "Green" )
-
- -

In the above example, the FsmDemo could flare every 5 seconds a Green or a Red flare into the air. -The next code implements this through the event handling method OnAfterSwitch.

- -

Transition Flow

- -
 function FsmDemo:OnAfterSwitch( From, Event, To, FsmUnit )
-   self:T( { From, Event, To, FsmUnit } )
-
-   if From == "Green" then
-     FsmUnit:Flare(FLARECOLOR.Green)
-   else
-     if From == "Red" then
-       FsmUnit:Flare(FLARECOLOR.Red)
-     end
-   end
-   self:__Switch( 5, FsmUnit ) -- Trigger the next Switch event to happen in 5 seconds.
- end
-
- FsmDemo:__Switch( 5, FsmUnit ) -- Trigger the first Switch event to happen in 5 seconds.
-
- -

The OnAfterSwitch implements a loop. The last line of the code fragment triggers the Switch Event within 5 seconds. -Upon the event execution (after 5 seconds), the OnAfterSwitch method is called of FsmDemo (cfr. the double point notation!!! ":"). -The OnAfterSwitch method receives from the FSM the 3 transition parameter details ( From, Event, To ), -and one additional parameter that was given when the event was triggered, which is in this case the Unit that is used within OnSwitchAfter.

- -
 function FsmDemo:OnAfterSwitch( From, Event, To, FsmUnit )
-
- -

For debugging reasons the received parameters are traced within the DCS.log.

- -
    self:T( { From, Event, To, FsmUnit } )
-
- -

The method will check if the From state received is either "Green" or "Red" and will flare the respective color from the FsmUnit.

- -
   if From == "Green" then
-     FsmUnit:Flare(FLARECOLOR.Green)
-   else
-     if From == "Red" then
-       FsmUnit:Flare(FLARECOLOR.Red)
-     end
-   end
-
- -

It is important that the Switch event is again triggered, otherwise, the FsmDemo would stop working after having the first Event being handled.

- -
   FsmDemo:__Switch( 5, FsmUnit ) -- Trigger the next Switch event to happen in 5 seconds.
-
- -

The below code fragment extends the FsmDemo, demonstrating multiple From states declared as a table, adding a Linear Transition Rule. -The new event Stop will cancel the Switching process. -The transition for event Stop can be executed if the current state of the FSM is either "Red" or "Green".

- -
 local FsmDemo = FSM:New() -- #FsmDemo
- FsmDemo:SetStartState( "Green" )
- FsmDemo:AddTransition( "Green", "Switch", "Red" )
- FsmDemo:AddTransition( "Red", "Switch", "Green" )
- FsmDemo:AddTransition( { "Red", "Green" }, "Stop", "Stopped" )
-
- -

The transition for event Stop can also be simplified, as any current state of the FSM is valid.

- -
 FsmDemo:AddTransition( "*", "Stop", "Stopped" )
-
- -

So... When FsmDemo:Stop() is being triggered, the state of FsmDemo will transition from Red or Green to Stopped. -And there is no transition handling method defined for that transition, thus, no new event is being triggered causing the FsmDemo process flow to halt.

- -

1.5) FSM Hierarchical Transitions

- -

Hierarchical Transitions allow to re-use readily available and implemented FSMs. -This becomes in very useful for mission building, where mission designers build complex processes and workflows, -combining smaller FSMs to one single FSM.

- -

The FSM can embed Sub-FSMs that will execute and return multiple possible Return (End) States.
-Depending upon which state is returned, the main FSM can continue the flow triggering specific events.

- -

The method FSM.AddProcess() adds a new Sub-FSM to the FSM.

- -
- - -
-
-
-
- - #FSM_CONTROLLABLE - -FSM_CONTROLLABLE - -
-
- -

FSM_CONTROLLABLE, extends #FSM

- -

FSM_CONTROLLABLE class models Finite State Machines for Controllables, which are Groups, Units, Clients.

- - - -
- - -
-
-
-
- - #FSM_PROCESS - -FSM_PROCESS - -
-
- -

FSM_PROCESS, extends #FSM

- -

FSM_PROCESS class models Finite State Machines for Task actions, which control Clients.

- - - -
- - -
-
-
-
- - #FSM_SET - -FSM_SET - -
-
- -

FSM_SET, extends #FSM

- -

FSM_SET class models Finite State Machines for Sets.

- - -

Note that these FSMs control multiple objects!!! So State concerns here -for multiple objects or the position of the state machine in the process.

- -
- - -
-
-
-
- - #FSM_TASK - -FSM_TASK - -
-
- -

FSM_TASK, extends #FSM

- -

FSM_TASK class models Finite State Machines for Tasks.

- - - -
- - -
-
-

Type Fsm

- -

Type FSM

-

Field(s)

-
-
- - -FSM:AddEndState(State) - -
-
- -

Adds an End state.

- -

Parameter

-
    -
  • - -

    State :

    - -
  • -
-
-
-
-
- - -FSM:AddProcess(From, Event, Process, ReturnEvents) - -
-
- -

Set the default Process template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Controllable by the task.

- -

Parameters

-
    -
  • - -

    #table From : -Can contain a string indicating the From state or a table of strings containing multiple From states.

    - -
  • -
  • - -

    #string Event : -The Event name.

    - -
  • -
  • - -

    Core.Fsm#FSM_PROCESS Process : -An sub-process FSM.

    - -
  • -
  • - -

    #table ReturnEvents : -A table indicating for which returned events of the SubFSM which Event must be triggered in the FSM.

    - -
  • -
-

Return value

- -

Core.Fsm#FSM_PROCESS: -The SubFSM.

- -
-
-
-
- - -FSM:AddScore(State, ScoreText, Score) - -
-
- -

Adds a score for the FSM to be achieved.

- -

Parameters

-
    -
  • - -

    #string State : -is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

    - -
  • -
  • - -

    #string ScoreText : -is a text describing the score that is given according the status.

    - -
  • -
  • - -

    #number Score : -is a number providing the score of the status.

    - -
  • -
-

Return value

- -

#FSM: -self

- -
-
-
-
- - -FSM:AddScoreProcess(From, Event, State, ScoreText, Score) - -
-
- -

Adds a score for the FSM_PROCESS to be achieved.

- -

Parameters

-
    -
  • - -

    #string From : -is the From State of the main process.

    - -
  • -
  • - -

    #string Event : -is the Event of the main process.

    - -
  • -
  • - -

    #string State : -is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

    - -
  • -
  • - -

    #string ScoreText : -is a text describing the score that is given according the status.

    - -
  • -
  • - -

    #number Score : -is a number providing the score of the status.

    - -
  • -
-

Return value

- -

#FSM: -self

- -
-
-
-
- - -FSM:AddTransition(From, Event, To) - -
-
- -

Add a new transition rule to the FSM.

- - -

A transition rule defines when and if the FSM can transition from a state towards another state upon a triggered event.

- -

Parameters

-
    -
  • - -

    #table From : -Can contain a string indicating the From state or a table of strings containing multiple From states.

    - -
  • -
  • - -

    #string Event : -The Event name.

    - -
  • -
  • - -

    #string To : -The To state.

    - -
  • -
-
-
-
-
- - - -FSM.CallScheduler - -
-
- - - -
-
-
-
- - - -FSM.Events - -
-
- - - -
-
-
-
- - -FSM:GetEndStates() - -
-
- -

Returns the End states.

- -
-
-
-
- - -FSM:GetProcess(From, Event) - -
-
- - - -

Parameters

-
    -
  • - -

    From :

    - -
  • -
  • - -

    Event :

    - -
  • -
-
-
-
-
- - -FSM:GetProcesses() - -
-
- -

Returns a table of the SubFSM rules defined within the FSM.

- -

Return value

- -

#table:

- - -
-
-
-
- - -FSM:GetScores() - -
-
- -

Returns a table with the scores defined.

- -
-
-
-
- - -FSM:GetStartState() - -
-
- -

Returns the start state of the FSM.

- -

Return value

- -

#string: -A string containing the start state.

- -
-
-
-
- - -FSM:GetState() - -
-
- - - -
-
-
-
- - -FSM:GetSubs() - -
-
- -

Returns a table with the Subs defined.

- -
-
-
-
- - -FSM:GetTransitions() - -
-
- -

Returns a table of the transition rules defined within the FSM.

- -

Return value

- -

#table:

- - -
-
-
-
- - -FSM:Is(State) - -
-
- - - -

Parameter

-
    -
  • - -

    State :

    - -
  • -
-
-
-
-
- - -FSM:LoadCallBacks(CallBackTable) - -
-
- - - -

Parameter

-
    -
  • - -

    CallBackTable :

    - -
  • -
-
-
-
-
- - -FSM:New(FsmT) - -
-
- -

Creates a new FSM object.

- -

Parameter

-
    -
  • - -

    FsmT :

    - -
  • -
-

Return value

- -

#FSM:

- - -
-
-
-
- - - -FSM.Scores - -
-
- - - -
-
-
-
- - -FSM:SetStartState(State) - -
-
- -

Sets the start state of the FSM.

- -

Parameter

-
    -
  • - -

    #string State : -A string defining the start state.

    - -
  • -
-
-
-
-
- - - -FSM._EndStates - -
-
- - - -
-
-
-
- - - -FSM._EventSchedules - -
-
- - - -
-
-
-
- - - -FSM._Processes - -
-
- - - -
-
-
-
- - - -FSM._Scores - -
-
- - - -
-
-
-
- - #string - -FSM._StartState - -
-
- - - -
-
-
-
- - - -FSM._Transitions - -
-
- - - -
-
-
-
- - -FSM:_add_to_map(Map, Event) - -
-
- - - -

Parameters

-
    -
  • - -

    Map :

    - -
  • -
  • - -

    Event :

    - -
  • -
-
-
-
-
- - -FSM:_call_handler(handler, params, EventName) - -
-
- - - -

Parameters

-
    -
  • - -

    handler :

    - -
  • -
  • - -

    params :

    - -
  • -
  • - -

    EventName :

    - -
  • -
-
-
-
-
- - -FSM:_create_transition(EventName) - -
-
- - - -

Parameter

-
    -
  • - -

    EventName :

    - -
  • -
-
-
-
-
- - -FSM:_delayed_transition(EventName) - -
-
- - - -

Parameter

-
    -
  • - -

    EventName :

    - -
  • -
-
-
-
-
- - -FSM:_eventmap(Events, EventStructure) - -
-
- - - -

Parameters

-
    -
  • - -

    Events :

    - -
  • -
  • - -

    EventStructure :

    - -
  • -
-
-
-
-
- - -FSM:_gosub(ParentFrom, ParentEvent) - -
-
- - - -

Parameters

-
    -
  • - -

    ParentFrom :

    - -
  • -
  • - -

    ParentEvent :

    - -
  • -
-
-
-
-
- - -FSM:_handler(EventName, ...) - -
-
- - - -

Parameters

-
    -
  • - -

    EventName :

    - -
  • -
  • - -

    ... :

    - -
  • -
-
-
-
-
- - -FSM:_isendstate(Current) - -
-
- - - -

Parameter

-
    -
  • - -

    Current :

    - -
  • -
-
-
-
-
- - -FSM:_submap(subs, sub, name) - -
-
- - - -

Parameters

-
    -
  • - -

    subs :

    - -
  • -
  • - -

    sub :

    - -
  • -
  • - -

    name :

    - -
  • -
-
-
-
-
- - -FSM:can(e) - -
-
- - - -

Parameter

-
    -
  • - -

    e :

    - -
  • -
-
-
-
-
- - -FSM:cannot(e) - -
-
- - - -

Parameter

-
    -
  • - -

    e :

    - -
  • -
-
-
-
-
- - -FSM.current - -
-
- - - -
-
-
-
- - - -FSM.endstates - -
-
- - - -
-
-
-
- - -FSM:is(state) - -
-
- - - -

Parameter

-
    -
  • - -

    state :

    - -
  • -
-
-
-
-
- - -FSM.options - -
-
- - - -
-
-
-
- - - -FSM.subs - -
-
- - - -
-
- -

Type FSM_CONTROLLABLE

-

Field(s)

-
-
- - Wrapper.Controllable#CONTROLLABLE - -FSM_CONTROLLABLE.Controllable - -
-
- - - -
-
-
-
- - -FSM_CONTROLLABLE:GetControllable() - -
-
- -

Gets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

- -

Return value

- -

Wrapper.Controllable#CONTROLLABLE:

- - -
-
-
-
- - -FSM_CONTROLLABLE:New(FSMT, Controllable) - -
-
- -

Creates a new FSM_CONTROLLABLE object.

- -

Parameters

-
    -
  • - -

    #table FSMT : -Finite State Machine Table

    - -
  • -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -(optional) The CONTROLLABLE object that the FSM_CONTROLLABLE governs.

    - -
  • -
-

Return value

- -

#FSM_CONTROLLABLE:

- - -
-
-
-
- - -FSM_CONTROLLABLE:OnAfterStop(Controllable, From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Stop.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -FSM_CONTROLLABLE:OnBeforeStop(Controllable, From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Stop.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -FSM_CONTROLLABLE:OnEnterStopped(Controllable, From, Event, To) - -
-
- -

OnEnter Transition Handler for State Stopped.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -FSM_CONTROLLABLE:OnLeaveStopped(Controllable, From, Event, To) - -
-
- -

OnLeave Transition Handler for State Stopped.

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE Controllable : -The Controllable Object managed by the FSM.

    - -
  • -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -FSM_CONTROLLABLE:SetControllable(FSMControllable) - -
-
- -

Sets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

- -

Parameter

- -

Return value

- -

#FSM_CONTROLLABLE:

- - -
-
-
-
- - -FSM_CONTROLLABLE:Stop() - -
-
- -

Synchronous Event Trigger for Event Stop.

- -
-
-
-
- - -FSM_CONTROLLABLE:__Stop(Delay) - -
-
- -

Asynchronous Event Trigger for Event Stop.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -FSM_CONTROLLABLE:_call_handler(handler, params, EventName) - -
-
- - - -

Parameters

-
    -
  • - -

    handler :

    - -
  • -
  • - -

    params :

    - -
  • -
  • - -

    EventName :

    - -
  • -
-
-
- -

Type FSM_PROCESS

-

Field(s)

-
-
- - -FSM_PROCESS:Assign(Task, ProcessUnit) - -
-
- -

Assign the process to a Unit and activate the process.

- -

Parameters

- -

Return value

- -

#FSM_PROCESS: -self

- -
-
-
-
- - -FSM_PROCESS:Copy(Controllable, Task) - -
-
- -

Creates a new FSMPROCESS object based on this FSMPROCESS.

- -

Parameters

-
    -
  • - -

    Controllable :

    - -
  • -
  • - -

    Task :

    - -
  • -
-

Return value

- -

#FSM_PROCESS:

- - -
-
-
-
- - -FSM_PROCESS:GetCommandCenter() - -
-
- -

Gets the mission of the process.

- -

Return value

- -

Tasking.CommandCenter#COMMANDCENTER:

- - -
-
-
-
- - -FSM_PROCESS:GetMission() - -
-
- -

Gets the mission of the process.

- -

Return value

- -

Tasking.Mission#MISSION:

- - -
-
-
-
- - -FSM_PROCESS:GetTask() - -
-
- -

Gets the task of the process.

- -

Return value

- -

Tasking.Task#TASK:

- - -
-
-
-
- - -FSM_PROCESS:Init(FsmProcess) - -
-
- - - -

Parameter

-
    -
  • - -

    FsmProcess :

    - -
  • -
-
-
-
-
- - -FSM_PROCESS:Message(Message) - -
-
- -

Send a message of the Task to the Group of the Unit.

- -

Parameter

-
    -
  • - -

    Message :

    - -
  • -
-
-
-
-
- - -FSM_PROCESS:New(Controllable, Task) - -
-
- -

Creates a new FSM_PROCESS object.

- -

Parameters

-
    -
  • - -

    Controllable :

    - -
  • -
  • - -

    Task :

    - -
  • -
-

Return value

- -

#FSM_PROCESS:

- - -
-
-
-
- - -FSM_PROCESS:Remove() - -
-
- -

Removes an FSM_PROCESS object.

- -

Return value

- -

#FSM_PROCESS:

- - -
-
-
-
- - -FSM_PROCESS:SetTask(Task) - -
-
- -

Sets the task of the process.

- -

Parameter

- -

Return value

- -

#FSM_PROCESS:

- - -
-
-
-
- - Tasking.Task#TASK - -FSM_PROCESS.Task - -
-
- - - -
-
-
-
- - -FSM_PROCESS:_call_handler(handler, params, EventName) - -
-
- - - -

Parameters

-
    -
  • - -

    handler :

    - -
  • -
  • - -

    params :

    - -
  • -
  • - -

    EventName :

    - -
  • -
-
-
-
-
- - -FSM_PROCESS:onenterAssigned(ProcessUnit) - -
-
- - - -

Parameter

-
    -
  • - -

    ProcessUnit :

    - -
  • -
-
-
-
-
- - -FSM_PROCESS:onenterFailed(ProcessUnit) - -
-
- - - -

Parameter

-
    -
  • - -

    ProcessUnit :

    - -
  • -
-
-
-
-
- - -FSM_PROCESS:onenterSuccess(ProcessUnit) - -
-
- - - -

Parameter

-
    -
  • - -

    ProcessUnit :

    - -
  • -
-
-
-
-
- - -FSM_PROCESS:onstatechange(ProcessUnit, Event, From, To, Task, Dummy) - -
-
- -

StateMachine callback function for a FSM_PROCESS

- -

Parameters

-
    -
  • - -

    Wrapper.Controllable#CONTROLLABLE ProcessUnit :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    Task :

    - -
  • -
  • - -

    Dummy :

    - -
  • -
-
-
- -

Type FSM_SET

- -

FSM_SET class

- -

Field(s)

-
-
- - -FSM_SET:Get() - -
-
- -

Gets the SETBASE object that the FSMSET governs.

- -

Return value

- -

Core.Set#SET_BASE:

- - -
-
-
-
- - -FSM_SET:New(FSMT, Set_SET_BASE, FSMSet) - -
-
- -

Creates a new FSM_SET object.

- -

Parameters

-
    -
  • - -

    #table FSMT : -Finite State Machine Table

    - -
  • -
  • - -

    SetSETBASE : -FSMSet (optional) The Set object that the FSM_SET governs.

    - -
  • -
  • - -

    FSMSet :

    - -
  • -
-

Return value

- -

#FSM_SET:

- - -
-
-
-
- - Core.Set#SET_BASE - -FSM_SET.Set - -
-
- - - -
-
-
-
- - -FSM_SET:_call_handler(handler, params, EventName) - -
-
- - - -

Parameters

-
    -
  • - -

    handler :

    - -
  • -
  • - -

    params :

    - -
  • -
  • - -

    EventName :

    - -
  • -
-
-
- -

Type FSM_TASK

- -

FSM_TASK class

- -

Field(s)

-
-
- - -FSM_TASK:New(FSMT, Task, TaskUnit) - -
-
- -

Creates a new FSM_TASK object.

- -

Parameters

- -

Return value

- -

#FSM_TASK:

- - -
-
-
-
- - Tasking.Task#TASK - -FSM_TASK.Task - -
-
- - - -
-
-
-
- - -FSM_TASK:_call_handler(handler, params, EventName) - -
-
- - - -

Parameters

-
    -
  • - -

    handler :

    - -
  • -
  • - -

    params :

    - -
  • -
  • - -

    EventName :

    - -
  • -
-
-
- -
- -
- - diff --git a/docs/Documentation/Group.html b/docs/Documentation/Group.html deleted file mode 100644 index 2a7095a6d..000000000 --- a/docs/Documentation/Group.html +++ /dev/null @@ -1,1951 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Group

- -

Wrapper -- GROUP is a wrapper class for the DCS Class Group.

- - - -
- -

The #GROUP class is a wrapper class to handle the DCS Group objects:

- -
    -
  • Support all DCS Group APIs.
  • -
  • Enhance with Group specific APIs not in the DCS Group API set.
  • -
  • Handle local Group Controller.
  • -
  • Manage the "state" of the DCS Group.
  • -
- -

IMPORTANT: ONE SHOULD NEVER SANATIZE these GROUP OBJECT REFERENCES! (make the GROUP object references nil).

- -

See the detailed documentation on the GROUP class.

- -
- -

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-03-26: GROUP:RouteRTB( RTBAirbase, Speed ) added.

- -

2017-03-07: GROUP:HandleEvent( Event, EventFunction ) added.
-2017-03-07: GROUP:UnHandleEvent( Event ) added.

- -

2017-01-24: GROUP:SetAIOnOff( AIOnOff ) added.

- -

2017-01-24: GROUP:SetAIOn() added.

- -

2017-01-24: GROUP:SetAIOff() added.

- -
- -

AUTHORS and CONTRIBUTIONS

- -

Contributions:

- -
    -
  • Entropy, Afinegan: Came up with the requirement for AIOnOff().
  • -
- -

Authors:

- -
    -
  • FlightControl: Design & Programming
  • -
- - -

Global(s)

- - - - - -
GROUP -

GROUP class, extends Controllable#CONTROLLABLE

- -

For each DCS Group object alive within a running mission, a GROUP wrapper object (instance) will be created within the _DATABASE object.

-
-

Type GROUP

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GROUP:Activate() -

Activates a GROUP.

-
GROUP:AllOnGround() -

Returns if all units of the group are on the ground or landed.

-
GROUP:CalculateThreatLevelA2G() -

Calculate the maxium A2G threat level of the Group.

-
GROUP:CopyRoute(Begin, End, Randomize, Radius) -

Return the route of a group by using the Database#DATABASE class.

-
GROUP:Destroy() -

Destroys the DCS Group and all of its DCS Units.

-
GROUP:Find(DCSGroup) -

Find the GROUP wrapper class instance using the DCS Group.

-
GROUP:FindByName(GroupName) -

Find the created GROUP using the DCS Group Name.

-
GROUP:GetCallsign() -

Gets the CallSign of the first DCS Unit of the DCS Group.

-
GROUP:GetCategory() -

Returns category of the DCS Group.

-
GROUP:GetCategoryName() -

Returns the category name of the #GROUP.

-
GROUP:GetCoalition() -

Returns the coalition of the DCS Group.

-
GROUP:GetCountry() -

Returns the country of the DCS Group.

-
GROUP:GetDCSObject() -

Returns the DCS Group.

-
GROUP:GetDCSUnit(UnitNumber) -

Returns the DCS Unit with number UnitNumber.

-
GROUP:GetDCSUnits() -

Returns the DCS Units of the DCS Group.

-
GROUP:GetHeading() -

Returns the mean heading of every UNIT in the GROUP in degrees

-
GROUP:GetInitialSize() -
    -
  • Returns the initial size of the DCS Group.
  • -
-
GROUP:GetMaxHeight() -

Returns the current maximum height of the group.

-
GROUP:GetMaxVelocity() -

Returns the current maximum velocity of the group.

-
GROUP:GetMinHeight() -

Returns the current minimum height of the group.

-
GROUP:GetPlayerNames() -

Get player names

-
GROUP:GetPointVec2() -

Returns a POINT_VEC2 object indicating the point in 2D of the first UNIT of the GROUP within the mission.

-
GROUP:GetPositionVec3() -

Returns the DCSTypes#Position3 position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.

-
GROUP:GetRandomVec3(Radius) -

Returns a random DCSTypes#Vec3 vector (point in 3D of the UNIT within the mission) within a range around the first UNIT of the GROUP.

-
GROUP:GetSize() -

Returns current size of the DCS Group.

-
GROUP:GetTaskMission() -

Return the mission template of the group.

-
GROUP:GetTaskRoute() -

Return the mission route of the group.

-
GROUP:GetTemplate() -

Returns the group template from the DATABASE (_DATABASE object).

-
GROUP:GetTypeName() -

Gets the type name of the group.

-
GROUP:GetUnit(UnitNumber) -

Returns the UNIT wrapper class with number UnitNumber.

-
GROUP:GetVec2() -

Returns the current point (Vec2 vector) of the first DCS Unit in the DCS Group.

-
GROUP:GetVec3() -

Returns the current Vec3 vector of the first DCS Unit in the GROUP.

-
GROUP.GroupName -

The name of the group.

-
GROUP:HandleEvent(Event, EventFunction) -

Subscribe to a DCS Event.

-
GROUP:InAir() -

Returns true if the first unit of the GROUP is in the air.

-
GROUP:IsAir() -

Returns if the group is of an air category.

-
GROUP:IsAirPlane() -

Returns if the DCS Group contains AirPlanes.

-
GROUP:IsAlive() -

Returns if the Group is alive.

-
GROUP:IsCompletelyInZone(Zone) -

Returns true if all units of the group are within a Zone.

-
GROUP:IsGround() -

Returns if the DCS Group contains Ground troops.

-
GROUP:IsHelicopter() -

Returns if the DCS Group contains Helicopters.

-
GROUP:IsNotInZone(Zone) -

Returns true if none of the group units of the group are within a Zone.

-
GROUP:IsPartlyInZone(Zone) -

Returns true if some units of the group are within a Zone.

-
GROUP:IsShip() -

Returns if the DCS Group contains Ships.

-
GROUP:OnReSpawn(ReSpawnFunction) - -
GROUP:Register(GroupName) -

Create a new GROUP from a DCSGroup

-
GROUP:ResetEvents() -

Reset the subscriptions.

-
GROUP:Respawn(Template) -

Respawn the GROUP using a (tweaked) template of the Group.

-
GROUP:RouteRTB(RTBAirbase, Speed) -

(AIR) Return the Group to an Airbase#AIRBASE.

-
GROUP:SetAIOff() -

Turns the AI Off for the GROUP.

-
GROUP:SetAIOn() -

Turns the AI On for the GROUP.

-
GROUP:SetAIOnOff(AIOnOff) -

Turns the AI On or Off for the GROUP.

-
GROUP:SetTemplateCoalition(CoalitionID, Template) -

Sets the CoalitionID of the group in a Template.

-
GROUP:SetTemplateControlled(Controlled, Template) -

Sets the controlled status in a Template.

-
GROUP:SetTemplateCountry(CountryID, Template) -

Sets the CountryID of the group in a Template.

-
GROUP:UnHandleEvent(Event) -

UnSubscribe to a DCS event.

-
- -

Global(s)

-
-
- - #GROUP - -GROUP - -
-
- -

GROUP class, extends Controllable#CONTROLLABLE

- -

For each DCS Group object alive within a running mission, a GROUP wrapper object (instance) will be created within the _DATABASE object.

- - -

This is done at the beginning of the mission (when the mission starts), and dynamically when new DCS Group objects are spawned (using the SPAWN class).

- -

The GROUP class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference -using the DCS Group or the DCS GroupName.

- -

Another thing to know is that GROUP objects do not "contain" the DCS Group object. -The GROUP methods will reference the DCS Group object by name when it is needed during API execution. -If the DCS Group object does not exist or is nil, the GROUP methods will return nil and log an exception in the DCS.log file.

- -

The GROUP class provides the following functions to retrieve quickly the relevant GROUP instance:

- -
    -
  • GROUP.Find(): Find a GROUP instance from the _DATABASE object using a DCS Group object.
  • -
  • GROUP.FindByName(): Find a GROUP instance from the _DATABASE object using a DCS Group name.
  • -
- -

GROUP task methods

- -

A GROUP is a Controllable. See the Controllable task methods section for a description of the task methods.

- -

Obtain the mission from group templates

- -

Group templates contain complete mission descriptions. Sometimes you want to copy a complete mission from a group and assign it to another:

- - - -

GROUP Command methods

- -

A GROUP is a Controllable. See the Controllable command methods section for a description of the command methods.

- -

GROUP option methods

- -

A GROUP is a Controllable. See the Controllable option methods section for a description of the option methods.

- -

GROUP Zone validation methods

- -

The group can be validated whether it is completely, partly or not within a Zone. -Use the following Zone validation methods on the group:

- - - -

The zone can be of any Zone class derived from Zone#ZONE_BASE. So, these methods are polymorphic to the zones tested on.

- -

GROUP AI methods

- -

A GROUP has AI methods to control the AI activation.

- - - - -
-
-

Type Group

- -

Type GROUP

-

Field(s)

-
-
- - -GROUP:Activate() - -
-
- -

Activates a GROUP.

- -
-
-
-
- - -GROUP:AllOnGround() - -
-
- -

Returns if all units of the group are on the ground or landed.

- - -

If all units of this group are on the ground, this function will return true, otherwise false.

- -

Return value

- -

#boolean: -All units on the ground result.

- -
-
-
-
- - -GROUP:CalculateThreatLevelA2G() - -
-
- -

Calculate the maxium A2G threat level of the Group.

- -
-
-
-
- - -GROUP:CopyRoute(Begin, End, Randomize, Radius) - -
-
- -

Return the route of a group by using the Database#DATABASE class.

- -

Parameters

-
    -
  • - -

    #number Begin : -The route point from where the copy will start. The base route point is 0.

    - -
  • -
  • - -

    #number End : -The route point where the copy will end. The End point is the last point - the End point. The last point has base 0.

    - -
  • -
  • - -

    #boolean Randomize : -Randomization of the route, when true.

    - -
  • -
  • - -

    #number Radius : -When randomization is on, the randomization is within the radius.

    - -
  • -
-
-
-
-
- - -GROUP:Destroy() - -
-
- -

Destroys the DCS Group and all of its DCS Units.

- - -

Note that this destroy method also raises a destroy event at run-time. -So all event listeners will catch the destroy event of this DCS Group.

- -
-
-
-
- - -GROUP:Find(DCSGroup) - -
-
- -

Find the GROUP wrapper class instance using the DCS Group.

- -

Parameter

- -

Return value

- -

#GROUP: -The GROUP.

- -
-
-
-
- - -GROUP:FindByName(GroupName) - -
-
- -

Find the created GROUP using the DCS Group Name.

- -

Parameter

-
    -
  • - -

    #string GroupName : -The DCS Group Name.

    - -
  • -
-

Return value

- -

#GROUP: -The GROUP.

- -
-
-
-
- - -GROUP:GetCallsign() - -
-
- -

Gets the CallSign of the first DCS Unit of the DCS Group.

- -

Return value

- -

#string: -The CallSign of the first DCS Unit of the DCS Group.

- -
-
-
-
- - -GROUP:GetCategory() - -
-
- -

Returns category of the DCS Group.

- -

Return value

- -

Dcs.DCSWrapper.Group#Group.Category: -The category ID

- -
-
-
-
- - -GROUP:GetCategoryName() - -
-
- -

Returns the category name of the #GROUP.

- -

Return value

- -

#string: -Category name = Helicopter, Airplane, Ground Unit, Ship

- -
-
-
-
- - -GROUP:GetCoalition() - -
-
- -

Returns the coalition of the DCS Group.

- -

Return value

- -

Dcs.DCSCoalitionWrapper.Object#coalition.side: -The coalition side of the DCS Group.

- -
-
-
-
- - -GROUP:GetCountry() - -
-
- -

Returns the country of the DCS Group.

- -

Return values

-
    -
  1. - -

    Dcs.DCScountry#country.id: -The country identifier.

    - -
  2. -
  3. - -

    #nil: -The DCS Group is not existing or alive.

    - -
  4. -
-
-
-
-
- - -GROUP:GetDCSObject() - -
-
- -

Returns the DCS Group.

- -

Return value

- -

Dcs.DCSWrapper.Group#Group: -The DCS Group.

- -
-
-
-
- - -GROUP:GetDCSUnit(UnitNumber) - -
-
- -

Returns the DCS Unit with number UnitNumber.

- - -

If the underlying DCS Unit does not exist, the method will return nil. .

- -

Parameter

-
    -
  • - -

    #number UnitNumber : -The number of the DCS Unit to be returned.

    - -
  • -
-

Return value

- -

Dcs.DCSWrapper.Unit#Unit: -The DCS Unit.

- -
-
-
-
- - -GROUP:GetDCSUnits() - -
-
- -

Returns the DCS Units of the DCS Group.

- -

Return value

- -

#table: -The DCS Units.

- -
-
-
-
- - -GROUP:GetHeading() - -
-
- -

Returns the mean heading of every UNIT in the GROUP in degrees

- -

Return values

-
    -
  1. - -

    #number: -mean heading of the GROUP

    - -
  2. -
  3. - -

    #nil: -The first UNIT is not existing or alive.

    - -
  4. -
-
-
-
-
- - -GROUP:GetInitialSize() - -
-
- -
    -
  • Returns the initial size of the DCS Group.
  • -
- - -

If some of the DCS Units of the DCS Group are destroyed, the initial size of the DCS Group is unchanged.

- -

Return value

- -

#number: -The DCS Group initial size.

- -
-
-
-
- - -GROUP:GetMaxHeight() - -
-
- -

Returns the current maximum height of the group.

- - -

Each unit within the group gets evaluated, and the maximum height (= the unit which is the highest elevated) is returned.

- -

Return value

- -

#number: -Maximum height found.

- -
-
-
-
- - -GROUP:GetMaxVelocity() - -
-
- -

Returns the current maximum velocity of the group.

- - -

Each unit within the group gets evaluated, and the maximum velocity (= the unit which is going the fastest) is returned.

- -

Return value

- -

#number: -Maximum velocity found.

- -
-
-
-
- - -GROUP:GetMinHeight() - -
-
- -

Returns the current minimum height of the group.

- - -

Each unit within the group gets evaluated, and the minimum height (= the unit which is the lowest elevated) is returned.

- -

Return value

- -

#number: -Minimum height found.

- -
-
-
-
- - -GROUP:GetPlayerNames() - -
-
- -

Get player names

- -

Return values

-
    -
  1. - -

    #table: -The group has players, an array of player names is returned.

    - -
  2. -
  3. - -

    #nil: -The group has no players

    - -
  4. -
-
-
-
-
- - -GROUP:GetPointVec2() - -
-
- -

Returns a POINT_VEC2 object indicating the point in 2D of the first UNIT of the GROUP within the mission.

- -

Return values

-
    -
  1. - -

    Core.Point#POINT_VEC2: -The 2D point vector of the first DCS Unit of the GROUP.

    - -
  2. -
  3. - -

    #nil: -The first UNIT is not existing or alive.

    - -
  4. -
-
-
-
-
- - -GROUP:GetPositionVec3() - -
-
- -

Returns the DCSTypes#Position3 position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.

- -

Return values

-
    -
  1. - -

    Dcs.DCSTypes#Position: -The 3D position vectors of the POSITIONABLE.

    - -
  2. -
  3. - -

    #nil: -The POSITIONABLE is not existing or alive.

    - -
  4. -
-
-
-
-
- - -GROUP:GetRandomVec3(Radius) - -
-
- -

Returns a random DCSTypes#Vec3 vector (point in 3D of the UNIT within the mission) within a range around the first UNIT of the GROUP.

- -

Parameter

-
    -
  • - -

    #number Radius :

    - -
  • -
-

Return values

-
    -
  1. - -

    Dcs.DCSTypes#Vec3: -The random 3D point vector around the first UNIT of the GROUP.

    - -
  2. -
  3. - -

    #nil: -The GROUP is invalid or empty

    - -
  4. -
-

Usage:

-

--- If Radius is ignored, returns the Dcs.DCSTypes#Vec3 of first UNIT of the GROUP
- -
-
-
-
- - -GROUP:GetSize() - -
-
- -

Returns current size of the DCS Group.

- - -

If some of the DCS Units of the DCS Group are destroyed the size of the DCS Group is changed.

- -

Return value

- -

#number: -The DCS Group size.

- -
-
-
-
- - -GROUP:GetTaskMission() - -
-
- -

Return the mission template of the group.

- -

Return value

- -

#table: -The MissionTemplate

- -
-
-
-
- - -GROUP:GetTaskRoute() - -
-
- -

Return the mission route of the group.

- -

Return value

- -

#table: -The mission route defined by points.

- -
-
-
-
- - -GROUP:GetTemplate() - -
-
- -

Returns the group template from the DATABASE (_DATABASE object).

- -

Return value

- -

#table:

- - -
-
-
-
- - -GROUP:GetTypeName() - -
-
- -

Gets the type name of the group.

- -

Return value

- -

#string: -The type name of the group.

- -
-
-
-
- - -GROUP:GetUnit(UnitNumber) - -
-
- -

Returns the UNIT wrapper class with number UnitNumber.

- - -

If the underlying DCS Unit does not exist, the method will return nil. .

- -

Parameter

-
    -
  • - -

    #number UnitNumber : -The number of the UNIT wrapper class to be returned.

    - -
  • -
-

Return value

- -

Wrapper.Unit#UNIT: -The UNIT wrapper class.

- -
-
-
-
- - -GROUP:GetVec2() - -
-
- -

Returns the current point (Vec2 vector) of the first DCS Unit in the DCS Group.

- -

Return value

- -

Dcs.DCSTypes#Vec2: -Current Vec2 point of the first DCS Unit of the DCS Group.

- -
-
-
-
- - -GROUP:GetVec3() - -
-
- -

Returns the current Vec3 vector of the first DCS Unit in the GROUP.

- -

Return value

- -

Dcs.DCSTypes#Vec3: -Current Vec3 of the first DCS Unit of the GROUP.

- -
-
-
-
- - #string - -GROUP.GroupName - -
-
- -

The name of the group.

- -
-
-
-
- - -GROUP:HandleEvent(Event, EventFunction) - -
-
- -

Subscribe to a DCS Event.

- -

Parameters

-
    -
  • - -

    Core.Event#EVENTS Event :

    - -
  • -
  • - -

    #function EventFunction : -(optional) The function to be called when the event occurs for the GROUP.

    - -
  • -
-

Return value

- -

#GROUP:

- - -
-
-
-
- - -GROUP:InAir() - -
-
- -

Returns true if the first unit of the GROUP is in the air.

- -

Return values

-
    -
  1. - -

    #boolean: -true if in the first unit of the group is in the air.

    - -
  2. -
  3. - -

    #nil: -The GROUP is not existing or not alive.

    - -
  4. -
-
-
-
-
- - -GROUP:IsAir() - -
-
- -

Returns if the group is of an air category.

- - -

If the group is a helicopter or a plane, then this method will return true, otherwise false.

- -

Return value

- -

#boolean: -Air category evaluation result.

- -
-
-
-
- - -GROUP:IsAirPlane() - -
-
- -

Returns if the DCS Group contains AirPlanes.

- -

Return value

- -

#boolean: -true if DCS Group contains AirPlanes.

- -
-
-
-
- - -GROUP:IsAlive() - -
-
- -

Returns if the Group is alive.

- - -

The Group must:

- -
    -
  • Exist at run-time.
  • -
  • Has at least one unit.
  • -
- -

When the first Unit of the Group is active, it will return true. -If the first Unit of the Group is inactive, it will return false.

- - -

Return values

-
    -
  1. - -

    #boolean: -true if the Group is alive and active.

    - -
  2. -
  3. - -

    #boolean: -false if the Group is alive but inactive.

    - -
  4. -
  5. - -

    #nil: -if the group does not exist anymore.

    - -
  6. -
-
-
-
-
- - -GROUP:IsCompletelyInZone(Zone) - -
-
- -

Returns true if all units of the group are within a Zone.

- -

Parameter

- -

Return value

- -

#boolean: -Returns true if the Group is completely within the Zone#ZONE_BASE

- -
-
-
-
- - -GROUP:IsGround() - -
-
- -

Returns if the DCS Group contains Ground troops.

- -

Return value

- -

#boolean: -true if DCS Group contains Ground troops.

- -
-
-
-
- - -GROUP:IsHelicopter() - -
-
- -

Returns if the DCS Group contains Helicopters.

- -

Return value

- -

#boolean: -true if DCS Group contains Helicopters.

- -
-
-
-
- - -GROUP:IsNotInZone(Zone) - -
-
- -

Returns true if none of the group units of the group are within a Zone.

- -

Parameter

- -

Return value

- -

#boolean: -Returns true if the Group is not within the Zone#ZONE_BASE

- -
-
-
-
- - -GROUP:IsPartlyInZone(Zone) - -
-
- -

Returns true if some units of the group are within a Zone.

- -

Parameter

- -

Return value

- -

#boolean: -Returns true if the Group is partially within the Zone#ZONE_BASE

- -
-
-
-
- - -GROUP:IsShip() - -
-
- -

Returns if the DCS Group contains Ships.

- -

Return value

- -

#boolean: -true if DCS Group contains Ships.

- -
-
-
-
- - -GROUP:OnReSpawn(ReSpawnFunction) - -
-
- - - -

Parameter

-
    -
  • - -

    ReSpawnFunction :

    - -
  • -
-
-
-
-
- - -GROUP:Register(GroupName) - -
-
- -

Create a new GROUP from a DCSGroup

- -

Parameter

- -

Return value

- -

#GROUP: -self

- -
-
-
-
- - -GROUP:ResetEvents() - -
-
- -

Reset the subscriptions.

- -

Return value

- -

#GROUP:

- - -
-
-
-
- - -GROUP:Respawn(Template) - -
-
- -

Respawn the GROUP using a (tweaked) template of the Group.

- - -

The template must be retrieved with the Group#GROUP.GetTemplate() function. -The template contains all the definitions as declared within the mission file. -To understand templates, do the following:

- -
    -
  • unpack your .miz file into a directory using 7-zip.
  • -
  • browse in the directory created to the file mission.
  • -
  • open the file and search for the country group definitions.
  • -
- -

Your group template will contain the fields as described within the mission file.

- -

This function will:

- -
    -
  • Get the current position and heading of the group.
  • -
  • When the group is alive, it will tweak the template x, y and heading coordinates of the group and the embedded units to the current units positions.
  • -
  • Then it will destroy the current alive group.
  • -
  • And it will respawn the group using your new template definition.
  • -
- -

Parameter

-
    -
  • - -

    #table Template : -The template of the Group retrieved with GROUP:GetTemplate()

    - -
  • -
-
-
-
-
- - -GROUP:RouteRTB(RTBAirbase, Speed) - -
-
- -

(AIR) Return the Group to an Airbase#AIRBASE.

- - -

The following things are to be taken into account:

- -
    -
  • The group is respawned to achieve the RTB, there may be side artefacts as a result of this. (Like weapons suddenly come back).
  • -
  • A group consisting out of more than one unit, may rejoin formation when respawned.
  • -
  • A speed can be given in km/h. If no speed is specified, the maximum speed of the first unit will be taken to return to base.
  • -
  • When there is no Airbase object specified, the group will return to the home base if the route of the group is pinned at take-off or at landing to a base.
  • -
  • When there is no Airbase object specified and the group route is not pinned to any airbase, it will return to the nearest airbase.
  • -
- - -

Parameters

-
    -
  • - -

    Wrapper.Airbase#AIRBASE RTBAirbase : -(optional) The Airbase to return to. If blank, the controllable will return to the nearest friendly airbase.

    - -
  • -
  • - -

    #number Speed : -(optional) The Speed, if no Speed is given, the maximum Speed of the first unit is selected.

    - -
  • -
-

Return value

- -

#GROUP:

- - -
-
-
-
- - -GROUP:SetAIOff() - -
-
- -

Turns the AI Off for the GROUP.

- -

Return value

- -

#GROUP: -The GROUP.

- -
-
-
-
- - -GROUP:SetAIOn() - -
-
- -

Turns the AI On for the GROUP.

- -

Return value

- -

#GROUP: -The GROUP.

- -
-
-
-
- - -GROUP:SetAIOnOff(AIOnOff) - -
-
- -

Turns the AI On or Off for the GROUP.

- -

Parameter

-
    -
  • - -

    #boolean AIOnOff : -The value true turns the AI On, the value false turns the AI Off.

    - -
  • -
-

Return value

- -

#GROUP: -The GROUP.

- -
-
-
-
- - -GROUP:SetTemplateCoalition(CoalitionID, Template) - -
-
- -

Sets the CoalitionID of the group in a Template.

- -

Parameters

- -

Return value

- -

#table:

- - -
-
-
-
- - -GROUP:SetTemplateControlled(Controlled, Template) - -
-
- -

Sets the controlled status in a Template.

- -

Parameters

-
    -
  • - -

    #boolean Controlled : -true is controlled, false is uncontrolled.

    - -
  • -
  • - -

    Template :

    - -
  • -
-

Return value

- -

#table:

- - -
-
-
-
- - -GROUP:SetTemplateCountry(CountryID, Template) - -
-
- -

Sets the CountryID of the group in a Template.

- -

Parameters

- -

Return value

- -

#table:

- - -
-
-
-
- - -GROUP:UnHandleEvent(Event) - -
-
- -

UnSubscribe to a DCS event.

- -

Parameter

- -

Return value

- -

#GROUP:

- - -
-
- -
- -
- - diff --git a/docs/Documentation/Identifiable.html b/docs/Documentation/Identifiable.html deleted file mode 100644 index 3d15ed716..000000000 --- a/docs/Documentation/Identifiable.html +++ /dev/null @@ -1,550 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Identifiable

- -

This module contains the IDENTIFIABLE class.

- - - -

1) #IDENTIFIABLE class, extends Object#OBJECT

-

The #IDENTIFIABLE class is a wrapper class to handle the DCS Identifiable objects:

- -
    -
  • Support all DCS Identifiable APIs.
  • -
  • Enhance with Identifiable specific APIs not in the DCS Identifiable API set.
  • -
  • Manage the "state" of the DCS Identifiable.
  • -
- -

1.1) IDENTIFIABLE constructor:

-

The IDENTIFIABLE class provides the following functions to construct a IDENTIFIABLE instance:

- - - -

1.2) IDENTIFIABLE methods:

-

The following methods can be used to identify an identifiable object:

- - - - -
- - -

Global(s)

- - - - - -
IDENTIFIABLE - -
-

Type IDENTIFIABLE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDENTIFIABLE.ClassName - -
IDENTIFIABLE:GetCallsign() -

Gets the CallSign of the IDENTIFIABLE, which is a blank by default.

-
IDENTIFIABLE:GetCategory() -

Returns category of the DCS Identifiable.

-
IDENTIFIABLE:GetCategoryName() -

Returns the DCS Identifiable category name as defined within the DCS Identifiable Descriptor.

-
IDENTIFIABLE:GetCoalition() -

Returns coalition of the Identifiable.

-
IDENTIFIABLE:GetCountry() -

Returns country of the Identifiable.

-
IDENTIFIABLE:GetDesc() -

Returns Identifiable descriptor.

-
IDENTIFIABLE:GetName() -

Returns DCS Identifiable object name.

-
IDENTIFIABLE:GetThreatLevel() - -
IDENTIFIABLE:GetTypeName() -

Returns the type name of the DCS Identifiable.

-
IDENTIFIABLE.IdentifiableName -

The name of the identifiable.

-
IDENTIFIABLE:IsAlive() -

Returns if the Identifiable is alive.

-
IDENTIFIABLE:New(IdentifiableName) -

Create a new IDENTIFIABLE from a DCSIdentifiable

-
- -

Global(s)

-
-
- - #IDENTIFIABLE - -IDENTIFIABLE - -
-
- - - -
-
-

Type Identifiable

- -

Type IDENTIFIABLE

- -

The IDENTIFIABLE class

- -

Field(s)

-
-
- - #string - -IDENTIFIABLE.ClassName - -
-
- - - -
-
-
-
- - -IDENTIFIABLE:GetCallsign() - -
-
- -

Gets the CallSign of the IDENTIFIABLE, which is a blank by default.

- -

Return value

- -

#string: -The CallSign of the IDENTIFIABLE.

- -
-
-
-
- - -IDENTIFIABLE:GetCategory() - -
-
- -

Returns category of the DCS Identifiable.

- -

Return value

- -

Dcs.DCSWrapper.Object#Object.Category: -The category ID

- -
-
-
-
- - -IDENTIFIABLE:GetCategoryName() - -
-
- -

Returns the DCS Identifiable category name as defined within the DCS Identifiable Descriptor.

- -

Return value

- -

#string: -The DCS Identifiable Category Name

- -
-
-
-
- - -IDENTIFIABLE:GetCoalition() - -
-
- -

Returns coalition of the Identifiable.

- -

Return values

-
    -
  1. - -

    Dcs.DCSCoalitionWrapper.Object#coalition.side: -The side of the coalition.

    - -
  2. -
  3. - -

    #nil: -The DCS Identifiable is not existing or alive.

    - -
  4. -
-
-
-
-
- - -IDENTIFIABLE:GetCountry() - -
-
- -

Returns country of the Identifiable.

- -

Return values

-
    -
  1. - -

    Dcs.DCScountry#country.id: -The country identifier.

    - -
  2. -
  3. - -

    #nil: -The DCS Identifiable is not existing or alive.

    - -
  4. -
-
-
-
-
- - -IDENTIFIABLE:GetDesc() - -
-
- -

Returns Identifiable descriptor.

- - -

Descriptor type depends on Identifiable category.

- -

Return values

-
    -
  1. - -

    Dcs.DCSWrapper.Identifiable#Identifiable.Desc: -The Identifiable descriptor.

    - -
  2. -
  3. - -

    #nil: -The DCS Identifiable is not existing or alive.

    - -
  4. -
-
-
-
-
- - -IDENTIFIABLE:GetName() - -
-
- -

Returns DCS Identifiable object name.

- - -

The function provides access to non-activated objects too.

- -

Return values

-
    -
  1. - -

    #string: -The name of the DCS Identifiable.

    - -
  2. -
  3. - -

    #nil: -The DCS Identifiable is not existing or alive.

    - -
  4. -
-
-
-
-
- - -IDENTIFIABLE:GetThreatLevel() - -
-
- - - -
-
-
-
- - -IDENTIFIABLE:GetTypeName() - -
-
- -

Returns the type name of the DCS Identifiable.

- -

Return values

-
    -
  1. - -

    #string: -The type name of the DCS Identifiable.

    - -
  2. -
  3. - -

    #nil: -The DCS Identifiable is not existing or alive.

    - -
  4. -
-
-
-
-
- - #string - -IDENTIFIABLE.IdentifiableName - -
-
- -

The name of the identifiable.

- -
-
-
-
- - -IDENTIFIABLE:IsAlive() - -
-
- -

Returns if the Identifiable is alive.

- - -

If the Identifiable is not alive, nil is returned.
-If the Identifiable is alive, true is returned.

- -

Return values

-
    -
  1. - -

    #boolean: -true if Identifiable is alive.

    - -
  2. -
  3. - -

    #nil: -if the Identifiable is not existing or is not alive.

    - -
  4. -
-
-
-
-
- - -IDENTIFIABLE:New(IdentifiableName) - -
-
- -

Create a new IDENTIFIABLE from a DCSIdentifiable

- -

Parameter

- -

Return value

- -

#IDENTIFIABLE: -self

- -
-
- -
- -
- - diff --git a/docs/Documentation/MOVEMENT.html b/docs/Documentation/MOVEMENT.html deleted file mode 100644 index 1a64cbb26..000000000 --- a/docs/Documentation/MOVEMENT.html +++ /dev/null @@ -1,427 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Movement

- -

Limit the simultaneous movement of Groups within a running Mission.

- - -

This module is defined to improve the performance in missions, and to bring additional realism for GROUND vehicles. -Performance: If in a DCSRTE there are a lot of moving GROUND units, then in a multi player mission, this WILL create lag if -the main DCS execution core of your CPU is fully utilized. So, this class will limit the amount of simultaneous moving GROUND units -on defined intervals (currently every minute).

- -

Global(s)

- - - - - -
MOVEMENT - -
-

Type MOVEMENT

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MOVEMENT.AliveUnits - -
MOVEMENT.ClassName - -
MOVEMENT.MoveCount - -
MOVEMENT.MoveMaximum - -
MOVEMENT.MovePrefixes - -
MOVEMENT.MoveUnits - -
MOVEMENT:New(MovePrefixes, MoveMaximum) - -
MOVEMENT:OnDeadOrCrash(Event) -

Captures the Dead or Crash events when Units crash or are destroyed.

-
MOVEMENT:OnEventBirth(self, EventData) -

Captures the birth events when new Units were spawned.

-
MOVEMENT:ScheduleStart() -

Call this function to start the MOVEMENT scheduling.

-
MOVEMENT:ScheduleStop() -

Call this function to stop the MOVEMENT scheduling.

-
MOVEMENT:_Scheduler() -

This function is called automatically by the MOVEMENT scheduler.

-
- -

Global(s)

-
-
- - #MOVEMENT - -MOVEMENT - -
-
- - - -
-
-

Type Movement

- -

Type MOVEMENT

- -

the MOVEMENT class

- -

Field(s)

-
-
- - #number - -MOVEMENT.AliveUnits - -
-
- - - - -

Contains the counter how many units are currently alive

- -
-
-
-
- - #string - -MOVEMENT.ClassName - -
-
- - - -
-
-
-
- - #number - -MOVEMENT.MoveCount - -
-
- - - - -

The internal counter of the amount of Moveing the has happened since MoveStart.

- -
-
-
-
- - - -MOVEMENT.MoveMaximum - -
-
- - - - -

Contains the Maximum amount of units that are allowed to move...

- -
-
-
-
- - - -MOVEMENT.MovePrefixes - -
-
- - - -
-
-
-
- - - -MOVEMENT.MoveUnits - -
-
- - - - -

Reflects if the Moving for this MovePrefixes is going to be scheduled or not.

- -
-
-
-
- - -MOVEMENT:New(MovePrefixes, MoveMaximum) - -
-
- - - -

Parameters

-
    -
  • - -

    MovePrefixes :

    - -
  • -
  • - -

    MoveMaximum :

    - -
  • -
-
-
-
-
- - -MOVEMENT:OnDeadOrCrash(Event) - -
-
- -

Captures the Dead or Crash events when Units crash or are destroyed.

- -

Parameter

-
    -
  • - -

    Event :

    - -
  • -
-
-
-
-
- - -MOVEMENT:OnEventBirth(self, EventData) - -
-
- -

Captures the birth events when new Units were spawned.

- -

Parameters

- -
-
-
-
- - -MOVEMENT:ScheduleStart() - -
-
- -

Call this function to start the MOVEMENT scheduling.

- -
-
-
-
- - -MOVEMENT:ScheduleStop() - -
-
- -

Call this function to stop the MOVEMENT scheduling.

- -
-
-
-
- - -MOVEMENT:_Scheduler() - -
-
- -

This function is called automatically by the MOVEMENT scheduler.

- - -

A new function is scheduled when MoveScheduled is true.

- -
-
- -
- -
- - diff --git a/docs/Documentation/Menu.html b/docs/Documentation/Menu.html deleted file mode 100644 index e6a65ed88..000000000 --- a/docs/Documentation/Menu.html +++ /dev/null @@ -1,2212 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Menu

- -

Core -- MENU_ classes model the definition of hierarchical menu structures and commands for players within a mission.

- - - -
- -

DCS Menus can be managed using the MENU classes. -The advantage of using MENU classes is that it hides the complexity of dealing with menu management in more advanced scanerios where you need to -set menus and later remove them, and later set them again. You'll find while using use normal DCS scripting functions, that setting and removing -menus is not a easy feat if you have complex menu hierarchies defined. -Using the MOOSE menu classes, the removal and refreshing of menus are nicely being handled within these classes, and becomes much more easy. -On top, MOOSE implements variable parameter passing for command menus.

- -

There are basically two different MENU class types that you need to use:

- -

To manage main menus, the classes begin with MENU_:

- - - -

To manage command menus, which are menus that allow the player to issue functions, the classes begin with MENUCOMMAND:

- - - -
- -

The above menus classes are derived from 2 main abstract classes defined within the MOOSE framework (so don't use these):

- -

1) MENU_ BASE abstract base classes (don't use them)

-

The underlying base menu classes are NOT to be used within your missions. -These are simply abstract base classes defining a couple of fields that are used by the -derived MENU_ classes to manage menus.

- -

1.1) #MENU_BASE class, extends Base#BASE

-

The #MENU_BASE class defines the main MENU class where other MENU classes are derived from.

- -

1.2) #MENUCOMMANDBASE class, extends Base#BASE

-

The #MENUCOMMANDBASE class defines the main MENU class where other MENU COMMAND_ classes are derived from, in order to set commands.

- -
- -

The next menus define the MENU classes that you can use within your missions.

- -

2) MENU MISSION classes

-

The underlying classes manage the menus for a complete mission file.

- -

2.1) #MENU_MISSION class, extends Menu#MENU_BASE

-

The Menu#MENU_MISSION class manages the main menus for a complete mission.
-You can add menus with the MENU_MISSION.New method, which constructs a MENU_MISSION object and returns you the object reference. -Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_MISSION.Remove.

- -

2.2) #MENUMISSIONCOMMAND class, extends Menu#MENUCOMMANDBASE

-

The Menu#MENUMISSIONCOMMAND class manages the command menus for a complete mission, which allow players to execute functions during mission execution.
-You can add menus with the MENUMISSIONCOMMAND.New method, which constructs a MENUMISSIONCOMMAND object and returns you the object reference. -Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENUMISSIONCOMMAND.Remove.

- -
- -

3) MENU COALITION classes

-

The underlying classes manage the menus for whole coalitions.

- -

3.1) #MENU_COALITION class, extends Menu#MENU_BASE

-

The Menu#MENU_COALITION class manages the main menus for coalitions.
-You can add menus with the MENU_COALITION.New method, which constructs a MENU_COALITION object and returns you the object reference. -Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_COALITION.Remove.

- -

3.2) Menu#MENUCOALITIONCOMMAND class, extends Menu#MENUCOMMANDBASE

-

The Menu#MENUCOALITIONCOMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.
-You can add menus with the MENUCOALITIONCOMMAND.New method, which constructs a MENUCOALITIONCOMMAND object and returns you the object reference. -Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENUCOALITIONCOMMAND.Remove.

- -
- -

4) MENU GROUP classes

-

The underlying classes manage the menus for groups. Note that groups can be inactive, alive or can be destroyed.

- -

4.1) Menu#MENU_GROUP class, extends Menu#MENU_BASE

-

The Menu#MENU_GROUP class manages the main menus for coalitions.
-You can add menus with the MENU_GROUP.New method, which constructs a MENU_GROUP object and returns you the object reference. -Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_GROUP.Remove.

- -

4.2) Menu#MENUGROUPCOMMAND class, extends Menu#MENUCOMMANDBASE

-

The Menu#MENUGROUPCOMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.
-You can add menus with the MENUGROUPCOMMAND.New method, which constructs a MENUGROUPCOMMAND object and returns you the object reference. -Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENUGROUPCOMMAND.Remove.

- -
- -

5) MENU CLIENT classes

-

The underlying classes manage the menus for units with skill level client or player.

- -

5.1) Menu#MENU_CLIENT class, extends Menu#MENU_BASE

-

The Menu#MENU_CLIENT class manages the main menus for coalitions.
-You can add menus with the MENU_CLIENT.New method, which constructs a MENU_CLIENT object and returns you the object reference. -Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_CLIENT.Remove.

- -

5.2) Menu#MENUCLIENTCOMMAND class, extends Menu#MENUCOMMANDBASE

-

The Menu#MENUCLIENTCOMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.
-You can add menus with the MENUCLIENTCOMMAND.New method, which constructs a MENUCLIENTCOMMAND object and returns you the object reference. -Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENUCLIENTCOMMAND.Remove.

- -
- -

Contributions: -

-

Authors: FlightControl : Design & Programming

- - -

Global(s)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MENU_BASE - -
MENU_CLIENT - -
MENU_CLIENT_COMMAND - -
MENU_COALITION - -
MENU_COALITION_COMMAND - -
MENU_COMMAND_BASE - -
MENU_GROUP - -
MENU_GROUP_COMMAND - -
MENU_MISSION - -
MENU_MISSION_COMMAND - -
-

Type MENU_BASE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MENU_BASE.ClassName - -
MENU_BASE:GetMenu(MenuText) -

Gets a Menu from a parent Menu

-
MENU_BASE.MenuParentPath - -
MENU_BASE.MenuPath - -
MENU_BASE.MenuRemoveParent - -
MENU_BASE.MenuText - -
MENU_BASE.MenuTime - -
MENU_BASE.New(#, self, MenuText, ParentMenu) -

Consructor

-
MENU_BASE:SetRemoveParent(RemoveParent) -

Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu.

-
MENU_BASE:SetTime(MenuTime) -

Sets a time stamp for later prevention of menu removal.

-
- -

Type MENU_CLIENT

- - - - - - - - - - - - - - - - - -
MENU_CLIENT.ClassName - -
MENU_CLIENT:New(Client, MenuText, ParentMenu) -

MENU_CLIENT constructor.

-
MENU_CLIENT:Remove() -

Removes the sub menus recursively of this MENU_CLIENT.

-
MENU_CLIENT:RemoveSubMenus() -

Removes the sub menus recursively of this #MENU_CLIENT.

-
- -

Type MENU_CLIENT_COMMAND

- - - - - - - - - - - - - -
MENU_CLIENT_COMMAND.ClassName - -
MENU_CLIENT_COMMAND:New(Client, MenuText, ParentMenu, CommandMenuFunction, ...) -

MENUCLIENTCOMMAND constructor.

-
MENU_CLIENT_COMMAND:Remove() -

Removes a menu structure for a client.

-
- -

Type MENU_COALITION

- - - - - - - - - - - - - - - - - -
MENU_COALITION.ClassName - -
MENU_COALITION:New(Coalition, MenuText, ParentMenu) -

MENU_COALITION constructor.

-
MENU_COALITION:Remove() -

Removes the main menu and the sub menus recursively of this MENU_COALITION.

-
MENU_COALITION:RemoveSubMenus() -

Removes the sub menus recursively of this MENU_COALITION.

-
- -

Type MENU_COALITION_COMMAND

- - - - - - - - - - - - - -
MENU_COALITION_COMMAND.ClassName - -
MENU_COALITION_COMMAND:New(Coalition, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) -

MENU_COALITION constructor.

-
MENU_COALITION_COMMAND:Remove() -

Removes a radio command item for a coalition

-
- -

Type MENU_COMMAND_BASE

- - - - - - - - - - - - - - - - - - - - - -
MENU_COMMAND_BASE.ClassName - -
MENU_COMMAND_BASE.CommandMenuArgument - -
MENU_COMMAND_BASE.CommandMenuFunction - -
MENU_COMMAND_BASE.MenuCallHandler - -
MENU_COMMAND_BASE.New(#, self, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments) -

Constructor

-
- -

Type MENU_GROUP

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MENU_GROUP.ClassName - -
MENU_GROUP.MenuGroup - -
MENU_GROUP.MenuGroupID - -
MENU_GROUP.MenuPath - -
MENU_GROUP.MenuText - -
MENU_GROUP:New(MenuGroup, MenuText, ParentMenu) -

MENU_GROUP constructor.

-
MENU_GROUP.ParentMenu - -
MENU_GROUP.Path - -
MENU_GROUP:Remove(MenuTime) -

Removes the main menu and sub menus recursively of this MENU_GROUP.

-
MENU_GROUP:RemoveSubMenus(MenuTime) -

Removes the sub menus recursively of this MENU_GROUP.

-
- -

Type MENU_GROUP_COMMAND

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MENU_GROUP_COMMAND.ClassName - -
MENU_GROUP_COMMAND.MenuGroup - -
MENU_GROUP_COMMAND.MenuGroupID - -
MENU_GROUP_COMMAND.MenuPath - -
MENU_GROUP_COMMAND.MenuText - -
MENU_GROUP_COMMAND:New(MenuGroup, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) -

Creates a new radio command item for a group

-
MENU_GROUP_COMMAND.ParentMenu - -
MENU_GROUP_COMMAND.Path - -
MENU_GROUP_COMMAND:Remove(MenuTime) -

Removes a menu structure for a group.

-
- -

Type MENU_MISSION

- - - - - - - - - - - - - - - - - -
MENU_MISSION.ClassName - -
MENU_MISSION:New(MenuText, ParentMenu) -

MENU_MISSION constructor.

-
MENU_MISSION:Remove() -

Removes the main menu and the sub menus recursively of this MENU_MISSION.

-
MENU_MISSION:RemoveSubMenus() -

Removes the sub menus recursively of this MENU_MISSION.

-
- -

Type MENU_MISSION_COMMAND

- - - - - - - - - - - - - -
MENU_MISSION_COMMAND.ClassName - -
MENU_MISSION_COMMAND:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) -

MENU_MISSION constructor.

-
MENU_MISSION_COMMAND:Remove() -

Removes a radio command item for a coalition

-
- -

Global(s)

-
-
- - #MENU_BASE - -MENU_BASE - -
-
- - - -
-
-
-
- - #MENU_CLIENT - -MENU_CLIENT - -
-
- - - -
-
-
-
- - #MENU_CLIENT_COMMAND - -MENU_CLIENT_COMMAND - -
-
- - - -
-
-
-
- - #MENU_COALITION - -MENU_COALITION - -
-
- - - -
-
-
-
- - #MENU_COALITION_COMMAND - -MENU_COALITION_COMMAND - -
-
- - - -
-
-
-
- - #MENU_COMMAND_BASE - -MENU_COMMAND_BASE - -
-
- - - -
-
-
-
- - #MENU_GROUP - -MENU_GROUP - -
-
- - - -
-
-
-
- - #MENU_GROUP_COMMAND - -MENU_GROUP_COMMAND - -
-
- - - -
-
-
-
- - #MENU_MISSION - -MENU_MISSION - -
-
- - - -
-
-
-
- - #MENU_MISSION_COMMAND - -MENU_MISSION_COMMAND - -
-
- - - -
-
-

Type Menu

- -

Type MENU_BASE

- -

The MENU_BASE class

- -

Field(s)

-
-
- - #string - -MENU_BASE.ClassName - -
-
- - - -
-
-
-
- - -MENU_BASE:GetMenu(MenuText) - -
-
- -

Gets a Menu from a parent Menu

- -

Parameter

-
    -
  • - -

    #string MenuText : -The text of the child menu.

    - -
  • -
-

Return value

- -

#MENU_BASE:

- - -
-
-
-
- - -MENU_BASE.MenuParentPath - -
-
- - - -
-
-
-
- - -MENU_BASE.MenuPath - -
-
- - - -
-
-
-
- - - -MENU_BASE.MenuRemoveParent - -
-
- - - -
-
-
-
- - #string - -MENU_BASE.MenuText - -
-
- - - -
-
-
-
- - - -MENU_BASE.MenuTime - -
-
- - - -
-
-
-
- - -MENU_BASE.New(#, self, MenuText, ParentMenu) - -
-
- -

Consructor

- -

Parameters

-
    -
  • - -

    # : -ENU_BASE

    - -
  • -
  • - -

    self :

    - -
  • -
  • - -

    MenuText :

    - -
  • -
  • - -

    ParentMenu :

    - -
  • -
-

Return value

- -

#MENU_BASE:

- - -
-
-
-
- - -MENU_BASE:SetRemoveParent(RemoveParent) - -
-
- -

Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu.

- -

Parameter

-
    -
  • - -

    #boolean RemoveParent : -If true, the parent menu is automatically removed when this menu is the last child menu of that parent Menu.

    - -
  • -
-

Return value

- -

#MENU_BASE:

- - -
-
-
-
- - -MENU_BASE:SetTime(MenuTime) - -
-
- -

Sets a time stamp for later prevention of menu removal.

- -

Parameter

-
    -
  • - -

    MenuTime :

    - -
  • -
-

Return value

- -

#MENU_BASE:

- - -
-
- -

Type MENU_CLIENT

- -

MENU_COALITION constructor.

- - -

Creates a new radio command item for a coalition, which can invoke a function with parameters.

- -

Usage:

-
 -- This demo creates a menu structure for the two clients of planes.
- -- Each client will receive a different menu structure.
- -- To test, join the planes, then look at the other radio menus (Option F10).
- -- Then switch planes and check if the menu is still there.
- -- And play with the Add and Remove menu options.
- 
- -- Note that in multi player, this will only work after the DCS clients bug is solved.
-
- local function ShowStatus( PlaneClient, StatusText, Coalition )
-
-   MESSAGE:New( Coalition, 15 ):ToRed()
-   PlaneClient:Message( StatusText, 15 )
- end
-
- local MenuStatus = {}
-
- local function RemoveStatusMenu( MenuClient )
-   local MenuClientName = MenuClient:GetName()
-   MenuStatus[MenuClientName]:Remove()
- end
-
- --- @param Wrapper.Client#CLIENT MenuClient
- local function AddStatusMenu( MenuClient )
-   local MenuClientName = MenuClient:GetName()
-   -- This would create a menu for the red coalition under the MenuCoalitionRed menu object.
-   MenuStatus[MenuClientName] = MENU_CLIENT:New( MenuClient, "Status for Planes" )
-   MENU_CLIENT_COMMAND:New( MenuClient, "Show Status", MenuStatus[MenuClientName], ShowStatus, MenuClient, "Status of planes is ok!", "Message to Red Coalition" )
- end
-
- SCHEDULER:New( nil,
-   function()
-     local PlaneClient = CLIENT:FindByName( "Plane 1" )
-     if PlaneClient and PlaneClient:IsAlive() then
-       local MenuManage = MENU_CLIENT:New( PlaneClient, "Manage Menus" )
-       MENU_CLIENT_COMMAND:New( PlaneClient, "Add Status Menu Plane 1", MenuManage, AddStatusMenu, PlaneClient )
-       MENU_CLIENT_COMMAND:New( PlaneClient, "Remove Status Menu Plane 1", MenuManage, RemoveStatusMenu, PlaneClient )
-     end
-   end, {}, 10, 10 )
-
- SCHEDULER:New( nil,
-   function()
-     local PlaneClient = CLIENT:FindByName( "Plane 2" )
-     if PlaneClient and PlaneClient:IsAlive() then
-       local MenuManage = MENU_CLIENT:New( PlaneClient, "Manage Menus" )
-       MENU_CLIENT_COMMAND:New( PlaneClient, "Add Status Menu Plane 2", MenuManage, AddStatusMenu, PlaneClient )
-       MENU_CLIENT_COMMAND:New( PlaneClient, "Remove Status Menu Plane 2", MenuManage, RemoveStatusMenu, PlaneClient )
-     end
-   end, {}, 10, 10 )
- -

Field(s)

-
-
- - #string - -MENU_CLIENT.ClassName - -
-
- - - -
-
-
-
- - -MENU_CLIENT:New(Client, MenuText, ParentMenu) - -
-
- -

MENU_CLIENT constructor.

- - -

Creates a new radio menu item for a client.

- -

Parameters

-
    -
  • - -

    Wrapper.Client#CLIENT Client : -The Client owning the menu.

    - -
  • -
  • - -

    #string MenuText : -The text for the menu.

    - -
  • -
  • - -

    #table ParentMenu : -The parent menu.

    - -
  • -
-

Return value

- -

#MENU_CLIENT: -self

- -
-
-
-
- - -MENU_CLIENT:Remove() - -
-
- -

Removes the sub menus recursively of this MENU_CLIENT.

- -

Return value

- -

#nil:

- - -
-
-
-
- - -MENU_CLIENT:RemoveSubMenus() - -
-
- -

Removes the sub menus recursively of this #MENU_CLIENT.

- -

Return value

- -

#MENU_CLIENT: -self

- -
-
- -

Type MENU_CLIENT_COMMAND

- -

The MENUCLIENTCOMMAND class

- -

Field(s)

-
-
- - #string - -MENU_CLIENT_COMMAND.ClassName - -
-
- - - -
-
-
-
- - -MENU_CLIENT_COMMAND:New(Client, MenuText, ParentMenu, CommandMenuFunction, ...) - -
-
- -

MENUCLIENTCOMMAND constructor.

- - -

Creates a new radio command item for a client, which can invoke a function with parameters.

- -

Parameters

-
    -
  • - -

    Wrapper.Client#CLIENT Client : -The Client owning the menu.

    - -
  • -
  • - -

    #string MenuText : -The text for the menu.

    - -
  • -
  • - -

    #MENU_BASE ParentMenu : -The parent menu.

    - -
  • -
  • - -

    CommandMenuFunction : -A function that is called when the menu key is pressed.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

Menu#MENUCLIENTCOMMAND: -self

- -
-
-
-
- - -MENU_CLIENT_COMMAND:Remove() - -
-
- -

Removes a menu structure for a client.

- -

Return value

- -

#nil:

- - -
-
- -

Type MENU_COALITION

- -

The MENU_COALITION class

- -

Usage:

-
 -- This demo creates a menu structure for the planes within the red coalition.
- -- To test, join the planes, then look at the other radio menus (Option F10).
- -- Then switch planes and check if the menu is still there.
-
- local Plane1 = CLIENT:FindByName( "Plane 1" )
- local Plane2 = CLIENT:FindByName( "Plane 2" )
-
-
- -- This would create a menu for the red coalition under the main DCS "Others" menu.
- local MenuCoalitionRed = MENU_COALITION:New( coalition.side.RED, "Manage Menus" )
-
-
- local function ShowStatus( StatusText, Coalition )
-
-   MESSAGE:New( Coalition, 15 ):ToRed()
-   Plane1:Message( StatusText, 15 )
-   Plane2:Message( StatusText, 15 )
- end
-
- local MenuStatus -- Menu#MENU_COALITION
- local MenuStatusShow -- Menu#MENU_COALITION_COMMAND
-
- local function RemoveStatusMenu()
-   MenuStatus:Remove()
- end
-
- local function AddStatusMenu()
-   
-   -- This would create a menu for the red coalition under the MenuCoalitionRed menu object.
-   MenuStatus = MENU_COALITION:New( coalition.side.RED, "Status for Planes" )
-   MenuStatusShow = MENU_COALITION_COMMAND:New( coalition.side.RED, "Show Status", MenuStatus, ShowStatus, "Status of planes is ok!", "Message to Red Coalition" )
- end
-
- local MenuAdd = MENU_COALITION_COMMAND:New( coalition.side.RED, "Add Status Menu", MenuCoalitionRed, AddStatusMenu )
- local MenuRemove = MENU_COALITION_COMMAND:New( coalition.side.RED, "Remove Status Menu", MenuCoalitionRed, RemoveStatusMenu )
- -

Field(s)

-
-
- - #string - -MENU_COALITION.ClassName - -
-
- - - -
-
-
-
- - -MENU_COALITION:New(Coalition, MenuText, ParentMenu) - -
-
- -

MENU_COALITION constructor.

- - -

Creates a new MENU_COALITION object and creates the menu for a complete coalition.

- -

Parameters

-
    -
  • - -

    Dcs.DCSCoalition#coalition.side Coalition : -The coalition owning the menu.

    - -
  • -
  • - -

    #string MenuText : -The text for the menu.

    - -
  • -
  • - -

    #table ParentMenu : -The parent menu. This parameter can be ignored if you want the menu to be located at the perent menu of DCS world (under F10 other).

    - -
  • -
-

Return value

- -

#MENU_COALITION: -self

- -
-
-
-
- - -MENU_COALITION:Remove() - -
-
- -

Removes the main menu and the sub menus recursively of this MENU_COALITION.

- -

Return value

- -

#nil:

- - -
-
-
-
- - -MENU_COALITION:RemoveSubMenus() - -
-
- -

Removes the sub menus recursively of this MENU_COALITION.

- - -

Note that the main menu is kept!

- -

Return value

- -

#MENU_COALITION:

- - -
-
- -

Type MENU_COALITION_COMMAND

- -

The MENUCOALITIONCOMMAND class

- -

Field(s)

-
-
- - #string - -MENU_COALITION_COMMAND.ClassName - -
-
- - - -
-
-
-
- - -MENU_COALITION_COMMAND:New(Coalition, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) - -
-
- -

MENU_COALITION constructor.

- - -

Creates a new radio command item for a coalition, which can invoke a function with parameters.

- -

Parameters

-
    -
  • - -

    Dcs.DCSCoalition#coalition.side Coalition : -The coalition owning the menu.

    - -
  • -
  • - -

    #string MenuText : -The text for the menu.

    - -
  • -
  • - -

    Menu#MENU_COALITION ParentMenu : -The parent menu.

    - -
  • -
  • - -

    CommandMenuFunction : -A function that is called when the menu key is pressed.

    - -
  • -
  • - -

    CommandMenuArgument : -An argument for the function. There can only be ONE argument given. So multiple arguments must be wrapped into a table. See the below example how to do this.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#MENUCOALITIONCOMMAND:

- - -
-
-
-
- - -MENU_COALITION_COMMAND:Remove() - -
-
- -

Removes a radio command item for a coalition

- -

Return value

- -

#nil:

- - -
-
- -

Type MENU_COMMAND_BASE

- -

The MENUCOMMANDBASE class

- -

Field(s)

-
-
- - #string - -MENU_COMMAND_BASE.ClassName - -
-
- - - -
-
-
-
- - -MENU_COMMAND_BASE.CommandMenuArgument - -
-
- - - -
-
-
-
- - -MENU_COMMAND_BASE.CommandMenuFunction - -
-
- - - -
-
-
-
- - #function - -MENU_COMMAND_BASE.MenuCallHandler - -
-
- - - -
-
-
-
- - -MENU_COMMAND_BASE.New(#, self, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments) - -
-
- -

Constructor

- -

Parameters

-
    -
  • - -

    # : -ENUCOMMANDBASE

    - -
  • -
  • - -

    self :

    - -
  • -
  • - -

    MenuText :

    - -
  • -
  • - -

    ParentMenu :

    - -
  • -
  • - -

    CommandMenuFunction :

    - -
  • -
  • - -

    CommandMenuArguments :

    - -
  • -
-

Return value

- -

#MENUCOMMANDBASE:

- - -
-
- -

Type MENU_GROUP

- -

The MENU_GROUP class

- -

Usage:

-
 -- This demo creates a menu structure for the two groups of planes.
- -- Each group will receive a different menu structure.
- -- To test, join the planes, then look at the other radio menus (Option F10).
- -- Then switch planes and check if the menu is still there.
- -- And play with the Add and Remove menu options.
- 
- -- Note that in multi player, this will only work after the DCS groups bug is solved.
-
- local function ShowStatus( PlaneGroup, StatusText, Coalition )
-
-   MESSAGE:New( Coalition, 15 ):ToRed()
-   PlaneGroup:Message( StatusText, 15 )
- end
-
- local MenuStatus = {}
-
- local function RemoveStatusMenu( MenuGroup )
-   local MenuGroupName = MenuGroup:GetName()
-   MenuStatus[MenuGroupName]:Remove()
- end
-
- --- @param Wrapper.Group#GROUP MenuGroup
- local function AddStatusMenu( MenuGroup )
-   local MenuGroupName = MenuGroup:GetName()
-   -- This would create a menu for the red coalition under the MenuCoalitionRed menu object.
-   MenuStatus[MenuGroupName] = MENU_GROUP:New( MenuGroup, "Status for Planes" )
-   MENU_GROUP_COMMAND:New( MenuGroup, "Show Status", MenuStatus[MenuGroupName], ShowStatus, MenuGroup, "Status of planes is ok!", "Message to Red Coalition" )
- end
-
- SCHEDULER:New( nil,
-   function()
-     local PlaneGroup = GROUP:FindByName( "Plane 1" )
-     if PlaneGroup and PlaneGroup:IsAlive() then
-       local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" )
-       MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 1", MenuManage, AddStatusMenu, PlaneGroup )
-       MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 1", MenuManage, RemoveStatusMenu, PlaneGroup )
-     end
-   end, {}, 10, 10 )
-
- SCHEDULER:New( nil,
-   function()
-     local PlaneGroup = GROUP:FindByName( "Plane 2" )
-     if PlaneGroup and PlaneGroup:IsAlive() then
-       local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" )
-       MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 2", MenuManage, AddStatusMenu, PlaneGroup )
-       MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 2", MenuManage, RemoveStatusMenu, PlaneGroup )
-     end
-   end, {}, 10, 10 )
-
- -

Field(s)

-
-
- - #string - -MENU_GROUP.ClassName - -
-
- - - -
-
-
-
- - - -MENU_GROUP.MenuGroup - -
-
- - - -
-
-
-
- - - -MENU_GROUP.MenuGroupID - -
-
- - - -
-
-
-
- - - -MENU_GROUP.MenuPath - -
-
- - - -
-
-
-
- - - -MENU_GROUP.MenuText - -
-
- - - -
-
-
-
- - -MENU_GROUP:New(MenuGroup, MenuText, ParentMenu) - -
-
- -

MENU_GROUP constructor.

- - -

Creates a new radio menu item for a group.

- -

Parameters

-
    -
  • - -

    Wrapper.Group#GROUP MenuGroup : -The Group owning the menu.

    - -
  • -
  • - -

    #string MenuText : -The text for the menu.

    - -
  • -
  • - -

    #table ParentMenu : -The parent menu.

    - -
  • -
-

Return value

- -

#MENU_GROUP: -self

- -
-
-
-
- - - -MENU_GROUP.ParentMenu - -
-
- - - -
-
-
-
- - - -MENU_GROUP.Path - -
-
- - - -
-
-
-
- - -MENU_GROUP:Remove(MenuTime) - -
-
- -

Removes the main menu and sub menus recursively of this MENU_GROUP.

- -

Parameter

-
    -
  • - -

    MenuTime :

    - -
  • -
-

Return value

- -

#nil:

- - -
-
-
-
- - -MENU_GROUP:RemoveSubMenus(MenuTime) - -
-
- -

Removes the sub menus recursively of this MENU_GROUP.

- -

Parameter

-
    -
  • - -

    MenuTime :

    - -
  • -
-

Return value

- -

#MENU_GROUP: -self

- -
-
- -

Type MENU_GROUP_COMMAND

- -

The MENUGROUPCOMMAND class

- -

Field(s)

-
-
- - #string - -MENU_GROUP_COMMAND.ClassName - -
-
- - - -
-
-
-
- - - -MENU_GROUP_COMMAND.MenuGroup - -
-
- - - -
-
-
-
- - - -MENU_GROUP_COMMAND.MenuGroupID - -
-
- - - -
-
-
-
- - - -MENU_GROUP_COMMAND.MenuPath - -
-
- - - -
-
-
-
- - - -MENU_GROUP_COMMAND.MenuText - -
-
- - - -
-
-
-
- - -MENU_GROUP_COMMAND:New(MenuGroup, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) - -
-
- -

Creates a new radio command item for a group

- -

Parameters

-
    -
  • - -

    Wrapper.Group#GROUP MenuGroup : -The Group owning the menu.

    - -
  • -
  • - -

    MenuText : -The text for the menu.

    - -
  • -
  • - -

    ParentMenu : -The parent menu.

    - -
  • -
  • - -

    CommandMenuFunction : -A function that is called when the menu key is pressed.

    - -
  • -
  • - -

    CommandMenuArgument : -An argument for the function.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#MENUGROUPCOMMAND:

- - -
-
-
-
- - - -MENU_GROUP_COMMAND.ParentMenu - -
-
- - - -
-
-
-
- - - -MENU_GROUP_COMMAND.Path - -
-
- - - -
-
-
-
- - -MENU_GROUP_COMMAND:Remove(MenuTime) - -
-
- -

Removes a menu structure for a group.

- -

Parameter

-
    -
  • - -

    MenuTime :

    - -
  • -
-

Return value

- -

#nil:

- - -
-
- -

Type MENU_MISSION

- -

The MENU_MISSION class

- -

Field(s)

-
-
- - #string - -MENU_MISSION.ClassName - -
-
- - - -
-
-
-
- - -MENU_MISSION:New(MenuText, ParentMenu) - -
-
- -

MENU_MISSION constructor.

- - -

Creates a new MENU_MISSION object and creates the menu for a complete mission file.

- -

Parameters

-
    -
  • - -

    #string MenuText : -The text for the menu.

    - -
  • -
  • - -

    #table ParentMenu : -The parent menu. This parameter can be ignored if you want the menu to be located at the perent menu of DCS world (under F10 other).

    - -
  • -
-

Return value

- -

#MENU_MISSION:

- - -
-
-
-
- - -MENU_MISSION:Remove() - -
-
- -

Removes the main menu and the sub menus recursively of this MENU_MISSION.

- -

Return value

- -

#nil:

- - -
-
-
-
- - -MENU_MISSION:RemoveSubMenus() - -
-
- -

Removes the sub menus recursively of this MENU_MISSION.

- - -

Note that the main menu is kept!

- -

Return value

- -

#MENU_MISSION:

- - -
-
- -

Type MENU_MISSION_COMMAND

- -

The MENUMISSIONCOMMAND class

- -

Field(s)

-
-
- - #string - -MENU_MISSION_COMMAND.ClassName - -
-
- - - -
-
-
-
- - -MENU_MISSION_COMMAND:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) - -
-
- -

MENU_MISSION constructor.

- - -

Creates a new radio command item for a complete mission file, which can invoke a function with parameters.

- -

Parameters

-
    -
  • - -

    #string MenuText : -The text for the menu.

    - -
  • -
  • - -

    Menu#MENU_MISSION ParentMenu : -The parent menu.

    - -
  • -
  • - -

    CommandMenuFunction : -A function that is called when the menu key is pressed.

    - -
  • -
  • - -

    CommandMenuArgument : -An argument for the function. There can only be ONE argument given. So multiple arguments must be wrapped into a table. See the below example how to do this.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#MENUMISSIONCOMMAND: -self

- -
-
-
-
- - -MENU_MISSION_COMMAND:Remove() - -
-
- -

Removes a radio command item for a coalition

- -

Return value

- -

#nil:

- - -
-
- -
- -
- - diff --git a/docs/Documentation/Message.html b/docs/Documentation/Message.html deleted file mode 100644 index 355d0c6ab..000000000 --- a/docs/Documentation/Message.html +++ /dev/null @@ -1,594 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Message

- -

Core - MESSAGE class takes are of the real-time notifications and messages to players during a simulation.

- - - -

Banner Image

- -
- -

1) Message#MESSAGE class, extends Base#BASE

- -

Message System to display Messages to Clients, Coalitions or All. -Messages are shown on the display panel for an amount of seconds, and will then disappear. -Messages can contain a category which is indicating the category of the message.

- -

1.1) MESSAGE construction

- -

Messages are created with Message#MESSAGE.New. Note that when the MESSAGE object is created, no message is sent yet. -To send messages, you need to use the To functions.

- -

1.2) Send messages to an audience

- -

Messages are sent:

- - - -

1.3) Send conditionally to an audience

- -

Messages can be sent conditionally to an audience (when a condition is true):

- - - - - -

Global(s)

- - - - - -
MESSAGE - -
-

Type MESSAGE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MESSAGE.ClassName - -
MESSAGE.MessageCategory - -
MESSAGE.MessageID - -
MESSAGE:New(MessageText, MessageDuration, MessageCategory) -

Creates a new MESSAGE object.

-
MESSAGE:ToAll() -

Sends a MESSAGE to all players.

-
MESSAGE:ToAllIf(Condition) -

Sends a MESSAGE to all players if the given Condition is true.

-
MESSAGE:ToBlue() -

Sends a MESSAGE to the Blue coalition.

-
MESSAGE:ToClient(Client) -

Sends a MESSAGE to a Client Group.

-
MESSAGE:ToCoalition(CoalitionSide) -

Sends a MESSAGE to a Coalition.

-
MESSAGE:ToCoalitionIf(CoalitionSide, Condition) -

Sends a MESSAGE to a Coalition if the given Condition is true.

-
MESSAGE:ToGroup(Group) -

Sends a MESSAGE to a Group.

-
MESSAGE:ToRed() -

Sends a MESSAGE to the Red Coalition.

-
- -

Global(s)

-
-
- - #MESSAGE - -MESSAGE - -
-
- - - -
-
-

Type Message

- -

Type MESSAGE

- -

The MESSAGE class

- -

Field(s)

-
-
- - #string - -MESSAGE.ClassName - -
-
- - - -
-
-
-
- - #number - -MESSAGE.MessageCategory - -
-
- - - -
-
-
-
- - #number - -MESSAGE.MessageID - -
-
- - - -
-
-
-
- - -MESSAGE:New(MessageText, MessageDuration, MessageCategory) - -
-
- -

Creates a new MESSAGE object.

- - -

Note that these MESSAGE objects are not yet displayed on the display panel. You must use the functions ToClient or ToCoalition or ToAll to send these Messages to the respective recipients.

- -

Parameters

-
    -
  • - -

    #string MessageText : -is the text of the Message.

    - -
  • -
  • - -

    #number MessageDuration : -is a number in seconds of how long the MESSAGE should be shown on the display panel.

    - -
  • -
  • - -

    #string MessageCategory : -(optional) is a string expressing the "category" of the Message. The category will be shown as the first text in the message followed by a ": ".

    - -
  • -
-

Return value

- -

#MESSAGE:

- - -

Usage:

-
-- Create a series of new Messages.
--- MessageAll is meant to be sent to all players, for 25 seconds, and is classified as "Score".
--- MessageRED is meant to be sent to the RED players only, for 10 seconds, and is classified as "End of Mission", with ID "Win".
--- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
--- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
-MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!",  25, "End of Mission" )
-MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", 25, "Penalty" )
-MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target",  25, "Score" )
-MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", 25, "Score")
- -
-
-
-
- - -MESSAGE:ToAll() - -
-
- -

Sends a MESSAGE to all players.

- -

Return value

- -

#MESSAGE:

- - -

Usage:

-
-- Send a message created to all players.
-MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" ):ToAll()
-or
-MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" ):ToAll()
-or
-MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" )
-MessageAll:ToAll()
- -
-
-
-
- - -MESSAGE:ToAllIf(Condition) - -
-
- -

Sends a MESSAGE to all players if the given Condition is true.

- -

Parameter

-
    -
  • - -

    Condition :

    - -
  • -
-

Return value

- -

#MESSAGE:

- - -
-
-
-
- - -MESSAGE:ToBlue() - -
-
- -

Sends a MESSAGE to the Blue coalition.

- -

Return value

- -

#MESSAGE:

- - -

Usage:

-
-- Send a message created with the @{New} method to the BLUE coalition.
-MessageBLUE = MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToBlue()
-or
-MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToBlue()
-or
-MessageBLUE = MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
-MessageBLUE:ToBlue()
- -
-
-
-
- - -MESSAGE:ToClient(Client) - -
-
- -

Sends a MESSAGE to a Client Group.

- - -

Note that the Group needs to be defined within the ME with the skillset "Client" or "Player".

- -

Parameter

- -

Return value

- -

#MESSAGE:

- - -

Usage:

-
-- Send the 2 messages created with the @{New} method to the Client Group.
--- Note that the Message of MessageClient2 is overwriting the Message of MessageClient1.
-ClientGroup = Group.getByName( "ClientGroup" )
-
-MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" ):ToClient( ClientGroup )
-MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" ):ToClient( ClientGroup )
-or
-MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" ):ToClient( ClientGroup )
-MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" ):ToClient( ClientGroup )
-or
-MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" )
-MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" )
-MessageClient1:ToClient( ClientGroup )
-MessageClient2:ToClient( ClientGroup )
- -
-
-
-
- - -MESSAGE:ToCoalition(CoalitionSide) - -
-
- -

Sends a MESSAGE to a Coalition.

- -

Parameter

-
    -
  • - -

    CoalitionSide : -needs to be filled out by the defined structure of the standard scripting engine coalition.side.

    - -
  • -
-

Return value

- -

#MESSAGE:

- - -

Usage:

-
-- Send a message created with the @{New} method to the RED coalition.
-MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToCoalition( coalition.side.RED )
-or
-MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToCoalition( coalition.side.RED )
-or
-MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
-MessageRED:ToCoalition( coalition.side.RED )
- -
-
-
-
- - -MESSAGE:ToCoalitionIf(CoalitionSide, Condition) - -
-
- -

Sends a MESSAGE to a Coalition if the given Condition is true.

- -

Parameters

-
    -
  • - -

    CoalitionSide : -needs to be filled out by the defined structure of the standard scripting engine coalition.side.

    - -
  • -
  • - -

    Condition :

    - -
  • -
-

Return value

- -

#MESSAGE:

- - -
-
-
-
- - -MESSAGE:ToGroup(Group) - -
-
- -

Sends a MESSAGE to a Group.

- -

Parameter

- -

Return value

- -

#MESSAGE:

- - -
-
-
-
- - -MESSAGE:ToRed() - -
-
- -

Sends a MESSAGE to the Red Coalition.

- -

Return value

- -

#MESSAGE:

- - -

Usage:

-
-- Send a message created with the @{New} method to the RED coalition.
-MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToRed()
-or
-MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToRed()
-or
-MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
-MessageRED:ToRed()
- -
-
- -
- -
- - diff --git a/docs/Documentation/MissileTrainer.html b/docs/Documentation/MissileTrainer.html deleted file mode 100644 index 3664bf7a8..000000000 --- a/docs/Documentation/MissileTrainer.html +++ /dev/null @@ -1,1043 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module MissileTrainer

- -

This module contains the MISSILETRAINER class.

- - - -
- -

1) MissileTrainer#MISSILETRAINER class, extends Base#BASE

-

The #MISSILETRAINER class uses the DCS world messaging system to be alerted of any missiles fired, and when a missile would hit your aircraft, -the class will destroy the missile within a certain range, to avoid damage to your aircraft. -It suports the following functionality:

- -
    -
  • Track the missiles fired at you and other players, providing bearing and range information of the missiles towards the airplanes.
  • -
  • Provide alerts of missile launches, including detailed information of the units launching, including bearing, range �
  • -
  • Provide alerts when a missile would have killed your aircraft.
  • -
  • Provide alerts when the missile self destructs.
  • -
  • Enable / Disable and Configure the Missile Trainer using the various menu options.
  • -
- -

When running a mission where MISSILETRAINER is used, the following radio menu structure ( 'Radio Menu' -> 'Other (F10)' -> 'MissileTrainer' ) options are available for the players:

- -
    -
  • Messages: Menu to configure all messages. -
      -
    • Messages On: Show all messages.
    • -
    • Messages Off: Disable all messages.
    • -
  • -
  • Tracking: Menu to configure missile tracking messages. -
      -
    • To All: Shows missile tracking messages to all players.
    • -
    • To Target: Shows missile tracking messages only to the player where the missile is targetted at.
    • -
    • Tracking On: Show missile tracking messages.
    • -
    • Tracking Off: Disable missile tracking messages.
    • -
    • Frequency Increase: Increases the missile tracking message frequency with one second.
    • -
    • Frequency Decrease: Decreases the missile tracking message frequency with one second.
    • -
  • -
  • Alerts: Menu to configure alert messages. -
      -
    • To All: Shows alert messages to all players.
    • -
    • To Target: Shows alert messages only to the player where the missile is (was) targetted at.
    • -
    • Hits On: Show missile hit alert messages.
    • -
    • Hits Off: Disable missile hit alert messages.
    • -
    • Launches On: Show missile launch messages.
    • -
    • Launches Off: Disable missile launch messages.
    • -
  • -
  • Details: Menu to configure message details. -
      -
    • Range On: Shows range information when a missile is fired to a target.
    • -
    • Range Off: Disable range information when a missile is fired to a target.
    • -
    • Bearing On: Shows bearing information when a missile is fired to a target.
    • -
    • Bearing Off: Disable bearing information when a missile is fired to a target.
    • -
  • -
  • Distance: Menu to configure the distance when a missile needs to be destroyed when near to a player, during tracking. This will improve/influence hit calculation accuracy, but has the risk of damaging the aircraft when the missile reaches the aircraft before the distance is measured. -
      -
    • 50 meter: Destroys the missile when the distance to the aircraft is below or equal to 50 meter.
    • -
    • 100 meter: Destroys the missile when the distance to the aircraft is below or equal to 100 meter.
    • -
    • 150 meter: Destroys the missile when the distance to the aircraft is below or equal to 150 meter.
    • -
    • 200 meter: Destroys the missile when the distance to the aircraft is below or equal to 200 meter.
    • -
  • -
- - -

1.1) MISSILETRAINER construction methods:

-

Create a new MISSILETRAINER object with the MISSILETRAINER.New method:

- -
    -
  • MISSILETRAINER.New: Creates a new MISSILETRAINER object taking the maximum distance to your aircraft to evaluate when a missile needs to be destroyed.
  • -
- -

MISSILETRAINER will collect each unit declared in the mission with a skill level "Client" and "Player", and will monitor the missiles shot at those.

- -

1.2) MISSILETRAINER initialization methods:

-

A MISSILETRAINER object will behave differently based on the usage of initialization methods:

- - - -
- -

CREDITS

-

Stuka (Danny) Who you can search on the Eagle Dynamics Forums. -Working together with Danny has resulted in the MISSILETRAINER class. -Danny has shared his ideas and together we made a design. -Together with the 476 virtual team, we tested the MISSILETRAINER class, and got much positive feedback!

- - -

Global(s)

- - - - - -
MISSILETRAINER - -
-

Type MISSILETRAINER

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MISSILETRAINER.AlertsHitsOnOff - -
MISSILETRAINER.AlertsLaunchesOnOff - -
MISSILETRAINER.AlertsToAll - -
MISSILETRAINER.ClassName - -
MISSILETRAINER.DBClients - -
MISSILETRAINER.DetailsBearingOnOff - -
MISSILETRAINER.DetailsRangeOnOff - -
MISSILETRAINER:InitAlertsHitsOnOff(AlertsHitsOnOff) -

Sets by default the display of hit alerts ON or OFF.

-
MISSILETRAINER:InitAlertsLaunchesOnOff(AlertsLaunchesOnOff) -

Sets by default the display of launch alerts ON or OFF.

-
MISSILETRAINER:InitAlertsToAll(AlertsToAll) -

Sets by default the display of alerts to be shown to all players or only to you.

-
MISSILETRAINER:InitBearingOnOff(DetailsBearingOnOff) -

Sets by default the display of bearing information of missiles ON of OFF.

-
MISSILETRAINER:InitMenusOnOff(MenusOnOff) -

Enables / Disables the menus.

-
MISSILETRAINER:InitMessagesOnOff(MessagesOnOff) -

Sets by default the display of any message to be ON or OFF.

-
MISSILETRAINER:InitRangeOnOff(DetailsRangeOnOff) -

Sets by default the display of range information of missiles ON of OFF.

-
MISSILETRAINER:InitTrackingFrequency(TrackingFrequency) -

Increases, decreases the missile tracking message display frequency with the provided time interval in seconds.

-
MISSILETRAINER:InitTrackingOnOff(TrackingOnOff) -

Sets by default the display of missile tracking report to be ON or OFF.

-
MISSILETRAINER:InitTrackingToAll(TrackingToAll) -

Sets by default the missile tracking report for all players or only for those missiles targetted to you.

-
MISSILETRAINER.MenusOnOff - -
MISSILETRAINER.MessagesOnOff - -
MISSILETRAINER:New(Distance, Briefing) -

Creates the main object which is handling missile tracking.

-
MISSILETRAINER:OnEventShot(EventData, EVentData) -

Detects if an SA site was shot with an anti radiation missile.

-
MISSILETRAINER.TrackingFrequency - -
MISSILETRAINER.TrackingMissiles - -
MISSILETRAINER.TrackingOnOff - -
MISSILETRAINER.TrackingToAll - -
MISSILETRAINER:_AddBearing(Client, TrainerWeapon) - -
MISSILETRAINER:_AddRange(Client, TrainerWeapon) - -
MISSILETRAINER._Alive(Client, self) - -
MISSILETRAINER._MenuMessages(MenuParameters) - -
MISSILETRAINER:_TrackMissiles() - -
- -

Global(s)

-
-
- - #MISSILETRAINER - -MISSILETRAINER - -
-
- - - -
-
-

Type MissileTrainer

- -

Type MISSILETRAINER

- -

The MISSILETRAINER class

- -

Field(s)

-
-
- - - -MISSILETRAINER.AlertsHitsOnOff - -
-
- - - -
-
-
-
- - - -MISSILETRAINER.AlertsLaunchesOnOff - -
-
- - - -
-
-
-
- - - -MISSILETRAINER.AlertsToAll - -
-
- - - -
-
-
-
- - #string - -MISSILETRAINER.ClassName - -
-
- - - -
-
-
-
- - Core.Set#SET_CLIENT - -MISSILETRAINER.DBClients - -
-
- - - -
-
-
-
- - - -MISSILETRAINER.DetailsBearingOnOff - -
-
- - - -
-
-
-
- - - -MISSILETRAINER.DetailsRangeOnOff - -
-
- - - -
-
-
-
- - -MISSILETRAINER:InitAlertsHitsOnOff(AlertsHitsOnOff) - -
-
- -

Sets by default the display of hit alerts ON or OFF.

- -

Parameter

-
    -
  • - -

    #boolean AlertsHitsOnOff : -true or false

    - -
  • -
-

Return value

- -

#MISSILETRAINER: -self

- -
-
-
-
- - -MISSILETRAINER:InitAlertsLaunchesOnOff(AlertsLaunchesOnOff) - -
-
- -

Sets by default the display of launch alerts ON or OFF.

- -

Parameter

-
    -
  • - -

    #boolean AlertsLaunchesOnOff : -true or false

    - -
  • -
-

Return value

- -

#MISSILETRAINER: -self

- -
-
-
-
- - -MISSILETRAINER:InitAlertsToAll(AlertsToAll) - -
-
- -

Sets by default the display of alerts to be shown to all players or only to you.

- -

Parameter

-
    -
  • - -

    #boolean AlertsToAll : -true or false

    - -
  • -
-

Return value

- -

#MISSILETRAINER: -self

- -
-
-
-
- - -MISSILETRAINER:InitBearingOnOff(DetailsBearingOnOff) - -
-
- -

Sets by default the display of bearing information of missiles ON of OFF.

- -

Parameter

-
    -
  • - -

    #boolean DetailsBearingOnOff : -true or false

    - -
  • -
-

Return value

- -

#MISSILETRAINER: -self

- -
-
-
-
- - -MISSILETRAINER:InitMenusOnOff(MenusOnOff) - -
-
- -

Enables / Disables the menus.

- -

Parameter

-
    -
  • - -

    #boolean MenusOnOff : -true or false

    - -
  • -
-

Return value

- -

#MISSILETRAINER: -self

- -
-
-
-
- - -MISSILETRAINER:InitMessagesOnOff(MessagesOnOff) - -
-
- -

Sets by default the display of any message to be ON or OFF.

- -

Parameter

-
    -
  • - -

    #boolean MessagesOnOff : -true or false

    - -
  • -
-

Return value

- -

#MISSILETRAINER: -self

- -
-
-
-
- - -MISSILETRAINER:InitRangeOnOff(DetailsRangeOnOff) - -
-
- -

Sets by default the display of range information of missiles ON of OFF.

- -

Parameter

-
    -
  • - -

    #boolean DetailsRangeOnOff : -true or false

    - -
  • -
-

Return value

- -

#MISSILETRAINER: -self

- -
-
-
-
- - -MISSILETRAINER:InitTrackingFrequency(TrackingFrequency) - -
-
- -

Increases, decreases the missile tracking message display frequency with the provided time interval in seconds.

- - -

The default frequency is a 3 second interval, so the Tracking Frequency parameter specifies the increase or decrease from the default 3 seconds or the last frequency update.

- -

Parameter

-
    -
  • - -

    #number TrackingFrequency : -Provide a negative or positive value in seconds to incraese or decrease the display frequency.

    - -
  • -
-

Return value

- -

#MISSILETRAINER: -self

- -
-
-
-
- - -MISSILETRAINER:InitTrackingOnOff(TrackingOnOff) - -
-
- -

Sets by default the display of missile tracking report to be ON or OFF.

- -

Parameter

-
    -
  • - -

    #boolean TrackingOnOff : -true or false

    - -
  • -
-

Return value

- -

#MISSILETRAINER: -self

- -
-
-
-
- - -MISSILETRAINER:InitTrackingToAll(TrackingToAll) - -
-
- -

Sets by default the missile tracking report for all players or only for those missiles targetted to you.

- -

Parameter

-
    -
  • - -

    #boolean TrackingToAll : -true or false

    - -
  • -
-

Return value

- -

#MISSILETRAINER: -self

- -
-
-
-
- - - -MISSILETRAINER.MenusOnOff - -
-
- - - -
-
-
-
- - - -MISSILETRAINER.MessagesOnOff - -
-
- - - -
-
-
-
- - -MISSILETRAINER:New(Distance, Briefing) - -
-
- -

Creates the main object which is handling missile tracking.

- - -

When a missile is fired a SCHEDULER is set off that follows the missile. When near a certain a client player, the missile will be destroyed.

- -

Parameters

-
    -
  • - -

    #number Distance : -The distance in meters when a tracked missile needs to be destroyed when close to a player.

    - -
  • -
  • - -

    #string Briefing : -(Optional) Will show a text to the players when starting their mission. Can be used for briefing purposes.

    - -
  • -
-

Return value

- -

#MISSILETRAINER:

- - -
-
-
-
- - -MISSILETRAINER:OnEventShot(EventData, EVentData) - -
-
- -

Detects if an SA site was shot with an anti radiation missile.

- - -

In this case, take evasive actions based on the skill level set within the ME.

- -

Parameters

- -
-
-
-
- - -MISSILETRAINER.TrackingFrequency - -
-
- - - -
-
-
-
- - - -MISSILETRAINER.TrackingMissiles - -
-
- - - -
-
-
-
- - - -MISSILETRAINER.TrackingOnOff - -
-
- - - -
-
-
-
- - - -MISSILETRAINER.TrackingToAll - -
-
- - - -
-
-
-
- - -MISSILETRAINER:_AddBearing(Client, TrainerWeapon) - -
-
- - - -

Parameters

-
    -
  • - -

    Client :

    - -
  • -
  • - -

    TrainerWeapon :

    - -
  • -
-
-
-
-
- - -MISSILETRAINER:_AddRange(Client, TrainerWeapon) - -
-
- - - -

Parameters

-
    -
  • - -

    Client :

    - -
  • -
  • - -

    TrainerWeapon :

    - -
  • -
-
-
-
-
- - -MISSILETRAINER._Alive(Client, self) - -
-
- - - -

Parameters

-
    -
  • - -

    Client :

    - -
  • -
  • - -

    self :

    - -
  • -
-
-
-
-
- - -MISSILETRAINER._MenuMessages(MenuParameters) - -
-
- - - -

Parameter

-
    -
  • - -

    MenuParameters :

    - -
  • -
-
-
-
-
- - -MISSILETRAINER:_TrackMissiles() - -
-
- - - -
-
- -
- -
- - diff --git a/docs/Documentation/Mission.html b/docs/Documentation/Mission.html deleted file mode 100644 index 1dfbf5f58..000000000 --- a/docs/Documentation/Mission.html +++ /dev/null @@ -1,2092 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Mission

- -

A MISSION is the main owner of a Mission orchestration within MOOSE .

- - -

The Mission framework orchestrates CLIENTs, TASKs, STAGEs etc. -A CLIENT needs to be registered within the MISSION through the function AddClient. A TASK needs to be registered within the MISSION through the function AddTask.

- -

Global(s)

- - - - - -
MISSION - -
-

Type MISSION

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MISSION:AbortUnit(PlayerUnit) -

Aborts a PlayerUnit from the Mission.

-
MISSION:AddScoring(Scoring) -

Add a scoring to the mission.

-
MISSION:AddTask(Task) -

Register a Task to be completed within the Mission.

-
MISSION.ClassName - -
MISSION:Complete() -

Synchronous Event Trigger for Event Complete.

-
MISSION:CrashUnit(PlayerUnit) -

Handles a crash of a PlayerUnit from the Mission.

-
MISSION:Fail() -

Synchronous Event Trigger for Event Fail.

-
MISSION:GetCommandCenter() -

Gets the COMMANDCENTER.

-
MISSION:GetGroups() -

Get the groups for which TASKS are given in the mission

-
MISSION:GetMenu(TaskGroup) -

Gets the mission menu for the coalition.

-
MISSION:GetName() -

Gets the mission name.

-
MISSION:GetNextTaskID(Task) -

Return the next Task ID to be completed within the Mission.

-
MISSION:GetScoring() -

Get the scoring object of a mission.

-
MISSION.GetTask(TaskName, self) -

Get the TASK identified by the TaskNumber from the Mission.

-
MISSION:GetTasks() -

Get all the TASKs from the Mission.

-
MISSION.HasGroup(#, self, TaskGroup) -

Validates if the Mission has a Group

-
MISSION:IsCompleted() -

Is the Mission Completed.

-
MISSION:IsFailed() -

Is the Mission Failed.

-
MISSION:IsHold() -

Is the Mission Hold.

-
MISSION:IsIdle() -

Is the Mission Idle.

-
MISSION:IsOngoing() -

Is the Mission Ongoing.

-
MISSION:JoinUnit(PlayerUnit, PlayerGroup) -

Add a Unit to join the Mission.

-
MISSION.MissionBriefing - -
MISSION.MissionMenu - -
MISSION.MissionStatus - -
MISSION.Name - -
MISSION:New(CommandCenter, MissionName, MissionPriority, MissionBriefing, MissionCoalition) -

This is the main MISSION declaration method.

-
MISSION:OnAfterComplete(From, Event, To) -

OnAfter Transition Handler for Event Complete.

-
MISSION:OnAfterFail(From, Event, To) -

OnAfter Transition Handler for Event Fail.

-
MISSION:OnAfterStart(From, Event, To) -

OnAfter Transition Handler for Event Start.

-
MISSION:OnAfterStop(From, Event, To) -

OnAfter Transition Handler for Event Stop.

-
MISSION:OnBeforeComplete(From, Event, To) -

OnBefore Transition Handler for Event Complete.

-
MISSION:OnBeforeFail(From, Event, To) -

OnBefore Transition Handler for Event Fail.

-
MISSION:OnBeforeStart(From, Event, To) -

OnBefore Transition Handler for Event Start.

-
MISSION:OnBeforeStop(From, Event, To) -

OnBefore Transition Handler for Event Stop.

-
MISSION:OnEnterCompleted(From, Event, To) -

OnEnter Transition Handler for State Completed.

-
MISSION:OnEnterFailed(From, Event, To) -

OnEnter Transition Handler for State Failed.

-
MISSION:OnEnterIdle(From, Event, To) -

OnEnter Transition Handler for State Idle.

-
MISSION:OnEnterOngoing(From, Event, To) -

OnEnter Transition Handler for State Ongoing.

-
MISSION:OnLeaveCompleted(From, Event, To) -

OnLeave Transition Handler for State Completed.

-
MISSION:OnLeaveFailed(From, Event, To) -

OnLeave Transition Handler for State Failed.

-
MISSION:OnLeaveIdle(From, Event, To) -

OnLeave Transition Handler for State Idle.

-
MISSION:OnLeaveOngoing(From, Event, To) -

OnLeave Transition Handler for State Ongoing.

-
MISSION:RemoveMenu(MenuTime) -

Removes the Planned Task menu.

-
MISSION:RemoveTask(Task) -

Removes a Task to be completed within the Mission.

-
MISSION:RemoveTaskMenu(Task) -

Removes a Task menu.

-
MISSION:ReportDetails() -

Create a detailed report of the Mission, listing all the details of the Task.

-
MISSION:ReportOverview() -

Create a overview report of the Mission (multiple lines).

-
MISSION:ReportSummary() -

Create a summary report of the Mission (one line).

-
MISSION.Scoring - -
MISSION:SetMenu(MenuTime) -

Sets the Planned Task menu.

-
MISSION:Start() -

Synchronous Event Trigger for Event Start.

-
MISSION:Stop() -

Synchronous Event Trigger for Event Stop.

-
MISSION._Clients - -
MISSION:__Complete(Delay) -

Asynchronous Event Trigger for Event Complete.

-
MISSION:__Fail(Delay) -

Asynchronous Event Trigger for Event Fail.

-
MISSION:__Start(Delay) -

Asynchronous Event Trigger for Event Start.

-
MISSION:__Stop(Delay) -

Asynchronous Event Trigger for Event Stop.

-
MISSION:onbeforeComplete(From, Event, To) - -
MISSION:onenterCompleted(From, Event, To) - -
- -

Global(s)

-
-
- - #MISSION - -MISSION - -
-
- - - -
-
-

Type Mission

- -

Type MISSION

- -

The MISSION class

- -

Field(s)

-
-
- - -MISSION:AbortUnit(PlayerUnit) - -
-
- -

Aborts a PlayerUnit from the Mission.

- - -

For each Task within the Mission, the PlayerUnit is removed from Task where it is assigned. -If the Unit was not part of a Task in the Mission, false is returned. -If the Unit is part of a Task in the Mission, true is returned.

- -

Parameter

-
    -
  • - -

    Wrapper.Unit#UNIT PlayerUnit : -The CLIENT or UNIT of the Player joining the Mission.

    - -
  • -
-

Return value

- -

#boolean: -true if Unit is part of a Task in the Mission.

- -
-
-
-
- - -MISSION:AddScoring(Scoring) - -
-
- -

Add a scoring to the mission.

- -

Parameter

-
    -
  • - -

    Scoring :

    - -
  • -
-

Return value

- -

#MISSION: -self

- -
-
-
-
- - -MISSION:AddTask(Task) - -
-
- -

Register a Task to be completed within the Mission.

- - -

Note that there can be multiple Tasks registered to be completed. -Each Task can be set a certain Goals. The Mission will not be completed until all Goals are reached.

- -

Parameter

- -

Return value

- -

Tasking.Task#TASK: -The task added.

- -
-
-
-
- - #string - -MISSION.ClassName - -
-
- - - -
-
-
-
- - -MISSION:Complete() - -
-
- -

Synchronous Event Trigger for Event Complete.

- -
-
-
-
- - -MISSION:CrashUnit(PlayerUnit) - -
-
- -

Handles a crash of a PlayerUnit from the Mission.

- - -

For each Task within the Mission, the PlayerUnit is removed from Task where it is assigned. -If the Unit was not part of a Task in the Mission, false is returned. -If the Unit is part of a Task in the Mission, true is returned.

- -

Parameter

-
    -
  • - -

    Wrapper.Unit#UNIT PlayerUnit : -The CLIENT or UNIT of the Player crashing.

    - -
  • -
-

Return value

- -

#boolean: -true if Unit is part of a Task in the Mission.

- -
-
-
-
- - -MISSION:Fail() - -
-
- -

Synchronous Event Trigger for Event Fail.

- -
-
-
-
- - -MISSION:GetCommandCenter() - -
-
- -

Gets the COMMANDCENTER.

- -

Return value

- -

Tasking.CommandCenter#COMMANDCENTER:

- - -
-
-
-
- - -MISSION:GetGroups() - -
-
- -

Get the groups for which TASKS are given in the mission

- -

Return value

- -

Core.Set#SET_GROUP:

- - -
-
-
-
- - -MISSION:GetMenu(TaskGroup) - -
-
- -

Gets the mission menu for the coalition.

- -

Parameter

- -

Return value

- -

Core.Menu#MENU_COALITION: -self

- -
-
-
-
- - -MISSION:GetName() - -
-
- -

Gets the mission name.

- -

Return value

- -

#MISSION: -self

- -
-
-
-
- - -MISSION:GetNextTaskID(Task) - -
-
- -

Return the next Task ID to be completed within the Mission.

- -

Parameter

- -

Return value

- -

Tasking.Task#TASK: -The task added.

- -
-
-
-
- - -MISSION:GetScoring() - -
-
- -

Get the scoring object of a mission.

- -

Return value

- -

#SCORING: -Scoring

- -
-
-
-
- - -MISSION.GetTask(TaskName, self) - -
-
- -

Get the TASK identified by the TaskNumber from the Mission.

- - -

This function is useful in GoalFunctions.

- -

Parameters

-
    -
  • - -

    #string TaskName : -The Name of the Task within the Mission.

    - -
  • -
  • - -

    self :

    - -
  • -
-

Return values

-
    -
  1. - -

    Tasking.Task#TASK: -The Task

    - -
  2. -
  3. - -

    #nil: -Returns nil if no task was found.

    - -
  4. -
-
-
-
-
- - -MISSION:GetTasks() - -
-
- -

Get all the TASKs from the Mission.

- - -

This function is useful in GoalFunctions.

- -

Return value

- - -

{TASK,...} Structure of TASKS with the TASK number as the key.

- -

Usage:

-
-- Get Tasks from the Mission.
-Tasks = Mission:GetTasks()
-env.info( "Task 2 Completion = " .. Tasks[2]:GetGoalPercentage() .. "%" )
- -
-
-
-
- - -MISSION.HasGroup(#, self, TaskGroup) - -
-
- -

Validates if the Mission has a Group

- -

Parameters

-
    -
  • - -

    # : -ISSION

    - -
  • -
  • - -

    self :

    - -
  • -
  • - -

    TaskGroup :

    - -
  • -
-

Return value

- -

#boolean: -true if the Mission has a Group.

- -
-
-
-
- - -MISSION:IsCompleted() - -
-
- -

Is the Mission Completed.

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -MISSION:IsFailed() - -
-
- -

Is the Mission Failed.

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -MISSION:IsHold() - -
-
- -

Is the Mission Hold.

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -MISSION:IsIdle() - -
-
- -

Is the Mission Idle.

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -MISSION:IsOngoing() - -
-
- -

Is the Mission Ongoing.

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -MISSION:JoinUnit(PlayerUnit, PlayerGroup) - -
-
- -

Add a Unit to join the Mission.

- - -

For each Task within the Mission, the Unit is joined with the Task. -If the Unit was not part of a Task in the Mission, false is returned. -If the Unit is part of a Task in the Mission, true is returned.

- -

Parameters

-
    -
  • - -

    Wrapper.Unit#UNIT PlayerUnit : -The CLIENT or UNIT of the Player joining the Mission.

    - -
  • -
  • - -

    Wrapper.Group#GROUP PlayerGroup : -The GROUP of the player joining the Mission.

    - -
  • -
-

Return value

- -

#boolean: -true if Unit is part of a Task in the Mission.

- -
-
-
-
- - #string - -MISSION.MissionBriefing - -
-
- - - -
-
-
-
- - Core.Menu#MENU_COALITION - -MISSION.MissionMenu - -
-
- - - -
-
-
-
- - #string - -MISSION.MissionStatus - -
-
- - - -
-
-
-
- - #string - -MISSION.Name - -
-
- - - -
-
-
-
- - -MISSION:New(CommandCenter, MissionName, MissionPriority, MissionBriefing, MissionCoalition) - -
-
- -

This is the main MISSION declaration method.

- - -

Each Mission is like the master or a Mission orchestration between, Clients, Tasks, Stages etc.

- -

Parameters

-
    -
  • - -

    Tasking.CommandCenter#COMMANDCENTER CommandCenter :

    - -
  • -
  • - -

    #string MissionName : -is the name of the mission. This name will be used to reference the status of each mission by the players.

    - -
  • -
  • - -

    #string MissionPriority : -is a string indicating the "priority" of the Mission. f.e. "Primary", "Secondary" or "First", "Second". It is free format and up to the Mission designer to choose. There are no rules behind this field.

    - -
  • -
  • - -

    #string MissionBriefing : -is a string indicating the mission briefing to be shown when a player joins a CLIENT.

    - -
  • -
  • - -

    Dcs.DCSCoalitionWrapper.Object#coalition MissionCoalition : -is a string indicating the coalition or party to which this mission belongs to. It is free format and can be chosen freely by the mission designer. Note that this field is not to be confused with the coalition concept of the ME. Examples of a Mission Coalition could be "NATO", "CCCP", "Intruders", "Terrorists"...

    - -
  • -
-

Return value

- -

#MISSION: -self

- -
-
-
-
- - -MISSION:OnAfterComplete(From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Complete.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -MISSION:OnAfterFail(From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Fail.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -MISSION:OnAfterStart(From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Start.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -MISSION:OnAfterStop(From, Event, To) - -
-
- -

OnAfter Transition Handler for Event Stop.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -MISSION:OnBeforeComplete(From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Complete.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -MISSION:OnBeforeFail(From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Fail.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -MISSION:OnBeforeStart(From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Start.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -MISSION:OnBeforeStop(From, Event, To) - -
-
- -

OnBefore Transition Handler for Event Stop.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -MISSION:OnEnterCompleted(From, Event, To) - -
-
- -

OnEnter Transition Handler for State Completed.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -MISSION:OnEnterFailed(From, Event, To) - -
-
- -

OnEnter Transition Handler for State Failed.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -MISSION:OnEnterIdle(From, Event, To) - -
-
- -

OnEnter Transition Handler for State Idle.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -MISSION:OnEnterOngoing(From, Event, To) - -
-
- -

OnEnter Transition Handler for State Ongoing.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-
-
-
-
- - -MISSION:OnLeaveCompleted(From, Event, To) - -
-
- -

OnLeave Transition Handler for State Completed.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -MISSION:OnLeaveFailed(From, Event, To) - -
-
- -

OnLeave Transition Handler for State Failed.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -MISSION:OnLeaveIdle(From, Event, To) - -
-
- -

OnLeave Transition Handler for State Idle.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -MISSION:OnLeaveOngoing(From, Event, To) - -
-
- -

OnLeave Transition Handler for State Ongoing.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
-

Return value

- -

#boolean: -Return false to cancel Transition.

- -
-
-
-
- - -MISSION:RemoveMenu(MenuTime) - -
-
- -

Removes the Planned Task menu.

- -

Parameter

-
    -
  • - -

    #number MenuTime :

    - -
  • -
-
-
-
-
- - -MISSION:RemoveTask(Task) - -
-
- -

Removes a Task to be completed within the Mission.

- - -

Note that there can be multiple Tasks registered to be completed. -Each Task can be set a certain Goals. The Mission will not be completed until all Goals are reached.

- -

Parameter

- -

Return value

- -

#nil: -The cleaned Task reference.

- -
-
-
-
- - -MISSION:RemoveTaskMenu(Task) - -
-
- -

Removes a Task menu.

- -

Parameter

- -

Return value

- -

#MISSION: -self

- -
-
-
-
- - -MISSION:ReportDetails() - -
-
- -

Create a detailed report of the Mission, listing all the details of the Task.

- -

Return value

- -

#string:

- - -
-
-
-
- - -MISSION:ReportOverview() - -
-
- -

Create a overview report of the Mission (multiple lines).

- -

Return value

- -

#string:

- - -
-
-
-
- - -MISSION:ReportSummary() - -
-
- -

Create a summary report of the Mission (one line).

- -

Return value

- -

#string:

- - -
-
-
-
- - - -MISSION.Scoring - -
-
- - - -
-
-
-
- - -MISSION:SetMenu(MenuTime) - -
-
- -

Sets the Planned Task menu.

- -

Parameter

-
    -
  • - -

    #number MenuTime :

    - -
  • -
-
-
-
-
- - -MISSION:Start() - -
-
- -

Synchronous Event Trigger for Event Start.

- -
-
-
-
- - -MISSION:Stop() - -
-
- -

Synchronous Event Trigger for Event Stop.

- -
-
-
-
- - #MISSION.Clients - -MISSION._Clients - -
-
- - - -
-
-
-
- - -MISSION:__Complete(Delay) - -
-
- -

Asynchronous Event Trigger for Event Complete.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -MISSION:__Fail(Delay) - -
-
- -

Asynchronous Event Trigger for Event Fail.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -MISSION:__Start(Delay) - -
-
- -

Asynchronous Event Trigger for Event Start.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -MISSION:__Stop(Delay) - -
-
- -

Asynchronous Event Trigger for Event Stop.

- -

Parameter

-
    -
  • - -

    #number Delay : -The delay in seconds.

    - -
  • -
-
-
-
-
- - -MISSION:onbeforeComplete(From, Event, To) - -
-
- - - - -

FSM function for a MISSION - @param #MISSION self - @param #string From - @param #string Event - @param #string To

- -

Parameters

-
    -
  • - -

    From :

    - -
  • -
  • - -

    Event :

    - -
  • -
  • - -

    To :

    - -
  • -
-
-
-
-
- - -MISSION:onenterCompleted(From, Event, To) - -
-
- - - - -

FSM function for a MISSION - @param #MISSION self - @param #string From - @param #string Event - @param #string To

- -

Parameters

-
    -
  • - -

    From :

    - -
  • -
  • - -

    Event :

    - -
  • -
  • - -

    To :

    - -
  • -
-
-
- -

Type MISSION.Clients

- -

Type SCORING

- -
- -
- - diff --git a/docs/Documentation/Object.html b/docs/Documentation/Object.html deleted file mode 100644 index a8198242c..000000000 --- a/docs/Documentation/Object.html +++ /dev/null @@ -1,331 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Object

- -

This module contains the OBJECT class.

- - - -

1) Object#OBJECT class, extends Base#BASE

-

The Object#OBJECT class is a wrapper class to handle the DCS Object objects:

- -
    -
  • Support all DCS Object APIs.
  • -
  • Enhance with Object specific APIs not in the DCS Object API set.
  • -
  • Manage the "state" of the DCS Object.
  • -
- -

1.1) OBJECT constructor:

-

The OBJECT class provides the following functions to construct a OBJECT instance:

- - - -

1.2) OBJECT methods:

-

The following methods can be used to identify an Object object:

- - - -
- - -

Global(s)

- - - - - -
OBJECT - -
-

Type DCSObject

- - - - - -
DCSObject.id_ -

The ID of the controllable in DCS

-
- -

Type OBJECT

- - - - - - - - - - - - - - - - - - - - - -
OBJECT.ClassName - -
OBJECT:Destroy() -

Destroys the OBJECT.

-
OBJECT:GetID() -

Returns the unit's unique identifier.

-
OBJECT:New(ObjectName, Test) -

Create a new OBJECT from a DCSObject

-
OBJECT.ObjectName -

The name of the Object.

-
- -

Global(s)

-
-
- - #OBJECT - -OBJECT - -
-
- - - -
-
-

Type Object

- -

Type DCSObject

- -

A DCSObject

- -

Field(s)

-
-
- - -DCSObject.id_ - -
-
- -

The ID of the controllable in DCS

- -
-
- -

Type OBJECT

- -

The OBJECT class

- -

Field(s)

-
-
- - #string - -OBJECT.ClassName - -
-
- - - -
-
-
-
- - -OBJECT:Destroy() - -
-
- -

Destroys the OBJECT.

- -

Return value

- -

#nil: -The DCS Unit is not existing or alive.

- -
-
-
-
- - -OBJECT:GetID() - -
-
- -

Returns the unit's unique identifier.

- -

Return values

-
    -
  1. - -

    Dcs.DCSWrapper.Object#Object.ID: -ObjectID

    - -
  2. -
  3. - -

    #nil: -The DCS Object is not existing or alive.

    - -
  4. -
-
-
-
-
- - -OBJECT:New(ObjectName, Test) - -
-
- -

Create a new OBJECT from a DCSObject

- -

Parameters

- -

Return value

- -

#OBJECT: -self

- -
-
-
-
- - #string - -OBJECT.ObjectName - -
-
- -

The name of the Object.

- -
-
- -
- -
- - diff --git a/docs/Documentation/Patrol.html b/docs/Documentation/Patrol.html deleted file mode 100644 index 1e60bd6a1..000000000 --- a/docs/Documentation/Patrol.html +++ /dev/null @@ -1,771 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Patrol

- -

(AI) (FSM) Make AI patrol routes or zones.

- - - -
- -

1) #AI_PATROLZONE class, extends Core.Fsm#FSM_CONTROLLABLE

-

The #AI_PATROLZONE class implements the core functions to patrol a Zone by an AIR Controllable Group. -The patrol algorithm works that for each airplane patrolling, upon arrival at the patrol zone, -a random point is selected as the route point within the 3D space, within the given boundary limits. -The airplane will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits. -Upon arrival at the random 3D point, a new 3D random point will be selected within the patrol zone using the given limits. -This cycle will continue until a fuel treshold has been reached by the airplane. -When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.

- -

1.1) AI_PATROLZONE constructor:

- - - -

1.2) AI_PATROLZONE state machine:

-

The AI_PATROLZONE is a state machine: it manages the different events and states of the AIControllable it is controlling.

- -

1.2.1) AI_PATROLZONE Events:

- -
    -
  • AI_PATROLZONE.Route( AIControllable ): A new 3D route point is selected and the AIControllable will fly towards that point with the given speed.
  • -
  • AI_PATROLZONE.Patrol( AIControllable ): The AIControllable reports it is patrolling. This event is called every 30 seconds.
  • -
  • AI_PATROLZONE.RTB( AIControllable ): The AIControllable will report return to base.
  • -
  • AI_PATROLZONE.End( AIControllable ): The end of the AI_PATROLZONE process.
  • -
  • AI_PATROLZONE.Dead( AIControllable ): The AIControllable is dead. The AI_PATROLZONE process will be ended.
  • -
- -

1.2.2) AI_PATROLZONE States:

- -
    -
  • Route: A new 3D route point is selected and the AIControllable will fly towards that point with the given speed.
  • -
  • Patrol: The AIControllable is patrolling. This state is set every 30 seconds, so every 30 seconds, a state transition method can be used.
  • -
  • RTB: The AIControllable reports it wants to return to the base.
  • -
  • Dead: The AIControllable is dead ...
  • -
  • End: The process has come to an end.
  • -
- -

1.2.3) AI_PATROLZONE state transition methods:

- -

State transition functions can be set by the mission designer customizing or improving the behaviour of the state. -There are 2 moments when state transition methods will be called by the state machine:

- -
    -
  • Before the state transition. - The state transition method needs to start with the name OnBefore + the name of the state. - If the state transition method returns false, then the processing of the state transition will not be done! - If you want to change the behaviour of the AIControllable at this event, return false, - but then you'll need to specify your own logic using the AIControllable!

  • -
  • After the state transition. - The state transition method needs to start with the name OnAfter + the name of the state. - These state transition methods need to provide a return value, which is specified at the function description.

  • -
- -

An example how to manage a state transition for an AI_PATROLZONE object Patrol for the state RTB:

- -
 local PatrolZoneGroup = GROUP:FindByName( "Patrol Zone" )
- local PatrolZone = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup )
-
- local PatrolSpawn = SPAWN:New( "Patrol Group" )
- local PatrolGroup = PatrolSpawn:Spawn()
-
- local Patrol = AI_PATROLZONE:New( PatrolZone, 3000, 6000, 300, 600 )
- Patrol:SetControllable( PatrolGroup )
- Patrol:ManageFuel( 0.2, 60 )
-
- -

OnBeforeRTB( AIGroup ) will be called by the AIPATROLZONE object when the AIGroup reports RTB, but before the RTB default action is processed by the AIPATROLZONE object.

- -
 --- State transition function for the AI_PATROLZONE **Patrol** object
- -- @param #AI_PATROLZONE self 
- -- @param Wrapper.Controllable#CONTROLLABLE AIGroup
- -- @return #boolean If false is returned, then the OnAfter state transition method will not be called.
- function Patrol:OnBeforeRTB( AIGroup )
-   AIGroup:MessageToRed( "Returning to base", 20 )
- end
-
- -

OnAfterRTB( AIGroup ) will be called by the AIPATROLZONE object when the AIGroup reports RTB, but after the RTB default action was processed by the AIPATROLZONE object.

- -
 --- State transition function for the AI_PATROLZONE **Patrol** object
- -- @param #AI_PATROLZONE self 
- -- @param Wrapper.Controllable#CONTROLLABLE AIGroup
- -- @return #Wrapper.Controllable#CONTROLLABLE The new AIGroup object that is set to be patrolling the zone.
- function Patrol:OnAfterRTB( AIGroup )
-   return PatrolSpawn:Spawn()
- end 
-
- -

1.3) Manage the AI_PATROLZONE parameters:

-

The following methods are available to modify the parameters of a AI_PATROLZONE object:

- - - -

1.3) Manage the out of fuel in the AI_PATROLZONE:

-

When the AIControllable is out of fuel, it is required that a new AIControllable is started, before the old AIControllable can return to the home base. -Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. -When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_PATROLZONE. -Once the time is finished, the old AIControllable will return to the base. -Use the method AI_PATROLZONE.ManageFuel() to have this proces in place.

- -
- -

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:

- -

2016-09-01: Initial class and API.

- -
- -

AUTHORS and CONTRIBUTIONS

- -

Contributions:

- -
    -
  • DutchBaron: Testing.
  • -
  • Pikey: Testing and API concept review.
  • -
- -

Authors:

- -
    -
  • FlightControl: Design & Programming.
  • -
- - - -

Global(s)

- - - - - - - - - -
AI_PATROLZONE - -
_NewPatrolRoute(AIControllable) - -
-

Type AI_PATROLZONE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AI_PATROLZONE.AIControllable -

The Controllable patrolling.

-
AI_PATROLZONE.ClassName - -
AI_PATROLZONE:ManageFuel(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime) -

When the AIControllable is out of fuel, it is required that a new AIControllable is started, before the old AIControllable can return to the home base.

-
AI_PATROLZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed) -

Creates a new AI_PATROLZONE object

-
AI_PATROLZONE:OnAfterRoute(Controllable) -

OnAfter State Transition Function

-
AI_PATROLZONE:OnBeforeRoute(Controllable) -

OnBefore State Transition Function

-
AI_PATROLZONE.PatrolCeilingAltitude -

The highest altitude in meters where to execute the patrol.

-
AI_PATROLZONE.PatrolFloorAltitude -

The lowest altitude in meters where to execute the patrol.

-
AI_PATROLZONE.PatrolFuelTresholdPercentage - -
AI_PATROLZONE.PatrolManageFuel - -
AI_PATROLZONE.PatrolMaxSpeed -

The maximum speed of the Controllable in km/h.

-
AI_PATROLZONE.PatrolMinSpeed -

The minimum speed of the Controllable in km/h.

-
AI_PATROLZONE.PatrolOutOfFuelOrbitTime - -
AI_PATROLZONE.PatrolZone -

The Zone where the patrol needs to be executed.

-
AI_PATROLZONE:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude) -

Sets the floor and ceiling altitude of the patrol.

-
AI_PATROLZONE:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed) -

Sets (modifies) the minimum and maximum speed of the patrol.

-
AI_PATROLZONE:onenterPatrol() - -
AI_PATROLZONE:onenterRoute() -

Defines a new patrol route using the Process_PatrolZone parameters and settings.

-
- -

Global(s)

-
-
- - #AI_PATROLZONE - -AI_PATROLZONE - -
-
- - - -
-
-
-
- - -_NewPatrolRoute(AIControllable) - -
-
- - - -

Parameter

- -
-
-

Type Patrol

- -

Type AI_PATROLZONE

- -

AI_PATROLZONE class

- -

Field(s)

-
-
- - Wrapper.Controllable#CONTROLLABLE - -AI_PATROLZONE.AIControllable - -
-
- -

The Controllable patrolling.

- -
-
-
-
- - #string - -AI_PATROLZONE.ClassName - -
-
- - - -
-
-
-
- - -AI_PATROLZONE:ManageFuel(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime) - -
-
- -

When the AIControllable is out of fuel, it is required that a new AIControllable is started, before the old AIControllable can return to the home base.

- - -

Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. -When the fuel treshold is reached, the AIControllable will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_PATROLZONE. -Once the time is finished, the old AIControllable will return to the base.

- -

Parameters

-
    -
  • - -

    #number PatrolFuelTresholdPercentage : -The treshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel.

    - -
  • -
  • - -

    #number PatrolOutOfFuelOrbitTime : -The amount of seconds the out of fuel AIControllable will orbit before returning to the base.

    - -
  • -
-

Return value

- -

#AI_PATROLZONE: -self

- -
-
-
-
- - -AI_PATROLZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed) - -
-
- -

Creates a new AI_PATROLZONE object

- -

Parameters

- -

Return value

- -

#AI_PATROLZONE: -self

- -

Usage:

-
-- Define a new AI_PATROLZONE Object. This PatrolArea will patrol an AIControllable within PatrolZone between 3000 and 6000 meters, with a variying speed between 600 and 900 km/h.
-PatrolZone = ZONE:New( 'PatrolZone' )
-PatrolSpawn = SPAWN:New( 'Patrol Group' )
-PatrolArea = AI_PATROLZONE:New( PatrolZone, 3000, 6000, 600, 900 )
- -
-
-
-
- - -AI_PATROLZONE:OnAfterRoute(Controllable) - -
-
- -

OnAfter State Transition Function

- -

Parameter

- -
-
-
-
- - -AI_PATROLZONE:OnBeforeRoute(Controllable) - -
-
- -

OnBefore State Transition Function

- -

Parameter

- -

Return value

- -

#boolean:

- - -
-
-
-
- - Dcs.DCSTypes#Altitude - -AI_PATROLZONE.PatrolCeilingAltitude - -
-
- -

The highest altitude in meters where to execute the patrol.

- -
-
-
-
- - Dcs.DCSTypes#Altitude - -AI_PATROLZONE.PatrolFloorAltitude - -
-
- -

The lowest altitude in meters where to execute the patrol.

- -
-
-
-
- - - -AI_PATROLZONE.PatrolFuelTresholdPercentage - -
-
- - - -
-
-
-
- - #boolean - -AI_PATROLZONE.PatrolManageFuel - -
-
- - - -
-
-
-
- - Dcs.DCSTypes#Speed - -AI_PATROLZONE.PatrolMaxSpeed - -
-
- -

The maximum speed of the Controllable in km/h.

- -
-
-
-
- - Dcs.DCSTypes#Speed - -AI_PATROLZONE.PatrolMinSpeed - -
-
- -

The minimum speed of the Controllable in km/h.

- -
-
-
-
- - - -AI_PATROLZONE.PatrolOutOfFuelOrbitTime - -
-
- - - -
-
-
-
- - Core.Zone#ZONE_BASE - -AI_PATROLZONE.PatrolZone - -
-
- -

The Zone where the patrol needs to be executed.

- -
-
-
-
- - -AI_PATROLZONE:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude) - -
-
- -

Sets the floor and ceiling altitude of the patrol.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Altitude PatrolFloorAltitude : -The lowest altitude in meters where to execute the patrol.

    - -
  • -
  • - -

    Dcs.DCSTypes#Altitude PatrolCeilingAltitude : -The highest altitude in meters where to execute the patrol.

    - -
  • -
-

Return value

- -

#AI_PATROLZONE: -self

- -
-
-
-
- - -AI_PATROLZONE:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed) - -
-
- -

Sets (modifies) the minimum and maximum speed of the patrol.

- -

Parameters

- -

Return value

- -

#AI_PATROLZONE: -self

- -
-
-
-
- - -AI_PATROLZONE:onenterPatrol() - -
-
- - - -
-
-
-
- - -AI_PATROLZONE:onenterRoute() - -
-
- -

Defines a new patrol route using the Process_PatrolZone parameters and settings.

- -

Return value

- -

#AI_PATROLZONE: -self

- -
-
- -
- -
- - diff --git a/docs/Documentation/Point.html b/docs/Documentation/Point.html deleted file mode 100644 index b321acabb..000000000 --- a/docs/Documentation/Point.html +++ /dev/null @@ -1,2747 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Point

- -

Core - POINT_VEC classes define an extensive API to manage 3D points in the simulation space.

- - - -

1) Point#POINT_VEC3 class, extends Base#BASE

-

The Point#POINT_VEC3 class defines a 3D point in the simulator.

- -

Important Note: Most of the functions in this section were taken from MIST, and reworked to OO concepts. -In order to keep the credibility of the the author, I want to emphasize that the of the MIST framework was created by Grimes, who you can find on the Eagle Dynamics Forums.

- -

1.1) POINT_VEC3 constructor

- -

A new POINT_VEC3 instance can be created with:

- - - -

1.2) Manupulate the X, Y, Z coordinates of the point

- -

A POINT_VEC3 class works in 3D space. It contains internally an X, Y, Z coordinate. -Methods exist to manupulate these coordinates.

- -

The current X, Y, Z axis can be retrieved with the methods POINT_VEC3.GetX(), POINT_VEC3.GetY(), POINT_VEC3.GetZ() respectively. -The methods POINT_VEC3.SetX(), POINT_VEC3.SetY(), POINT_VEC3.SetZ() change the respective axis with a new value. -The current axis values can be changed by using the methods POINT_VEC3.AddX(), POINT_VEC3.AddY(), POINT_VEC3.AddZ() -to add or substract a value from the current respective axis value. -Note that the Set and Add methods return the current POINT_VEC3 object, so these manipulation methods can be chained... For example:

- -
 local Vec3 = PointVec3:AddX( 100 ):AddZ( 150 ):GetVec3()
-
- -

1.3) Create waypoints for routes

- -

A POINT_VEC3 can prepare waypoints for Ground, Air and Naval groups to be embedded into a Route.

- - -

1.5) Smoke, flare, explode, illuminate

- -

At the point a smoke, flare, explosion and illumination bomb can be triggered. Use the following methods:

- -

1.5.1) Smoke

- - - -

1.5.2) Flare

- - - -

1.5.3) Explode

- - - -

1.5.4) Illuminate

- - - - -

2) Point#POINT_VEC2 class, extends Point#POINT_VEC3

-

The Point#POINT_VEC2 class defines a 2D point in the simulator. The height coordinate (if needed) will be the land height + an optional added height specified.

- -

2.1) POINT_VEC2 constructor

-

A new POINT_VEC2 instance can be created with:

- - - -

1.2) Manupulate the X, Altitude, Y coordinates of the 2D point

- -

A POINT_VEC2 class works in 2D space, with an altitude setting. It contains internally an X, Altitude, Y coordinate. -Methods exist to manupulate these coordinates.

- -

The current X, Altitude, Y axis can be retrieved with the methods POINT_VEC2.GetX(), POINT_VEC2.GetAlt(), POINT_VEC2.GetY() respectively. -The methods POINT_VEC2.SetX(), POINT_VEC2.SetAlt(), POINT_VEC2.SetY() change the respective axis with a new value. -The current Lat(itude), Alt(itude), Lon(gitude) values can also be retrieved with the methods POINT_VEC2.GetLat(), POINT_VEC2.GetAlt(), POINT_VEC2.GetLon() respectively. -The current axis values can be changed by using the methods POINT_VEC2.AddX(), POINT_VEC2.AddAlt(), POINT_VEC2.AddY() -to add or substract a value from the current respective axis value. -Note that the Set and Add methods return the current POINT_VEC2 object, so these manipulation methods can be chained... For example:

- -
 local Vec2 = PointVec2:AddX( 100 ):AddY( 2000 ):GetVec2()
-
- -
- -

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-03-03: POINT_VEC3:Explosion( ExplosionIntensity ) added.
-2017-03-03: POINT_VEC3:IlluminationBomb() added.

- -

2017-02-18: POINT_VEC3:NewFromVec2( Vec2, LandHeightAdd ) added.

- -

2016-08-12: POINT_VEC3:Translate( Distance, Angle ) added.

- -

2016-08-06: Made PointVec3 and Vec3, PointVec2 and Vec2 terminology used in the code consistent.

- -
    -
  • Replaced method PointVec3() to Vec3() where the code manages a Vec3. Replaced all references to the method.
  • -
  • Replaced method PointVec2() to Vec2() where the code manages a Vec2. Replaced all references to the method.
  • -
  • Replaced method RandomPointVec3() to RandomVec3() where the code manages a Vec3. Replaced all references to the method. - .
  • -
- -

Authors:

- -
    -
  • FlightControl : Design & Programming
  • -
- -

Contributions:

- - -

Global(s)

- - - - - - - - - -
POINT_VEC2 - -
POINT_VEC3 - -
-

Type POINT_VEC2

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POINT_VEC2:AddAlt(Altitude) -

Add to the current land height an altitude.

-
POINT_VEC2:AddX(x) -

Add to the x coordinate of the POINT_VEC2.

-
POINT_VEC2:AddY(y) -

Add to the y coordinate of the POINT_VEC2.

-
POINT_VEC2.ClassName - -
POINT_VEC2:DistanceFromPointVec2(PointVec2Reference) -

Calculate the distance from a reference #POINT_VEC2.

-
POINT_VEC2:DistanceFromVec2(Vec2Reference) -

Calculate the distance from a reference DCSTypes#Vec2.

-
POINT_VEC2:GetAlt() -

Return the altitude (height) of the land at the POINT_VEC2.

-
POINT_VEC2:GetAltitudeText() -

Return no text for the altitude of the POINT_VEC2.

-
POINT_VEC2:GetLat() -

Return Return the Lat(itude) coordinate of the POINTVEC2 (ie: (parent)POINTVEC3.x).

-
POINT_VEC2:GetLon() -

Return the Lon(gitude) coordinate of the POINTVEC2 (ie: (parent)POINTVEC3.z).

-
POINT_VEC2:GetX() -

Return the x coordinate of the POINT_VEC2.

-
POINT_VEC2:GetY() -

Return the y coordinate of the POINT_VEC2.

-
POINT_VEC2:New(x, y, LandHeightAdd) -

POINT_VEC2 constructor.

-
POINT_VEC2:NewFromVec2(Vec2, LandHeightAdd) -

Create a new POINT_VEC2 object from Vec2 coordinates.

-
POINT_VEC2:NewFromVec3(Vec3) -

Create a new POINT_VEC2 object from Vec3 coordinates.

-
POINT_VEC2:SetAlt(Altitude) -

Set the altitude of the POINT_VEC2.

-
POINT_VEC2:SetLat(x) -

Set the Lat(itude) coordinate of the POINTVEC2 (ie: POINTVEC3.x).

-
POINT_VEC2:SetLon(y, z) -

Set the Lon(gitude) coordinate of the POINTVEC2 (ie: POINTVEC3.z).

-
POINT_VEC2:SetX(x) -

Set the x coordinate of the POINT_VEC2.

-
POINT_VEC2:SetY(y) -

Set the y coordinate of the POINT_VEC2.

-
POINT_VEC2:Translate(Distance, Angle) -

Add a Distance in meters from the POINTVEC2 orthonormal plane, with the given angle, and calculate the new POINTVEC2.

-
POINT_VEC2.x -

The x coordinate in meters.

-
POINT_VEC2.y -

the y coordinate in meters.

-
POINT_VEC2.z - -
- -

Type POINT_VEC3

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POINT_VEC3:AddX(x) -

Add to the x coordinate of the POINT_VEC3.

-
POINT_VEC3:AddY(y) -

Add to the y coordinate of the POINT_VEC3.

-
POINT_VEC3:AddZ(z) -

Add to the z coordinate of the POINT_VEC3.

-
POINT_VEC3.ClassName - -
POINT_VEC3:Explosion(ExplosionIntensity) -

Creates an explosion at the point of a certain intensity.

-
POINT_VEC3:Flare(FlareColor, (, Azimuth) -

Flares the point in a color.

-
POINT_VEC3.FlareColor - -
POINT_VEC3:FlareGreen((, Azimuth) -

Flare the POINT_VEC3 Green.

-
POINT_VEC3:FlareRed(Azimuth) -

Flare the POINT_VEC3 Red.

-
POINT_VEC3:FlareWhite((, Azimuth) -

Flare the POINT_VEC3 White.

-
POINT_VEC3:FlareYellow((, Azimuth) -

Flare the POINT_VEC3 Yellow.

-
POINT_VEC3:Get2DDistance(TargetPointVec3) -

Return the 2D distance in meters between the target POINTVEC3 and the POINTVEC3.

-
POINT_VEC3:Get3DDistance(TargetPointVec3) -

Return the 3D distance in meters between the target POINTVEC3 and the POINTVEC3.

-
POINT_VEC3:GetAltitudeText() -

Return the altitude text of the POINT_VEC3.

-
POINT_VEC3:GetBRText(TargetPointVec3) -

Return a BR string from a POINTVEC3 to the POINTVEC3.

-
POINT_VEC3:GetDirectionRadians(DirectionVec3) -

Return a direction in radians from the POINT_VEC3 using a direction vector in Vec3 format.

-
POINT_VEC3:GetDirectionVec3(TargetPointVec3) -

Return a direction vector Vec3 from POINTVEC3 to the POINTVEC3.

-
POINT_VEC3:GetNorthCorrectionRadians() -

Get a correction in radians of the real magnetic north of the POINT_VEC3.

-
POINT_VEC3:GetRandomPointVec2InRadius(OuterRadius, InnerRadius) -

Return a random POINTVEC2 within an Outer Radius and optionally NOT within an Inner Radius of the POINTVEC3.

-
POINT_VEC3:GetRandomPointVec3InRadius(OuterRadius, InnerRadius) -

Return a random POINTVEC3 within an Outer Radius and optionally NOT within an Inner Radius of the POINTVEC3.

-
POINT_VEC3:GetRandomVec2InRadius(OuterRadius, InnerRadius) -

Return a random Vec2 within an Outer Radius and optionally NOT within an Inner Radius of the POINT_VEC3.

-
POINT_VEC3:GetRandomVec3InRadius(OuterRadius, InnerRadius) -

Return a random Vec3 within an Outer Radius and optionally NOT within an Inner Radius of the POINT_VEC3.

-
POINT_VEC3:GetVec2() -

Return the coordinates of the POINT_VEC3 in Vec2 format.

-
POINT_VEC3:GetVec3() -

Return the coordinates of the POINT_VEC3 in Vec3 format.

-
POINT_VEC3:GetX() -

Return the x coordinate of the POINT_VEC3.

-
POINT_VEC3:GetY() -

Return the y coordinate of the POINT_VEC3.

-
POINT_VEC3:GetZ() -

Return the z coordinate of the POINT_VEC3.

-
POINT_VEC3:IlluminationBomb() -

Creates an illumination bomb at the point.

-
POINT_VEC3:IsMetric() -

Gets if the POINT_VEC3 is metric or NM.

-
POINT_VEC3.Metric - -
POINT_VEC3:New(x, y, z) -

Create a new POINT_VEC3 object.

-
POINT_VEC3:NewFromVec2(Vec2, LandHeightAdd) -

Create a new POINT_VEC3 object from Vec2 coordinates.

-
POINT_VEC3:NewFromVec3(Vec3) -

Create a new POINT_VEC3 object from Vec3 coordinates.

-
POINT_VEC3.RoutePointAction - -
POINT_VEC3:RoutePointAir(AltType, Type, Action, Speed, SpeedLocked) -

Build an air type route point.

-
POINT_VEC3.RoutePointAltType - -
POINT_VEC3:RoutePointGround(Speed, Formation) -

Build an ground type route point.

-
POINT_VEC3.RoutePointType - -
POINT_VEC3:SetMetric(Metric) -

Sets the POINT_VEC3 metric or NM.

-
POINT_VEC3:SetX(x) -

Set the x coordinate of the POINT_VEC3.

-
POINT_VEC3:SetY(y) -

Set the y coordinate of the POINT_VEC3.

-
POINT_VEC3:SetZ(z) -

Set the z coordinate of the POINT_VEC3.

-
POINT_VEC3:Smoke(SmokeColor) -

Smokes the point in a color.

-
POINT_VEC3:SmokeBlue() -

Smoke the POINT_VEC3 Blue.

-
POINT_VEC3.SmokeColor - -
POINT_VEC3:SmokeGreen() -

Smoke the POINT_VEC3 Green.

-
POINT_VEC3:SmokeOrange() -

Smoke the POINT_VEC3 Orange.

-
POINT_VEC3:SmokeRed() -

Smoke the POINT_VEC3 Red.

-
POINT_VEC3:SmokeWhite() -

Smoke the POINT_VEC3 White.

-
POINT_VEC3:ToStringBR(AngleRadians, Distance) -

Provides a Bearing / Range string

-
POINT_VEC3:ToStringLL(AngleRadians, Distance, acc, DMS) -

Provides a Bearing / Range string

-
POINT_VEC3:Translate(Distance, Angle) -

Add a Distance in meters from the POINTVEC3 horizontal plane, with the given angle, and calculate the new POINTVEC3.

-
POINT_VEC3.x -

The x coordinate in 3D space.

-
POINT_VEC3.y -

The y coordinate in 3D space.

-
POINT_VEC3.z -

The z coordiante in 3D space.

-
- -

Type POINT_VEC3.RoutePointAction

- - - - - - - - - -
POINT_VEC3.RoutePointAction.FromParkingArea -

"From Parking Area"

-
POINT_VEC3.RoutePointAction.TurningPoint -

"Turning Point"

-
- -

Type POINT_VEC3.RoutePointAltType

- - - - - -
POINT_VEC3.RoutePointAltType.BARO -

"BARO"

-
- -

Type POINT_VEC3.RoutePointType

- - - - - - - - - -
POINT_VEC3.RoutePointType.TakeOffParking -

"TakeOffParking"

-
POINT_VEC3.RoutePointType.TurningPoint -

"Turning Point"

-
- -

Global(s)

-
-
- - #POINT_VEC2 - -POINT_VEC2 - -
-
- - - -
-
-
-
- - #POINT_VEC3 - -POINT_VEC3 - -
-
- - - -
-
-

Type Point

- -

Type POINT_VEC2

- -

The POINT_VEC2 class

- -

Field(s)

-
-
- - -POINT_VEC2:AddAlt(Altitude) - -
-
- -

Add to the current land height an altitude.

- -

Parameter

-
    -
  • - -

    #number Altitude : -The Altitude to add. If nothing (nil) is given, then the current land altitude is set.

    - -
  • -
-

Return value

- -

#POINT_VEC2:

- - -
-
-
-
- - -POINT_VEC2:AddX(x) - -
-
- -

Add to the x coordinate of the POINT_VEC2.

- -

Parameter

-
    -
  • - -

    #number x : -The x coordinate.

    - -
  • -
-

Return value

- -

#POINT_VEC2:

- - -
-
-
-
- - -POINT_VEC2:AddY(y) - -
-
- -

Add to the y coordinate of the POINT_VEC2.

- -

Parameter

-
    -
  • - -

    #number y : -The y coordinate.

    - -
  • -
-

Return value

- -

#POINT_VEC2:

- - -
-
-
-
- - #string - -POINT_VEC2.ClassName - -
-
- - - -
-
-
-
- - -POINT_VEC2:DistanceFromPointVec2(PointVec2Reference) - -
-
- -

Calculate the distance from a reference #POINT_VEC2.

- -

Parameter

- -

Return value

- -

Dcs.DCSTypes#Distance: -The distance from the reference #POINT_VEC2 in meters.

- -
-
-
-
- - -POINT_VEC2:DistanceFromVec2(Vec2Reference) - -
-
- -

Calculate the distance from a reference DCSTypes#Vec2.

- -

Parameter

- -

Return value

- -

Dcs.DCSTypes#Distance: -The distance from the reference DCSTypes#Vec2 in meters.

- -
-
-
-
- - -POINT_VEC2:GetAlt() - -
-
- -

Return the altitude (height) of the land at the POINT_VEC2.

- -

Return value

- -

#number: -The land altitude.

- -
-
-
-
- - -POINT_VEC2:GetAltitudeText() - -
-
- -

Return no text for the altitude of the POINT_VEC2.

- -

Return value

- -

#string: -Empty string.

- -
-
-
-
- - -POINT_VEC2:GetLat() - -
-
- -

Return Return the Lat(itude) coordinate of the POINTVEC2 (ie: (parent)POINTVEC3.x).

- -

Return value

- -

#number: -The x coodinate.

- -
-
-
-
- - -POINT_VEC2:GetLon() - -
-
- -

Return the Lon(gitude) coordinate of the POINTVEC2 (ie: (parent)POINTVEC3.z).

- -

Return value

- -

#number: -The y coodinate.

- -
-
-
-
- - -POINT_VEC2:GetX() - -
-
- -

Return the x coordinate of the POINT_VEC2.

- -

Return value

- -

#number: -The x coodinate.

- -
-
-
-
- - -POINT_VEC2:GetY() - -
-
- -

Return the y coordinate of the POINT_VEC2.

- -

Return value

- -

#number: -The y coodinate.

- -
-
-
-
- - -POINT_VEC2:New(x, y, LandHeightAdd) - -
-
- -

POINT_VEC2 constructor.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Distance x : -The x coordinate of the Vec3 point, pointing to the North.

    - -
  • -
  • - -

    Dcs.DCSTypes#Distance y : -The y coordinate of the Vec3 point, pointing to the Right.

    - -
  • -
  • - -

    Dcs.DCSTypes#Distance LandHeightAdd : -(optional) The default height if required to be evaluated will be the land height of the x, y coordinate. You can specify an extra height to be added to the land height.

    - -
  • -
-

Return value

- -

Core.Point#POINT_VEC2:

- - -
-
-
-
- - -POINT_VEC2:NewFromVec2(Vec2, LandHeightAdd) - -
-
- -

Create a new POINT_VEC2 object from Vec2 coordinates.

- -

Parameters

- -

Return value

- -

Core.Point#POINT_VEC2: -self

- -
-
-
-
- - -POINT_VEC2:NewFromVec3(Vec3) - -
-
- -

Create a new POINT_VEC2 object from Vec3 coordinates.

- -

Parameter

- -

Return value

- -

Core.Point#POINT_VEC2: -self

- -
-
-
-
- - -POINT_VEC2:SetAlt(Altitude) - -
-
- -

Set the altitude of the POINT_VEC2.

- -

Parameter

-
    -
  • - -

    #number Altitude : -The land altitude. If nothing (nil) is given, then the current land altitude is set.

    - -
  • -
-

Return value

- -

#POINT_VEC2:

- - -
-
-
-
- - -POINT_VEC2:SetLat(x) - -
-
- -

Set the Lat(itude) coordinate of the POINTVEC2 (ie: POINTVEC3.x).

- -

Parameter

-
    -
  • - -

    #number x : -The x coordinate.

    - -
  • -
-

Return value

- -

#POINT_VEC2:

- - -
-
-
-
- - -POINT_VEC2:SetLon(y, z) - -
-
- -

Set the Lon(gitude) coordinate of the POINTVEC2 (ie: POINTVEC3.z).

- -

Parameters

-
    -
  • - -

    #number y : -The y coordinate.

    - -
  • -
  • - -

    z :

    - -
  • -
-

Return value

- -

#POINT_VEC2:

- - -
-
-
-
- - -POINT_VEC2:SetX(x) - -
-
- -

Set the x coordinate of the POINT_VEC2.

- -

Parameter

-
    -
  • - -

    #number x : -The x coordinate.

    - -
  • -
-

Return value

- -

#POINT_VEC2:

- - -
-
-
-
- - -POINT_VEC2:SetY(y) - -
-
- -

Set the y coordinate of the POINT_VEC2.

- -

Parameter

-
    -
  • - -

    #number y : -The y coordinate.

    - -
  • -
-

Return value

- -

#POINT_VEC2:

- - -
-
-
-
- - -POINT_VEC2:Translate(Distance, Angle) - -
-
- -

Add a Distance in meters from the POINTVEC2 orthonormal plane, with the given angle, and calculate the new POINTVEC2.

- -

Parameters

- -

Return value

- -

#POINT_VEC2: -The new calculated POINT_VEC2.

- -
-
-
-
- - Dcs.DCSTypes#Distance - -POINT_VEC2.x - -
-
- -

The x coordinate in meters.

- -
-
-
-
- - Dcs.DCSTypes#Distance - -POINT_VEC2.y - -
-
- -

the y coordinate in meters.

- -
-
-
-
- - - -POINT_VEC2.z - -
-
- - - -
-
- -

Type POINT_VEC3

- -

The POINT_VEC3 class

- -

Field(s)

-
-
- - -POINT_VEC3:AddX(x) - -
-
- -

Add to the x coordinate of the POINT_VEC3.

- -

Parameter

-
    -
  • - -

    #number x : -The x coordinate value to add to the current x coodinate.

    - -
  • -
-

Return value

- -

#POINT_VEC3:

- - -
-
-
-
- - -POINT_VEC3:AddY(y) - -
-
- -

Add to the y coordinate of the POINT_VEC3.

- -

Parameter

-
    -
  • - -

    #number y : -The y coordinate value to add to the current y coodinate.

    - -
  • -
-

Return value

- -

#POINT_VEC3:

- - -
-
-
-
- - -POINT_VEC3:AddZ(z) - -
-
- -

Add to the z coordinate of the POINT_VEC3.

- -

Parameter

-
    -
  • - -

    #number z : -The z coordinate value to add to the current z coodinate.

    - -
  • -
-

Return value

- -

#POINT_VEC3:

- - -
-
-
-
- - #string - -POINT_VEC3.ClassName - -
-
- - - -
-
-
-
- - -POINT_VEC3:Explosion(ExplosionIntensity) - -
-
- -

Creates an explosion at the point of a certain intensity.

- -

Parameter

-
    -
  • - -

    #number ExplosionIntensity :

    - -
  • -
-
-
-
-
- - -POINT_VEC3:Flare(FlareColor, (, Azimuth) - -
-
- -

Flares the point in a color.

- -

Parameters

- -
-
-
-
- - Utilities.Utils#FLARECOLOR - -POINT_VEC3.FlareColor - -
-
- - - -
-
-
-
- - -POINT_VEC3:FlareGreen((, Azimuth) - -
-
- -

Flare the POINT_VEC3 Green.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Azimuth ( : -ptional) Azimuth The azimuth of the flare direction. The default azimuth is 0.

    - -
  • -
  • - -

    Azimuth :

    - -
  • -
-
-
-
-
- - -POINT_VEC3:FlareRed(Azimuth) - -
-
- -

Flare the POINT_VEC3 Red.

- -

Parameter

-
    -
  • - -

    Azimuth :

    - -
  • -
-
-
-
-
- - -POINT_VEC3:FlareWhite((, Azimuth) - -
-
- -

Flare the POINT_VEC3 White.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Azimuth ( : -ptional) Azimuth The azimuth of the flare direction. The default azimuth is 0.

    - -
  • -
  • - -

    Azimuth :

    - -
  • -
-
-
-
-
- - -POINT_VEC3:FlareYellow((, Azimuth) - -
-
- -

Flare the POINT_VEC3 Yellow.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Azimuth ( : -ptional) Azimuth The azimuth of the flare direction. The default azimuth is 0.

    - -
  • -
  • - -

    Azimuth :

    - -
  • -
-
-
-
-
- - -POINT_VEC3:Get2DDistance(TargetPointVec3) - -
-
- -

Return the 2D distance in meters between the target POINTVEC3 and the POINTVEC3.

- -

Parameter

-
    -
  • - -

    #POINT_VEC3 TargetPointVec3 : -The target POINT_VEC3.

    - -
  • -
-

Return value

- -

Dcs.DCSTypes#Distance: -Distance The distance in meters.

- -
-
-
-
- - -POINT_VEC3:Get3DDistance(TargetPointVec3) - -
-
- -

Return the 3D distance in meters between the target POINTVEC3 and the POINTVEC3.

- -

Parameter

-
    -
  • - -

    #POINT_VEC3 TargetPointVec3 : -The target POINT_VEC3.

    - -
  • -
-

Return value

- -

Dcs.DCSTypes#Distance: -Distance The distance in meters.

- -
-
-
-
- - -POINT_VEC3:GetAltitudeText() - -
-
- -

Return the altitude text of the POINT_VEC3.

- -

Return value

- -

#string: -Altitude text.

- -
-
-
-
- - -POINT_VEC3:GetBRText(TargetPointVec3) - -
-
- -

Return a BR string from a POINTVEC3 to the POINTVEC3.

- -

Parameter

-
    -
  • - -

    #POINT_VEC3 TargetPointVec3 : -The target POINT_VEC3.

    - -
  • -
-

Return value

- -

#string: -The BR text.

- -
-
-
-
- - -POINT_VEC3:GetDirectionRadians(DirectionVec3) - -
-
- -

Return a direction in radians from the POINT_VEC3 using a direction vector in Vec3 format.

- -

Parameter

- -

Return value

- -

#number: -DirectionRadians The direction in radians.

- -
-
-
-
- - -POINT_VEC3:GetDirectionVec3(TargetPointVec3) - -
-
- -

Return a direction vector Vec3 from POINTVEC3 to the POINTVEC3.

- -

Parameter

-
    -
  • - -

    #POINT_VEC3 TargetPointVec3 : -The target POINT_VEC3.

    - -
  • -
-

Return value

- -

Dcs.DCSTypes#Vec3: -DirectionVec3 The direction vector in Vec3 format.

- -
-
-
-
- - -POINT_VEC3:GetNorthCorrectionRadians() - -
-
- -

Get a correction in radians of the real magnetic north of the POINT_VEC3.

- -

Return value

- -

#number: -CorrectionRadians The correction in radians.

- -
-
-
-
- - -POINT_VEC3:GetRandomPointVec2InRadius(OuterRadius, InnerRadius) - -
-
- -

Return a random POINTVEC2 within an Outer Radius and optionally NOT within an Inner Radius of the POINTVEC3.

- -

Parameters

- -

Return value

- -

#POINT_VEC2:

- - -
-
-
-
- - -POINT_VEC3:GetRandomPointVec3InRadius(OuterRadius, InnerRadius) - -
-
- -

Return a random POINTVEC3 within an Outer Radius and optionally NOT within an Inner Radius of the POINTVEC3.

- -

Parameters

- -

Return value

- -

#POINT_VEC3:

- - -
-
-
-
- - -POINT_VEC3:GetRandomVec2InRadius(OuterRadius, InnerRadius) - -
-
- -

Return a random Vec2 within an Outer Radius and optionally NOT within an Inner Radius of the POINT_VEC3.

- -

Parameters

- -

Return value

- -

Dcs.DCSTypes#Vec2: -Vec2

- -
-
-
-
- - -POINT_VEC3:GetRandomVec3InRadius(OuterRadius, InnerRadius) - -
-
- -

Return a random Vec3 within an Outer Radius and optionally NOT within an Inner Radius of the POINT_VEC3.

- -

Parameters

- -

Return value

- -

Dcs.DCSTypes#Vec3: -Vec3

- -
-
-
-
- - -POINT_VEC3:GetVec2() - -
-
- -

Return the coordinates of the POINT_VEC3 in Vec2 format.

- -

Return value

- -

Dcs.DCSTypes#Vec2: -The Vec2 coodinate.

- -
-
-
-
- - -POINT_VEC3:GetVec3() - -
-
- -

Return the coordinates of the POINT_VEC3 in Vec3 format.

- -

Return value

- -

Dcs.DCSTypes#Vec3: -The Vec3 coodinate.

- -
-
-
-
- - -POINT_VEC3:GetX() - -
-
- -

Return the x coordinate of the POINT_VEC3.

- -

Return value

- -

#number: -The x coodinate.

- -
-
-
-
- - -POINT_VEC3:GetY() - -
-
- -

Return the y coordinate of the POINT_VEC3.

- -

Return value

- -

#number: -The y coodinate.

- -
-
-
-
- - -POINT_VEC3:GetZ() - -
-
- -

Return the z coordinate of the POINT_VEC3.

- -

Return value

- -

#number: -The z coodinate.

- -
-
-
-
- - -POINT_VEC3:IlluminationBomb() - -
-
- -

Creates an illumination bomb at the point.

- -
-
-
-
- - -POINT_VEC3:IsMetric() - -
-
- -

Gets if the POINT_VEC3 is metric or NM.

- -

Return value

- -

#boolean: -Metric true means metric, false means NM.

- -
-
-
-
- - - -POINT_VEC3.Metric - -
-
- - - -
-
-
-
- - -POINT_VEC3:New(x, y, z) - -
-
- -

Create a new POINT_VEC3 object.

- -

Parameters

- -

Return value

- -

Core.Point#POINT_VEC3: -self

- -
-
-
-
- - -POINT_VEC3:NewFromVec2(Vec2, LandHeightAdd) - -
-
- -

Create a new POINT_VEC3 object from Vec2 coordinates.

- -

Parameters

- -

Return value

- -

Core.Point#POINT_VEC3: -self

- -
-
-
-
- - -POINT_VEC3:NewFromVec3(Vec3) - -
-
- -

Create a new POINT_VEC3 object from Vec3 coordinates.

- -

Parameter

- -

Return value

- -

Core.Point#POINT_VEC3: -self

- -
-
-
-
- - #POINT_VEC3.RoutePointAction - -POINT_VEC3.RoutePointAction - -
-
- - - -
-
-
-
- - -POINT_VEC3:RoutePointAir(AltType, Type, Action, Speed, SpeedLocked) - -
-
- -

Build an air type route point.

- -

Parameters

- -

Return value

- -

#table: -The route point.

- -
-
-
-
- - #POINT_VEC3.RoutePointAltType - -POINT_VEC3.RoutePointAltType - -
-
- - - -
-
-
-
- - -POINT_VEC3:RoutePointGround(Speed, Formation) - -
-
- -

Build an ground type route point.

- -

Parameters

- -

Return value

- -

#table: -The route point.

- -
-
-
-
- - #POINT_VEC3.RoutePointType - -POINT_VEC3.RoutePointType - -
-
- - - -
-
-
-
- - -POINT_VEC3:SetMetric(Metric) - -
-
- -

Sets the POINT_VEC3 metric or NM.

- -

Parameter

-
    -
  • - -

    #boolean Metric : -true means metric, false means NM.

    - -
  • -
-
-
-
-
- - -POINT_VEC3:SetX(x) - -
-
- -

Set the x coordinate of the POINT_VEC3.

- -

Parameter

-
    -
  • - -

    #number x : -The x coordinate.

    - -
  • -
-

Return value

- -

#POINT_VEC3:

- - -
-
-
-
- - -POINT_VEC3:SetY(y) - -
-
- -

Set the y coordinate of the POINT_VEC3.

- -

Parameter

-
    -
  • - -

    #number y : -The y coordinate.

    - -
  • -
-

Return value

- -

#POINT_VEC3:

- - -
-
-
-
- - -POINT_VEC3:SetZ(z) - -
-
- -

Set the z coordinate of the POINT_VEC3.

- -

Parameter

-
    -
  • - -

    #number z : -The z coordinate.

    - -
  • -
-

Return value

- -

#POINT_VEC3:

- - -
-
-
-
- - -POINT_VEC3:Smoke(SmokeColor) - -
-
- -

Smokes the point in a color.

- -

Parameter

- -
-
-
-
- - -POINT_VEC3:SmokeBlue() - -
-
- -

Smoke the POINT_VEC3 Blue.

- -
-
-
-
- - Utilities.Utils#SMOKECOLOR - -POINT_VEC3.SmokeColor - -
-
- - - -
-
-
-
- - -POINT_VEC3:SmokeGreen() - -
-
- -

Smoke the POINT_VEC3 Green.

- -
-
-
-
- - -POINT_VEC3:SmokeOrange() - -
-
- -

Smoke the POINT_VEC3 Orange.

- -
-
-
-
- - -POINT_VEC3:SmokeRed() - -
-
- -

Smoke the POINT_VEC3 Red.

- -
-
-
-
- - -POINT_VEC3:SmokeWhite() - -
-
- -

Smoke the POINT_VEC3 White.

- -
-
-
-
- - -POINT_VEC3:ToStringBR(AngleRadians, Distance) - -
-
- -

Provides a Bearing / Range string

- -

Parameters

-
    -
  • - -

    #number AngleRadians : -The angle in randians

    - -
  • -
  • - -

    #number Distance : -The distance

    - -
  • -
-

Return value

- -

#string: -The BR Text

- -
-
-
-
- - -POINT_VEC3:ToStringLL(AngleRadians, Distance, acc, DMS) - -
-
- -

Provides a Bearing / Range string

- -

Parameters

-
    -
  • - -

    #number AngleRadians : -The angle in randians

    - -
  • -
  • - -

    #number Distance : -The distance

    - -
  • -
  • - -

    acc :

    - -
  • -
  • - -

    DMS :

    - -
  • -
-

Return value

- -

#string: -The BR Text

- -
-
-
-
- - -POINT_VEC3:Translate(Distance, Angle) - -
-
- -

Add a Distance in meters from the POINTVEC3 horizontal plane, with the given angle, and calculate the new POINTVEC3.

- -

Parameters

- -

Return value

- -

#POINT_VEC3: -The new calculated POINT_VEC3.

- -
-
-
-
- - #number - -POINT_VEC3.x - -
-
- -

The x coordinate in 3D space.

- -
-
-
-
- - #number - -POINT_VEC3.y - -
-
- -

The y coordinate in 3D space.

- -
-
-
-
- - #number - -POINT_VEC3.z - -
-
- -

The z coordiante in 3D space.

- -
-
- -

Type POINT_VEC3.RoutePointAction

- -

RoutePoint Actions

- -

Field(s)

-
-
- - -POINT_VEC3.RoutePointAction.FromParkingArea - -
-
- -

"From Parking Area"

- -
-
-
-
- - -POINT_VEC3.RoutePointAction.TurningPoint - -
-
- -

"Turning Point"

- -
-
- -

Type POINT_VEC3.RoutePointAltType

- -

RoutePoint AltTypes

- -

Field(s)

-
-
- - -POINT_VEC3.RoutePointAltType.BARO - -
-
- -

"BARO"

- -
-
- -

Type POINT_VEC3.RoutePointType

- -

RoutePoint Types

- -

Field(s)

-
-
- - -POINT_VEC3.RoutePointType.TakeOffParking - -
-
- -

"TakeOffParking"

- -
-
-
-
- - -POINT_VEC3.RoutePointType.TurningPoint - -
-
- -

"Turning Point"

- -
-
- -
- -
- - diff --git a/docs/Documentation/Positionable.html b/docs/Documentation/Positionable.html deleted file mode 100644 index 1e498e791..000000000 --- a/docs/Documentation/Positionable.html +++ /dev/null @@ -1,1085 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Positionable

- -

This module contains the POSITIONABLE class.

- - - -

1) Positionable#POSITIONABLE class, extends Identifiable#IDENTIFIABLE

-

The Positionable#POSITIONABLE class is a wrapper class to handle the POSITIONABLE objects:

- -
    -
  • Support all DCS APIs.
  • -
  • Enhance with POSITIONABLE specific APIs not in the DCS API set.
  • -
  • Manage the "state" of the POSITIONABLE.
  • -
- -

1.1) POSITIONABLE constructor:

-

The POSITIONABLE class provides the following functions to construct a POSITIONABLE instance:

- - - -

1.2) POSITIONABLE methods:

-

The following methods can be used to identify an measurable object:

- - - -
- - -

Global(s)

- - - - - -
POSITIONABLE - -
-

Type DCSPositionable

- - - - - -
DCSPositionable.id_ -

The ID of the controllable in DCS

-
- -

Type POSITIONABLE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POSITIONABLE.ClassName - -
POSITIONABLE:GetAltitude() -

Returns the altitude of the POSITIONABLE.

-
POSITIONABLE:GetHeading() -

Returns the POSITIONABLE heading in degrees.

-
POSITIONABLE:GetMessage(Message, Duration, Name) -

Returns a message with the callsign embedded (if there is one).

-
POSITIONABLE:GetPointVec2() -

Returns a POINT_VEC2 object indicating the point in 2D of the POSITIONABLE within the mission.

-
POSITIONABLE:GetPointVec3() -

Returns a POINT_VEC3 object indicating the point in 3D of the POSITIONABLE within the mission.

-
POSITIONABLE:GetPositionVec3() -

Returns the DCSTypes#Position3 position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.

-
POSITIONABLE:GetRadio() -

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

Returns the DCSTypes#Vec2 vector indicating the point in 2D of the POSITIONABLE within the mission.

-
POSITIONABLE:GetVec3() -

Returns the DCSTypes#Vec3 vector indicating the 3D vector of the POSITIONABLE within the mission.

-
POSITIONABLE:GetVelocity() -

Returns the POSITIONABLE velocity vector.

-
POSITIONABLE:GetVelocityKMH() -

Returns the POSITIONABLE velocity in km/h.

-
POSITIONABLE:InAir() -

Returns true if the POSITIONABLE is in the air.

-
POSITIONABLE:IsAboveRunway() -

Returns if the Positionable is located above a runway.

-
POSITIONABLE:Message(Message, Duration, Name) -

Send a message to the players in the Group.

-
POSITIONABLE:MessageToAll(Message, Duration, Name) -

Send a message to all coalitions.

-
POSITIONABLE:MessageToBlue(Message, Duration, Name) -

Send a message to the blue coalition.

-
POSITIONABLE:MessageToClient(Message, Duration, Client, Name) -

Send a message to a client.

-
POSITIONABLE:MessageToCoalition(Message, Duration, MessageCoalition, Name) -

Send a message to a coalition.

-
POSITIONABLE:MessageToGroup(Message, Duration, MessageGroup, Name) -

Send a message to a Group.

-
POSITIONABLE:MessageToRed(Message, Duration, Name) -

Send a message to the red coalition.

-
POSITIONABLE:New(PositionableName) -

Create a new POSITIONABLE from a DCSPositionable

-
POSITIONABLE.PositionableName -

The name of the measurable.

-
- -

Global(s)

-
-
- - #POSITIONABLE - -POSITIONABLE - -
-
- - - -
-
-

Type Positionable

- -

Type DCSPositionable

- -

A DCSPositionable

- -

Field(s)

-
-
- - -DCSPositionable.id_ - -
-
- -

The ID of the controllable in DCS

- -
-
- -

Type POSITIONABLE

- -

The POSITIONABLE class

- -

Field(s)

-
-
- - #string - -POSITIONABLE.ClassName - -
-
- - - -
-
-
-
- - -POSITIONABLE:GetAltitude() - -
-
- -

Returns the altitude of the POSITIONABLE.

- -

Return values

-
    -
  1. - -

    Dcs.DCSTypes#Distance: -The altitude of the POSITIONABLE.

    - -
  2. -
  3. - -

    #nil: -The POSITIONABLE is not existing or alive.

    - -
  4. -
-
-
-
-
- - -POSITIONABLE:GetHeading() - -
-
- -

Returns the POSITIONABLE heading in degrees.

- -

Return values

-
    -
  1. - -

    #number: -The POSTIONABLE heading

    - -
  2. -
  3. - -

    #nil: -The POSITIONABLE is not existing or alive.

    - -
  4. -
-
-
-
-
- - -POSITIONABLE:GetMessage(Message, Duration, Name) - -
-
- -

Returns a message with the callsign embedded (if there is one).

- -

Parameters

-
    -
  • - -

    #string Message : -The message text

    - -
  • -
  • - -

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

    - -
  • -
  • - -

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

    - -
  • -
-

Return value

- -

Core.Message#MESSAGE:

- - -
-
-
-
- - -POSITIONABLE:GetPointVec2() - -
-
- -

Returns a POINT_VEC2 object indicating the point in 2D of the POSITIONABLE within the mission.

- -

Return values

-
    -
  1. - -

    Core.Point#POINT_VEC2: -The 2D point vector of the POSITIONABLE.

    - -
  2. -
  3. - -

    #nil: -The POSITIONABLE is not existing or alive.

    - -
  4. -
-
-
-
-
- - -POSITIONABLE:GetPointVec3() - -
-
- -

Returns a POINT_VEC3 object indicating the point in 3D of the POSITIONABLE within the mission.

- -

Return values

-
    -
  1. - -

    Core.Point#POINT_VEC3: -The 3D point vector of the POSITIONABLE.

    - -
  2. -
  3. - -

    #nil: -The POSITIONABLE is not existing or alive.

    - -
  4. -
-
-
-
-
- - -POSITIONABLE:GetPositionVec3() - -
-
- -

Returns the DCSTypes#Position3 position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.

- -

Return values

-
    -
  1. - -

    Dcs.DCSTypes#Position: -The 3D position vectors of the POSITIONABLE.

    - -
  2. -
  3. - -

    #nil: -The POSITIONABLE is not existing or alive.

    - -
  4. -
-
-
-
-
- - -POSITIONABLE:GetRadio() - -
-
- -

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

- -

Return value

- -

#RADIO: -Radio

- -
-
-
-
- - -POSITIONABLE:GetRandomVec3(Radius) - -
-
- -

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

- -

Parameter

-
    -
  • - -

    #number Radius :

    - -
  • -
-

Return values

-
    -
  1. - -

    Dcs.DCSTypes#Vec3: -The 3D point vector of the POSITIONABLE.

    - -
  2. -
  3. - -

    #nil: -The POSITIONABLE is not existing or alive.

    - -
  4. -
-

Usage:

-

--- If Radius is ignored, returns the Dcs.DCSTypes#Vec3 of first UNIT of the GROUP
- -
-
-
-
- - -POSITIONABLE:GetVec2() - -
-
- -

Returns the DCSTypes#Vec2 vector indicating the point in 2D of the POSITIONABLE within the mission.

- -

Return values

-
    -
  1. - -

    Dcs.DCSTypes#Vec2: -The 2D point vector of the POSITIONABLE.

    - -
  2. -
  3. - -

    #nil: -The POSITIONABLE is not existing or alive.

    - -
  4. -
-
-
-
-
- - -POSITIONABLE:GetVec3() - -
-
- -

Returns the DCSTypes#Vec3 vector indicating the 3D vector of the POSITIONABLE within the mission.

- -

Return values

-
    -
  1. - -

    Dcs.DCSTypes#Vec3: -The 3D point vector of the POSITIONABLE.

    - -
  2. -
  3. - -

    #nil: -The POSITIONABLE is not existing or alive.

    - -
  4. -
-
-
-
-
- - -POSITIONABLE:GetVelocity() - -
-
- -

Returns the POSITIONABLE velocity vector.

- -

Return values

-
    -
  1. - -

    Dcs.DCSTypes#Vec3: -The velocity vector

    - -
  2. -
  3. - -

    #nil: -The POSITIONABLE is not existing or alive.

    - -
  4. -
-
-
-
-
- - -POSITIONABLE:GetVelocityKMH() - -
-
- -

Returns the POSITIONABLE velocity in km/h.

- -

Return values

-
    -
  1. - -

    #number: -The velocity in km/h

    - -
  2. -
  3. - -

    #nil: -The POSITIONABLE is not existing or alive.

    - -
  4. -
-
-
-
-
- - -POSITIONABLE:InAir() - -
-
- -

Returns true if the POSITIONABLE is in the air.

- - -

Polymorphic, is overridden in GROUP and UNIT.

- -

Return values

-
    -
  1. - -

    #boolean: -true if in the air.

    - -
  2. -
  3. - -

    #nil: -The POSITIONABLE is not existing or alive.

    - -
  4. -
-
-
-
-
- - -POSITIONABLE:IsAboveRunway() - -
-
- -

Returns if the Positionable is located above a runway.

- -

Return values

-
    -
  1. - -

    #boolean: -true if Positionable is above a runway.

    - -
  2. -
  3. - -

    #nil: -The POSITIONABLE is not existing or alive.

    - -
  4. -
-
-
-
-
- - -POSITIONABLE:Message(Message, Duration, Name) - -
-
- -

Send a message to the players in the 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.

    - -
  • -
  • - -

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

    - -
  • -
-
-
-
-
- - -POSITIONABLE:MessageToAll(Message, Duration, Name) - -
-
- -

Send a message to all coalitions.

- - -

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.

    - -
  • -
  • - -

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

    - -
  • -
-
-
-
-
- - -POSITIONABLE:MessageToBlue(Message, Duration, Name) - -
-
- -

Send a message to the blue coalition.

- - -

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.

    - -
  • -
  • - -

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

    - -
  • -
-
-
-
-
- - -POSITIONABLE:MessageToClient(Message, Duration, Client, Name) - -
-
- -

Send a message to a client.

- - -

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.

    - -
  • -
  • - -

    Wrapper.Client#CLIENT Client : -The client object receiving the message.

    - -
  • -
  • - -

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

    - -
  • -
-
-
-
-
- - -POSITIONABLE:MessageToCoalition(Message, Duration, MessageCoalition, Name) - -
-
- -

Send a message to a coalition.

- - -

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.

    - -
  • -
  • - -

    Dcs.DCScoalition#coalition MessageCoalition : -The Coalition receiving the message.

    - -
  • -
  • - -

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

    - -
  • -
-
-
-
-
- - -POSITIONABLE:MessageToGroup(Message, Duration, MessageGroup, Name) - -
-
- -

Send a message to a 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.

    - -
  • -
  • - -

    Wrapper.Group#GROUP MessageGroup : -The GROUP object receiving the message.

    - -
  • -
  • - -

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

    - -
  • -
-
-
-
-
- - -POSITIONABLE:MessageToRed(Message, Duration, Name) - -
-
- -

Send a message to the red coalition.

- - -

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.

    - -
  • -
  • - -

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

    - -
  • -
-
-
-
-
- - -POSITIONABLE:New(PositionableName) - -
-
- -

Create a new POSITIONABLE from a DCSPositionable

- -

Parameter

- -

Return value

- -

#POSITIONABLE: -self

- -
-
-
-
- - #string - -POSITIONABLE.PositionableName - -
-
- -

The name of the measurable.

- -
-
- -

Type RADIO

- -
- -
- - diff --git a/docs/Documentation/Process_JTAC.html b/docs/Documentation/Process_JTAC.html deleted file mode 100644 index f3e75bb9b..000000000 --- a/docs/Documentation/Process_JTAC.html +++ /dev/null @@ -1,611 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Process_JTAC

- - - -

Global(s)

- - - - - -
PROCESS_JTAC - -
-

Type PROCESS_JTAC

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROCESS_JTAC.ClassName - -
PROCESS_JTAC.DisplayCategory - -
PROCESS_JTAC.DisplayCount - -
PROCESS_JTAC.DisplayInterval - -
PROCESS_JTAC.DisplayMessage - -
PROCESS_JTAC.DisplayTime - -
PROCESS_JTAC.FACUnit - -
PROCESS_JTAC.Fsm - -
PROCESS_JTAC:New(Task, ProcessUnit, TargetSetUnit, FACUnit) -

Creates a new DESTROY process.

-
PROCESS_JTAC:OnJTACMenuAwait(Fsm, Event, From, To) -

StateMachine callback function for a PROCESS

-
PROCESS_JTAC:OnJTACMenuCancel(Fsm, Event, From, To, TargetUnit) -

StateMachine callback function for a PROCESS

-
PROCESS_JTAC:OnJTACMenuSpot(Fsm, Event, From, To, TargetUnit) -

StateMachine callback function for a PROCESS

-
PROCESS_JTAC:OnJTACMenuUpdate(Fsm, Event, From, To) -

StateMachine callback function for a PROCESS

-
PROCESS_JTAC:OnStart(Fsm, Event, From, To) -

StateMachine callback function for a PROCESS

-
PROCESS_JTAC.ProcessUnit - -
PROCESS_JTAC.TargetSetUnit - -
- -

Global(s)

-
-
- - #PROCESS_JTAC - -PROCESS_JTAC - -
-
- - - -
-
-

Type Process_JTAC

- -

Type PROCESS_JTAC

- -

PROCESS_JTAC class

- -

Field(s)

-
-
- - #string - -PROCESS_JTAC.ClassName - -
-
- - - -
-
-
-
- - #string - -PROCESS_JTAC.DisplayCategory - -
-
- - - - -

Targets is the default display category

- -
-
-
-
- - #number - -PROCESS_JTAC.DisplayCount - -
-
- - - -
-
-
-
- - #number - -PROCESS_JTAC.DisplayInterval - -
-
- - - -
-
-
-
- - #boolean - -PROCESS_JTAC.DisplayMessage - -
-
- - - -
-
-
-
- - #number - -PROCESS_JTAC.DisplayTime - -
-
- - - - -

10 seconds is the default

- -
-
-
-
- - - -PROCESS_JTAC.FACUnit - -
-
- - - -
-
-
-
- - - -PROCESS_JTAC.Fsm - -
-
- - - -
-
-
-
- - -PROCESS_JTAC:New(Task, ProcessUnit, TargetSetUnit, FACUnit) - -
-
- -

Creates a new DESTROY process.

- -

Parameters

- -

Return value

- -

#PROCESS_JTAC: -self

- -
-
-
-
- - -PROCESS_JTAC:OnJTACMenuAwait(Fsm, Event, From, To) - -
-
- -

StateMachine callback function for a PROCESS

- -

Parameters

-
    -
  • - -

    Core.Fsm#FSM_PROCESS Fsm :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
-
-
-
-
- - -PROCESS_JTAC:OnJTACMenuCancel(Fsm, Event, From, To, TargetUnit) - -
-
- -

StateMachine callback function for a PROCESS

- -

Parameters

- -
-
-
-
- - -PROCESS_JTAC:OnJTACMenuSpot(Fsm, Event, From, To, TargetUnit) - -
-
- -

StateMachine callback function for a PROCESS

- -

Parameters

- -
-
-
-
- - -PROCESS_JTAC:OnJTACMenuUpdate(Fsm, Event, From, To) - -
-
- -

StateMachine callback function for a PROCESS

- -

Parameters

-
    -
  • - -

    Core.Fsm#FSM_PROCESS Fsm :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
-
-
-
-
- - -PROCESS_JTAC:OnStart(Fsm, Event, From, To) - -
-
- -

StateMachine callback function for a PROCESS

- -

Parameters

-
    -
  • - -

    Core.Fsm#FSM_PROCESS Fsm :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
-
-
-
-
- - Wrapper.Unit#UNIT - -PROCESS_JTAC.ProcessUnit - -
-
- - - -
-
-
-
- - Core.Set#SET_UNIT - -PROCESS_JTAC.TargetSetUnit - -
-
- - - -
-
- -
- -
- - diff --git a/docs/Documentation/Process_Pickup.html b/docs/Documentation/Process_Pickup.html deleted file mode 100644 index 6967c3780..000000000 --- a/docs/Documentation/Process_Pickup.html +++ /dev/null @@ -1,702 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Process_Pickup

- - - -

Global(s)

- - - - - -
PROCESS_PICKUP - -
-

Type PROCESS_PICKUP

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PROCESS_PICKUP.ClassName - -
PROCESS_PICKUP.DisplayCategory - -
PROCESS_PICKUP.DisplayCount - -
PROCESS_PICKUP.DisplayInterval - -
PROCESS_PICKUP.DisplayMessage - -
PROCESS_PICKUP.DisplayTime - -
PROCESS_PICKUP:EventDead(Event) - -
PROCESS_PICKUP.Fsm - -
PROCESS_PICKUP:New(Task, ProcessUnit, TargetSetUnit, ProcessName) -

Creates a new DESTROY process.

-
PROCESS_PICKUP:OnDestroyed(Fsm, Event, From, To) -

StateMachine callback function for a PROCESS

-
PROCESS_PICKUP:OnHitTarget(Fsm, Event, From, To, Event) -

StateMachine callback function for a PROCESS

-
PROCESS_PICKUP:OnKilled(Fsm, Event, From, To, DCSEvent) -

StateMachine callback function for a PROCESS

-
PROCESS_PICKUP:OnMoreTargets(Fsm, Event, From, To) -

StateMachine callback function for a PROCESS

-
PROCESS_PICKUP:OnNavigating(Fsm, Event, From, To) -

StateMachine callback function for a PROCESS

-
PROCESS_PICKUP:OnRestart(Fsm, Event, From, To) -

StateMachine callback function for a PROCESS

-
PROCESS_PICKUP:OnStart(Fsm, Event, From, To) -

StateMachine callback function for a PROCESS

-
PROCESS_PICKUP.ProcessUnit - -
PROCESS_PICKUP.TargetSetUnit - -
- -

Global(s)

-
-
- - #PROCESS_PICKUP - -PROCESS_PICKUP - -
-
- - - -
-
-

Type Process_Pickup

- -

Type PROCESS_PICKUP

- -

PROCESS_PICKUP class

- -

Field(s)

-
-
- - #string - -PROCESS_PICKUP.ClassName - -
-
- - - -
-
-
-
- - #string - -PROCESS_PICKUP.DisplayCategory - -
-
- - - - -

Targets is the default display category

- -
-
-
-
- - #number - -PROCESS_PICKUP.DisplayCount - -
-
- - - -
-
-
-
- - #number - -PROCESS_PICKUP.DisplayInterval - -
-
- - - -
-
-
-
- - #boolean - -PROCESS_PICKUP.DisplayMessage - -
-
- - - -
-
-
-
- - #number - -PROCESS_PICKUP.DisplayTime - -
-
- - - - -

10 seconds is the default

- -
-
-
-
- - -PROCESS_PICKUP:EventDead(Event) - -
-
- - - -

Parameter

- -
-
-
-
- - - -PROCESS_PICKUP.Fsm - -
-
- - - -
-
-
-
- - -PROCESS_PICKUP:New(Task, ProcessUnit, TargetSetUnit, ProcessName) - -
-
- -

Creates a new DESTROY process.

- -

Parameters

- -

Return value

- -

#PROCESS_PICKUP: -self

- -
-
-
-
- - -PROCESS_PICKUP:OnDestroyed(Fsm, Event, From, To) - -
-
- -

StateMachine callback function for a PROCESS

- -

Parameters

-
    -
  • - -

    Core.Fsm#FSM_PROCESS Fsm :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
-
-
-
-
- - -PROCESS_PICKUP:OnHitTarget(Fsm, Event, From, To, Event) - -
-
- -

StateMachine callback function for a PROCESS

- -

Parameters

- -
-
-
-
- - -PROCESS_PICKUP:OnKilled(Fsm, Event, From, To, DCSEvent) - -
-
- -

StateMachine callback function for a PROCESS

- -

Parameters

- -
-
-
-
- - -PROCESS_PICKUP:OnMoreTargets(Fsm, Event, From, To) - -
-
- -

StateMachine callback function for a PROCESS

- -

Parameters

-
    -
  • - -

    Core.Fsm#FSM_PROCESS Fsm :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
-
-
-
-
- - -PROCESS_PICKUP:OnNavigating(Fsm, Event, From, To) - -
-
- -

StateMachine callback function for a PROCESS

- -

Parameters

-
    -
  • - -

    Core.Fsm#FSM_PROCESS Fsm :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
-
-
-
-
- - -PROCESS_PICKUP:OnRestart(Fsm, Event, From, To) - -
-
- -

StateMachine callback function for a PROCESS

- -

Parameters

-
    -
  • - -

    Core.Fsm#FSM_PROCESS Fsm :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
-
-
-
-
- - -PROCESS_PICKUP:OnStart(Fsm, Event, From, To) - -
-
- -

StateMachine callback function for a PROCESS

- -

Parameters

-
    -
  • - -

    Core.Fsm#FSM_PROCESS Fsm :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
-
-
-
-
- - Wrapper.Unit#UNIT - -PROCESS_PICKUP.ProcessUnit - -
-
- - - -
-
-
-
- - Core.Set#SET_UNIT - -PROCESS_PICKUP.TargetSetUnit - -
-
- - - -
-
- -
- -
- - diff --git a/docs/Documentation/Radio.html b/docs/Documentation/Radio.html deleted file mode 100644 index 1254f064b..000000000 --- a/docs/Documentation/Radio.html +++ /dev/null @@ -1,841 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Radio

- -

Core - The RADIO class is responsible for transmitting radio communications.

- - - -

Banner Image

- -
- -

What are radio communications in DCS ?

- -
    -
  • Radio transmissions consist of sound files that are broadcasted on a specific frequency (e.g. 115MHz) and modulation (e.g. AM),
  • -
  • They can be subtitled for a specific duration, the power in Watts of the transmiter's antenna can be set, and the transmission can be looped.
  • -
- -

How to supply DCS my own Sound Files ?

- -
    -
  • Your sound files need to be encoded in .ogg or .wav,
  • -
  • Your sound files should be as tiny as possible. It is suggested you encode in .ogg with low bitrate and sampling settings,
  • -
  • They need to be added in .\l10n\DEFAULT\ in you .miz file (wich can be decompressed like a .zip file),
  • -
  • For simplicty sake, you can let DCS' Mission Editor add the file itself, by creating a new Trigger with the action "Sound to Country", and choosing your sound file and a country you don't use in your mission.
  • -
- -

Due to weird DCS quirks, radio communications behave differently if sent by a Unit#UNIT or a Group#GROUP or by any other Positionable#POSITIONABLE

- - - -

Note that obviously, the frequency and the modulation of the transmission are important only if the players are piloting an Advanced System Modelling enabled aircraft, -like the A10C or the Mirage 2000C. They will hear the transmission if they are tuned on the right frequency and modulation (and if they are close enough - more on that below). -If a FC3 airacraft is used, it will hear every communication, whatever the frequency and the modulation is set to.

- -
- -

Author: Hugues "Grey_Echo" Bousquet

- - -

Global(s)

- - - - - -
RADIO - -
-

Type RADIO

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RADIO:Broadcast() -

Actually Broadcast the transmission

-
RADIO.ClassName - -
RADIO.FileName -

Name of the sound file

-
RADIO.Frequency -

Frequency of the transmission in Hz

-
RADIO.Loop - -
RADIO.Modulation -

Modulation of the transmission (either radio.modulation.AM or radio.modulation.FM)

-
RADIO:New(Positionable) -

Create a new RADIO Object.

-
RADIO:NewGenericTransmission(FileName, Frequency, Modulation, Power) -

Create a new transmission, that is to say, populate the RADIO with relevant data

-
RADIO:NewUnitTransmission(FileName, Subtitle, SubtitleDuration, Frequency, Modulation, Loop) -

Create a new transmission, that is to say, populate the RADIO with relevant data

-
RADIO.Positionable -

The transmiter

-
RADIO.Power -

Power of the antenna is Watts

-
RADIO:SetFileName(FileName) -

Check validity of the filename passed and sets RADIO.FileName

-
RADIO:SetFrequency(Frequency) -

Check validity of the frequency passed and sets RADIO.Frequency

-
RADIO:SetLoop(Loop) -

Check validity of the loop passed and sets RADIO.Loop

-
RADIO:SetModulation(Modulation) -

Check validity of the frequency passed and sets RADIO.Modulation

-
RADIO:SetPower(Power) -

Check validity of the power passed and sets RADIO.Power

-
RADIO:SetSubtitle(Subtitle, SubtitleDuration) -

Check validity of the subtitle and the subtitleDuration passed and sets RADIO.subtitle and RADIO.subtitleDuration

-
RADIO:StopBroadcast() -

Stops a transmission

-
RADIO.Subtitle -

Subtitle of the transmission

-
RADIO.SubtitleDuration -

Duration of the Subtitle in seconds

-
- -

Global(s)

-
-
- - #RADIO - -RADIO - -
-
- - - -
-
-

Type Radio

- -

Type RADIO

- -

1) RADIO class, extends Base#BASE

- -

1.1) RADIO usage

- -

There are 3 steps to a successful radio transmission.

- - - - - -

Methods to set relevant parameters for both a Unit#UNIT or a Group#GROUP or any other Positionable#POSITIONABLE

- - - -

Additional Methods to set relevant parameters if the transmiter is a Unit#UNIT or a Group#GROUP

- - - -

Additional Methods to set relevant parameters if the transmiter is any other Positionable#POSITIONABLE

- - - -

What is this power thing ?

- -
    -
  • If your transmission is sent by a Positionable#POSITIONABLE other than a Unit#UNIT or a Group#GROUP, you can set the power of the antenna,
  • -
  • Otherwise, DCS sets it automatically, depending on what's available on your Unit,
  • -
  • If the player gets too far from the transmiter, or if the antenna is too weak, the transmission will fade and become noisyer,
  • -
  • This an automated DCS calculation you have no say on,
  • -
  • For reference, a standard VOR station has a 100W antenna, a standard AA TACAN has a 120W antenna, and civilian ATC's antenna usually range between 300 and 500W,
  • -
  • Note that if the transmission has a subtitle, it will be readable, regardless of the quality of the transmission. -
  • -
- -

Field(s)

-
-
- - -RADIO:Broadcast() - -
-
- -

Actually Broadcast the transmission

- -

Return value

- -

#RADIO: -self

- -

Usage:

-
-- The Radio has to be populated with the new transmission before broadcasting.
--- Please use RADIO setters or either @{Radio#RADIO.NewGenericTransmission} or @{Radio#RADIO.NewUnitTransmission}
--- This class is in fact pretty smart, it determines the right DCS function to use depending on the type of POSITIONABLE
--- If the POSITIONABLE is not a UNIT or a GROUP, we use the generic (but limited) trigger.action.radioTransmission()
--- If the POSITIONABLE is a UNIT or a GROUP, we use the "TransmitMessage" Command
--- If your POSITIONABLE is a UNIT or a GROUP, the Power is ignored.
--- If your POSITIONABLE is not a UNIT or a GROUP, the Subtitle, SubtitleDuration and Loop are ignored
- -
-
-
-
- - #string - -RADIO.ClassName - -
-
- - - -
-
-
-
- - #string - -RADIO.FileName - -
-
- -

Name of the sound file

- -
-
-
-
- - #number - -RADIO.Frequency - -
-
- -

Frequency of the transmission in Hz

- -
-
-
-
- - #boolean - -RADIO.Loop - -
-
- - - -
-
-
-
- - #number - -RADIO.Modulation - -
-
- -

Modulation of the transmission (either radio.modulation.AM or radio.modulation.FM)

- -
-
-
-
- - -RADIO:New(Positionable) - -
-
- -

Create a new RADIO Object.

- - -

This doesn't broadcast a transmission, though, use RADIO.Broadcast to actually broadcast

- -

Parameter

- -

Return values

-
    -
  1. - -

    #RADIO: -Radio

    - -
  2. -
  3. - -

    #nil: -If Positionable is invalid

    - -
  4. -
-

Usage:

-
-- If you want to create a RADIO, you probably should use @{Positionable#POSITIONABLE.GetRadio}() instead
- -
-
-
-
- - -RADIO:NewGenericTransmission(FileName, Frequency, Modulation, Power) - -
-
- -

Create a new transmission, that is to say, populate the RADIO with relevant data

- -

Parameters

-
    -
  • - -

    #string FileName :

    - -
  • -
  • - -

    #number Frequency : -in MHz

    - -
  • -
  • - -

    #number Modulation : -either radio.modulation.AM or radio.modulation.FM

    - -
  • -
  • - -

    #number Power : -in W

    - -
  • -
-

Return value

- -

#RADIO: -self

- -

Usage:

-
-- In this function the data is especially relevant if the broadcaster is anything but a UNIT or a GROUP,
-but it will work with a UNIT or a GROUP anyway
--- Only the RADIO and the Filename are mandatory
- -
-
-
-
- - -RADIO:NewUnitTransmission(FileName, Subtitle, SubtitleDuration, Frequency, Modulation, Loop) - -
-
- -

Create a new transmission, that is to say, populate the RADIO with relevant data

- -

Parameters

-
    -
  • - -

    #string FileName :

    - -
  • -
  • - -

    #string Subtitle :

    - -
  • -
  • - -

    #number SubtitleDuration : -in s

    - -
  • -
  • - -

    #number Frequency : -in MHz

    - -
  • -
  • - -

    #number Modulation : -either radio.modulation.AM or radio.modulation.FM

    - -
  • -
  • - -

    #boolean Loop :

    - -
  • -
-

Return value

- -

#RADIO: -self

- -

Usage:

-
-- In this function the data is especially relevant if the broadcaster is a UNIT or a GROUP,
-but it will work for any POSITIONABLE
--- Only the RADIO and the Filename are mandatory
- -
-
-
-
- - Positionable#POSITIONABLE - -RADIO.Positionable - -
-
- -

The transmiter

- -
-
-
-
- - #number - -RADIO.Power - -
-
- -

Power of the antenna is Watts

- -
-
-
-
- - -RADIO:SetFileName(FileName) - -
-
- -

Check validity of the filename passed and sets RADIO.FileName

- -

Parameter

-
    -
  • - -

    #string FileName : -File name of the sound file (i.e. "Noise.ogg")

    - -
  • -
-

Return value

- -

#RADIO: -self

- -
-
-
-
- - -RADIO:SetFrequency(Frequency) - -
-
- -

Check validity of the frequency passed and sets RADIO.Frequency

- -

Parameter

-
    -
  • - -

    #number Frequency : -in MHz (Ranges allowed for radio transmissions in DCS : 30-88 / 108-152 / 225-400MHz)

    - -
  • -
-

Return value

- -

#RADIO: -self

- -
-
-
-
- - -RADIO:SetLoop(Loop) - -
-
- -

Check validity of the loop passed and sets RADIO.Loop

- -

Parameter

-
    -
  • - -

    #boolean Loop :

    - -
  • -
-

Return value

- -

#RADIO: -self

- -

Usage:

-
- -
-
-
-
- - -RADIO:SetModulation(Modulation) - -
-
- -

Check validity of the frequency passed and sets RADIO.Modulation

- -

Parameter

-
    -
  • - -

    #number Modulation : -either radio.modulation.AM or radio.modulation.FM

    - -
  • -
-

Return value

- -

#RADIO: -self

- -
-
-
-
- - -RADIO:SetPower(Power) - -
-
- -

Check validity of the power passed and sets RADIO.Power

- -

Parameter

-
    -
  • - -

    #number Power : -in W

    - -
  • -
-

Return value

- -

#RADIO: -self

- -
-
-
-
- - -RADIO:SetSubtitle(Subtitle, SubtitleDuration) - -
-
- -

Check validity of the subtitle and the subtitleDuration passed and sets RADIO.subtitle and RADIO.subtitleDuration

- -

Parameters

-
    -
  • - -

    #string Subtitle :

    - -
  • -
  • - -

    #number SubtitleDuration : -in s

    - -
  • -
-

Return value

- -

#RADIO: -self

- -

Usage:

-
-- Both parameters are mandatory, since it wouldn't make much sense to change the Subtitle and not its duration
- -
-
-
-
- - -RADIO:StopBroadcast() - -
-
- -

Stops a transmission

- -

Return value

- -

#RADIO: -self

- -

Usage:

-
-- Especially usefull to stop the broadcast of looped transmissions
--- Only works with broadcasts from UNIT or GROUP
- -
-
-
-
- - #string - -RADIO.Subtitle - -
-
- -

Subtitle of the transmission

- -
-
-
-
- - #number - -RADIO.SubtitleDuration - -
-
- -

Duration of the Subtitle in seconds

- -
-
- -
- -
- - diff --git a/docs/Documentation/Route.html b/docs/Documentation/Route.html deleted file mode 100644 index 837c6c28f..000000000 --- a/docs/Documentation/Route.html +++ /dev/null @@ -1,1285 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Route

- -

(SP) (MP) (FSM) Route AI or players through waypoints or to zones.

- - - -
- -

#ACT_ROUTE FSM class, extends Fsm#FSM_PROCESS

- -

ACT_ROUTE state machine:

- -

This class is a state machine: it manages a process that is triggered by events causing state transitions to occur. -All derived classes from this class will start with the class name, followed by a _. See the relevant derived class descriptions below. -Each derived class follows exactly the same process, using the same events and following the same state transitions, -but will have different implementation behaviour upon each event or state transition.

- -

ACT_ROUTE Events:

- -

These are the events defined in this class:

- -
    -
  • Start: The process is started. The process will go into the Report state.
  • -
  • Report: The process is reporting to the player the route to be followed.
  • -
  • Route: The process is routing the controllable.
  • -
  • Pause: The process is pausing the route of the controllable.
  • -
  • Arrive: The controllable has arrived at a route point.
  • -
  • More: There are more route points that need to be followed. The process will go back into the Report state.
  • -
  • NoMore: There are no more route points that need to be followed. The process will go into the Success state.
  • -
- -

ACT_ROUTE Event methods:

- -

Event methods are available (dynamically allocated by the state machine), that accomodate for state transitions occurring in the process. -There are two types of event methods, which you can use to influence the normal mechanisms in the state machine:

- -
    -
  • Immediate: The event method has exactly the name of the event.
  • -
  • Delayed: The event method starts with a __ + the name of the event. The first parameter of the event method is a number value, expressing the delay in seconds when the event will be executed.
  • -
- -

ACT_ROUTE States:

- -
    -
  • None: The controllable did not receive route commands.
  • -
  • Arrived (*): The controllable has arrived at a route point.
  • -
  • Aborted (*): The controllable has aborted the route path.
  • -
  • Routing: The controllable is understay to the route point.
  • -
  • Pausing: The process is pausing the routing. AI air will go into hover, AI ground will stop moving. Players can fly around.
  • -
  • Success (*): All route points were reached.
  • -
  • Failed (*): The process has failed.
  • -
- -

(*) End states of the process.

- -

ACT_ROUTE state transition methods:

- -

State transition functions can be set by the mission designer customizing or improving the behaviour of the state. -There are 2 moments when state transition methods will be called by the state machine:

- -
    -
  • Before the state transition. - The state transition method needs to start with the name OnBefore + the name of the state. - If the state transition method returns false, then the processing of the state transition will not be done! - If you want to change the behaviour of the AIControllable at this event, return false, - but then you'll need to specify your own logic using the AIControllable!

  • -
  • After the state transition. - The state transition method needs to start with the name OnAfter + the name of the state. - These state transition methods need to provide a return value, which is specified at the function description.

  • -
- -
- -

1) #ACTROUTEZONE class, extends Fsm.Route#ACT_ROUTE

- -

The ACTROUTEZONE class implements the core functions to route an AIR Controllable player Unit to a Zone. -The player receives on perioding times messages with the coordinates of the route to follow. -Upon arrival at the zone, a confirmation of arrival is sent, and the process will be ended.

- -

1.1) ACTROUTEZONE constructor:

- - - -
- - -

Global(s)

- - - - - - - - - - - - - -
ACT_ROUTE - -
ACT_ROUTE_POINT - -
ACT_ROUTE_ZONE - -
-

Type ACT_ROUTE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ACT_ROUTE.ClassName - -
ACT_ROUTE.DisplayCount - -
ACT_ROUTE:New() -

Creates a new routing state machine.

-
ACT_ROUTE.ProcessUnit - -
ACT_ROUTE.TASK - -
ACT_ROUTE.Zone - -
ACT_ROUTE:onafterStart(ProcessUnit, Event, From, To) -

StateMachine callback function

-
ACT_ROUTE:onbeforeRoute(ProcessUnit, Event, From, To) -

StateMachine callback function

-
ACT_ROUTE:onfuncHasArrived(ProcessUnit) -

Check if the controllable has arrived.

-
- -

Type ACT_ROUTE_POINT

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ACT_ROUTE_POINT.ClassName - -
ACT_ROUTE_POINT.DisplayCount - -
ACT_ROUTE_POINT.DisplayInterval - -
ACT_ROUTE_POINT.DisplayMessage - -
ACT_ROUTE_POINT.DisplayTime - -
ACT_ROUTE_POINT:GetPointVec2() -

Get PointVec2

-
ACT_ROUTE_POINT:GetRange() -

Get Range around PointVec2

-
ACT_ROUTE_POINT:Init(FsmRoute) - -
ACT_ROUTE_POINT:New(The, Range, Zone, PointVec2) -

Creates a new routing state machine.

-
ACT_ROUTE_POINT.PointVec2 - -
ACT_ROUTE_POINT.Range - -
ACT_ROUTE_POINT:SetPointVec2(PointVec2) -

Set PointVec2

-
ACT_ROUTE_POINT:SetRange(Range) -

Set Range around PointVec2

-
ACT_ROUTE_POINT.TASK - -
ACT_ROUTE_POINT:onenterReporting(ProcessUnit, Event, From, To) -

StateMachine callback function

-
ACT_ROUTE_POINT:onfuncHasArrived(ProcessUnit) -

Method override to check if the controllable has arrived.

-
- -

Type ACT_ROUTE_ZONE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ACT_ROUTE_ZONE.ClassName - -
ACT_ROUTE_ZONE.DisplayCount - -
ACT_ROUTE_ZONE.DisplayInterval - -
ACT_ROUTE_ZONE.DisplayMessage - -
ACT_ROUTE_ZONE.DisplayTime - -
ACT_ROUTE_ZONE:GetZone() -

Get Zone

-
ACT_ROUTE_ZONE:Init(FsmRoute) - -
ACT_ROUTE_ZONE:New(Zone) -

Creates a new routing state machine.

-
ACT_ROUTE_ZONE.ProcessUnit - -
ACT_ROUTE_ZONE:SetZone(Zone) -

Set Zone

-
ACT_ROUTE_ZONE.TASK - -
ACT_ROUTE_ZONE.Zone - -
ACT_ROUTE_ZONE:onenterReporting(ProcessUnit, Event, From, To) -

StateMachine callback function

-
ACT_ROUTE_ZONE:onfuncHasArrived(ProcessUnit) -

Method override to check if the controllable has arrived.

-
- -

Global(s)

-
-
- - #ACT_ROUTE - -ACT_ROUTE - -
-
- - - -
-
-
-
- - #ACT_ROUTE_POINT - -ACT_ROUTE_POINT - -
-
- - - -
-
-
-
- - #ACT_ROUTE_ZONE - -ACT_ROUTE_ZONE - -
-
- - - -
-
-

Type Route

- -

Type ACT_ROUTE

- -

ACT_ROUTE class

- -

Field(s)

-
-
- - #string - -ACT_ROUTE.ClassName - -
-
- - - -
-
-
-
- - #number - -ACT_ROUTE.DisplayCount - -
-
- - - -
-
-
-
- - -ACT_ROUTE:New() - -
-
- -

Creates a new routing state machine.

- - -

The process will route a CLIENT to a ZONE until the CLIENT is within that ZONE.

- -

Return value

- -

#ACT_ROUTE: -self

- -
-
-
-
- - Wrapper.Unit#UNIT - -ACT_ROUTE.ProcessUnit - -
-
- - - -
-
-
-
- - Tasking.Task#TASK - -ACT_ROUTE.TASK - -
-
- - - -
-
-
-
- - Core.Zone#ZONE_BASE - -ACT_ROUTE.Zone - -
-
- - - -
-
-
-
- - -ACT_ROUTE:onafterStart(ProcessUnit, Event, From, To) - -
-
- -

StateMachine callback function

- -

Parameters

- -
-
-
-
- - -ACT_ROUTE:onbeforeRoute(ProcessUnit, Event, From, To) - -
-
- -

StateMachine callback function

- -

Parameters

- -
-
-
-
- - -ACT_ROUTE:onfuncHasArrived(ProcessUnit) - -
-
- -

Check if the controllable has arrived.

- -

Parameter

- -

Return value

- -

#boolean:

- - -
-
- -

Type ACT_ROUTE_POINT

- -

ACTROUTEPOINT class

- -

Field(s)

-
-
- - #string - -ACT_ROUTE_POINT.ClassName - -
-
- - - -
-
-
-
- - #number - -ACT_ROUTE_POINT.DisplayCount - -
-
- - - -
-
-
-
- - #number - -ACT_ROUTE_POINT.DisplayInterval - -
-
- - - -
-
-
-
- - #boolean - -ACT_ROUTE_POINT.DisplayMessage - -
-
- - - -
-
-
-
- - #number - -ACT_ROUTE_POINT.DisplayTime - -
-
- - - - -

10 seconds is the default

- -
-
-
-
- - -ACT_ROUTE_POINT:GetPointVec2() - -
-
- -

Get PointVec2

- -

Return value

- -

Core.Point#POINT_VEC2: -PointVec2 The PointVec2 to route to.

- -
-
-
-
- - -ACT_ROUTE_POINT:GetRange() - -
-
- -

Get Range around PointVec2

- -

Return value

- -

#number: -The Range to consider the arrival. Default is 10000 meters.

- -
-
-
-
- - -ACT_ROUTE_POINT:Init(FsmRoute) - -
-
- - - -

Parameter

-
    -
  • - -

    FsmRoute :

    - -
  • -
-
-
-
-
- - -ACT_ROUTE_POINT:New(The, Range, Zone, PointVec2) - -
-
- -

Creates a new routing state machine.

- - -

The task will route a controllable to a PointVec2 until the controllable is within the Range.

- -

Parameters

- -
-
-
-
- - - -ACT_ROUTE_POINT.PointVec2 - -
-
- - - -
-
-
-
- - -ACT_ROUTE_POINT.Range - -
-
- - - -
-
-
-
- - -ACT_ROUTE_POINT:SetPointVec2(PointVec2) - -
-
- -

Set PointVec2

- -

Parameter

- -
-
-
-
- - -ACT_ROUTE_POINT:SetRange(Range) - -
-
- -

Set Range around PointVec2

- -

Parameter

-
    -
  • - -

    #number Range : -The Range to consider the arrival. Default is 10000 meters.

    - -
  • -
-
-
-
-
- - Tasking.Task#TASK - -ACT_ROUTE_POINT.TASK - -
-
- - - -
-
-
-
- - -ACT_ROUTE_POINT:onenterReporting(ProcessUnit, Event, From, To) - -
-
- -

StateMachine callback function

- -

Parameters

- -
-
-
-
- - -ACT_ROUTE_POINT:onfuncHasArrived(ProcessUnit) - -
-
- -

Method override to check if the controllable has arrived.

- -

Parameter

- -

Return value

- -

#boolean:

- - -
-
- -

Type ACT_ROUTE_ZONE

- -

ACTROUTEZONE class

- -

Field(s)

-
-
- - #string - -ACT_ROUTE_ZONE.ClassName - -
-
- - - -
-
-
-
- - #number - -ACT_ROUTE_ZONE.DisplayCount - -
-
- - - -
-
-
-
- - #number - -ACT_ROUTE_ZONE.DisplayInterval - -
-
- - - -
-
-
-
- - #boolean - -ACT_ROUTE_ZONE.DisplayMessage - -
-
- - - -
-
-
-
- - #number - -ACT_ROUTE_ZONE.DisplayTime - -
-
- - - - -

10 seconds is the default

- -
-
-
-
- - -ACT_ROUTE_ZONE:GetZone() - -
-
- -

Get Zone

- -

Return value

- -

Core.Zone#ZONE_BASE: -Zone The Zone object where to route to.

- -
-
-
-
- - -ACT_ROUTE_ZONE:Init(FsmRoute) - -
-
- - - -

Parameter

-
    -
  • - -

    FsmRoute :

    - -
  • -
-
-
-
-
- - -ACT_ROUTE_ZONE:New(Zone) - -
-
- -

Creates a new routing state machine.

- - -

The task will route a controllable to a ZONE until the controllable is within that ZONE.

- -

Parameter

- -
-
-
-
- - Wrapper.Unit#UNIT - -ACT_ROUTE_ZONE.ProcessUnit - -
-
- - - -
-
-
-
- - -ACT_ROUTE_ZONE:SetZone(Zone) - -
-
- -

Set Zone

- -

Parameter

- -
-
-
-
- - Tasking.Task#TASK - -ACT_ROUTE_ZONE.TASK - -
-
- - - -
-
-
-
- - Core.Zone#ZONE_BASE - -ACT_ROUTE_ZONE.Zone - -
-
- - - -
-
-
-
- - -ACT_ROUTE_ZONE:onenterReporting(ProcessUnit, Event, From, To) - -
-
- -

StateMachine callback function

- -

Parameters

- -
-
-
-
- - -ACT_ROUTE_ZONE:onfuncHasArrived(ProcessUnit) - -
-
- -

Method override to check if the controllable has arrived.

- -

Parameter

- -

Return value

- -

#boolean:

- - -
-
- -
- -
- - diff --git a/docs/Documentation/Scenery.html b/docs/Documentation/Scenery.html deleted file mode 100644 index f0530ef7a..000000000 --- a/docs/Documentation/Scenery.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Scenery

- -

This module contains the SCENERY class.

- - - -

1) Scenery#SCENERY class, extends Positionable#POSITIONABLE

-

Scenery objects are defined on the map. -The Scenery#SCENERY class is a wrapper class to handle the DCS Scenery objects:

- -
    -
  • Wraps the DCS Scenery objects.
  • -
  • Support all DCS Scenery APIs.
  • -
  • Enhance with Scenery specific APIs not in the DCS API set.
  • -
- - -

Global(s)

- - - - - -
SCENERY - -
-

Type SCENERY

- - - - - - - - - - - - - - - - - -
SCENERY.ClassName - -
SCENERY:GetDCSObject() - -
SCENERY:GetThreatLevel() - -
SCENERY:Register(SceneryName, SceneryObject) - -
- -

Global(s)

-
-
- - #SCENERY - -SCENERY - -
-
- - - -
-
-

Type Scenery

- -

Type SCENERY

- -

The SCENERY class

- -

Field(s)

-
-
- - #string - -SCENERY.ClassName - -
-
- - - -
-
-
-
- - -SCENERY:GetDCSObject() - -
-
- - - -
-
-
-
- - -SCENERY:GetThreatLevel() - -
-
- - - -
-
-
-
- - -SCENERY:Register(SceneryName, SceneryObject) - -
-
- - - -

Parameters

-
    -
  • - -

    SceneryName :

    - -
  • -
  • - -

    SceneryObject :

    - -
  • -
-
-
- -
- -
- - diff --git a/docs/Documentation/ScheduleDispatcher.html b/docs/Documentation/ScheduleDispatcher.html deleted file mode 100644 index 0175998ff..000000000 --- a/docs/Documentation/ScheduleDispatcher.html +++ /dev/null @@ -1,483 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module ScheduleDispatcher

- -

This module defines the SCHEDULEDISPATCHER class, which is used by a central object called _SCHEDULEDISPATCHER.

- - - -
- -

Takes care of the creation and dispatching of scheduled functions for SCHEDULER objects.

- -

This class is tricky and needs some thorought explanation. -SCHEDULE classes are used to schedule functions for objects, or as persistent objects. -The SCHEDULEDISPATCHER class ensures that:

- -
    -
  • Scheduled functions are planned according the SCHEDULER object parameters.
  • -
  • Scheduled functions are repeated when requested, according the SCHEDULER object parameters.
  • -
  • Scheduled functions are automatically removed when the schedule is finished, according the SCHEDULER object parameters.
  • -
- -

The SCHEDULEDISPATCHER class will manage SCHEDULER object in memory during garbage collection: - - When a SCHEDULER object is not attached to another object (that is, it's first :Schedule() parameter is nil), then the SCHEDULER

-
object is _persistent_ within memory.
-
-

- When a SCHEDULER object is attached to another object, then the SCHEDULER object is not persistent within memory after a garbage collection! -The none persistency of SCHEDULERS attached to objects is required to allow SCHEDULER objects to be garbage collectged, when the parent object is also desroyed or nillified and garbage collected. -Even when there are pending timer scheduled functions to be executed for the SCHEDULER object,
-these will not be executed anymore when the SCHEDULER object has been destroyed.

- -

The SCHEDULEDISPATCHER allows multiple scheduled functions to be planned and executed for one SCHEDULER object. -The SCHEDULER object therefore keeps a table of "CallID's", which are returned after each planning of a new scheduled function by the SCHEDULEDISPATCHER. -The SCHEDULER object plans new scheduled functions through the Scheduler#SCHEDULER.Schedule() method. -The Schedule() method returns the CallID that is the reference ID for each planned schedule.

- -
- -
- -

Contributions: -

-

Authors: FlightControl : Design & Programming

- - -

Global(s)

- - - - - -
SCHEDULEDISPATCHER - -
-

Type SCHEDULEDISPATCHER

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SCHEDULEDISPATCHER:AddSchedule(Scheduler, ScheduleFunction, ScheduleArguments, Start, Repeat, Randomize, Stop) -

Add a Schedule to the ScheduleDispatcher.

-
SCHEDULEDISPATCHER.CallID - -
SCHEDULEDISPATCHER.ClassName - -
SCHEDULEDISPATCHER:Clear(Scheduler) - -
SCHEDULEDISPATCHER:New() - -
SCHEDULEDISPATCHER.ObjectSchedulers - -
SCHEDULEDISPATCHER.PersistentSchedulers - -
SCHEDULEDISPATCHER:RemoveSchedule(Scheduler, CallID) - -
SCHEDULEDISPATCHER.Schedule - -
SCHEDULEDISPATCHER:Start(Scheduler, CallID) - -
SCHEDULEDISPATCHER:Stop(Scheduler, CallID) - -
- -

Global(s)

-
-
- - #SCHEDULEDISPATCHER - -SCHEDULEDISPATCHER - -
-
- - - -
-
-

Type ScheduleDispatcher

- -

Type SCHEDULEDISPATCHER

- -

The SCHEDULEDISPATCHER structure

- -

Field(s)

-
-
- - -SCHEDULEDISPATCHER:AddSchedule(Scheduler, ScheduleFunction, ScheduleArguments, Start, Repeat, Randomize, Stop) - -
-
- -

Add a Schedule to the ScheduleDispatcher.

- - -

The development of this method was really tidy. -It is constructed as such that a garbage collection is executed on the weak tables, when the Scheduler is nillified. -Nothing of this code should be modified without testing it thoroughly.

- -

Parameters

-
    -
  • - -

    Core.Scheduler#SCHEDULER Scheduler :

    - -
  • -
  • - -

    ScheduleFunction :

    - -
  • -
  • - -

    ScheduleArguments :

    - -
  • -
  • - -

    Start :

    - -
  • -
  • - -

    Repeat :

    - -
  • -
  • - -

    Randomize :

    - -
  • -
  • - -

    Stop :

    - -
  • -
-
-
-
-
- - -SCHEDULEDISPATCHER.CallID - -
-
- - - -
-
-
-
- - #string - -SCHEDULEDISPATCHER.ClassName - -
-
- - - -
-
-
-
- - -SCHEDULEDISPATCHER:Clear(Scheduler) - -
-
- - - -

Parameter

-
    -
  • - -

    Scheduler :

    - -
  • -
-
-
-
-
- - -SCHEDULEDISPATCHER:New() - -
-
- - - -
-
-
-
- - -SCHEDULEDISPATCHER.ObjectSchedulers - -
-
- - - - -

or {}

- -
-
-
-
- - -SCHEDULEDISPATCHER.PersistentSchedulers - -
-
- - - - -

Initialize the ObjectSchedulers array, which is a weakly coupled table. - If the object used as the key is nil, then the garbage collector will remove the item from the Functions array.

- -
-
-
-
- - -SCHEDULEDISPATCHER:RemoveSchedule(Scheduler, CallID) - -
-
- - - -

Parameters

-
    -
  • - -

    Scheduler :

    - -
  • -
  • - -

    CallID :

    - -
  • -
-
-
-
-
- - -SCHEDULEDISPATCHER.Schedule - -
-
- - - -
-
-
-
- - -SCHEDULEDISPATCHER:Start(Scheduler, CallID) - -
-
- - - -

Parameters

-
    -
  • - -

    Scheduler :

    - -
  • -
  • - -

    CallID :

    - -
  • -
-
-
-
-
- - -SCHEDULEDISPATCHER:Stop(Scheduler, CallID) - -
-
- - - -

Parameters

-
    -
  • - -

    Scheduler :

    - -
  • -
  • - -

    CallID :

    - -
  • -
-
-
- -
- -
- - diff --git a/docs/Documentation/Scheduler.html b/docs/Documentation/Scheduler.html deleted file mode 100644 index 78118365a..000000000 --- a/docs/Documentation/Scheduler.html +++ /dev/null @@ -1,529 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Scheduler

- -

Core - SCHEDULER prepares and handles the execution of functions over scheduled time (intervals).

- - - -

Banner Image

- -
- -

1) Scheduler#SCHEDULER class, extends Base#BASE

- -

The Scheduler#SCHEDULER class creates schedule.

- -

1.1) SCHEDULER constructor

- -

The SCHEDULER class is quite easy to use, but note that the New constructor has variable parameters:

- -
    -
  • Scheduler#SCHEDULER.New( nil ): Setup a new SCHEDULER object, which is persistently executed after garbage collection.
  • -
  • Scheduler#SCHEDULER.New( Object ): Setup a new SCHEDULER object, which is linked to the Object. When the Object is nillified or destroyed, the SCHEDULER object will also be destroyed and stopped after garbage collection.
  • -
  • Scheduler#SCHEDULER.New( nil, Function, FunctionArguments, Start, ... ): Setup a new persistent SCHEDULER object, and start a new schedule for the Function with the defined FunctionArguments according the Start and sequent parameters.
  • -
  • Scheduler#SCHEDULER.New( Object, Function, FunctionArguments, Start, ... ): Setup a new SCHEDULER object, linked to Object, and start a new schedule for the Function with the defined FunctionArguments according the Start and sequent parameters.
  • -
- -

1.2) SCHEDULER timer stopping and (re-)starting.

- -

The SCHEDULER can be stopped and restarted with the following methods:

- -
    -
  • Scheduler#SCHEDULER.Start(): (Re-)Start the schedules within the SCHEDULER object. If a CallID is provided to :Start(), only the schedule referenced by CallID will be (re-)started.
  • -
  • Scheduler#SCHEDULER.Stop(): Stop the schedules within the SCHEDULER object. If a CallID is provided to :Stop(), then only the schedule referenced by CallID will be stopped.
  • -
- -

1.3) Create a new schedule

- -

With Scheduler#SCHEDULER.Schedule() a new time event can be scheduled. This function is used by the :New() constructor when a new schedule is planned.

- -
- -

Contributions:

- -
    -
  • FlightControl : Concept & Testing
  • -
- -

Authors:

- -
    -
  • FlightControl : Design & Programming
  • -
- -

Test Missions:

- -
    -
  • SCH - Scheduler
  • -
- -
- - -

Global(s)

- - - - - -
SCHEDULER - -
-

Type SCHEDULER

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SCHEDULER.ClassName - -
SCHEDULER:Clear() -

Clears all pending schedules.

-
SCHEDULER:New(SchedulerObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop) -

SCHEDULER constructor.

-
SCHEDULER:Remove(ScheduleID) -

Removes a specific schedule if a valid ScheduleID is provided.

-
SCHEDULER:Schedule(SchedulerObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop) -

Schedule a new time event.

-
SCHEDULER.ScheduleID -

the ID of the scheduler.

-
SCHEDULER.SchedulerObject - -
SCHEDULER.Schedules - -
SCHEDULER:Start(ScheduleID) -

(Re-)Starts the schedules or a specific schedule if a valid ScheduleID is provided.

-
SCHEDULER:Stop(ScheduleID) -

Stops the schedules or a specific schedule if a valid ScheduleID is provided.

-
- -

Global(s)

-
-
- - #SCHEDULER - -SCHEDULER - -
-
- - - -
-
-

Type Scheduler

- -

Type SCHEDULER

- -

The SCHEDULER class

- -

Field(s)

-
-
- - #string - -SCHEDULER.ClassName - -
-
- - - -
-
-
-
- - -SCHEDULER:Clear() - -
-
- -

Clears all pending schedules.

- -
-
-
-
- - -SCHEDULER:New(SchedulerObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop) - -
-
- -

SCHEDULER constructor.

- -

Parameters

-
    -
  • - -

    #table SchedulerObject : -Specified for which Moose object the timer is setup. If a value of nil is provided, a scheduler will be setup without an object reference.

    - -
  • -
  • - -

    #function SchedulerFunction : -The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

    - -
  • -
  • - -

    #table SchedulerArguments : -Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

    - -
  • -
  • - -

    #number Start : -Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

    - -
  • -
  • - -

    #number Repeat : -Specifies the interval in seconds when the scheduler will call the event function.

    - -
  • -
  • - -

    #number RandomizeFactor : -Specifies a randomization factor between 0 and 1 to randomize the Repeat.

    - -
  • -
  • - -

    #number Stop : -Specifies the amount of seconds when the scheduler will be stopped.

    - -
  • -
-

Return values

-
    -
  1. - -

    #SCHEDULER: -self.

    - -
  2. -
  3. - -

    #number: -The ScheduleID of the planned schedule.

    - -
  4. -
-
-
-
-
- - -SCHEDULER:Remove(ScheduleID) - -
-
- -

Removes a specific schedule if a valid ScheduleID is provided.

- -

Parameter

-
    -
  • - -

    #number ScheduleID : -(optional) The ScheduleID of the planned (repeating) schedule.

    - -
  • -
-
-
-
-
- - -SCHEDULER:Schedule(SchedulerObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop) - -
-
- -

Schedule a new time event.

- - -

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

- -

Parameters

-
    -
  • - -

    #table SchedulerObject : -Specified for which Moose object the timer is setup. If a value of nil is provided, a scheduler will be setup without an object reference.

    - -
  • -
  • - -

    #function SchedulerFunction : -The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

    - -
  • -
  • - -

    #table SchedulerArguments : -Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

    - -
  • -
  • - -

    #number Start : -Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

    - -
  • -
  • - -

    #number Repeat : -Specifies the interval in seconds when the scheduler will call the event function.

    - -
  • -
  • - -

    #number RandomizeFactor : -Specifies a randomization factor between 0 and 1 to randomize the Repeat.

    - -
  • -
  • - -

    #number Stop : -Specifies the amount of seconds when the scheduler will be stopped.

    - -
  • -
-

Return value

- -

#number: -The ScheduleID of the planned schedule.

- -
-
-
-
- - #number - -SCHEDULER.ScheduleID - -
-
- -

the ID of the scheduler.

- -
-
-
-
- - - -SCHEDULER.SchedulerObject - -
-
- - - -
-
-
-
- - - -SCHEDULER.Schedules - -
-
- - - -
-
-
-
- - -SCHEDULER:Start(ScheduleID) - -
-
- -

(Re-)Starts the schedules or a specific schedule if a valid ScheduleID is provided.

- -

Parameter

-
    -
  • - -

    #number ScheduleID : -(optional) The ScheduleID of the planned (repeating) schedule.

    - -
  • -
-
-
-
-
- - -SCHEDULER:Stop(ScheduleID) - -
-
- -

Stops the schedules or a specific schedule if a valid ScheduleID is provided.

- -

Parameter

-
    -
  • - -

    #number ScheduleID : -(optional) The ScheduleID of the planned (repeating) schedule.

    - -
  • -
-
-
- -
- -
- - diff --git a/docs/Documentation/Scoring.html b/docs/Documentation/Scoring.html deleted file mode 100644 index 7868ecda1..000000000 --- a/docs/Documentation/Scoring.html +++ /dev/null @@ -1,2226 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Scoring

- -

Single-Player:Yes / Multi-Player:Yes / Core:Yes -- Administer the scoring of player achievements, -and create a CSV file logging the scoring events for use at team or squadron websites.

- -

Banner Image

- -
- -

The #SCORING class administers the scoring of player achievements, -and creates a CSV file logging the scoring events and results for use at team or squadron websites.

- - - -

SCORING automatically calculates the threat level of the objects hit and destroyed by players, -which can be Unit, Static objects.

- -

Positive score points are granted when enemy or neutral targets are destroyed. -Negative score points or penalties are given when a friendly target is hit or destroyed. -This brings a lot of dynamism in the scoring, where players need to take care to inflict damage on the right target. -By default, penalties weight heavier in the scoring, to ensure that players don't commit fratricide. -The total score of the player is calculated by adding the scores minus the penalties.

- -

Banner Image

- -

The score value is calculated based on the threat level of the player and the threat level of the target. -A calculated score takes the threat level of the target divided by a balanced threat level of the player unit.
-As such, if the threat level of the target is high, and the player threat level is low, a higher score will be given than -if the threat level of the player would be high too.

- -

Banner Image

- -

When multiple players hit the same target, and finally succeed in destroying the target, then each player who contributed to the target -destruction, will receive a score. This is important for targets that require significant damage before it can be destroyed, like -ships or heavy planes.

- -

Banner Image

- -

Optionally, the score values can be scaled by a scale. Specific scales can be set for positive cores or negative penalties. -The default range of the scores granted is a value between 0 and 10. The default range of penalties given is a value between 0 and 30.

- -

Banner Image

- -

Additional scores can be granted to specific objects, when the player(s) destroy these objects.

- -

Banner Image

- -

Various Zones can be defined for which scores are also granted when objects in that Zone are destroyed. -This is specifically useful to designate scenery targets on the map that will generate points when destroyed.

- -

With a small change in MissionScripting.lua, the scoring results can also be logged in a CSV file.
-These CSV files can be used to:

- -
    -
  • Upload scoring to a database or a BI tool to publish the scoring results to the player community.
  • -
  • Upload scoring in an (online) Excel like tool, using pivot tables and pivot charts to show mission results.
  • -
  • Share scoring amoung players after the mission to discuss mission results.
  • -
- -

Scores can be reported. Menu options are automatically added to each player group when a player joins a client slot or a CA unit. -Use the radio menu F10 to consult the scores while running the mission. -Scores can be reported for your user, or an overall score can be reported of all players currently active in the mission.

- -

1) Scoring#SCORING class, extends Base#BASE

- -

1.1) Set the destroy score or penalty scale

- -

Score scales can be set for scores granted when enemies or friendlies are destroyed. -Use the method SCORING.SetScaleDestroyScore() to set the scale of enemy destroys (positive destroys). -Use the method SCORING.SetScaleDestroyPenalty() to set the scale of friendly destroys (negative destroys).

- -
 local Scoring = SCORING:New( "Scoring File" )
- Scoring:SetScaleDestroyScore( 10 )
- Scoring:SetScaleDestroyPenalty( 40 )
-
- -

The above sets the scale for valid scores to 10. So scores will be given in a scale from 0 to 10. -The penalties will be given in a scale from 0 to 40.

- -

1.2) Define special targets that will give extra scores.

- -

Special targets can be set that will give extra scores to the players when these are destroyed. -Use the methods SCORING.AddUnitScore() and SCORING.RemoveUnitScore() to specify a special additional score for a specific Units.
-Use the methods SCORING.AddStaticScore() and SCORING.RemoveStaticScore() to specify a special additional score for a specific Statics.
-Use the method SCORING.SetGroupGroup() to specify a special additional score for a specific Groups.

- -
 local Scoring = SCORING:New( "Scoring File" )
- Scoring:AddUnitScore( UNIT:FindByName( "Unit #001" ), 200 )
- Scoring:AddStaticScore( STATIC:FindByName( "Static #1" ), 100 )
-
- -

The above grants an additional score of 200 points for Unit #001 and an additional 100 points of Static #1 if these are destroyed. -Note that later in the mission, one can remove these scores set, for example, when the a goal achievement time limit is over. -For example, this can be done as follows:

- -
 Scoring:RemoveUnitScore( UNIT:FindByName( "Unit #001" ) )
-
- -

1.3) Define destruction zones that will give extra scores.

- -

Define zones of destruction. Any object destroyed within the zone of the given category will give extra points. -Use the method SCORING.AddZoneScore() to add a Zone for additional scoring.
-Use the method SCORING.RemoveZoneScore() to remove a Zone for additional scoring.
-There are interesting variations that can be achieved with this functionality. For example, if the Zone is a Zone#ZONE_UNIT, -then the zone is a moving zone, and anything destroyed within that Zone will generate points. -The other implementation could be to designate a scenery target (a building) in the mission editor surrounded by a Zone, -just large enough around that building.

- -

1.4) Add extra Goal scores upon an event or a condition.

- -

A mission has goals and achievements. The scoring system provides an API to set additional scores when a goal or achievement event happens. -Use the method SCORING.AddGoalScore() to add a score for a Player at any time in your mission.

- -

1.5) Configure fratricide level.

- -

When a player commits too much damage to friendlies, his penalty score will reach a certain level. -Use the method SCORING.SetFratricide() to define the level when a player gets kicked.
-By default, the fratricide level is the default penalty mutiplier * 2 for the penalty score.

- -

1.6) Penalty score when a player changes the coalition.

- -

When a player changes the coalition, he can receive a penalty score. -Use the method SCORING.SetCoalitionChangePenalty() to define the penalty when a player changes coalition. -By default, the penalty for changing coalition is the default penalty scale.

- -

1.8) Define output CSV files.

- -

The CSV file is given the name of the string given in the SCORING.New{} constructor, followed by the .csv extension. -The file is incrementally saved in the **\Saved Games\DCS\Logs** folder, and has a time stamp indicating each mission run. -See the following example:

- -
local ScoringFirstMission = SCORING:New( "FirstMission" )
-local ScoringSecondMission = SCORING:New( "SecondMission" )
-
- -

The above documents that 2 Scoring objects are created, ScoringFirstMission and ScoringSecondMission.

- -

1.9) Configure messages.

- -

When players hit or destroy targets, messages are sent. -Various methods exist to configure:

- -
    -
  • Which messages are sent upon the event.
  • -
  • Which audience receives the message.
  • -
- -

1.9.1) Configure the messages sent upon the event.

- -

Use the following methods to configure when to send messages. By default, all messages are sent.

- - - -

1.9.2) Configure the audience of the messages.

- -

Use the following methods to configure the audience of the messages. By default, the messages are sent to all players in the mission.

- - - - -
- -

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-02-26: Initial class and API.

- -
- -

AUTHORS and CONTRIBUTIONS

- -

Contributions:

- -
    -
  • Wingthor (TAW): Testing & Advice.
  • -
  • Dutch-Baron (TAW): Testing & Advice.
  • -
  • **Whisper: Testing and Advice.
  • -
- -

Authors:

- -
    -
  • FlightControl: Concept, Design & Programming.
  • -
- - -

Global(s)

- - - - - - - - - - - - - - - - - -
SCORING - -
nHours - -
nMins - -
nSecs - -
-

Type SCORING

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SCORING:AddGoalScore(PlayerUnit, GoalTag, Text, Score) -

Add a goal score for a player.

-
SCORING:AddScoreGroup(ScoreGroup, Score) -

Specify a special additional score for a Group.

-
SCORING:AddStaticScore(ScoreStatic, Score) -

Add a Static for additional scoring when the Static is destroyed.

-
SCORING:AddUnitScore(ScoreUnit, Score) -

Add a Unit for additional scoring when the Unit is destroyed.

-
SCORING:AddZoneScore(ScoreZone, Score) -

Add a Zone to define additional scoring when any object is destroyed in that zone.

-
SCORING.ClassID - -
SCORING.ClassName - -
SCORING:CloseCSV() - -
SCORING.CoalitionChangePenalty - -
SCORING.Fratricide - -
SCORING.GameName - -
SCORING:IfMessagesDestroy() -

If to send messages after a target has been destroyed.

-
SCORING:IfMessagesHit() -

If to send messages after a target has been hit.

-
SCORING:IfMessagesScore() -

If to send messages after a target has been destroyed and receives additional scores.

-
SCORING:IfMessagesToAll() -

If to send messages to all players.

-
SCORING:IfMessagesToCoalition() -

If to send messages to only those players within the same coalition as the player.

-
SCORING:IfMessagesZone() -

If to send messages after a target has been hit in a zone, and additional score is received.

-
SCORING.MessagesAudience - -
SCORING.MessagesDestroy - -
SCORING.MessagesHit - -
SCORING.MessagesScore - -
SCORING.MessagesZone - -
SCORING:New(GameName) -

Creates a new SCORING object to administer the scoring achieved by players.

-
SCORING:OnEventPlayerEnterUnit(Event) -

Handles the OnPlayerEnterUnit event for the scoring.

-
SCORING:OnEventPlayerLeaveUnit(Event) -

Handles the OnPlayerLeaveUnit event for the scoring.

-
SCORING:OpenCSV(ScoringCSV) -

Opens a score CSV file to log the scores.

-
SCORING.Players -

A collection of the current players that have joined the game.

-
SCORING:RemoveStaticScore(ScoreStatic) -

Removes a Static for additional scoring when the Static is destroyed.

-
SCORING:RemoveUnitScore(ScoreUnit) -

Removes a Unit for additional scoring when the Unit is destroyed.

-
SCORING:RemoveZoneScore(ScoreZone) -

Remove a Zone for additional scoring.

-
SCORING:ReportDetailedPlayerCoalitionChanges(PlayerName) -

Produce detailed report of player penalty scores because of changing the coalition.

-
SCORING:ReportDetailedPlayerDestroys(PlayerName) -

Produce detailed report of player destroy scores.

-
SCORING:ReportDetailedPlayerGoals(PlayerName) -

Produce detailed report of player goal scores.

-
SCORING:ReportDetailedPlayerHits(PlayerName) -

Produce detailed report of player hit scores.

-
SCORING:ReportDetailedPlayerMissions(PlayerName) -

Produce detailed report of player penalty scores because of changing the coalition.

-
SCORING:ReportScoreAllSummary(PlayerGroup) -

Report all players score

-
SCORING:ReportScoreGroupDetailed(PlayerGroup) -

Report Group Score Detailed

-
SCORING:ReportScoreGroupSummary(PlayerGroup) -

Report Group Score Summary

-
SCORING.RunTime - -
SCORING.ScaleDestroyPenalty - -
SCORING.ScaleDestroyScore - -
SCORING:ScoreCSV(PlayerName, TargetPlayerName, ScoreType, ScoreTimes, ScoreAmount, PlayerUnitName, PlayerUnitCoalition, PlayerUnitCategory, PlayerUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType) -

Registers a score for a player.

-
SCORING.ScoringCSV - -
SCORING.ScoringObjects - -
SCORING.ScoringZones - -
SCORING:SecondsToClock(sSeconds) - -
SCORING:SetCoalitionChangePenalty(CoalitionChangePenalty) -

When a player changes the coalition, he can receive a penalty score.

-
SCORING:SetFratricide(Fratricide) -

When a player commits too much damage to friendlies, his penalty score will reach a certain level.

-
SCORING:SetMessagesDestroy(OnOff) -

Configure to send messages after a target has been destroyed.

-
SCORING:SetMessagesHit(OnOff) -

Configure to send messages after a target has been hit.

-
SCORING:SetMessagesScore(OnOff) -

Configure to send messages after a target has been destroyed and receives additional scores.

-
SCORING:SetMessagesToAll() -

Configure to send messages to all players.

-
SCORING:SetMessagesToCoalition() -

Configure to send messages to only those players within the same coalition as the player.

-
SCORING:SetMessagesZone(OnOff) -

Configure to send messages after a target has been hit in a zone, and additional score is received.

-
SCORING:SetScaleDestroyPenalty(Scale) -

Set the scale for scoring penalty destroys (friendly destroys).

-
SCORING:SetScaleDestroyScore(Scale) -

Set the scale for scoring valid destroys (enemy destroys).

-
SCORING:_AddMissionScore(Mission, PlayerUnit, Text, Score) -

Registers Mission Scores for possible multiple players that contributed in the Mission.

-
SCORING:_AddMissionTaskScore(Mission, PlayerUnit, Text, Score) -

Registers Scores the players completing a Mission Task.

-
SCORING:_AddPlayerFromUnit(UnitData) -

Add a new player entering a Unit.

-
SCORING:_EventOnDeadOrCrash(Event) -

Track DEAD or CRASH events for the scoring.

-
SCORING:_EventOnHit(Event) -

Handles the OnHit event for the scoring.

-
- -

Global(s)

-
-
- - #SCORING - -SCORING - -
-
- - - -
-
-
-
- - - -nHours - -
-
- - - -
-
-
-
- - - -nMins - -
-
- - - -
-
-
-
- - - -nSecs - -
-
- - - -
-
-

Type Scoring

- -

Type SCORING

- -

The Scoring class

- -

Field(s)

-
-
- - -SCORING:AddGoalScore(PlayerUnit, GoalTag, Text, Score) - -
-
- -

Add a goal score for a player.

- - -

The method takes the PlayerUnit for which the Goal score needs to be set. -The GoalTag is a string or identifier that is taken into the CSV file scoring log to identify the goal. -A free text can be given that is shown to the players. -The Score can be both positive and negative.

- -

Parameters

-
    -
  • - -

    Wrapper.Unit#UNIT PlayerUnit : -The Unit of the Player. Other Properties for the scoring are taken from this PlayerUnit, like coalition, type etc.

    - -
  • -
  • - -

    #string GoalTag : -The string or identifier that is used in the CSV file to identify the goal (sort or group later in Excel).

    - -
  • -
  • - -

    #string Text : -A free text that is shown to the players.

    - -
  • -
  • - -

    #number Score : -The score can be both positive or negative ( Penalty ).

    - -
  • -
-
-
-
-
- - -SCORING:AddScoreGroup(ScoreGroup, Score) - -
-
- -

Specify a special additional score for a Group.

- -

Parameters

- -

Return value

- -

#SCORING:

- - -
-
-
-
- - -SCORING:AddStaticScore(ScoreStatic, Score) - -
-
- -

Add a Static for additional scoring when the Static is destroyed.

- - -

Note that if there was already a Static declared within the scoring with the same name, -then the old Static will be replaced with the new Static.

- -

Parameters

-
    -
  • - -

    Wrapper.Static#UNIT ScoreStatic : -The Static for which the Score needs to be given.

    - -
  • -
  • - -

    #number Score : -The Score value.

    - -
  • -
-

Return value

- -

#SCORING:

- - -
-
-
-
- - -SCORING:AddUnitScore(ScoreUnit, Score) - -
-
- -

Add a Unit for additional scoring when the Unit is destroyed.

- - -

Note that if there was already a Unit declared within the scoring with the same name, -then the old Unit will be replaced with the new Unit.

- -

Parameters

-
    -
  • - -

    Wrapper.Unit#UNIT ScoreUnit : -The Unit for which the Score needs to be given.

    - -
  • -
  • - -

    #number Score : -The Score value.

    - -
  • -
-

Return value

- -

#SCORING:

- - -
-
-
-
- - -SCORING:AddZoneScore(ScoreZone, Score) - -
-
- -

Add a Zone to define additional scoring when any object is destroyed in that zone.

- - -

Note that if a Zone with the same name is already within the scoring added, the Zone (type) and Score will be replaced! -This allows for a dynamic destruction zone evolution within your mission.

- -

Parameters

-
    -
  • - -

    Core.Zone#ZONE_BASE ScoreZone : -The Zone which defines the destruction score perimeters. -Note that a zone can be a polygon or a moving zone.

    - -
  • -
  • - -

    #number Score : -The Score value.

    - -
  • -
-

Return value

- -

#SCORING:

- - -
-
-
-
- - #number - -SCORING.ClassID - -
-
- - - -
-
-
-
- - #string - -SCORING.ClassName - -
-
- - - -
-
-
-
- - -SCORING:CloseCSV() - -
-
- - - -
-
-
-
- - - -SCORING.CoalitionChangePenalty - -
-
- - - -
-
-
-
- - - -SCORING.Fratricide - -
-
- - - -
-
-
-
- - - -SCORING.GameName - -
-
- - - -
-
-
-
- - -SCORING:IfMessagesDestroy() - -
-
- -

If to send messages after a target has been destroyed.

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -SCORING:IfMessagesHit() - -
-
- -

If to send messages after a target has been hit.

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -SCORING:IfMessagesScore() - -
-
- -

If to send messages after a target has been destroyed and receives additional scores.

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -SCORING:IfMessagesToAll() - -
-
- -

If to send messages to all players.

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -SCORING:IfMessagesToCoalition() - -
-
- -

If to send messages to only those players within the same coalition as the player.

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -SCORING:IfMessagesZone() - -
-
- -

If to send messages after a target has been hit in a zone, and additional score is received.

- -

Return value

- -

#boolean:

- - -
-
-
-
- - #number - -SCORING.MessagesAudience - -
-
- - - -
-
-
-
- - - -SCORING.MessagesDestroy - -
-
- - - -
-
-
-
- - - -SCORING.MessagesHit - -
-
- - - -
-
-
-
- - - -SCORING.MessagesScore - -
-
- - - -
-
-
-
- - - -SCORING.MessagesZone - -
-
- - - -
-
-
-
- - -SCORING:New(GameName) - -
-
- -

Creates a new SCORING object to administer the scoring achieved by players.

- -

Parameter

-
    -
  • - -

    #string GameName : -The name of the game. This name is also logged in the CSV score file.

    - -
  • -
-

Return value

- -

#SCORING: -self

- -

Usage:

-
-- Define a new scoring object for the mission Gori Valley.
-ScoringObject = SCORING:New( "Gori Valley" )
- -
-
-
-
- - -SCORING:OnEventPlayerEnterUnit(Event) - -
-
- -

Handles the OnPlayerEnterUnit event for the scoring.

- -

Parameter

- -
-
-
-
- - -SCORING:OnEventPlayerLeaveUnit(Event) - -
-
- -

Handles the OnPlayerLeaveUnit event for the scoring.

- -

Parameter

- -
-
-
-
- - -SCORING:OpenCSV(ScoringCSV) - -
-
- -

Opens a score CSV file to log the scores.

- -

Parameter

-
    -
  • - -

    #string ScoringCSV :

    - -
  • -
-

Return value

- -

#SCORING: -self

- -

Usage:

-
-- Open a new CSV file to log the scores of the game Gori Valley. Let the name of the CSV file begin with "Player Scores".
-ScoringObject = SCORING:New( "Gori Valley" )
-ScoringObject:OpenCSV( "Player Scores" )
- -
-
-
-
- - -SCORING.Players - -
-
- -

A collection of the current players that have joined the game.

- -
-
-
-
- - -SCORING:RemoveStaticScore(ScoreStatic) - -
-
- -

Removes a Static for additional scoring when the Static is destroyed.

- -

Parameter

- -

Return value

- -

#SCORING:

- - -
-
-
-
- - -SCORING:RemoveUnitScore(ScoreUnit) - -
-
- -

Removes a Unit for additional scoring when the Unit is destroyed.

- -

Parameter

- -

Return value

- -

#SCORING:

- - -
-
-
-
- - -SCORING:RemoveZoneScore(ScoreZone) - -
-
- -

Remove a Zone for additional scoring.

- - -

The scoring will search if any Zone is added with the given name, and will remove that zone from the scoring. -This allows for a dynamic destruction zone evolution within your mission.

- -

Parameter

-
    -
  • - -

    Core.Zone#ZONE_BASE ScoreZone : -The Zone which defines the destruction score perimeters. -Note that a zone can be a polygon or a moving zone.

    - -
  • -
-

Return value

- -

#SCORING:

- - -
-
-
-
- - -SCORING:ReportDetailedPlayerCoalitionChanges(PlayerName) - -
-
- -

Produce detailed report of player penalty scores because of changing the coalition.

- -

Parameter

-
    -
  • - -

    #string PlayerName : -The name of the player.

    - -
  • -
-

Return value

- -

#string: -The report.

- -
-
-
-
- - -SCORING:ReportDetailedPlayerDestroys(PlayerName) - -
-
- -

Produce detailed report of player destroy scores.

- -

Parameter

-
    -
  • - -

    #string PlayerName : -The name of the player.

    - -
  • -
-

Return value

- -

#string: -The report.

- -
-
-
-
- - -SCORING:ReportDetailedPlayerGoals(PlayerName) - -
-
- -

Produce detailed report of player goal scores.

- -

Parameter

-
    -
  • - -

    #string PlayerName : -The name of the player.

    - -
  • -
-

Return value

- -

#string: -The report.

- -
-
-
-
- - -SCORING:ReportDetailedPlayerHits(PlayerName) - -
-
- -

Produce detailed report of player hit scores.

- -

Parameter

-
    -
  • - -

    #string PlayerName : -The name of the player.

    - -
  • -
-

Return value

- -

#string: -The report.

- -
-
-
-
- - -SCORING:ReportDetailedPlayerMissions(PlayerName) - -
-
- -

Produce detailed report of player penalty scores because of changing the coalition.

- -

Parameter

-
    -
  • - -

    #string PlayerName : -The name of the player.

    - -
  • -
-

Return value

- -

#string: -The report.

- -
-
-
-
- - -SCORING:ReportScoreAllSummary(PlayerGroup) - -
-
- -

Report all players score

- -

Parameter

- -
-
-
-
- - -SCORING:ReportScoreGroupDetailed(PlayerGroup) - -
-
- -

Report Group Score Detailed

- -

Parameter

- -
-
-
-
- - -SCORING:ReportScoreGroupSummary(PlayerGroup) - -
-
- -

Report Group Score Summary

- -

Parameter

- -
-
-
-
- - - -SCORING.RunTime - -
-
- - - -
-
-
-
- - - -SCORING.ScaleDestroyPenalty - -
-
- - - -
-
-
-
- - - -SCORING.ScaleDestroyScore - -
-
- - - -
-
-
-
- - -SCORING:ScoreCSV(PlayerName, TargetPlayerName, ScoreType, ScoreTimes, ScoreAmount, PlayerUnitName, PlayerUnitCoalition, PlayerUnitCategory, PlayerUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType) - -
-
- -

Registers a score for a player.

- -

Parameters

-
    -
  • - -

    #string PlayerName : -The name of the player.

    - -
  • -
  • - -

    #string TargetPlayerName : -The name of the target player.

    - -
  • -
  • - -

    #string ScoreType : -The type of the score.

    - -
  • -
  • - -

    #string ScoreTimes : -The amount of scores achieved.

    - -
  • -
  • - -

    #string ScoreAmount : -The score given.

    - -
  • -
  • - -

    #string PlayerUnitName : -The unit name of the player.

    - -
  • -
  • - -

    #string PlayerUnitCoalition : -The coalition of the player unit.

    - -
  • -
  • - -

    #string PlayerUnitCategory : -The category of the player unit.

    - -
  • -
  • - -

    #string PlayerUnitType : -The type of the player unit.

    - -
  • -
  • - -

    #string TargetUnitName : -The name of the target unit.

    - -
  • -
  • - -

    #string TargetUnitCoalition : -The coalition of the target unit.

    - -
  • -
  • - -

    #string TargetUnitCategory : -The category of the target unit.

    - -
  • -
  • - -

    #string TargetUnitType : -The type of the target unit.

    - -
  • -
-

Return value

- -

#SCORING: -self

- -
-
-
-
- - - -SCORING.ScoringCSV - -
-
- - - -
-
-
-
- - - -SCORING.ScoringObjects - -
-
- - - - -

Additional Object scores

- -
-
-
-
- - - -SCORING.ScoringZones - -
-
- - - - -

Additional Zone scores.

- -
-
-
-
- - -SCORING:SecondsToClock(sSeconds) - -
-
- - - -

Parameter

-
    -
  • - -

    sSeconds :

    - -
  • -
-
-
-
-
- - -SCORING:SetCoalitionChangePenalty(CoalitionChangePenalty) - -
-
- -

When a player changes the coalition, he can receive a penalty score.

- - -

Use the method SCORING.SetCoalitionChangePenalty() to define the penalty when a player changes coalition. -By default, the penalty for changing coalition is the default penalty scale.

- -

Parameter

-
    -
  • - -

    #number CoalitionChangePenalty : -The amount of penalty that is given.

    - -
  • -
-

Return value

- -

#SCORING:

- - -
-
-
-
- - -SCORING:SetFratricide(Fratricide) - -
-
- -

When a player commits too much damage to friendlies, his penalty score will reach a certain level.

- - -

Use this method to define the level when a player gets kicked.
-By default, the fratricide level is the default penalty mutiplier * 2 for the penalty score.

- -

Parameter

-
    -
  • - -

    #number Fratricide : -The amount of maximum penalty that may be inflicted by a friendly player before he gets kicked.

    - -
  • -
-

Return value

- -

#SCORING:

- - -
-
-
-
- - -SCORING:SetMessagesDestroy(OnOff) - -
-
- -

Configure to send messages after a target has been destroyed.

- -

Parameter

-
    -
  • - -

    #boolean OnOff : -If true is given, the messages are sent.

    - -
  • -
-

Return value

- -

#SCORING:

- - -
-
-
-
- - -SCORING:SetMessagesHit(OnOff) - -
-
- -

Configure to send messages after a target has been hit.

- -

Parameter

-
    -
  • - -

    #boolean OnOff : -If true is given, the messages are sent.

    - -
  • -
-

Return value

- -

#SCORING:

- - -
-
-
-
- - -SCORING:SetMessagesScore(OnOff) - -
-
- -

Configure to send messages after a target has been destroyed and receives additional scores.

- -

Parameter

-
    -
  • - -

    #boolean OnOff : -If true is given, the messages are sent.

    - -
  • -
-

Return value

- -

#SCORING:

- - -
-
-
-
- - -SCORING:SetMessagesToAll() - -
-
- -

Configure to send messages to all players.

- -

Return value

- -

#SCORING:

- - -
-
-
-
- - -SCORING:SetMessagesToCoalition() - -
-
- -

Configure to send messages to only those players within the same coalition as the player.

- -

Return value

- -

#SCORING:

- - -
-
-
-
- - -SCORING:SetMessagesZone(OnOff) - -
-
- -

Configure to send messages after a target has been hit in a zone, and additional score is received.

- -

Parameter

-
    -
  • - -

    #boolean OnOff : -If true is given, the messages are sent.

    - -
  • -
-

Return value

- -

#SCORING:

- - -
-
-
-
- - -SCORING:SetScaleDestroyPenalty(Scale) - -
-
- -

Set the scale for scoring penalty destroys (friendly destroys).

- - -

A default calculated penalty is a value between 1 and 10. -The scale magnifies the scores given to the players.

- -

Parameter

-
    -
  • - -

    #number Scale : -The scale of the score given.

    - -
  • -
-

Return value

- -

#SCORING:

- - -
-
-
-
- - -SCORING:SetScaleDestroyScore(Scale) - -
-
- -

Set the scale for scoring valid destroys (enemy destroys).

- - -

A default calculated score is a value between 1 and 10. -The scale magnifies the scores given to the players.

- -

Parameter

-
    -
  • - -

    #number Scale : -The scale of the score given.

    - -
  • -
-
-
-
-
- - -SCORING:_AddMissionScore(Mission, PlayerUnit, Text, Score) - -
-
- -

Registers Mission Scores for possible multiple players that contributed in the Mission.

- -

Parameters

- -
-
-
-
- - -SCORING:_AddMissionTaskScore(Mission, PlayerUnit, Text, Score) - -
-
- -

Registers Scores the players completing a Mission Task.

- -

Parameters

- -
-
-
-
- - -SCORING:_AddPlayerFromUnit(UnitData) - -
-
- -

Add a new player entering a Unit.

- -

Parameter

- -
-
-
-
- - -SCORING:_EventOnDeadOrCrash(Event) - -
-
- -

Track DEAD or CRASH events for the scoring.

- -

Parameter

- -
-
-
-
- - -SCORING:_EventOnHit(Event) - -
-
- -

Handles the OnHit event for the scoring.

- -

Parameter

- -
-
- -
- -
- - diff --git a/docs/Documentation/Sead.html b/docs/Documentation/Sead.html deleted file mode 100644 index 06dcb8af4..000000000 --- a/docs/Documentation/Sead.html +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Sead

- -

Provides defensive behaviour to a set of SAM sites within a running Mission.

- -

Global(s)

- - - - - -
SEAD - -
-

Type SEAD

- - - - - - - - - - - - - - - - - - - - - -
SEAD.ClassName - -
SEAD.New(table, self, SEADGroupPrefixes) -

Creates the main object which is handling defensive actions for SA sites or moving SA vehicles.

-
SEAD.OnEventShot(#, EventData, self) -

Detects if an SA site was shot with an anti radiation missile.

-
SEAD.SEADGroupPrefixes - -
SEAD.TargetSkill - -
- -

Global(s)

-
-
- - #SEAD - -SEAD - -
-
- - - -
-
-

Type Sead

- -

Type SEAD

- -

The SEAD class

- -

Field(s)

-
-
- - #string - -SEAD.ClassName - -
-
- - - -
-
-
-
- - -SEAD.New(table, self, SEADGroupPrefixes) - -
-
- -

Creates the main object which is handling defensive actions for SA sites or moving SA vehicles.

- - -

When an anti radiation missile is fired (KH-58, KH-31P, KH-31A, KH-25MPU, HARM missiles), the SA will shut down their radars and will take evasive actions... -Chances are big that the missile will miss.

- -

Parameters

-
    -
  • - -

    table : -string,...}|string SEADGroupPrefixes which is a table of Prefixes of the SA Groups in the DCSRTE on which evasive actions need to be taken.

    - -
  • -
  • - -

    self :

    - -
  • -
  • - -

    SEADGroupPrefixes :

    - -
  • -
-

Return value

- - -

SEAD

- -

Usage:

-
-- CCCP SEAD Defenses
--- Defends the Russian SA installations from SEAD attacks.
-SEAD_RU_SAM_Defenses = SEAD:New( { 'RU SA-6 Kub', 'RU SA-6 Defenses', 'RU MI-26 Troops', 'RU Attack Gori' } )
- -
-
-
-
- - -SEAD.OnEventShot(#, EventData, self) - -
-
- -

Detects if an SA site was shot with an anti radiation missile.

- - -

In this case, take evasive actions based on the skill level set within the ME.

- -

Parameters

- -
-
-
-
- - - -SEAD.SEADGroupPrefixes - -
-
- - - -
-
-
-
- - - -SEAD.TargetSkill - -
-
- - - -
-
- -
- -
- - diff --git a/docs/Documentation/Set.html b/docs/Documentation/Set.html deleted file mode 100644 index dff2ef289..000000000 --- a/docs/Documentation/Set.html +++ /dev/null @@ -1,4577 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Set

- -

Core - SET_ classes define collections of objects to perform bulk actions and logically group objects.

- - - -

Banner Image

- -
- -

SET_ classes group objects of the same type into a collection, which is either:

- -
    -
  • Manually managed using the :Add...() or :Remove...() methods. The initial SET can be filtered with the **SET_BASE.FilterOnce()** method
  • -
  • Dynamically updated when new objects are created or objects are destroyed using the **SET_BASE.FilterStart()** method.
  • -
- -

Various types of SET_ classes are available:

- - - -

These classes are derived from #SET_BASE, which contains the main methods to manage SETs.

- -

A multitude of other methods are available in SET_ classes that allow to:

- -
    -
  • Validate the presence of objects in the SET.
  • -
  • Trigger events when objects in the SET change a zone presence.
  • -
- -

Authors:

- -
    -
  • FlightControl : Design & Programming
  • -
- -

Contributions:

- - - -

Global(s)

- - - - - - - - - - - - - - - - - - - - - - - - - -
SET_AIRBASE -

5) SET_AIRBASE class, extends Set#SET_BASE

- -

Mission designers can use the Set#SET_AIRBASE class to build sets of airbases optionally belonging to certain:

- -
    -
  • Coalitions
  • -
- -

5.1) SET_AIRBASE constructor

- -

Create a new SET_AIRBASE object with the SET_AIRBASE.New method:

- - -
SET_BASE -

1) SET_BASE class, extends Base#BASE

-

The Set#SET_BASE class defines the core functions that define a collection of objects.

-
SET_CARGO -

SET_CARGO class, extends Set#SET_BASE

- -

Mission designers can use the Set#SET_CARGO class to build sets of cargos optionally belonging to certain:

- -
    -
  • Coalitions
  • -
  • Types
  • -
  • Name or Prefix
  • -
- -

SET_CARGO constructor

- -

Create a new SET_CARGO object with the SET_CARGO.New method:

- - -
SET_CLIENT -

4) SET_CLIENT class, extends Set#SET_BASE

- -

Mission designers can use the Set#SET_CLIENT class to build sets of units belonging to certain:

- -
    -
  • Coalitions
  • -
  • Categories
  • -
  • Countries
  • -
  • Client types
  • -
  • Starting with certain prefix strings.
  • -
-
SET_GROUP -

2) SET_GROUP class, extends Set#SET_BASE

- -

Mission designers can use the Set#SET_GROUP class to build sets of groups belonging to certain:

- -
    -
  • Coalitions
  • -
  • Categories
  • -
  • Countries
  • -
  • Starting with certain prefix strings.
  • -
-
SET_UNIT -

3) SET_UNIT class, extends Set#SET_BASE

- -

Mission designers can use the SET_UNIT class to build sets of units belonging to certain:

- -
    -
  • Coalitions
  • -
  • Categories
  • -
  • Countries
  • -
  • Unit types
  • -
  • Starting with certain prefix strings.
  • -
-
-

Type SET_AIRBASE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SET_AIRBASE:AddAirbasesByName(AddAirbaseNames) -

Add AIRBASEs to SET_AIRBASE.

-
SET_AIRBASE:AddInDatabase(Event) -

Handles the Database to check on an event (birth) that the Object was added in the Database.

-
SET_AIRBASE:FilterCategories(Categories) -

Builds a set of airbases out of categories.

-
SET_AIRBASE:FilterCoalitions(Coalitions) -

Builds a set of airbases of coalitions.

-
SET_AIRBASE:FilterStart() -

Starts the filtering.

-
SET_AIRBASE:FindAirbase(AirbaseName) -

Finds a Airbase based on the Airbase Name.

-
SET_AIRBASE:FindInDatabase(Event) -

Handles the Database to check on any event that Object exists in the Database.

-
SET_AIRBASE:FindNearestAirbaseFromPointVec2(PointVec2) -

Iterate the SET_AIRBASE while identifying the nearest Airbase#AIRBASE from a Point#POINT_VEC2.

-
SET_AIRBASE:ForEachAirbase(IteratorFunction, ...) -

Iterate the SET_AIRBASE and call an interator function for each AIRBASE, providing the AIRBASE and optional parameters.

-
SET_AIRBASE:IsIncludeObject(MAirbase) - -
SET_AIRBASE:New() -

Creates a new SET_AIRBASE object, building a set of airbases belonging to a coalitions and categories.

-
SET_AIRBASE:RemoveAirbasesByName(RemoveAirbaseNames) -

Remove AIRBASEs from SET_AIRBASE.

-
- -

Type SET_BASE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SET_BASE:Add(ObjectName, Object) -

Adds a Base#BASE object in the Set#SET_BASE, using a given ObjectName as the index.

-
SET_BASE:AddObject(Object) -

Adds a Base#BASE object in the Set#SET_BASE, using the Object Name as the index.

-
SET_BASE.CallScheduler - -
SET_BASE:Count() -

Retrieves the amount of objects in the Set#SET_BASE and derived classes.

-
SET_BASE.Database - -
SET_BASE.Filter - -
SET_BASE:FilterOnce() -

Filters for the defined collection.

-
SET_BASE:FilterStop() -

Stops the filtering for the defined collection.

-
SET_BASE:FindNearestObjectFromPointVec2(PointVec2) -

Iterate the SET_BASE while identifying the nearest object from a Point#POINT_VEC2.

-
SET_BASE:Flush() -

Flushes the current SET_BASE contents in the log ...

-
SET_BASE:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments) -

Iterate the SETBASE and derived classes and call an iterator function for the given SETBASE, providing the Object for each element within the set and optional parameters.

-
SET_BASE:Get(ObjectName) -

Gets a Base#BASE object from the Set#SET_BASE and derived classes, based on the Object Name.

-
SET_BASE:GetFirst() -

Gets the first object from the Set#SET_BASE and derived classes.

-
SET_BASE:GetLast() -

Gets the last object from the Set#SET_BASE and derived classes.

-
SET_BASE:GetRandom() -

Gets a random object from the Set#SET_BASE and derived classes.

-
SET_BASE:GetSet() -

Gets the Set.

-
SET_BASE:IsIncludeObject(Object) -

Decides whether to include the Object

-
SET_BASE.List - -
SET_BASE:New(Database) -

Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

-
SET_BASE:Remove(ObjectName) -

Removes a Base#BASE object from the Set#SET_BASE and derived classes, based on the Object Name.

-
SET_BASE.Set - -
SET_BASE:SetDatabase(BaseSet) -

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

-
SET_BASE:SetIteratorIntervals(YieldInterval, TimeInterval) -

Define the SET iterator "yield interval" and the "time interval".

-
SET_BASE.TimeInterval - -
SET_BASE.YieldInterval - -
SET_BASE:_EventOnBirth(Event) -

Handles the OnBirth event for the Set.

-
SET_BASE:_EventOnDeadOrCrash(Event) -

Handles the OnDead or OnCrash event for alive units set.

-
SET_BASE:_EventOnPlayerEnterUnit(Event) -

Handles the OnPlayerEnterUnit event to fill the active players table (with the unit filter applied).

-
SET_BASE:_EventOnPlayerLeaveUnit(Event) -

Handles the OnPlayerLeaveUnit event to clean the active players table.

-
SET_BASE:_FilterStart() -

Starts the filtering for the defined collection.

-
SET_BASE:_Find(ObjectName) -

Finds an Base#BASE object based on the object Name.

-
- -

Type SET_CARGO

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SET_CARGO:AddCargosByName(AddCargoNames) -

Add CARGOs to SET_CARGO.

-
SET_CARGO:AddInDatabase(Event) -

Handles the Database to check on an event (birth) that the Object was added in the Database.

-
SET_CARGO:FilterCoalitions(Coalitions) -

Builds a set of cargos of coalitions.

-
SET_CARGO:FilterCountries(Countries) -

Builds a set of cargos of defined countries.

-
SET_CARGO:FilterPrefixes(Prefixes) -

Builds a set of cargos of defined cargo prefixes.

-
SET_CARGO:FilterStart() -

Starts the filtering.

-
SET_CARGO:FilterTypes(Types) -

Builds a set of cargos of defined cargo types.

-
SET_CARGO:FindCargo(CargoName) -

Finds a Cargo based on the Cargo Name.

-
SET_CARGO:FindInDatabase(Event) -

Handles the Database to check on any event that Object exists in the Database.

-
SET_CARGO:FindNearestCargoFromPointVec2(PointVec2) -

Iterate the SET_CARGO while identifying the nearest Cargo#CARGO from a Point#POINT_VEC2.

-
SET_CARGO:ForEachCargo(IteratorFunction, ...) -

Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.

-
SET_CARGO:IsIncludeObject(MCargo) - -
SET_CARGO:New() -

Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.

-
SET_CARGO:OnEventDeleteCargo(EventData) -

Handles the OnDead or OnCrash event for alive units set.

-
SET_CARGO:OnEventNewCargo(EventData) -

Handles the OnEventNewCargo event for the Set.

-
SET_CARGO:RemoveCargosByName(RemoveCargoNames) -

Remove CARGOs from SET_CARGO.

-
- -

Type SET_CLIENT

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SET_CLIENT:AddClientsByName(AddClientNames) -

Add CLIENT(s) to SET_CLIENT.

-
SET_CLIENT:AddInDatabase(Event) -

Handles the Database to check on an event (birth) that the Object was added in the Database.

-
SET_CLIENT:FilterCategories(Categories) -

Builds a set of clients out of categories.

-
SET_CLIENT:FilterCoalitions(Coalitions) -

Builds a set of clients of coalitions.

-
SET_CLIENT:FilterCountries(Countries) -

Builds a set of clients of defined countries.

-
SET_CLIENT:FilterPrefixes(Prefixes) -

Builds a set of clients of defined client prefixes.

-
SET_CLIENT:FilterStart() -

Starts the filtering.

-
SET_CLIENT:FilterTypes(Types) -

Builds a set of clients of defined client types.

-
SET_CLIENT:FindClient(ClientName) -

Finds a Client based on the Client Name.

-
SET_CLIENT:FindInDatabase(Event) -

Handles the Database to check on any event that Object exists in the Database.

-
SET_CLIENT:ForEachClient(IteratorFunction, ...) -

Iterate the SET_CLIENT and call an interator function for each alive CLIENT, providing the CLIENT and optional parameters.

-
SET_CLIENT:ForEachClientInZone(ZoneObject, IteratorFunction, ...) -

Iterate the SET_CLIENT and call an iterator function for each alive CLIENT presence completely in a Zone, providing the CLIENT and optional parameters to the called function.

-
SET_CLIENT:ForEachClientNotInZone(ZoneObject, IteratorFunction, ...) -

Iterate the SET_CLIENT and call an iterator function for each alive CLIENT presence not in a Zone, providing the CLIENT and optional parameters to the called function.

-
SET_CLIENT:IsIncludeObject(MClient) - -
SET_CLIENT:New() -

Creates a new SET_CLIENT object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names.

-
SET_CLIENT:RemoveClientsByName(RemoveClientNames) -

Remove CLIENT(s) from SET_CLIENT.

-
- -

Type SET_GROUP

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SET_GROUP:AddGroupsByName(AddGroupNames) -

Add GROUP(s) to SET_GROUP.

-
SET_GROUP:AddInDatabase(Event) -

Handles the Database to check on an event (birth) that the Object was added in the Database.

-
SET_GROUP:FilterCategories(Categories) -

Builds a set of groups out of categories.

-
SET_GROUP:FilterCoalitions(Coalitions) -

Builds a set of groups of coalitions.

-
SET_GROUP:FilterCountries(Countries) -

Builds a set of groups of defined countries.

-
SET_GROUP:FilterPrefixes(Prefixes) -

Builds a set of groups of defined GROUP prefixes.

-
SET_GROUP:FilterStart() -

Starts the filtering.

-
SET_GROUP:FindGroup(GroupName) -

Finds a Group based on the Group Name.

-
SET_GROUP:FindInDatabase(Event) -

Handles the Database to check on any event that Object exists in the Database.

-
SET_GROUP:ForEachGroup(IteratorFunction, ...) -

Iterate the SET_GROUP and call an iterator function for each alive GROUP, providing the GROUP and optional parameters.

-
SET_GROUP:ForEachGroupCompletelyInZone(ZoneObject, IteratorFunction, ...) -

Iterate the SET_GROUP and call an iterator function for each alive GROUP presence completely in a Zone, providing the GROUP and optional parameters to the called function.

-
SET_GROUP:ForEachGroupNotInZone(ZoneObject, IteratorFunction, ...) -

Iterate the SET_GROUP and call an iterator function for each alive GROUP presence not in a Zone, providing the GROUP and optional parameters to the called function.

-
SET_GROUP:ForEachGroupPartlyInZone(ZoneObject, IteratorFunction, ...) -

Iterate the SET_GROUP and call an iterator function for each alive GROUP presence partly in a Zone, providing the GROUP and optional parameters to the called function.

-
SET_GROUP:IsIncludeObject(MooseGroup) - -
SET_GROUP:New() -

Creates a new SET_GROUP object, building a set of groups belonging to a coalitions, categories, countries, types or with defined prefix names.

-
SET_GROUP:RemoveGroupsByName(RemoveGroupNames) -

Remove GROUP(s) from SET_GROUP.

-
- -

Type SET_UNIT

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SET_UNIT:AddInDatabase(Event) -

Handles the Database to check on an event (birth) that the Object was added in the Database.

-
SET_UNIT:AddUnit(AddUnit) -

Add UNIT(s) to SET_UNIT.

-
SET_UNIT:AddUnitsByName(AddUnitNames) -

Add UNIT(s) to SET_UNIT.

-
SET_UNIT:CalculateThreatLevelA2G() -

Calculate the maxium A2G threat level of the SET_UNIT.

-
SET_UNIT:FilterCategories(Categories) -

Builds a set of units out of categories.

-
SET_UNIT:FilterCoalitions(Coalitions) -

Builds a set of units of coalitions.

-
SET_UNIT:FilterCountries(Countries) -

Builds a set of units of defined countries.

-
SET_UNIT:FilterHasRadar(RadarTypes) -

Builds a set of units having a radar of give types.

-
SET_UNIT:FilterHasSEAD() -

Builds a set of SEADable units.

-
SET_UNIT:FilterPrefixes(Prefixes) -

Builds a set of units of defined unit prefixes.

-
SET_UNIT:FilterStart() -

Starts the filtering.

-
SET_UNIT:FilterTypes(Types) -

Builds a set of units of defined unit types.

-
SET_UNIT:FindInDatabase(Event) -

Handles the Database to check on any event that Object exists in the Database.

-
SET_UNIT:FindUnit(UnitName) -

Finds a Unit based on the Unit Name.

-
SET_UNIT:ForEachUnit(IteratorFunction, ...) -

Iterate the SET_UNIT and call an interator function for each alive UNIT, providing the UNIT and optional parameters.

-
SET_UNIT:ForEachUnitCompletelyInZone(ZoneObject, IteratorFunction, ...) -

Iterate the SET_UNIT and call an iterator function for each alive UNIT presence completely in a Zone, providing the UNIT and optional parameters to the called function.

-
SET_UNIT:ForEachUnitNotInZone(ZoneObject, IteratorFunction, ...) -

Iterate the SET_UNIT and call an iterator function for each alive UNIT presence not in a Zone, providing the UNIT and optional parameters to the called function.

-
SET_UNIT:GetTypeNames(Delimiter) -

Retrieve the type names of the Units in the SET, delimited by an optional delimiter.

-
SET_UNIT:GetUnitThreatLevels() -

Returns map of unit threat levels.

-
SET_UNIT:GetUnitTypes() -

Returns map of unit types.

-
SET_UNIT:GetUnitTypesText() -

Returns a comma separated string of the unit types with a count in the Set.

-
SET_UNIT:HasFriendlyUnits(FriendlyCoalition) -

Returns if the Set has friendly ground units.

-
SET_UNIT:HasGroundUnits() -

Returns if the Set has ground targets.

-
SET_UNIT:HasRadar(RadarType) -

Returns if the Set has targets having a radar (of a given type).

-
SET_UNIT:HasSEAD() -

Returns if the Set has targets that can be SEADed.

-
SET_UNIT:IsIncludeObject(MUnit) - -
SET_UNIT:New() -

Creates a new SET_UNIT object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

-
SET_UNIT:RemoveUnitsByName(RemoveUnitNames) -

Remove UNIT(s) from SET_UNIT.

-
- -

Global(s)

-
-
- - #SET_AIRBASE - -SET_AIRBASE - -
-
- -

5) SET_AIRBASE class, extends Set#SET_BASE

- -

Mission designers can use the Set#SET_AIRBASE class to build sets of airbases optionally belonging to certain:

- -
    -
  • Coalitions
  • -
- -

5.1) SET_AIRBASE constructor

- -

Create a new SET_AIRBASE object with the SET_AIRBASE.New method:

- - - - -

-

5.2) Add or Remove AIRBASEs from SET_AIRBASE

- -

AIRBASEs can be added and removed using the Set#SET_AIRBASE.AddAirbasesByName and Set#SET_AIRBASE.RemoveAirbasesByName respectively. -These methods take a single AIRBASE name or an array of AIRBASE names to be added or removed from SET_AIRBASE.

- -

5.3) SET_AIRBASE filter criteria

- -

You can set filter criteria to define the set of clients within the SET_AIRBASE. -Filter criteria are defined by:

- - - -

Once the filter criteria have been set for the SET_AIRBASE, you can start filtering using:

- - - -

5.4) SET_AIRBASE iterators

- -

Once the filters have been defined and the SETAIRBASE has been built, you can iterate the SETAIRBASE with the available iterator methods. -The iterator methods will walk the SETAIRBASE set, and call for each airbase within the set a function that you provide. -The following iterator methods are currently available within the SETAIRBASE:

- - - -
- -
-
-
-
- - #SET_BASE - -SET_BASE - -
-
- -

1) SET_BASE class, extends Base#BASE

-

The Set#SET_BASE class defines the core functions that define a collection of objects.

- - -

A SET provides iterators to iterate the SET, but will temporarily yield the ForEach interator loop at defined "intervals" to the mail simulator loop. -In this way, large loops can be done while not blocking the simulator main processing loop. -The default "yield interval" is after 10 objects processed. -The default "time interval" is after 0.001 seconds.

- -

1.1) Add or remove objects from the SET

- -

Some key core functions are Set#SET_BASE.Add and Set#SET_BASE.Remove to add or remove objects from the SET in your logic.

- -

1.2) Define the SET iterator "yield interval" and the "time interval"

- -

Modify the iterator intervals with the Set#SET_BASE.SetInteratorIntervals method. -You can set the "yield interval", and the "time interval". (See above).

- - -
-
-
-
- - #SET_CARGO - -SET_CARGO - -
-
- -

SET_CARGO class, extends Set#SET_BASE

- -

Mission designers can use the Set#SET_CARGO class to build sets of cargos optionally belonging to certain:

- -
    -
  • Coalitions
  • -
  • Types
  • -
  • Name or Prefix
  • -
- -

SET_CARGO constructor

- -

Create a new SET_CARGO object with the SET_CARGO.New method:

- - - - -

-

Add or Remove CARGOs from SET_CARGO

- -

CARGOs can be added and removed using the Set#SET_CARGO.AddCargosByName and Set#SET_CARGO.RemoveCargosByName respectively. -These methods take a single CARGO name or an array of CARGO names to be added or removed from SET_CARGO.

- -

SET_CARGO filter criteria

- -

You can set filter criteria to automatically maintain the SET_CARGO contents. -Filter criteria are defined by:

- - - -

Once the filter criteria have been set for the SET_CARGO, you can start filtering using:

- - - -

SET_CARGO iterators

- -

Once the filters have been defined and the SETCARGO has been built, you can iterate the SETCARGO with the available iterator methods. -The iterator methods will walk the SETCARGO set, and call for each cargo within the set a function that you provide. -The following iterator methods are currently available within the SETCARGO:

- - - - -
-
-
-
- - #SET_CLIENT - -SET_CLIENT - -
-
- -

4) SET_CLIENT class, extends Set#SET_BASE

- -

Mission designers can use the Set#SET_CLIENT class to build sets of units belonging to certain:

- -
    -
  • Coalitions
  • -
  • Categories
  • -
  • Countries
  • -
  • Client types
  • -
  • Starting with certain prefix strings.
  • -
- - -

-

4.1) SET_CLIENT constructor

- -

Create a new SET_CLIENT object with the SET_CLIENT.New method:

- - - -

4.2) Add or Remove CLIENT(s) from SET_CLIENT

- -

CLIENTs can be added and removed using the Set#SET_CLIENT.AddClientsByName and Set#SET_CLIENT.RemoveClientsByName respectively. -These methods take a single CLIENT name or an array of CLIENT names to be added or removed from SET_CLIENT.

- -

4.3) SET_CLIENT filter criteria

- -

You can set filter criteria to define the set of clients within the SET_CLIENT. -Filter criteria are defined by:

- - - -

Once the filter criteria have been set for the SET_CLIENT, you can start filtering using:

- - - -

Planned filter criteria within development are (so these are not yet available):

- - - -

4.4) SET_CLIENT iterators

- -

Once the filters have been defined and the SETCLIENT has been built, you can iterate the SETCLIENT with the available iterator methods. -The iterator methods will walk the SETCLIENT set, and call for each element within the set a function that you provide. -The following iterator methods are currently available within the SETCLIENT:

- - - -
- -
-
-
-
- - #SET_GROUP - -SET_GROUP - -
-
- -

2) SET_GROUP class, extends Set#SET_BASE

- -

Mission designers can use the Set#SET_GROUP class to build sets of groups belonging to certain:

- -
    -
  • Coalitions
  • -
  • Categories
  • -
  • Countries
  • -
  • Starting with certain prefix strings.
  • -
- - -

-

2.1) SET_GROUP constructor

- -

Create a new SET_GROUP object with the SET_GROUP.New method:

- - - -

2.2) Add or Remove GROUP(s) from SET_GROUP

- -

GROUPS can be added and removed using the Set#SET_GROUP.AddGroupsByName and Set#SET_GROUP.RemoveGroupsByName respectively. -These methods take a single GROUP name or an array of GROUP names to be added or removed from SET_GROUP.

- -

2.3) SET_GROUP filter criteria

- -

You can set filter criteria to define the set of groups within the SET_GROUP. -Filter criteria are defined by:

- - - -

Once the filter criteria have been set for the SET_GROUP, you can start filtering using:

- -
    -
  • SET_GROUP.FilterStart: Starts the filtering of the groups within the SET_GROUP and add or remove GROUP objects dynamically.
  • -
- -

Planned filter criteria within development are (so these are not yet available):

- - - -

2.4) SET_GROUP iterators

- -

Once the filters have been defined and the SETGROUP has been built, you can iterate the SETGROUP with the available iterator methods. -The iterator methods will walk the SETGROUP set, and call for each element within the set a function that you provide. -The following iterator methods are currently available within the SETGROUP:

- -
    -
  • SET_GROUP.ForEachGroup: Calls a function for each alive group it finds within the SET_GROUP.
  • -
  • SET_GROUP.ForEachGroupCompletelyInZone: Iterate the SET_GROUP and call an iterator function for each alive GROUP presence completely in a Zone, providing the GROUP and optional parameters to the called function.
  • -
  • SET_GROUP.ForEachGroupPartlyInZone: Iterate the SET_GROUP and call an iterator function for each alive GROUP presence partly in a Zone, providing the GROUP and optional parameters to the called function.
  • -
  • SET_GROUP.ForEachGroupNotInZone: Iterate the SET_GROUP and call an iterator function for each alive GROUP presence not in a Zone, providing the GROUP and optional parameters to the called function.
  • -
- -
- -
-
-
-
- - #SET_UNIT - -SET_UNIT - -
-
- -

3) SET_UNIT class, extends Set#SET_BASE

- -

Mission designers can use the SET_UNIT class to build sets of units belonging to certain:

- -
    -
  • Coalitions
  • -
  • Categories
  • -
  • Countries
  • -
  • Unit types
  • -
  • Starting with certain prefix strings.
  • -
- - -

-

3.1) SET_UNIT constructor

- -

Create a new SET_UNIT object with the SET_UNIT.New method:

- - - -

3.2) Add or Remove UNIT(s) from SET_UNIT

- -

UNITs can be added and removed using the Set#SET_UNIT.AddUnitsByName and Set#SET_UNIT.RemoveUnitsByName respectively. -These methods take a single UNIT name or an array of UNIT names to be added or removed from SET_UNIT.

- -

3.3) SET_UNIT filter criteria

- -

You can set filter criteria to define the set of units within the SET_UNIT. -Filter criteria are defined by:

- - - -

Once the filter criteria have been set for the SET_UNIT, you can start filtering using:

- - - -

Planned filter criteria within development are (so these are not yet available):

- - - -

3.4) SET_UNIT iterators

- -

Once the filters have been defined and the SETUNIT has been built, you can iterate the SETUNIT with the available iterator methods. -The iterator methods will walk the SETUNIT set, and call for each element within the set a function that you provide. -The following iterator methods are currently available within the SETUNIT:

- -
    -
  • SET_UNIT.ForEachUnit: Calls a function for each alive unit it finds within the SET_UNIT.
  • -
  • SET_GROUP.ForEachGroupCompletelyInZone: Iterate the SET_GROUP and call an iterator function for each alive GROUP presence completely in a Zone, providing the GROUP and optional parameters to the called function.
  • -
  • SET_GROUP.ForEachGroupNotInZone: Iterate the SET_GROUP and call an iterator function for each alive GROUP presence not in a Zone, providing the GROUP and optional parameters to the called function.
  • -
- -

Planned iterators methods in development are (so these are not yet available):

- - - -

3.5 ) SET_UNIT atomic methods

- -

Various methods exist for a SETUNIT to perform actions or calculations and retrieve results from the SETUNIT:

- - - -
- -
-
-

Type Set

- -

Type SET_AIRBASE

-

Field(s)

-
-
- - -SET_AIRBASE:AddAirbasesByName(AddAirbaseNames) - -
-
- -

Add AIRBASEs to SET_AIRBASE.

- -

Parameter

-
    -
  • - -

    #string AddAirbaseNames : -A single name or an array of AIRBASE names.

    - -
  • -
-

Return value

- - -

self

- -
-
-
-
- - -SET_AIRBASE:AddInDatabase(Event) - -
-
- -

Handles the Database to check on an event (birth) that the Object was added in the Database.

- - -

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

- -

Parameter

- -

Return values

-
    -
  1. - -

    #string: -The name of the AIRBASE

    - -
  2. -
  3. - -

    #table: -The AIRBASE

    - -
  4. -
-
-
-
-
- - -SET_AIRBASE:FilterCategories(Categories) - -
-
- -

Builds a set of airbases out of categories.

- - -

Possible current categories are plane, helicopter, ground, ship.

- -

Parameter

-
    -
  • - -

    #string Categories : -Can take the following values: "airdrome", "helipad", "ship".

    - -
  • -
-

Return value

- -

#SET_AIRBASE: -self

- -
-
-
-
- - -SET_AIRBASE:FilterCoalitions(Coalitions) - -
-
- -

Builds a set of airbases of coalitions.

- - -

Possible current coalitions are red, blue and neutral.

- -

Parameter

-
    -
  • - -

    #string Coalitions : -Can take the following values: "red", "blue", "neutral".

    - -
  • -
-

Return value

- -

#SET_AIRBASE: -self

- -
-
-
-
- - -SET_AIRBASE:FilterStart() - -
-
- -

Starts the filtering.

- -

Return value

- -

#SET_AIRBASE: -self

- -
-
-
-
- - -SET_AIRBASE:FindAirbase(AirbaseName) - -
-
- -

Finds a Airbase based on the Airbase Name.

- -

Parameter

-
    -
  • - -

    #string AirbaseName :

    - -
  • -
-

Return value

- -

Wrapper.Airbase#AIRBASE: -The found Airbase.

- -
-
-
-
- - -SET_AIRBASE:FindInDatabase(Event) - -
-
- -

Handles the Database to check on any event that Object exists in the Database.

- - -

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

- -

Parameter

- -

Return values

-
    -
  1. - -

    #string: -The name of the AIRBASE

    - -
  2. -
  3. - -

    #table: -The AIRBASE

    - -
  4. -
-
-
-
-
- - -SET_AIRBASE:FindNearestAirbaseFromPointVec2(PointVec2) - -
-
- -

Iterate the SET_AIRBASE while identifying the nearest Airbase#AIRBASE from a Point#POINT_VEC2.

- -

Parameter

- -

Return value

- -

Wrapper.Airbase#AIRBASE: -The closest Airbase#AIRBASE.

- -
-
-
-
- - -SET_AIRBASE:ForEachAirbase(IteratorFunction, ...) - -
-
- -

Iterate the SET_AIRBASE and call an interator function for each AIRBASE, providing the AIRBASE and optional parameters.

- -

Parameters

-
    -
  • - -

    #function IteratorFunction : -The function that will be called when there is an alive AIRBASE in the SET_AIRBASE. The function needs to accept a AIRBASE parameter.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#SET_AIRBASE: -self

- -
-
-
-
- - -SET_AIRBASE:IsIncludeObject(MAirbase) - -
-
- - - -

Parameter

- -

Return value

- -

#SET_AIRBASE: -self

- -
-
-
-
- - -SET_AIRBASE:New() - -
-
- -

Creates a new SET_AIRBASE object, building a set of airbases belonging to a coalitions and categories.

- -

Return value

- -

#SET_AIRBASE: -self

- -

Usage:

-
-- Define a new SET_AIRBASE Object. The DatabaseSet will contain a reference to all Airbases.
-DatabaseSet = SET_AIRBASE:New()
- -
-
-
-
- - -SET_AIRBASE:RemoveAirbasesByName(RemoveAirbaseNames) - -
-
- -

Remove AIRBASEs from SET_AIRBASE.

- -

Parameter

- -

Return value

- - -

self

- -
-
- -

Type SET_BASE

-

Field(s)

-
-
- - -SET_BASE:Add(ObjectName, Object) - -
-
- -

Adds a Base#BASE object in the Set#SET_BASE, using a given ObjectName as the index.

- -

Parameters

- -

Return value

- -

Core.Base#BASE: -The added BASE Object.

- -
-
-
-
- - -SET_BASE:AddObject(Object) - -
-
- -

Adds a Base#BASE object in the Set#SET_BASE, using the Object Name as the index.

- -

Parameter

- -

Return value

- -

Core.Base#BASE: -The added BASE Object.

- -
-
-
-
- - Core.Scheduler#SCHEDULER - -SET_BASE.CallScheduler - -
-
- - - -
-
-
-
- - -SET_BASE:Count() - -
-
- -

Retrieves the amount of objects in the Set#SET_BASE and derived classes.

- -

Return value

- -

#number: -Count

- -
-
-
-
- - - -SET_BASE.Database - -
-
- - - - -

Now base the new Set on the BaseSet

- -
-
-
-
- - #table - -SET_BASE.Filter - -
-
- - - -
-
-
-
- - -SET_BASE:FilterOnce() - -
-
- -

Filters for the defined collection.

- -

Return value

- -

#SET_BASE: -self

- -
-
-
-
- - -SET_BASE:FilterStop() - -
-
- -

Stops the filtering for the defined collection.

- -

Return value

- -

#SET_BASE: -self

- -
-
-
-
- - -SET_BASE:FindNearestObjectFromPointVec2(PointVec2) - -
-
- -

Iterate the SET_BASE while identifying the nearest object from a Point#POINT_VEC2.

- -

Parameter

- -

Return value

- -

Core.Base#BASE: -The closest object.

- -
-
-
-
- - -SET_BASE:Flush() - -
-
- -

Flushes the current SET_BASE contents in the log ...

- - -

(for debugging reasons).

- -

Return value

- -

#string: -A string with the names of the objects.

- -
-
-
-
- - -SET_BASE:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments) - -
-
- -

Iterate the SETBASE and derived classes and call an iterator function for the given SETBASE, providing the Object for each element within the set and optional parameters.

- -

Parameters

-
    -
  • - -

    #function IteratorFunction : -The function that will be called.

    - -
  • -
  • - -

    arg :

    - -
  • -
  • - -

    Set :

    - -
  • -
  • - -

    Function :

    - -
  • -
  • - -

    FunctionArguments :

    - -
  • -
-

Return value

- -

#SET_BASE: -self

- -
-
-
-
- - -SET_BASE:Get(ObjectName) - -
-
- -

Gets a Base#BASE object from the Set#SET_BASE and derived classes, based on the Object Name.

- -

Parameter

-
    -
  • - -

    #string ObjectName :

    - -
  • -
-

Return value

- -

Core.Base#BASE:

- - -
-
-
-
- - -SET_BASE:GetFirst() - -
-
- -

Gets the first object from the Set#SET_BASE and derived classes.

- -

Return value

- -

Core.Base#BASE:

- - -
-
-
-
- - -SET_BASE:GetLast() - -
-
- -

Gets the last object from the Set#SET_BASE and derived classes.

- -

Return value

- -

Core.Base#BASE:

- - -
-
-
-
- - -SET_BASE:GetRandom() - -
-
- -

Gets a random object from the Set#SET_BASE and derived classes.

- -

Return value

- -

Core.Base#BASE:

- - -
-
-
-
- - -SET_BASE:GetSet() - -
-
- -

Gets the Set.

- -

Return value

- -

#SET_BASE: -self

- -
-
-
-
- - -SET_BASE:IsIncludeObject(Object) - -
-
- -

Decides whether to include the Object

- -

Parameter

-
    -
  • - -

    #table Object :

    - -
  • -
-

Return value

- -

#SET_BASE: -self

- -
-
-
-
- - #table - -SET_BASE.List - -
-
- - - -
-
-
-
- - -SET_BASE:New(Database) - -
-
- -

Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

- -

Parameter

-
    -
  • - -

    Database :

    - -
  • -
-

Return value

- -

#SET_BASE:

- - -

Usage:

-
-- Define a new SET_BASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
-DBObject = SET_BASE:New()
- -
-
-
-
- - -SET_BASE:Remove(ObjectName) - -
-
- -

Removes a Base#BASE object from the Set#SET_BASE and derived classes, based on the Object Name.

- -

Parameter

-
    -
  • - -

    #string ObjectName :

    - -
  • -
-
-
-
-
- - #table - -SET_BASE.Set - -
-
- - - -
-
-
-
- - -SET_BASE:SetDatabase(BaseSet) - -
-
- -

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

- -

Parameter

- -

Return value

- -

#SET_BASE:

- - -
-
-
-
- - -SET_BASE:SetIteratorIntervals(YieldInterval, TimeInterval) - -
-
- -

Define the SET iterator "yield interval" and the "time interval".

- -

Parameters

-
    -
  • - -

    #number YieldInterval : -Sets the frequency when the iterator loop will yield after the number of objects processed. The default frequency is 10 objects processed.

    - -
  • -
  • - -

    #number TimeInterval : -Sets the time in seconds when the main logic will resume the iterator loop. The default time is 0.001 seconds.

    - -
  • -
-

Return value

- -

#SET_BASE: -self

- -
-
-
-
- - - -SET_BASE.TimeInterval - -
-
- - - -
-
-
-
- - - -SET_BASE.YieldInterval - -
-
- - - -
-
-
-
- - -SET_BASE:_EventOnBirth(Event) - -
-
- -

Handles the OnBirth event for the Set.

- -

Parameter

- -
-
-
-
- - -SET_BASE:_EventOnDeadOrCrash(Event) - -
-
- -

Handles the OnDead or OnCrash event for alive units set.

- -

Parameter

- -
-
-
-
- - -SET_BASE:_EventOnPlayerEnterUnit(Event) - -
-
- -

Handles the OnPlayerEnterUnit event to fill the active players table (with the unit filter applied).

- -

Parameter

- -
-
-
-
- - -SET_BASE:_EventOnPlayerLeaveUnit(Event) - -
-
- -

Handles the OnPlayerLeaveUnit event to clean the active players table.

- -

Parameter

- -
-
-
-
- - -SET_BASE:_FilterStart() - -
-
- -

Starts the filtering for the defined collection.

- -

Return value

- -

#SET_BASE: -self

- -
-
-
-
- - -SET_BASE:_Find(ObjectName) - -
-
- -

Finds an Base#BASE object based on the object Name.

- -

Parameter

-
    -
  • - -

    #string ObjectName :

    - -
  • -
-

Return value

- -

Core.Base#BASE: -The Object found.

- -
-
- -

Type SET_CARGO

-

Field(s)

-
-
- - -SET_CARGO:AddCargosByName(AddCargoNames) - -
-
- -

Add CARGOs to SET_CARGO.

- -

Parameter

-
    -
  • - -

    #string AddCargoNames : -A single name or an array of CARGO names.

    - -
  • -
-

Return value

- - -

self

- -
-
-
-
- - -SET_CARGO:AddInDatabase(Event) - -
-
- -

Handles the Database to check on an event (birth) that the Object was added in the Database.

- - -

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

- -

Parameter

- -

Return values

-
    -
  1. - -

    #string: -The name of the CARGO

    - -
  2. -
  3. - -

    #table: -The CARGO

    - -
  4. -
-
-
-
-
- - -SET_CARGO:FilterCoalitions(Coalitions) - -
-
- -

Builds a set of cargos of coalitions.

- - -

Possible current coalitions are red, blue and neutral.

- -

Parameter

-
    -
  • - -

    #string Coalitions : -Can take the following values: "red", "blue", "neutral".

    - -
  • -
-

Return value

- -

#SET_CARGO: -self

- -
-
-
-
- - -SET_CARGO:FilterCountries(Countries) - -
-
- -

Builds a set of cargos of defined countries.

- - -

Possible current countries are those known within DCS world.

- -

Parameter

-
    -
  • - -

    #string Countries : -Can take those country strings known within DCS world.

    - -
  • -
-

Return value

- -

#SET_CARGO: -self

- -
-
-
-
- - -SET_CARGO:FilterPrefixes(Prefixes) - -
-
- -

Builds a set of cargos of defined cargo prefixes.

- - -

All the cargos starting with the given prefixes will be included within the set.

- -

Parameter

-
    -
  • - -

    #string Prefixes : -The prefix of which the cargo name starts with.

    - -
  • -
-

Return value

- -

#SET_CARGO: -self

- -
-
-
-
- - -SET_CARGO:FilterStart() - -
-
- -

Starts the filtering.

- -

Return value

- -

#SET_CARGO: -self

- -
-
-
-
- - -SET_CARGO:FilterTypes(Types) - -
-
- -

Builds a set of cargos of defined cargo types.

- - -

Possible current types are those types known within DCS world.

- -

Parameter

-
    -
  • - -

    #string Types : -Can take those type strings known within DCS world.

    - -
  • -
-

Return value

- -

#SET_CARGO: -self

- -
-
-
-
- - -SET_CARGO:FindCargo(CargoName) - -
-
- -

Finds a Cargo based on the Cargo Name.

- -

Parameter

-
    -
  • - -

    #string CargoName :

    - -
  • -
-

Return value

- -

Wrapper.Cargo#CARGO: -The found Cargo.

- -
-
-
-
- - -SET_CARGO:FindInDatabase(Event) - -
-
- -

Handles the Database to check on any event that Object exists in the Database.

- - -

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

- -

Parameter

- -

Return values

-
    -
  1. - -

    #string: -The name of the CARGO

    - -
  2. -
  3. - -

    #table: -The CARGO

    - -
  4. -
-
-
-
-
- - -SET_CARGO:FindNearestCargoFromPointVec2(PointVec2) - -
-
- -

Iterate the SET_CARGO while identifying the nearest Cargo#CARGO from a Point#POINT_VEC2.

- -

Parameter

- -

Return value

- -

Wrapper.Cargo#CARGO: -The closest Cargo#CARGO.

- -
-
-
-
- - -SET_CARGO:ForEachCargo(IteratorFunction, ...) - -
-
- -

Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.

- -

Parameters

-
    -
  • - -

    #function IteratorFunction : -The function that will be called when there is an alive CARGO in the SET_CARGO. The function needs to accept a CARGO parameter.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#SET_CARGO: -self

- -
-
-
-
- - -SET_CARGO:IsIncludeObject(MCargo) - -
-
- - - -

Parameter

- -

Return value

- -

#SET_CARGO: -self

- -
-
-
-
- - -SET_CARGO:New() - -
-
- -

Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.

- -

Return value

- -

#SET_CARGO: -self

- -

Usage:

-
-- Define a new SET_CARGO Object. The DatabaseSet will contain a reference to all Cargos.
-DatabaseSet = SET_CARGO:New()
- -
-
-
-
- - -SET_CARGO:OnEventDeleteCargo(EventData) - -
-
- -

Handles the OnDead or OnCrash event for alive units set.

- -

Parameter

- -
-
-
-
- - -SET_CARGO:OnEventNewCargo(EventData) - -
-
- -

Handles the OnEventNewCargo event for the Set.

- -

Parameter

- -
-
-
-
- - -SET_CARGO:RemoveCargosByName(RemoveCargoNames) - -
-
- -

Remove CARGOs from SET_CARGO.

- -

Parameter

- -

Return value

- - -

self

- -
-
- -

Type SET_CLIENT

-

Field(s)

-
-
- - -SET_CLIENT:AddClientsByName(AddClientNames) - -
-
- -

Add CLIENT(s) to SET_CLIENT.

- -

Parameter

-
    -
  • - -

    #string AddClientNames : -A single name or an array of CLIENT names.

    - -
  • -
-

Return value

- - -

self

- -
-
-
-
- - -SET_CLIENT:AddInDatabase(Event) - -
-
- -

Handles the Database to check on an event (birth) that the Object was added in the Database.

- - -

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

- -

Parameter

- -

Return values

-
    -
  1. - -

    #string: -The name of the CLIENT

    - -
  2. -
  3. - -

    #table: -The CLIENT

    - -
  4. -
-
-
-
-
- - -SET_CLIENT:FilterCategories(Categories) - -
-
- -

Builds a set of clients out of categories.

- - -

Possible current categories are plane, helicopter, ground, ship.

- -

Parameter

-
    -
  • - -

    #string Categories : -Can take the following values: "plane", "helicopter", "ground", "ship".

    - -
  • -
-

Return value

- -

#SET_CLIENT: -self

- -
-
-
-
- - -SET_CLIENT:FilterCoalitions(Coalitions) - -
-
- -

Builds a set of clients of coalitions.

- - -

Possible current coalitions are red, blue and neutral.

- -

Parameter

-
    -
  • - -

    #string Coalitions : -Can take the following values: "red", "blue", "neutral".

    - -
  • -
-

Return value

- -

#SET_CLIENT: -self

- -
-
-
-
- - -SET_CLIENT:FilterCountries(Countries) - -
-
- -

Builds a set of clients of defined countries.

- - -

Possible current countries are those known within DCS world.

- -

Parameter

-
    -
  • - -

    #string Countries : -Can take those country strings known within DCS world.

    - -
  • -
-

Return value

- -

#SET_CLIENT: -self

- -
-
-
-
- - -SET_CLIENT:FilterPrefixes(Prefixes) - -
-
- -

Builds a set of clients of defined client prefixes.

- - -

All the clients starting with the given prefixes will be included within the set.

- -

Parameter

-
    -
  • - -

    #string Prefixes : -The prefix of which the client name starts with.

    - -
  • -
-

Return value

- -

#SET_CLIENT: -self

- -
-
-
-
- - -SET_CLIENT:FilterStart() - -
-
- -

Starts the filtering.

- -

Return value

- -

#SET_CLIENT: -self

- -
-
-
-
- - -SET_CLIENT:FilterTypes(Types) - -
-
- -

Builds a set of clients of defined client types.

- - -

Possible current types are those types known within DCS world.

- -

Parameter

-
    -
  • - -

    #string Types : -Can take those type strings known within DCS world.

    - -
  • -
-

Return value

- -

#SET_CLIENT: -self

- -
-
-
-
- - -SET_CLIENT:FindClient(ClientName) - -
-
- -

Finds a Client based on the Client Name.

- -

Parameter

-
    -
  • - -

    #string ClientName :

    - -
  • -
-

Return value

- -

Wrapper.Client#CLIENT: -The found Client.

- -
-
-
-
- - -SET_CLIENT:FindInDatabase(Event) - -
-
- -

Handles the Database to check on any event that Object exists in the Database.

- - -

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

- -

Parameter

- -

Return values

-
    -
  1. - -

    #string: -The name of the CLIENT

    - -
  2. -
  3. - -

    #table: -The CLIENT

    - -
  4. -
-
-
-
-
- - -SET_CLIENT:ForEachClient(IteratorFunction, ...) - -
-
- -

Iterate the SET_CLIENT and call an interator function for each alive CLIENT, providing the CLIENT and optional parameters.

- -

Parameters

-
    -
  • - -

    #function IteratorFunction : -The function that will be called when there is an alive CLIENT in the SET_CLIENT. The function needs to accept a CLIENT parameter.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#SET_CLIENT: -self

- -
-
-
-
- - -SET_CLIENT:ForEachClientInZone(ZoneObject, IteratorFunction, ...) - -
-
- -

Iterate the SET_CLIENT and call an iterator function for each alive CLIENT presence completely in a Zone, providing the CLIENT and optional parameters to the called function.

- -

Parameters

-
    -
  • - -

    Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

    - -
  • -
  • - -

    #function IteratorFunction : -The function that will be called when there is an alive CLIENT in the SET_CLIENT. The function needs to accept a CLIENT parameter.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#SET_CLIENT: -self

- -
-
-
-
- - -SET_CLIENT:ForEachClientNotInZone(ZoneObject, IteratorFunction, ...) - -
-
- -

Iterate the SET_CLIENT and call an iterator function for each alive CLIENT presence not in a Zone, providing the CLIENT and optional parameters to the called function.

- -

Parameters

-
    -
  • - -

    Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

    - -
  • -
  • - -

    #function IteratorFunction : -The function that will be called when there is an alive CLIENT in the SET_CLIENT. The function needs to accept a CLIENT parameter.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#SET_CLIENT: -self

- -
-
-
-
- - -SET_CLIENT:IsIncludeObject(MClient) - -
-
- - - -

Parameter

- -

Return value

- -

#SET_CLIENT: -self

- -
-
-
-
- - -SET_CLIENT:New() - -
-
- -

Creates a new SET_CLIENT object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names.

- -

Return value

- -

#SET_CLIENT:

- - -

Usage:

-
-- Define a new SET_CLIENT Object. This DBObject will contain a reference to all Clients.
-DBObject = SET_CLIENT:New()
- -
-
-
-
- - -SET_CLIENT:RemoveClientsByName(RemoveClientNames) - -
-
- -

Remove CLIENT(s) from SET_CLIENT.

- -

Parameter

- -

Return value

- - -

self

- -
-
- -

Type SET_GROUP

-

Field(s)

-
-
- - -SET_GROUP:AddGroupsByName(AddGroupNames) - -
-
- -

Add GROUP(s) to SET_GROUP.

- -

Parameter

-
    -
  • - -

    #string AddGroupNames : -A single name or an array of GROUP names.

    - -
  • -
-

Return value

- - -

self

- -
-
-
-
- - -SET_GROUP:AddInDatabase(Event) - -
-
- -

Handles the Database to check on an event (birth) that the Object was added in the Database.

- - -

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

- -

Parameter

- -

Return values

-
    -
  1. - -

    #string: -The name of the GROUP

    - -
  2. -
  3. - -

    #table: -The GROUP

    - -
  4. -
-
-
-
-
- - -SET_GROUP:FilterCategories(Categories) - -
-
- -

Builds a set of groups out of categories.

- - -

Possible current categories are plane, helicopter, ground, ship.

- -

Parameter

-
    -
  • - -

    #string Categories : -Can take the following values: "plane", "helicopter", "ground", "ship".

    - -
  • -
-

Return value

- -

#SET_GROUP: -self

- -
-
-
-
- - -SET_GROUP:FilterCoalitions(Coalitions) - -
-
- -

Builds a set of groups of coalitions.

- - -

Possible current coalitions are red, blue and neutral.

- -

Parameter

-
    -
  • - -

    #string Coalitions : -Can take the following values: "red", "blue", "neutral".

    - -
  • -
-

Return value

- -

#SET_GROUP: -self

- -
-
-
-
- - -SET_GROUP:FilterCountries(Countries) - -
-
- -

Builds a set of groups of defined countries.

- - -

Possible current countries are those known within DCS world.

- -

Parameter

-
    -
  • - -

    #string Countries : -Can take those country strings known within DCS world.

    - -
  • -
-

Return value

- -

#SET_GROUP: -self

- -
-
-
-
- - -SET_GROUP:FilterPrefixes(Prefixes) - -
-
- -

Builds a set of groups of defined GROUP prefixes.

- - -

All the groups starting with the given prefixes will be included within the set.

- -

Parameter

-
    -
  • - -

    #string Prefixes : -The prefix of which the group name starts with.

    - -
  • -
-

Return value

- -

#SET_GROUP: -self

- -
-
-
-
- - -SET_GROUP:FilterStart() - -
-
- -

Starts the filtering.

- -

Return value

- -

#SET_GROUP: -self

- -
-
-
-
- - -SET_GROUP:FindGroup(GroupName) - -
-
- -

Finds a Group based on the Group Name.

- -

Parameter

-
    -
  • - -

    #string GroupName :

    - -
  • -
-

Return value

- -

Wrapper.Group#GROUP: -The found Group.

- -
-
-
-
- - -SET_GROUP:FindInDatabase(Event) - -
-
- -

Handles the Database to check on any event that Object exists in the Database.

- - -

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

- -

Parameter

- -

Return values

-
    -
  1. - -

    #string: -The name of the GROUP

    - -
  2. -
  3. - -

    #table: -The GROUP

    - -
  4. -
-
-
-
-
- - -SET_GROUP:ForEachGroup(IteratorFunction, ...) - -
-
- -

Iterate the SET_GROUP and call an iterator function for each alive GROUP, providing the GROUP and optional parameters.

- -

Parameters

-
    -
  • - -

    #function IteratorFunction : -The function that will be called when there is an alive GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#SET_GROUP: -self

- -
-
-
-
- - -SET_GROUP:ForEachGroupCompletelyInZone(ZoneObject, IteratorFunction, ...) - -
-
- -

Iterate the SET_GROUP and call an iterator function for each alive GROUP presence completely in a Zone, providing the GROUP and optional parameters to the called function.

- -

Parameters

-
    -
  • - -

    Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

    - -
  • -
  • - -

    #function IteratorFunction : -The function that will be called when there is an alive GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#SET_GROUP: -self

- -
-
-
-
- - -SET_GROUP:ForEachGroupNotInZone(ZoneObject, IteratorFunction, ...) - -
-
- -

Iterate the SET_GROUP and call an iterator function for each alive GROUP presence not in a Zone, providing the GROUP and optional parameters to the called function.

- -

Parameters

-
    -
  • - -

    Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

    - -
  • -
  • - -

    #function IteratorFunction : -The function that will be called when there is an alive GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#SET_GROUP: -self

- -
-
-
-
- - -SET_GROUP:ForEachGroupPartlyInZone(ZoneObject, IteratorFunction, ...) - -
-
- -

Iterate the SET_GROUP and call an iterator function for each alive GROUP presence partly in a Zone, providing the GROUP and optional parameters to the called function.

- -

Parameters

-
    -
  • - -

    Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

    - -
  • -
  • - -

    #function IteratorFunction : -The function that will be called when there is an alive GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#SET_GROUP: -self

- -
-
-
-
- - -SET_GROUP:IsIncludeObject(MooseGroup) - -
-
- - - -

Parameter

- -

Return value

- -

#SET_GROUP: -self

- -
-
-
-
- - -SET_GROUP:New() - -
-
- -

Creates a new SET_GROUP object, building a set of groups belonging to a coalitions, categories, countries, types or with defined prefix names.

- -

Return value

- -

#SET_GROUP:

- - -

Usage:

-
-- Define a new SET_GROUP Object. This DBObject will contain a reference to all alive GROUPS.
-DBObject = SET_GROUP:New()
- -
-
-
-
- - -SET_GROUP:RemoveGroupsByName(RemoveGroupNames) - -
-
- -

Remove GROUP(s) from SET_GROUP.

- -

Parameter

- -

Return value

- - -

self

- -
-
- -

Type SET_UNIT

-

Field(s)

-
-
- - -SET_UNIT:AddInDatabase(Event) - -
-
- -

Handles the Database to check on an event (birth) that the Object was added in the Database.

- - -

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

- -

Parameter

- -

Return values

-
    -
  1. - -

    #string: -The name of the UNIT

    - -
  2. -
  3. - -

    #table: -The UNIT

    - -
  4. -
-
-
-
-
- - -SET_UNIT:AddUnit(AddUnit) - -
-
- -

Add UNIT(s) to SET_UNIT.

- -

Parameter

-
    -
  • - -

    #string AddUnit : -A single UNIT.

    - -
  • -
-

Return value

- -

#SET_UNIT: -self

- -
-
-
-
- - -SET_UNIT:AddUnitsByName(AddUnitNames) - -
-
- -

Add UNIT(s) to SET_UNIT.

- -

Parameter

-
    -
  • - -

    #string AddUnitNames : -A single name or an array of UNIT names.

    - -
  • -
-

Return value

- -

#SET_UNIT: -self

- -
-
-
-
- - -SET_UNIT:CalculateThreatLevelA2G() - -
-
- -

Calculate the maxium A2G threat level of the SET_UNIT.

- -
-
-
-
- - -SET_UNIT:FilterCategories(Categories) - -
-
- -

Builds a set of units out of categories.

- - -

Possible current categories are plane, helicopter, ground, ship.

- -

Parameter

-
    -
  • - -

    #string Categories : -Can take the following values: "plane", "helicopter", "ground", "ship".

    - -
  • -
-

Return value

- -

#SET_UNIT: -self

- -
-
-
-
- - -SET_UNIT:FilterCoalitions(Coalitions) - -
-
- -

Builds a set of units of coalitions.

- - -

Possible current coalitions are red, blue and neutral.

- -

Parameter

-
    -
  • - -

    #string Coalitions : -Can take the following values: "red", "blue", "neutral".

    - -
  • -
-

Return value

- -

#SET_UNIT: -self

- -
-
-
-
- - -SET_UNIT:FilterCountries(Countries) - -
-
- -

Builds a set of units of defined countries.

- - -

Possible current countries are those known within DCS world.

- -

Parameter

-
    -
  • - -

    #string Countries : -Can take those country strings known within DCS world.

    - -
  • -
-

Return value

- -

#SET_UNIT: -self

- -
-
-
-
- - -SET_UNIT:FilterHasRadar(RadarTypes) - -
-
- -

Builds a set of units having a radar of give types.

- - -

All the units having a radar of a given type will be included within the set.

- -

Parameter

-
    -
  • - -

    #table RadarTypes : -The radar types.

    - -
  • -
-

Return value

- -

#SET_UNIT: -self

- -
-
-
-
- - -SET_UNIT:FilterHasSEAD() - -
-
- -

Builds a set of SEADable units.

- -

Return value

- -

#SET_UNIT: -self

- -
-
-
-
- - -SET_UNIT:FilterPrefixes(Prefixes) - -
-
- -

Builds a set of units of defined unit prefixes.

- - -

All the units starting with the given prefixes will be included within the set.

- -

Parameter

-
    -
  • - -

    #string Prefixes : -The prefix of which the unit name starts with.

    - -
  • -
-

Return value

- -

#SET_UNIT: -self

- -
-
-
-
- - -SET_UNIT:FilterStart() - -
-
- -

Starts the filtering.

- -

Return value

- -

#SET_UNIT: -self

- -
-
-
-
- - -SET_UNIT:FilterTypes(Types) - -
-
- -

Builds a set of units of defined unit types.

- - -

Possible current types are those types known within DCS world.

- -

Parameter

-
    -
  • - -

    #string Types : -Can take those type strings known within DCS world.

    - -
  • -
-

Return value

- -

#SET_UNIT: -self

- -
-
-
-
- - -SET_UNIT:FindInDatabase(Event) - -
-
- -

Handles the Database to check on any event that Object exists in the Database.

- - -

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

- -

Parameter

- -

Return values

-
    -
  1. - -

    #string: -The name of the UNIT

    - -
  2. -
  3. - -

    #table: -The UNIT

    - -
  4. -
-
-
-
-
- - -SET_UNIT:FindUnit(UnitName) - -
-
- -

Finds a Unit based on the Unit Name.

- -

Parameter

-
    -
  • - -

    #string UnitName :

    - -
  • -
-

Return value

- -

Wrapper.Unit#UNIT: -The found Unit.

- -
-
-
-
- - -SET_UNIT:ForEachUnit(IteratorFunction, ...) - -
-
- -

Iterate the SET_UNIT and call an interator function for each alive UNIT, providing the UNIT and optional parameters.

- -

Parameters

-
    -
  • - -

    #function IteratorFunction : -The function that will be called when there is an alive UNIT in the SET_UNIT. The function needs to accept a UNIT parameter.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#SET_UNIT: -self

- -
-
-
-
- - -SET_UNIT:ForEachUnitCompletelyInZone(ZoneObject, IteratorFunction, ...) - -
-
- -

Iterate the SET_UNIT and call an iterator function for each alive UNIT presence completely in a Zone, providing the UNIT and optional parameters to the called function.

- -

Parameters

-
    -
  • - -

    Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

    - -
  • -
  • - -

    #function IteratorFunction : -The function that will be called when there is an alive UNIT in the SET_UNIT. The function needs to accept a UNIT parameter.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#SET_UNIT: -self

- -
-
-
-
- - -SET_UNIT:ForEachUnitNotInZone(ZoneObject, IteratorFunction, ...) - -
-
- -

Iterate the SET_UNIT and call an iterator function for each alive UNIT presence not in a Zone, providing the UNIT and optional parameters to the called function.

- -

Parameters

-
    -
  • - -

    Core.Zone#ZONE ZoneObject : -The Zone to be tested for.

    - -
  • -
  • - -

    #function IteratorFunction : -The function that will be called when there is an alive UNIT in the SET_UNIT. The function needs to accept a UNIT parameter.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#SET_UNIT: -self

- -
-
-
-
- - -SET_UNIT:GetTypeNames(Delimiter) - -
-
- -

Retrieve the type names of the Units in the SET, delimited by an optional delimiter.

- -

Parameter

-
    -
  • - -

    #string Delimiter : -(optional) The delimiter, which is default a comma.

    - -
  • -
-

Return value

- -

#string: -The types of the Units delimited.

- -
-
-
-
- - -SET_UNIT:GetUnitThreatLevels() - -
-
- -

Returns map of unit threat levels.

- -

Return value

- -

#table:

- - -
-
-
-
- - -SET_UNIT:GetUnitTypes() - -
-
- -

Returns map of unit types.

- -

Return value

- -

#map:

-

string,#number> A map of the unit types found. The key is the UnitTypeName and the value is the amount of unit types found.

- -
-
-
-
- - -SET_UNIT:GetUnitTypesText() - -
-
- -

Returns a comma separated string of the unit types with a count in the Set.

- -

Return value

- -

#string: -The unit types string

- -
-
-
-
- - -SET_UNIT:HasFriendlyUnits(FriendlyCoalition) - -
-
- -

Returns if the Set has friendly ground units.

- -

Parameter

-
    -
  • - -

    FriendlyCoalition :

    - -
  • -
-

Return value

- -

#number: -The amount of ground targets in the Set.

- -
-
-
-
- - -SET_UNIT:HasGroundUnits() - -
-
- -

Returns if the Set has ground targets.

- -

Return value

- -

#number: -The amount of ground targets in the Set.

- -
-
-
-
- - -SET_UNIT:HasRadar(RadarType) - -
-
- -

Returns if the Set has targets having a radar (of a given type).

- -

Parameter

- -

Return value

- -

#number: -The amount of radars in the Set with the given type

- -
-
-
-
- - -SET_UNIT:HasSEAD() - -
-
- -

Returns if the Set has targets that can be SEADed.

- -

Return value

- -

#number: -The amount of SEADable units in the Set

- -
-
-
-
- - -SET_UNIT:IsIncludeObject(MUnit) - -
-
- - - -

Parameter

- -

Return value

- -

#SET_UNIT: -self

- -
-
-
-
- - -SET_UNIT:New() - -
-
- -

Creates a new SET_UNIT object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

- -

Return value

- -

#SET_UNIT:

- - -

Usage:

-
-- Define a new SET_UNIT Object. This DBObject will contain a reference to all alive Units.
-DBObject = SET_UNIT:New()
- -
-
-
-
- - -SET_UNIT:RemoveUnitsByName(RemoveUnitNames) - -
-
- -

Remove UNIT(s) from SET_UNIT.

- -

Parameter

-
    -
  • - -

    Wrapper.Unit#UNIT RemoveUnitNames : -A single name or an array of UNIT names.

    - -
  • -
-

Return value

- - -

self

- -
-
- -

Type map

- -
- -
- - diff --git a/docs/Documentation/Smoke.html b/docs/Documentation/Smoke.html deleted file mode 100644 index c4b4c2e9a..000000000 --- a/docs/Documentation/Smoke.html +++ /dev/null @@ -1,699 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Smoke

- -

(SP) (MP) (FSM) Route AI or players through waypoints or to zones.

- - - -
- -

#ACT_ASSIST FSM class, extends Fsm#FSM_PROCESS

- -

ACT_ASSIST state machine:

- -

This class is a state machine: it manages a process that is triggered by events causing state transitions to occur. -All derived classes from this class will start with the class name, followed by a _. See the relevant derived class descriptions below. -Each derived class follows exactly the same process, using the same events and following the same state transitions, -but will have different implementation behaviour upon each event or state transition.

- -

ACT_ASSIST Events:

- -

These are the events defined in this class:

- -
    -
  • Start: The process is started.
  • -
  • Next: The process is smoking the targets in the given zone.
  • -
- -

ACT_ASSIST Event methods:

- -

Event methods are available (dynamically allocated by the state machine), that accomodate for state transitions occurring in the process. -There are two types of event methods, which you can use to influence the normal mechanisms in the state machine:

- -
    -
  • Immediate: The event method has exactly the name of the event.
  • -
  • Delayed: The event method starts with a __ + the name of the event. The first parameter of the event method is a number value, expressing the delay in seconds when the event will be executed.
  • -
- -

ACT_ASSIST States:

- -
    -
  • None: The controllable did not receive route commands.
  • -
  • AwaitSmoke (*): The process is awaiting to smoke the targets in the zone.
  • -
  • Smoking (*): The process is smoking the targets in the zone.
  • -
  • Failed (*): The process has failed.
  • -
- -

(*) End states of the process.

- -

ACT_ASSIST state transition methods:

- -

State transition functions can be set by the mission designer customizing or improving the behaviour of the state. -There are 2 moments when state transition methods will be called by the state machine:

- -
    -
  • Before the state transition. - The state transition method needs to start with the name OnBefore + the name of the state. - If the state transition method returns false, then the processing of the state transition will not be done! - If you want to change the behaviour of the AIControllable at this event, return false, - but then you'll need to specify your own logic using the AIControllable!

  • -
  • After the state transition. - The state transition method needs to start with the name OnAfter + the name of the state. - These state transition methods need to provide a return value, which is specified at the function description.

  • -
- -
- -

1) #ACTASSISTSMOKETARGETSZONE class, extends Fsm.Route#ACT_ASSIST

- -

The ACTASSISTSMOKETARGETSZONE class implements the core functions to smoke targets in a Zone. -The targets are smoked within a certain range around each target, simulating a realistic smoking behaviour. -At random intervals, a new target is smoked.

- -

1.1) ACTASSISTSMOKETARGETSZONE constructor:

- - - -
- - -

Global(s)

- - - - - - - - - -
ACT_ASSIST - -
ACT_ASSIST_SMOKE_TARGETS_ZONE - -
-

Type ACT_ASSIST

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ACT_ASSIST.ClassName - -
ACT_ASSIST.Menu - -
ACT_ASSIST.MenuSmokeBlue - -
ACT_ASSIST.MenuSmokeGreen - -
ACT_ASSIST.MenuSmokeOrange - -
ACT_ASSIST.MenuSmokeRed - -
ACT_ASSIST.MenuSmokeWhite - -
ACT_ASSIST:New() -

Creates a new target smoking state machine.

-
ACT_ASSIST.TargetSetUnit - -
ACT_ASSIST.TargetZone - -
ACT_ASSIST:onafterStart(ProcessUnit, Event, From, To) -

StateMachine callback function

-
ACT_ASSIST:onafterStop(ProcessUnit, Event, From, To) -

StateMachine callback function

-
- -

Type ACT_ASSIST_SMOKE_TARGETS_ZONE

- - - - - - - - - - - - - - - - - - - - - - - - - -
ACT_ASSIST_SMOKE_TARGETS_ZONE.ClassName - -
ACT_ASSIST_SMOKE_TARGETS_ZONE:Init(FsmSmoke) - -
ACT_ASSIST_SMOKE_TARGETS_ZONE:New(TargetSetUnit, TargetZone) -

Creates a new target smoking state machine.

-
ACT_ASSIST_SMOKE_TARGETS_ZONE.TargetSetUnit - -
ACT_ASSIST_SMOKE_TARGETS_ZONE.TargetZone - -
ACT_ASSIST_SMOKE_TARGETS_ZONE:onenterSmoking(ProcessUnit, Event, From, To) -

StateMachine callback function

-
- -

Global(s)

-
-
- - #ACT_ASSIST - -ACT_ASSIST - -
-
- - - -
-
-
-
- - #ACT_ASSIST_SMOKE_TARGETS_ZONE - -ACT_ASSIST_SMOKE_TARGETS_ZONE - -
-
- - - -
-
-

Type Smoke

- -

Type ACT_ASSIST

- -

ACT_ASSIST class

- -

Field(s)

-
-
- - #string - -ACT_ASSIST.ClassName - -
-
- - - -
-
-
-
- - - -ACT_ASSIST.Menu - -
-
- - - -
-
-
-
- - - -ACT_ASSIST.MenuSmokeBlue - -
-
- - - -
-
-
-
- - - -ACT_ASSIST.MenuSmokeGreen - -
-
- - - -
-
-
-
- - - -ACT_ASSIST.MenuSmokeOrange - -
-
- - - -
-
-
-
- - - -ACT_ASSIST.MenuSmokeRed - -
-
- - - -
-
-
-
- - - -ACT_ASSIST.MenuSmokeWhite - -
-
- - - -
-
-
-
- - -ACT_ASSIST:New() - -
-
- -

Creates a new target smoking state machine.

- - -

The process will request from the menu if it accepts the task, if not, the unit is removed from the simulator.

- -

Return value

- -

#ACT_ASSIST:

- - -
-
-
-
- - - -ACT_ASSIST.TargetSetUnit - -
-
- - - -
-
-
-
- - - -ACT_ASSIST.TargetZone - -
-
- - - -
-
-
-
- - -ACT_ASSIST:onafterStart(ProcessUnit, Event, From, To) - -
-
- -

StateMachine callback function

- -

Parameters

- -
-
-
-
- - -ACT_ASSIST:onafterStop(ProcessUnit, Event, From, To) - -
-
- -

StateMachine callback function

- -

Parameters

- -
-
- -

Type ACT_ASSIST_SMOKE_TARGETS_ZONE

- -

ACTASSISTSMOKETARGETSZONE class

- -

Field(s)

-
-
- - #string - -ACT_ASSIST_SMOKE_TARGETS_ZONE.ClassName - -
-
- - - -
-
-
-
- - -ACT_ASSIST_SMOKE_TARGETS_ZONE:Init(FsmSmoke) - -
-
- - - -

Parameter

-
    -
  • - -

    FsmSmoke :

    - -
  • -
-
-
-
-
- - -ACT_ASSIST_SMOKE_TARGETS_ZONE:New(TargetSetUnit, TargetZone) - -
-
- -

Creates a new target smoking state machine.

- - -

The process will request from the menu if it accepts the task, if not, the unit is removed from the simulator.

- -

Parameters

- -
-
-
-
- - Set#SET_UNIT - -ACT_ASSIST_SMOKE_TARGETS_ZONE.TargetSetUnit - -
-
- - - -
-
-
-
- - Core.Zone#ZONE_BASE - -ACT_ASSIST_SMOKE_TARGETS_ZONE.TargetZone - -
-
- - - -
-
-
-
- - -ACT_ASSIST_SMOKE_TARGETS_ZONE:onenterSmoking(ProcessUnit, Event, From, To) - -
-
- -

StateMachine callback function

- -

Parameters

- -
-
- -
- -
- - diff --git a/docs/Documentation/Spawn.html b/docs/Documentation/Spawn.html deleted file mode 100644 index b8d4286eb..000000000 --- a/docs/Documentation/Spawn.html +++ /dev/null @@ -1,3566 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Spawn

- -

Functional -- Spawn dynamically new GROUPs in your missions.

- - -

-Banner Image

- -
- -

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

- -
- -

Demo Missions

- -

SPAWN Demo Missions source code

- -

SPAWN Demo Missions, only for beta testers

- -

ALL Demo Missions pack of the last release

- -
- -

YouTube Channel

- -

SPAWN 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:

- -

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:

- -
    -
  • Aaron: Posed the idea for Group position randomization at SpawnInZone and make the Unit randomization separate from the Group randomization.
  • -
  • Entropy, Afinegan: Came up with the requirement for AIOnOff().
  • -
- -

Authors:

- -
    -
  • FlightControl: Design & Programming
  • -
- - -

Global(s)

- - - - - -
SPAWN -

SPAWN class, extends Base#BASE

- -

The SPAWN class allows to spawn dynamically new groups.

-
-

Type SPAWN

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SPAWN.AIOnOff - -
SPAWN.AliveUnits - -
SPAWN.ClassName - -
SPAWN.CleanUpScheduler - -
SPAWN.DelayOnOff - -
SPAWN:GetFirstAliveGroup() -

Will find the first alive Group it has spawned, and return the alive Group object and the first Index where the first alive Group object has been found.

-
SPAWN:GetGroupFromIndex(SpawnIndex) -

Get the group from an index.

-
SPAWN:GetLastAliveGroup() -

Will find the last alive Group object, and will return a reference to the last live Group object and the last Index where the last alive Group object has been found.

-
SPAWN:GetNextAliveGroup(SpawnIndexStart) -

Will find the next alive Group object from a given Index, and return a reference to the alive Group object and the next Index where the alive Group has been found.

-
SPAWN:GetSpawnIndexFromGroup(SpawnGroup) -

Get the index from a given group.

-
SPAWN:InitAIOff() -

Turns the AI Off for the Group when spawning.

-
SPAWN:InitAIOn() -

Turns the AI On for the Group when spawning.

-
SPAWN:InitAIOnOff(AIOnOff) - -
SPAWN:InitArray(SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY) -

Makes the groups visible before start (like a batallion).

-
SPAWN:InitCleanUp(SpawnCleanUpInterval) -

CleanUp groups when they are still alive, but inactive.

-
SPAWN:InitDelayOff() -

Turns the Delay Off for the Group when spawning.

-
SPAWN:InitDelayOn() -

Turns the Delay On for the Group when spawning.

-
SPAWN:InitDelayOnOff(DelayOnOff) - -
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.

-
SPAWN:InitLimit(SpawnMaxUnitsAlive, SpawnMaxGroups) -

Limits the Maximum amount of Units that can be alive at the same time, and the maximum amount of groups that can be spawned.

-
SPAWN:InitRandomizePosition(RandomizePosition, OuterRadius, InnerRadius) -

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:InitRandomizeRoute(SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight) -

Randomizes the defined route of the SpawnTemplatePrefix group in the ME.

-
SPAWN:InitRandomizeTemplate(SpawnTemplatePrefixTable) -

This method is rather complicated to understand.

-
SPAWN:InitRandomizeUnits(RandomizeUnits, OuterRadius, InnerRadius) -

Randomizes the UNITs that are spawned within a radius band given an Outer and Inner radius.

-
SPAWN:InitRandomizeZones(SpawnZoneTable) - -
SPAWN:InitRepeat() -

For planes and helicopters, when these groups go home and land on their home airbases and farps, they normally would taxi to the parking spot, shut-down their engines and wait forever until the Group is removed by the runtime environment.

-
SPAWN:InitRepeatOnEngineShutDown() -

Respawn after landing when its engines have shut down.

-
SPAWN:InitRepeatOnLanding() -

Respawn group after landing.

-
SPAWN:InitUnControlled(UnControlled) -

(AIR) Will spawn a plane group in UnControlled or Controlled mode...

-
SPAWN.MaxAliveGroups - -
SPAWN.MaxAliveUnits - -
SPAWN:New(SpawnTemplatePrefix) -

Creates the main object to spawn a Group defined in the DCS ME.

-
SPAWN:NewWithAlias(SpawnTemplatePrefix, SpawnAliasPrefix) -

Creates a new SPAWN instance to create new groups based on the defined template and using a new alias for each new group.

-
SPAWN:OnSpawnGroup(SpawnCallBackFunction, SpawnFunctionArguments, ...) -

Allows to place a CallFunction hook when a new group spawns.

-
SPAWN:ReSpawn(SpawnIndex) -

Will re-spawn a group based on a given index.

-
SPAWN.Repeat - -
SPAWN.RepeatOnEngineShutDown - -
SPAWN.RepeatOnLanding - -
SPAWN:Spawn() -

Will spawn a group based on the internal index.

-
SPAWN.SpawnAliasPrefix - -
SPAWN.SpawnCleanUpInterval - -
SPAWN.SpawnCleanUpTimeStamps - -
SPAWN.SpawnCount - -
SPAWN:SpawnFromStatic(HostStatic, SpawnIndex) -

Will spawn a group from a hosting static.

-
SPAWN:SpawnFromUnit(HostUnit, SpawnIndex) -

Will spawn a group from a hosting unit.

-
SPAWN:SpawnFromVec2(Vec2, SpawnIndex) -

Will spawn a group from a Vec2 in 3D space.

-
SPAWN:SpawnFromVec3(Vec3, SpawnIndex) -

Will spawn a group from a Vec3 in 3D space.

-
SPAWN.SpawnFunctionArguments - -
SPAWN.SpawnFunctionHook - -
SPAWN:SpawnGroupName(SpawnIndex) -

Will return the SpawnGroupName either with with a specific count number or without any count.

-
SPAWN.SpawnGroups - -
SPAWN:SpawnInZone(Zone, RandomizeGroup, SpawnIndex) -

Will spawn a Group within a given Zone.

-
SPAWN.SpawnIndex - -
SPAWN.SpawnInitKeepUnitNames - -
SPAWN.SpawnInitLimit - -
SPAWN.SpawnInnerRadius - -
SPAWN.SpawnIsScheduled - -
SPAWN.SpawnMaxGroups - -
SPAWN.SpawnMaxUnitsAlive - -
SPAWN.SpawnOuterRadius - -
SPAWN.SpawnRandomize - -
SPAWN.SpawnRandomizePosition - -
SPAWN.SpawnRandomizePositionInnerRadius - -
SPAWN.SpawnRandomizePositionOuterRadius - -
SPAWN.SpawnRandomizeRoute - -
SPAWN.SpawnRandomizeRouteEndPoint - -
SPAWN.SpawnRandomizeRouteHeight - -
SPAWN.SpawnRandomizeRouteRadius - -
SPAWN.SpawnRandomizeRouteStartPoint - -
SPAWN.SpawnRandomizeTemplate - -
SPAWN.SpawnRandomizeUnits - -
SPAWN:SpawnScheduleStart() -

Will re-start the spawning scheduler.

-
SPAWN:SpawnScheduleStop() -

Will stop the scheduled spawning scheduler.

-
SPAWN:SpawnScheduled(SpawnTime, SpawnTimeVariation) -

Spawns new groups at varying time intervals.

-
SPAWN.SpawnScheduler - -
SPAWN.SpawnTemplate - -
SPAWN.SpawnTemplatePrefix - -
SPAWN.SpawnTemplatePrefixTable - -
SPAWN.SpawnUnControlled - -
SPAWN.SpawnVisible - -
SPAWN:SpawnWithIndex(SpawnIndex) -

Will spawn a group with a specified index number.

-
SPAWN.SpawnZoneTable - -
SPAWN.UnControlled - -
SPAWN:_GetGroupCategoryID(SpawnPrefix) -

Gets the CategoryID of the Group with the given SpawnPrefix

-
SPAWN:_GetGroupCoalitionID(SpawnPrefix) -

Gets the CoalitionID of the Group with the given SpawnPrefix

-
SPAWN:_GetGroupCountryID(SpawnPrefix) -

Gets the CountryID of the Group with the given SpawnPrefix

-
SPAWN:_GetLastIndex() -

Return the last maximum index that can be used.

-
SPAWN:_GetPrefixFromGroup(DCSUnit, SpawnGroup) -

Return the prefix of a SpawnUnit.

-
SPAWN:_GetSpawnIndex(SpawnIndex) -

Get the next index of the groups to be spawned.

-
SPAWN:_GetTemplate(SpawnTemplatePrefix) -

Gets the Group Template from the ME environment definition.

-
SPAWN:_InitializeSpawnGroups(SpawnIndex) -

Initalize the SpawnGroups collection.

-
SPAWN:_OnBirth(EventData) - -
SPAWN:_OnDeadOrCrash(EventData) - -
SPAWN:_OnEngineShutDown(EventData) -

Will detect AIR Units shutting down their engines ...

-
SPAWN:_OnLand(EventData) -

Will detect AIR Units landing...

-
SPAWN:_OnTakeOff(EventData) -

Will detect AIR Units taking off...

-
SPAWN:_Prepare(SpawnTemplatePrefix, SpawnIndex) -

Prepares the new Group Template.

-
SPAWN:_RandomizeRoute(SpawnIndex) -

Private method randomizing the routes.

-
SPAWN:_RandomizeTemplate(SpawnIndex) -

Private method that randomizes the template of the group.

-
SPAWN:_RandomizeZones(SpawnIndex) -

Private method that randomizes the Zones where the Group will be spawned.

-
SPAWN:_Scheduler() -

This function is called automatically by the Spawning scheduler.

-
SPAWN:_SpawnCleanUpScheduler() -

Schedules the CleanUp of Groups

-
SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle) - -
- -

Global(s)

-
-
- - #SPAWN - -SPAWN - -
-
- -

SPAWN class, extends Base#BASE

- -

The SPAWN class allows to spawn dynamically new groups.

- - -

Each SPAWN object needs to be have a related template group setup in the Mission Editor (ME), -which is a normal group with the Late Activation flag set. -This template group will never be activated in your mission.
-SPAWN uses that template group to reference to all the characteristics -(air, ground, livery, unit composition, formation, skill level etc) of each new group to be spawned.

- -

Therefore, when creating a SPAWN object, the SPAWN.New and SPAWN.NewWithAlias require -the name of the template group to be given as a string to those constructor methods.

- -

Initialization settings can be applied on the SPAWN object, -which modify the behaviour or the way groups are spawned. -These initialization methods have the prefix Init. -There are also spawn methods with the prefix Spawn and will spawn new groups in various ways.

- -

IMPORTANT! The methods with prefix Init must be used before any methods with prefix Spawn method are used, or unexpected results may appear!!!

- -

Because SPAWN can spawn multiple groups of a template group, -SPAWN has an internal index that keeps track -which was the latest group that was spawned.

- -

Limits can be set on how many groups can be spawn in each SPAWN object, -using the method SPAWN.InitLimit. SPAWN has 2 kind of limits:

- -
    -
  • The maximum amount of Units that can be alive at the same time...
  • -
  • The maximum amount of Groups that can be spawned... This is more of a resource-type of limit.
  • -
- -

When new groups get spawned using the Spawn methods, -it will be evaluated whether any limits have been reached. -When no spawn limit is reached, a new group will be created by the spawning methods, -and the internal index will be increased with 1.

- -

These limits ensure that your mission does not accidentally get flooded with spawned groups.
-Additionally, it also guarantees that independent of the group composition, -at any time, the most optimal amount of groups are alive in your mission. -For example, if your template group has a group composition of 10 units, and you specify a limit of 100 units alive at the same time, -with unlimited resources = :InitLimit( 100, 0 ) and 10 groups are alive, but two groups have only one unit alive in the group, -then a sequent Spawn(Scheduled) will allow a new group to be spawned!!!

- -

IMPORTANT!! If a limit has been reached, it is possible that a Spawn method returns nil, meaning, no Group had been spawned!!!

- -

Spawned groups get the same name as the name of the template group.
-Spawned units in those groups keep by default the same name as the name of the template group.
-However, because multiple groups and units are created from the template group, -a suffix is added to each spawned group and unit.

- -

Newly spawned groups will get the following naming structure at run-time:

- -
    -
  1. Spawned groups will have the name _GroupName#nnn_, where GroupName is the name of the template group, - and nnn is a counter from 0 to 999.
  2. -
  3. Spawned units will have the name _GroupName#nnn-uu_, - where uu is a counter from 0 to 99 for each new spawned unit belonging to the group.
  4. -
- -

That being said, there is a way to keep the same unit names!
-The method SPAWN.InitKeepUnitNames() will keep the same unit names as defined within the template group, thus:

- -
    -
  1. Spawned units will have the name _UnitName#nnn-uu_, - where UnitName is the unit name as defined in the template group*, - and uu is a **counter from 0 to 99 for each new spawned unit belonging to the group.
  2. -
- -

Some additional notes that need to be considered!!:

- -
    -
  • templates are actually groups defined within the mission editor, with the flag "Late Activation" set. - As such, these groups are never used within the mission, but are used by the #SPAWN module.
  • -
  • It is important to defined BEFORE you spawn new groups, - a proper initialization of the SPAWN instance is done with the options you want to use.
  • -
  • When designing a mission, NEVER name groups using a "#" within the name of the group Spawn template(s), - or the SPAWN module logic won't work anymore.
  • -
- -

SPAWN construction methods

- -

Create a new SPAWN object with the SPAWN.New() or the SPAWN.NewWithAlias() methods:

- -
    -
  • SPAWN.New(): Creates a new SPAWN object taking the name of the group that represents the GROUP template (definition).
  • -
  • SPAWN.NewWithAlias(): Creates a new SPAWN object taking the name of the group that represents the GROUP template (definition), and gives each spawned Group an different name.
  • -
- -

It is important to understand how the SPAWN class works internally. The SPAWN object created will contain internally a list of groups that will be spawned and that are already spawned. -The initialization methods will modify this list of groups so that when a group gets spawned, ALL information is already prepared when spawning. This is done for performance reasons. -So in principle, the group list will contain all parameters and configurations after initialization, and when groups get actually spawned, this spawning can be done quickly and efficient.

- -

SPAWN Initialization methods

- -

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

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

- -
    -
  • SPAWN.InitArray(): Make groups visible before they are actually activated, and order these groups like a batallion in an array.
  • -
- -

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

- - - -

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. -Every time a SPAWN object spawns a new GROUP object, a reference to the GROUP object is added to an internal table of GROUPS. -SPAWN provides methods to iterate through that internal GROUP object reference table:

- -
    -
  • SPAWN.GetFirstAliveGroup(): Will find the first alive GROUP it has spawned, and return the alive GROUP object and the first Index where the first alive GROUP object has been found.
  • -
  • SPAWN.GetNextAliveGroup(): Will find the next alive GROUP object from a given Index, and return a reference to the alive GROUP object and the next Index where the alive GROUP has been found.
  • -
  • SPAWN.GetLastAliveGroup(): Will find the last alive GROUP object, and will return a reference to the last live GROUP object and the last Index where the last alive GROUP object has been found.
  • -
- -

You can use the methods SPAWN.GetFirstAliveGroup() and sequently SPAWN.GetNextAliveGroup() to iterate through the alive GROUPS within the SPAWN object, and to actions... See the respective methods for an example. -The method SPAWN.GetGroupFromIndex() will return the GROUP object reference from the given Index, dead or alive...

- -

Spawned cleaning of inactive groups

- -

Sometimes, it will occur during a mission run-time, that ground or especially air objects get damaged, and will while being damged stop their activities, while remaining alive. -In such cases, the SPAWN object will just sit there and wait until that group gets destroyed, but most of the time it won't, -and it may occur that no new groups are or can be spawned as limits are reached. -To prevent this, a SPAWN.InitCleanUp() initialization method has been defined that will silently monitor the status of each spawned group. -Once a group has a velocity = 0, and has been waiting for a defined interval, that group will be cleaned or removed from run-time. -There is a catch however :-) If a damaged group has returned to an airbase within the coalition, that group will not be considered as "lost"... -In such a case, when the inactive group is cleaned, a new group will Re-spawned automatically. -This models AI that has succesfully returned to their airbase, to restart their combat activities. -Check the SPAWN.InitCleanUp() for further info.

- -

Catch the Group Spawn Event in a callback function!

- -

When using the SPAWN.SpawnScheduleds are created following the spawn time interval parameters. -When a new Group is spawned, you maybe want to execute actions with that group spawned at the spawn event. -The SPAWN class supports this functionality through the method SPAWN.OnSpawnGroup( *function( SpawnedGroup ) end * ), -which takes a function as a parameter that you can define locally. -Whenever a new Group is spawned, the given function is called, and the Group that was just spawned, is given as a parameter. -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.

- - - -
-
-

Type Spawn

- -

Type SPAWN

- -

SPAWN Class

- -

Field(s)

-
-
- - #boolean - -SPAWN.AIOnOff - -
-
- - - - -

The AI is on by default when spawning a group.

- -
-
-
-
- - #number - -SPAWN.AliveUnits - -
-
- - - -
-
-
-
- - -SPAWN.ClassName - -
-
- - - -
-
-
-
- - - -SPAWN.CleanUpScheduler - -
-
- - - - -

self.CleanUpFunction = routines.scheduleFunction( self._SpawnCleanUpScheduler, { self }, timer.getTime() + 1, SpawnCleanUpInterval )

- -
-
-
-
- - #boolean - -SPAWN.DelayOnOff - -
-
- - - - -

No intial delay when spawning the first group.

- -
-
-
-
- - -SPAWN:GetFirstAliveGroup() - -
-
- -

Will find the first alive Group it has spawned, and return the alive Group object and the first Index where the first alive Group object has been found.

- -

Return values

-
    -
  1. - -

    Wrapper.Group#GROUP, #number: -The Group object found, the new Index where the group was found.

    - -
  2. -
  3. - -

    #nil, #nil: -When no group is found, #nil is returned.

    - -
  4. -
-

Usage:

-
-- Find the first alive @{Group} object of the SpawnPlanes SPAWN object @{Group} collection that it has spawned during the mission.
-local GroupPlane, Index = SpawnPlanes:GetFirstAliveGroup()
-while GroupPlane ~= nil do
-  -- Do actions with the GroupPlane object.
-  GroupPlane, Index = SpawnPlanes:GetNextAliveGroup( Index )
-end
- -
-
-
-
- - -SPAWN:GetGroupFromIndex(SpawnIndex) - -
-
- -

Get the group from an index.

- - -

Returns the group from the SpawnGroups list. -If no index is given, it will return the first group in the list.

- -

Parameter

-
    -
  • - -

    #number SpawnIndex : -The index of the group to return.

    - -
  • -
-

Return value

- -

Wrapper.Group#GROUP: -self

- -
-
-
-
- - -SPAWN:GetLastAliveGroup() - -
-
- -

Will find the last alive Group object, and will return a reference to the last live Group object and the last Index where the last alive Group object has been found.

- -

Return values

-
    -
  1. - -

    Wrapper.Group#GROUP, #number: -The last alive Group object found, the last Index where the last alive Group object was found.

    - -
  2. -
  3. - -

    #nil, #nil: -When no alive Group object is found, #nil is returned.

    - -
  4. -
-

Usage:

-
-- Find the last alive @{Group} object of the SpawnPlanes SPAWN object @{Group} collection that it has spawned during the mission.
-local GroupPlane, Index = SpawnPlanes:GetLastAliveGroup()
-if GroupPlane then -- GroupPlane can be nil!!!
-  -- Do actions with the GroupPlane object.
-end
- -
-
-
-
- - -SPAWN:GetNextAliveGroup(SpawnIndexStart) - -
-
- -

Will find the next alive Group object from a given Index, and return a reference to the alive Group object and the next Index where the alive Group has been found.

- -

Parameter

-
    -
  • - -

    #number SpawnIndexStart : -A Index holding the start position to search from. This method can also be used to find the first alive Group object from the given Index.

    - -
  • -
-

Return values

-
    -
  1. - -

    Wrapper.Group#GROUP, #number: -The next alive Group object found, the next Index where the next alive Group object was found.

    - -
  2. -
  3. - -

    #nil, #nil: -When no alive Group object is found from the start Index position, #nil is returned.

    - -
  4. -
-

Usage:

-
-- Find the first alive @{Group} object of the SpawnPlanes SPAWN object @{Group} collection that it has spawned during the mission.
-local GroupPlane, Index = SpawnPlanes:GetFirstAliveGroup()
-while GroupPlane ~= nil do
-  -- Do actions with the GroupPlane object.
-  GroupPlane, Index = SpawnPlanes:GetNextAliveGroup( Index )
-end
- -
-
-
-
- - -SPAWN:GetSpawnIndexFromGroup(SpawnGroup) - -
-
- -

Get the index from a given group.

- - -

The function will search the name of the group for a #, and will return the number behind the #-mark.

- -

Parameter

-
    -
  • - -

    SpawnGroup :

    - -
  • -
-
-
-
-
- - -SPAWN:InitAIOff() - -
-
- -

Turns the AI Off for the Group when spawning.

- -

Return value

- -

#SPAWN: -The SPAWN object

- -
-
-
-
- - -SPAWN:InitAIOn() - -
-
- -

Turns the AI On for the Group when spawning.

- -

Return value

- -

#SPAWN: -The SPAWN object

- -
-
-
-
- - -SPAWN:InitAIOnOff(AIOnOff) - -
-
- - - -

Parameter

-
    -
  • - -

    AIOnOff :

    - -
  • -
-
-
-
-
- - -SPAWN:InitArray(SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY) - -
-
- -

Makes the groups visible before start (like a batallion).

- - -

The method will take the position of the group as the first position in the array.

- -

Parameters

-
    -
  • - -

    #number SpawnAngle :

    -
        The angle in degrees how the groups and each unit of the group will be positioned.
    -
    - -
  • -
  • - -

    #number SpawnWidth :

    -
         The amount of Groups that will be positioned on the X axis.
    -
    - -
  • -
  • - -

    #number SpawnDeltaX :

    -
       The space between each Group on the X-axis.
    -
    - -
  • -
  • - -

    #number SpawnDeltaY :

    -
         The space between each Group on the Y-axis.
    -
    - -
  • -
-

Return value

- -

#SPAWN: -self

- -

Usage:

-
-- Define an array of Groups.
-Spawn_BE_Ground = SPAWN:New( 'BE Ground' ):InitLimit( 2, 24 ):InitArray( 90, "Diamond", 10, 100, 50 )
- -
-
-
-
- - -SPAWN:InitCleanUp(SpawnCleanUpInterval) - -
-
- -

CleanUp groups when they are still alive, but inactive.

- - -

When groups are still alive and have become inactive due to damage and are unable to contribute anything, then this group will be removed at defined intervals in seconds.

- -

Parameter

-
    -
  • - -

    #string SpawnCleanUpInterval : -The interval to check for inactive groups within seconds.

    - -
  • -
-

Return value

- -

#SPAWN: -self

- -

Usage:

-
Spawn_Helicopter:CleanUp( 20 )  -- CleanUp the spawning of the helicopters every 20 seconds when they become inactive.
- -
-
-
-
- - -SPAWN:InitDelayOff() - -
-
- -

Turns the Delay Off for the Group when spawning.

- -

Return value

- -

#SPAWN: -The SPAWN object

- -
-
-
-
- - -SPAWN:InitDelayOn() - -
-
- -

Turns the Delay On for the Group when spawning.

- -

Return value

- -

#SPAWN: -The SPAWN object

- -
-
-
-
- - -SPAWN:InitDelayOnOff(DelayOnOff) - -
-
- - - -

Parameter

-
    -
  • - -

    DelayOnOff :

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

- -

Return value

- -

#SPAWN: -self

- -
-
-
-
- - -SPAWN:InitLimit(SpawnMaxUnitsAlive, SpawnMaxGroups) - -
-
- -

Limits the Maximum amount of Units that can be alive at the same time, and the maximum amount of groups that can be spawned.

- - -

Note that this method is exceptionally important to balance the performance of the mission. Depending on the machine etc, a mission can only process a maximum amount of units. -If the time interval must be short, but there should not be more Units or Groups alive than a maximum amount of units, then this method should be used... -When a SPAWN.New is executed and the limit of the amount of units alive is reached, then no new spawn will happen of the group, until some of these units of the spawn object will be destroyed.

- -

Parameters

-
    -
  • - -

    #number SpawnMaxUnitsAlive : -The maximum amount of units that can be alive at runtime.

    - -
  • -
  • - -

    #number SpawnMaxGroups : -The maximum amount of groups that can be spawned. When the limit is reached, then no more actual spawns will happen of the group. -This parameter is useful to define a maximum amount of airplanes, ground troops, helicopters, ships etc within a supply area. -This parameter accepts the value 0, which defines that there are no maximum group limits, but there are limits on the maximum of units that can be alive at the same time.

    - -
  • -
-

Return value

- -

#SPAWN: -self

- -

Usage:

-
-- NATO helicopters engaging in the battle field.
--- This helicopter group consists of one Unit. So, this group will SPAWN maximum 2 groups simultaneously within the DCSRTE.
--- There will be maximum 24 groups spawned during the whole mission lifetime. 
-Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitLimit( 2, 24 )
- -
-
-
-
- - -SPAWN:InitRandomizePosition(RandomizePosition, OuterRadius, InnerRadius) - -
-
- -

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.

- -

Parameters

-
    -
  • - -

    #boolean RandomizePosition : -If true, SPAWN will perform the randomization of the Groups position between a given outer and inner radius.

    - -
  • -
  • - -

    Dcs.DCSTypes#Distance OuterRadius : -(optional) The outer radius in meters where the new group will be spawned.

    - -
  • -
  • - -

    Dcs.DCSTypes#Distance InnerRadius : -(optional) The inner radius in meters where the new group will NOT be spawned.

    - -
  • -
-

Return value

- -

#SPAWN:

- - -
-
-
-
- - -SPAWN:InitRandomizeRoute(SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight) - -
-
- -

Randomizes the defined route of the SpawnTemplatePrefix group in the ME.

- - -

This is very useful to define extra variation of the behaviour of groups.

- -

Parameters

-
    -
  • - -

    #number SpawnStartPoint : -is the waypoint where the randomization begins. -Note that the StartPoint = 0 equaling the point where the group is spawned.

    - -
  • -
  • - -

    #number SpawnEndPoint : -is the waypoint where the randomization ends counting backwards. -This parameter is useful to avoid randomization to end at a waypoint earlier than the last waypoint on the route.

    - -
  • -
  • - -

    #number SpawnRadius : -is the radius in meters in which the randomization of the new waypoints, with the original waypoint of the original template located in the middle ...

    - -
  • -
  • - -

    #number SpawnHeight : -(optional) Specifies the additional height in meters that can be added to the base height specified at each waypoint in the ME.

    - -
  • -
-

Return value

- -

#SPAWN:

- - -

Usage:

-
-- NATO helicopters engaging in the battle field. 
--- The KA-50 has waypoints Start point ( =0 or SP ), 1, 2, 3, 4, End point (= 5 or DP). 
--- Waypoints 2 and 3 will only be randomized. The others will remain on their original position with each new spawn of the helicopter.
--- The randomization of waypoint 2 and 3 will take place within a radius of 2000 meters.
-Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute( 2, 2, 2000 )
- -
-
-
-
- - -SPAWN:InitRandomizeTemplate(SpawnTemplatePrefixTable) - -
-
- -

This method is rather complicated to understand.

- - -

But I'll try to explain. -This method becomes useful when you need to spawn groups with random templates of groups defined within the mission editor, -but they will all follow the same Template route and have the same prefix name. -In other words, this method randomizes between a defined set of groups the template to be used for each new spawn of a group.

- -

Parameter

-
    -
  • - -

    #string SpawnTemplatePrefixTable : -A table with the names of the groups defined within the mission editor, from which one will be choosen when a new group will be spawned.

    - -
  • -
-

Return value

- -

#SPAWN:

- - -

Usage:

-
-- NATO Tank Platoons invading Gori.
--- Choose between 13 different 'US Tank Platoon' configurations for each new SPAWN the Group to be spawned for the 
--- 'US Tank Platoon Left', 'US Tank Platoon Middle' and 'US Tank Platoon Right' SpawnTemplatePrefixes.
--- Each new SPAWN will randomize the route, with a defined time interval of 200 seconds with 40% time variation (randomization) and 
--- with a limit set of maximum 12 Units alive simulteneously  and 150 Groups to be spawned during the whole mission.
-Spawn_US_Platoon = { 'US Tank Platoon 1', 'US Tank Platoon 2', 'US Tank Platoon 3', 'US Tank Platoon 4', 'US Tank Platoon 5', 
-                     'US Tank Platoon 6', 'US Tank Platoon 7', 'US Tank Platoon 8', 'US Tank Platoon 9', 'US Tank Platoon 10', 
-                     'US Tank Platoon 11', 'US Tank Platoon 12', 'US Tank Platoon 13' }
-Spawn_US_Platoon_Left = SPAWN:New( 'US Tank Platoon Left' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
-Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
-Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
- -
-
-
-
- - -SPAWN:InitRandomizeUnits(RandomizeUnits, OuterRadius, InnerRadius) - -
-
- -

Randomizes the UNITs that are spawned within a radius band given an Outer and Inner radius.

- -

Parameters

-
    -
  • - -

    #boolean RandomizeUnits : -If true, SPAWN will perform the randomization of the UNITs position within the group between a given outer and inner radius.

    - -
  • -
  • - -

    Dcs.DCSTypes#Distance OuterRadius : -(optional) The outer radius in meters where the new group will be spawned.

    - -
  • -
  • - -

    Dcs.DCSTypes#Distance InnerRadius : -(optional) The inner radius in meters where the new group will NOT be spawned.

    - -
  • -
-

Return value

- -

#SPAWN:

- - -

Usage:

-
-- NATO helicopters engaging in the battle field. 
--- The KA-50 has waypoints Start point ( =0 or SP ), 1, 2, 3, 4, End point (= 5 or DP). 
--- Waypoints 2 and 3 will only be randomized. The others will remain on their original position with each new spawn of the helicopter.
--- The randomization of waypoint 2 and 3 will take place within a radius of 2000 meters.
-Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute( 2, 2, 2000 )
- -
-
-
-
- - -SPAWN:InitRandomizeZones(SpawnZoneTable) - -
-
- - - - -

TODO: Add example. -- This method provides the functionality to randomize the spawning of the Groups at a given list of zones of different types. - @param #SPAWN self - @param #table SpawnZoneTable A table with Zone objects. If this table is given, then each spawn will be executed within the given list of Zones objects. - @return #SPAWN - @usage - -- NATO Tank Platoons invading Gori. - -- Choose between 3 different zones for each new SPAWN the Group to be executed, regardless of the zone type.

- -

Parameter

-
    -
  • - -

    SpawnZoneTable :

    - -
  • -
-
-
-
-
- - -SPAWN:InitRepeat() - -
-
- -

For planes and helicopters, when these groups go home and land on their home airbases and farps, they normally would taxi to the parking spot, shut-down their engines and wait forever until the Group is removed by the runtime environment.

- - -

This method is used to re-spawn automatically (so no extra call is needed anymore) the same group after it has landed. -This will enable a spawned group to be re-spawned after it lands, until it is destroyed... -Note: When the group is respawned, it will re-spawn from the original airbase where it took off. -So ensure that the routes for groups that respawn, always return to the original airbase, or players may get confused ...

- -

Return value

- -

#SPAWN: -self

- -

Usage:

-
-- RU Su-34 - AI Ship Attack
--- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically. 
-SpawnRU_SU34 = SPAWN:New( 'TF1 RU Su-34 Krymsk@AI - Attack Ships' ):Schedule( 2, 3, 1800, 0.4 ):SpawnUncontrolled():InitRandomizeRoute( 1, 1, 3000 ):RepeatOnEngineShutDown()
- -
-
-
-
- - -SPAWN:InitRepeatOnEngineShutDown() - -
-
- -

Respawn after landing when its engines have shut down.

- -

Return value

- -

#SPAWN: -self

- -
-
-
-
- - -SPAWN:InitRepeatOnLanding() - -
-
- -

Respawn group after landing.

- -

Return value

- -

#SPAWN: -self

- -
-
-
-
- - -SPAWN:InitUnControlled(UnControlled) - -
-
- -

(AIR) Will spawn a plane group in UnControlled or Controlled mode...

- - -

This will be similar to the uncontrolled flag setting in the ME. -You can use UnControlled mode to simulate planes startup and ready for take-off but aren't moving (yet). -ReSpawn the plane in Controlled mode, and the plane will move...

- -

Parameter

-
    -
  • - -

    #boolean UnControlled : -true if UnControlled, false if Controlled.

    - -
  • -
-

Return value

- -

#SPAWN: -self

- -
-
-
-
- - #number - -SPAWN.MaxAliveGroups - -
-
- - - -
-
-
-
- - #number - -SPAWN.MaxAliveUnits - -
-
- - - -
-
-
-
- - -SPAWN:New(SpawnTemplatePrefix) - -
-
- -

Creates the main object to spawn a Group defined in the DCS ME.

- -

Parameter

-
    -
  • - -

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

- -

#SPAWN:

- - -

Usages:

-
    -
  • -- NATO helicopters engaging in the battle field.
    -Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' )
  • -
  • local Plane = SPAWN:New( "Plane" ) -- Creates a new local variable that can initiate new planes with the name "Plane#ddd" using the template "Plane" as defined within the ME.
  • -
- -
-
-
-
- - -SPAWN:NewWithAlias(SpawnTemplatePrefix, SpawnAliasPrefix) - -
-
- -

Creates a new SPAWN instance to create new groups based on the defined template and using a new alias for each new group.

- -

Parameters

-
    -
  • - -

    #string SpawnTemplatePrefix : -is the name of the Group in the ME that defines the Template.

    - -
  • -
  • - -

    #string SpawnAliasPrefix : -is the name that will be given to the Group at runtime.

    - -
  • -
-

Return value

- -

#SPAWN:

- - -

Usages:

-
    -
  • -- NATO helicopters engaging in the battle field.
    -Spawn_BE_KA50 = SPAWN:NewWithAlias( 'BE KA-50@RAMP-Ground Defense', 'Helicopter Attacking a City' )
  • -
  • local PlaneWithAlias = SPAWN:NewWithAlias( "Plane", "Bomber" ) -- Creates a new local variable that can instantiate new planes with the name "Bomber#ddd" using the template "Plane" as defined within the ME.
  • -
- -
-
-
-
- - -SPAWN:OnSpawnGroup(SpawnCallBackFunction, SpawnFunctionArguments, ...) - -
-
- -

Allows to place a CallFunction hook when a new group spawns.

- - -

The provided method will be called when a new group is spawned, including its given parameters. -The first parameter of the SpawnFunction is the Group#GROUP that was spawned.

- -

Parameters

-
    -
  • - -

    #function SpawnCallBackFunction : -The function to be called when a group spawns.

    - -
  • -
  • - -

    SpawnFunctionArguments : -A random amount of arguments to be provided to the function when the group spawns.

    - -
  • -
  • - -

    ... :

    - -
  • -
-

Return value

- -

#SPAWN:

- - -

Usage:

-
-- Declare SpawnObject and call a function when a new Group is spawned.
-local SpawnObject = SPAWN
-  :New( "SpawnObject" )
-  :InitLimit( 2, 10 )
-  :OnSpawnGroup(
-    function( SpawnGroup )
-      SpawnGroup:E( "I am spawned" )
-    end 
-    )
-  :SpawnScheduled( 300, 0.3 )
- -
-
-
-
- - -SPAWN:ReSpawn(SpawnIndex) - -
-
- -

Will re-spawn a group based on a given index.

- - -

Note: Uses DATABASE module defined in MOOSE.

- -

Parameter

-
    -
  • - -

    #string SpawnIndex : -The index of the group to be spawned.

    - -
  • -
-

Return value

- -

Wrapper.Group#GROUP: -The group that was spawned. You can use this group for further actions.

- -
-
-
-
- - #boolean - -SPAWN.Repeat - -
-
- - - - -

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

- -
-
-
-
- - #boolean - -SPAWN.RepeatOnEngineShutDown - -
-
- - - -
-
-
-
- - #boolean - -SPAWN.RepeatOnLanding - -
-
- - - -
-
-
-
- - -SPAWN:Spawn() - -
-
- -

Will spawn a group based on the internal index.

- - -

Note: Uses DATABASE module defined in MOOSE.

- -

Return value

- -

Wrapper.Group#GROUP: -The group that was spawned. You can use this group for further actions.

- -
-
-
-
- - #string - -SPAWN.SpawnAliasPrefix - -
-
- - - -
-
-
-
- - - -SPAWN.SpawnCleanUpInterval - -
-
- - - -
-
-
-
- - - -SPAWN.SpawnCleanUpTimeStamps - -
-
- - - -
-
-
-
- - #number - -SPAWN.SpawnCount - -
-
- - - - -

The internal counter of the amount of spawning the has happened since SpawnStart.

- -
-
-
-
- - -SPAWN:SpawnFromStatic(HostStatic, SpawnIndex) - -
-
- -

Will spawn a group from a hosting static.

- - -

This method is mostly advisable to be used if you want to simulate spawning from buldings and structures (static buildings). -You can use the returned group to further define the route to be followed.

- -

Parameters

-
    -
  • - -

    Wrapper.Static#STATIC HostStatic : -The static dropping or unloading the group.

    - -
  • -
  • - -

    #number SpawnIndex : -(optional) The index which group to spawn within the given zone.

    - -
  • -
-

Return values

-
    -
  1. - -

    Wrapper.Group#GROUP: -that was spawned.

    - -
  2. -
  3. - -

    #nil: -Nothing was spawned.

    - -
  4. -
-
-
-
-
- - -SPAWN:SpawnFromUnit(HostUnit, SpawnIndex) - -
-
- -

Will spawn a group from a hosting unit.

- - -

This method is mostly advisable to be used if you want to simulate spawning from air units, like helicopters, which are dropping infantry into a defined Landing Zone. -Note that each point in the route assigned to the spawning group is reset to the point of the spawn. -You can use the returned group to further define the route to be followed.

- -

Parameters

-
    -
  • - -

    Wrapper.Unit#UNIT HostUnit : -The air or ground unit dropping or unloading the group.

    - -
  • -
  • - -

    #number SpawnIndex : -(optional) The index which group to spawn within the given zone.

    - -
  • -
-

Return values

-
    -
  1. - -

    Wrapper.Group#GROUP: -that was spawned.

    - -
  2. -
  3. - -

    #nil: -Nothing was spawned.

    - -
  4. -
-
-
-
-
- - -SPAWN:SpawnFromVec2(Vec2, SpawnIndex) - -
-
- -

Will spawn a group from a Vec2 in 3D space.

- - -

This method is mostly advisable to be used if you want to simulate spawning groups on the ground from air units, like vehicles. -Note that each point in the route assigned to the spawning group is reset to the point of the spawn. -You can use the returned group to further define the route to be followed.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Vec2 Vec2 : -The Vec2 coordinates where to spawn the group.

    - -
  • -
  • - -

    #number SpawnIndex : -(optional) The index which group to spawn within the given zone.

    - -
  • -
-

Return values

-
    -
  1. - -

    Wrapper.Group#GROUP: -that was spawned.

    - -
  2. -
  3. - -

    #nil: -Nothing was spawned.

    - -
  4. -
-
-
-
-
- - -SPAWN:SpawnFromVec3(Vec3, SpawnIndex) - -
-
- -

Will spawn a group from a Vec3 in 3D space.

- - -

This method is mostly advisable to be used if you want to simulate spawning units in the air, like helicopters or airplanes. -Note that each point in the route assigned to the spawning group is reset to the point of the spawn. -You can use the returned group to further define the route to be followed.

- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Vec3 Vec3 : -The Vec3 coordinates where to spawn the group.

    - -
  • -
  • - -

    #number SpawnIndex : -(optional) The index which group to spawn within the given zone.

    - -
  • -
-

Return values

-
    -
  1. - -

    Wrapper.Group#GROUP: -that was spawned.

    - -
  2. -
  3. - -

    #nil: -Nothing was spawned.

    - -
  4. -
-
-
-
-
- - - -SPAWN.SpawnFunctionArguments - -
-
- - - -
-
-
-
- - - -SPAWN.SpawnFunctionHook - -
-
- - - -
-
-
-
- - -SPAWN:SpawnGroupName(SpawnIndex) - -
-
- -

Will return the SpawnGroupName either with with a specific count number or without any count.

- -

Parameter

-
    -
  • - -

    #number SpawnIndex : -Is the number of the Group that is to be spawned.

    - -
  • -
-

Return value

- -

#string: -SpawnGroupName

- -
-
-
-
- - - -SPAWN.SpawnGroups - -
-
- - - - -

Array containing the descriptions of each Group to be Spawned.

- -
-
-
-
- - -SPAWN:SpawnInZone(Zone, RandomizeGroup, SpawnIndex) - -
-
- -

Will spawn a Group within a given Zone.

- - -

The Zone can be of any type derived from Zone#ZONE_BASE. -Once the Group is spawned within the zone, the Group will continue on its route. -The first waypoint (where the group is spawned) is replaced with the zone location coordinates.

- -

Parameters

-
    -
  • - -

    Core.Zone#ZONE Zone : -The zone where the group is to be spawned.

    - -
  • -
  • - -

    #boolean RandomizeGroup : -(optional) Randomization of the Group position in the zone.

    - -
  • -
  • - -

    #number SpawnIndex : -(optional) The index which group to spawn within the given zone.

    - -
  • -
-

Return values

-
    -
  1. - -

    Wrapper.Group#GROUP: -that was spawned.

    - -
  2. -
  3. - -

    #nil: -when nothing was spawned.

    - -
  4. -
-
-
-
-
- - #number - -SPAWN.SpawnIndex - -
-
- - - -
-
-
-
- - #boolean - -SPAWN.SpawnInitKeepUnitNames - -
-
- - - - -

Overwrite unit names by default with group name.

- -
-
-
-
- - #boolean - -SPAWN.SpawnInitLimit - -
-
- - - -
-
-
-
- - -SPAWN.SpawnInnerRadius - -
-
- - - -
-
-
-
- - #boolean - -SPAWN.SpawnIsScheduled - -
-
- - - - -

Reflects if the spawning for this SpawnTemplatePrefix is going to be scheduled or not.

- -
-
-
-
- - - -SPAWN.SpawnMaxGroups - -
-
- - - - -

The maximum amount of groups that can be spawned.

- -
-
-
-
- - - -SPAWN.SpawnMaxUnitsAlive - -
-
- - - - -

The maximum amount of groups that can be alive of SpawnTemplatePrefix at the same time.

- -
-
-
-
- - -SPAWN.SpawnOuterRadius - -
-
- - - -
-
-
-
- - #boolean - -SPAWN.SpawnRandomize - -
-
- - - - -

Sets the randomization flag of new Spawned units to false.

- -
-
-
-
- - -SPAWN.SpawnRandomizePosition - -
-
- - - -
-
-
-
- - -SPAWN.SpawnRandomizePositionInnerRadius - -
-
- - - -
-
-
-
- - -SPAWN.SpawnRandomizePositionOuterRadius - -
-
- - - -
-
-
-
- - #boolean - -SPAWN.SpawnRandomizeRoute - -
-
- - - -
-
-
-
- - - -SPAWN.SpawnRandomizeRouteEndPoint - -
-
- - - -
-
-
-
- - - -SPAWN.SpawnRandomizeRouteHeight - -
-
- - - -
-
-
-
- - - -SPAWN.SpawnRandomizeRouteRadius - -
-
- - - -
-
-
-
- - - -SPAWN.SpawnRandomizeRouteStartPoint - -
-
- - - -
-
-
-
- - #boolean - -SPAWN.SpawnRandomizeTemplate - -
-
- - - -
-
-
-
- - -SPAWN.SpawnRandomizeUnits - -
-
- - - -
-
-
-
- - -SPAWN:SpawnScheduleStart() - -
-
- -

Will re-start the spawning scheduler.

- - -

Note: This method is only required to be called when the schedule was stopped.

- -

Return value

- -

#SPAWN:

- - -
-
-
-
- - -SPAWN:SpawnScheduleStop() - -
-
- -

Will stop the scheduled spawning scheduler.

- -

Return value

- -

#SPAWN:

- - -
-
-
-
- - -SPAWN:SpawnScheduled(SpawnTime, SpawnTimeVariation) - -
-
- -

Spawns new groups at varying time intervals.

- - -

This is useful if you want to have continuity within your missions of certain (AI) groups to be present (alive) within your missions.

- -

Parameters

-
    -
  • - -

    #number SpawnTime : -The time interval defined in seconds between each new spawn of new groups.

    - -
  • -
  • - -

    #number SpawnTimeVariation : -The variation to be applied on the defined time interval between each new spawn. -The variation is a number between 0 and 1, representing the %-tage of variation to be applied on the time interval.

    - -
  • -
-

Return value

- -

#SPAWN: -self

- -

Usage:

-
-- NATO helicopters engaging in the battle field.
--- The time interval is set to SPAWN new helicopters between each 600 seconds, with a time variation of 50%.
--- The time variation in this case will be between 450 seconds and 750 seconds. 
--- This is calculated as follows: 
---      Low limit:   600 * ( 1 - 0.5 / 2 ) = 450 
---      High limit:  600 * ( 1 + 0.5 / 2 ) = 750
--- Between these two values, a random amount of seconds will be choosen for each new spawn of the helicopters.
-Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
- -
-
-
-
- - - -SPAWN.SpawnScheduler - -
-
- - - -
-
-
-
- - - -SPAWN.SpawnTemplate - -
-
- - - - -

Contains the template structure for a Group Spawn from the Mission Editor. Note that this group must have lateActivation always on!!!

- -
-
-
-
- - #string - -SPAWN.SpawnTemplatePrefix - -
-
- - - -
-
-
-
- - - -SPAWN.SpawnTemplatePrefixTable - -
-
- - - -
-
-
-
- - #boolean - -SPAWN.SpawnUnControlled - -
-
- - - -
-
-
-
- - #boolean - -SPAWN.SpawnVisible - -
-
- - - - -

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

- -
-
-
-
- - -SPAWN:SpawnWithIndex(SpawnIndex) - -
-
- -

Will spawn a group with a specified index number.

- - -

Uses DATABASE global object defined in MOOSE.

- -

Parameter

-
    -
  • - -

    #string SpawnIndex : -The index of the group to be spawned.

    - -
  • -
-

Return value

- -

Wrapper.Group#GROUP: -The group that was spawned. You can use this group for further actions.

- -
-
-
-
- - #SPAWN.SpawnZoneTable - -SPAWN.SpawnZoneTable - -
-
- - - -
-
-
-
- - #boolean - -SPAWN.UnControlled - -
-
- - - - -

When working in UnControlled mode, all planes are Spawned in UnControlled mode before the scheduler starts.

- -
-
-
-
- - -SPAWN:_GetGroupCategoryID(SpawnPrefix) - -
-
- -

Gets the CategoryID of the Group with the given SpawnPrefix

- -

Parameter

-
    -
  • - -

    SpawnPrefix :

    - -
  • -
-
-
-
-
- - -SPAWN:_GetGroupCoalitionID(SpawnPrefix) - -
-
- -

Gets the CoalitionID of the Group with the given SpawnPrefix

- -

Parameter

-
    -
  • - -

    SpawnPrefix :

    - -
  • -
-
-
-
-
- - -SPAWN:_GetGroupCountryID(SpawnPrefix) - -
-
- -

Gets the CountryID of the Group with the given SpawnPrefix

- -

Parameter

-
    -
  • - -

    SpawnPrefix :

    - -
  • -
-
-
-
-
- - -SPAWN:_GetLastIndex() - -
-
- -

Return the last maximum index that can be used.

- -
-
-
-
- - -SPAWN:_GetPrefixFromGroup(DCSUnit, SpawnGroup) - -
-
- -

Return the prefix of a SpawnUnit.

- - -

The method will search for a #-mark, and will return the text before the #-mark. -It will return nil of no prefix was found.

- -

Parameters

- -

Return values

-
    -
  1. - -

    #string: -The prefix

    - -
  2. -
  3. - -

    #nil: -Nothing found

    - -
  4. -
-
-
-
-
- - -SPAWN:_GetSpawnIndex(SpawnIndex) - -
-
- -

Get the next index of the groups to be spawned.

- - -

This method is complicated, as it is used at several spaces.

- -

Parameter

-
    -
  • - -

    SpawnIndex :

    - -
  • -
-
-
-
-
- - -SPAWN:_GetTemplate(SpawnTemplatePrefix) - -
-
- -

Gets the Group Template from the ME environment definition.

- - -

This method used the DATABASE object, which contains ALL initial and new spawned object in MOOSE.

- -

Parameter

-
    -
  • - -

    #string SpawnTemplatePrefix :

    - -
  • -
-

Return value

- - -

@SPAWN self

- -
-
-
-
- - -SPAWN:_InitializeSpawnGroups(SpawnIndex) - -
-
- -

Initalize the SpawnGroups collection.

- -

Parameter

-
    -
  • - -

    SpawnIndex :

    - -
  • -
-
-
-
-
- - -SPAWN:_OnBirth(EventData) - -
-
- - - -

Parameter

- -
-
-
-
- - -SPAWN:_OnDeadOrCrash(EventData) - -
-
- - - -

Parameter

- -
-
-
-
- - -SPAWN:_OnEngineShutDown(EventData) - -
-
- -

Will detect AIR Units shutting down their engines ...

- - -

When the event takes place, and the method RepeatOnEngineShutDown was called, the spawned Group will Re-SPAWN. -But only when the Unit was registered to have landed.

- -

Parameter

- -
-
-
-
- - -SPAWN:_OnLand(EventData) - -
-
- -

Will detect AIR Units landing...

- - -

When the event takes place, the spawned Group is registered as landed. -This is needed to ensure that Re-SPAWNing is only done for landed AIR Groups.

- -

Parameter

- -
-
-
-
- - -SPAWN:_OnTakeOff(EventData) - -
-
- -

Will detect AIR Units taking off...

- - -

When the event takes place, the spawned Group is registered as airborne... -This is needed to ensure that Re-SPAWNing only is done for landed AIR Groups.

- -

Parameter

- -
-
-
-
- - -SPAWN:_Prepare(SpawnTemplatePrefix, SpawnIndex) - -
-
- -

Prepares the new Group Template.

- -

Parameters

-
    -
  • - -

    #string SpawnTemplatePrefix :

    - -
  • -
  • - -

    #number SpawnIndex :

    - -
  • -
-

Return value

- -

#SPAWN: -self

- -
-
-
-
- - -SPAWN:_RandomizeRoute(SpawnIndex) - -
-
- -

Private method randomizing the routes.

- -

Parameter

-
    -
  • - -

    #number SpawnIndex : -The index of the group to be spawned.

    - -
  • -
-

Return value

- -

#SPAWN:

- - -
-
-
-
- - -SPAWN:_RandomizeTemplate(SpawnIndex) - -
-
- -

Private method that randomizes the template of the group.

- -

Parameter

-
    -
  • - -

    #number SpawnIndex :

    - -
  • -
-

Return value

- -

#SPAWN: -self

- -
-
-
-
- - -SPAWN:_RandomizeZones(SpawnIndex) - -
-
- -

Private method that randomizes the Zones where the Group will be spawned.

- -

Parameter

-
    -
  • - -

    #number SpawnIndex :

    - -
  • -
-

Return value

- -

#SPAWN: -self

- -
-
-
-
- - -SPAWN:_Scheduler() - -
-
- -

This function is called automatically by the Spawning scheduler.

- - -

It is the internal worker method SPAWNing new Groups on the defined time intervals.

- -
-
-
-
- - -SPAWN:_SpawnCleanUpScheduler() - -
-
- -

Schedules the CleanUp of Groups

- -

Return value

- -

#boolean: -True = Continue Scheduler

- -
-
-
-
- - -SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle) - -
-
- - - -

Parameters

-
    -
  • - -

    SpawnIndex :

    - -
  • -
  • - -

    SpawnRootX :

    - -
  • -
  • - -

    SpawnRootY :

    - -
  • -
  • - -

    SpawnX :

    - -
  • -
  • - -

    SpawnY :

    - -
  • -
  • - -

    SpawnAngle :

    - -
  • -
-
-
- -

Type SPAWN.SpawnZoneTable

- -
- -
- - diff --git a/docs/Documentation/SpawnStatic.html b/docs/Documentation/SpawnStatic.html deleted file mode 100644 index 99a7e20af..000000000 --- a/docs/Documentation/SpawnStatic.html +++ /dev/null @@ -1,491 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module SpawnStatic

- -

Core -- Spawn dynamically new STATICs in your missions.

- - -

-Banner Image

- -
- -

SPAWNSTATIC spawns static structures in your missions dynamically. See below the SPAWNSTATIC class documentation.

- -
- -

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.

- - -

Through creating a copy of an existing static object template as defined in the Mission Editor (ME), -SPAWNSTATIC can retireve the properties of the defined static object template (like type, category etc), and "copy" -these properties to create a new static object and place it at the desired coordinate.

- -

New spawned Statics get the same name as the name of the template Static, -or gets the given name when a new name is provided at the Spawn method.
-By default, spawned Statics will follow a naming convention 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():

- -
    -
  • SPAWNSTATIC.NewFromStatic(): Creates a new SPAWNSTATIC object given a name that is used as the base of the naming of each spawned Static.
  • -
- -

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 deleted file mode 100644 index 82fa993f2..000000000 --- a/docs/Documentation/Static.html +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Static

- -

This module contains the STATIC class.

- - - -

1) Static#STATIC class, extends Positionable#POSITIONABLE

-

Statics are Static Units defined within the Mission Editor. -Note that Statics are almost the same as Units, but they don't have a controller. -The Static#STATIC class is a wrapper class to handle the DCS Static objects:

- -
    -
  • Wraps the DCS Static objects.
  • -
  • Support all DCS Static APIs.
  • -
  • Enhance with Static specific APIs not in the DCS API set.
  • -
- -

1.1) STATIC reference methods

-

For each DCS Static will have a STATIC wrapper object (instance) within the _DATABASE object. -This is done at the beginning of the mission (when the mission starts).

- -

The STATIC class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference -using the Static Name.

- -

Another thing to know is that STATIC objects do not "contain" the DCS Static object. -The STATIc methods will reference the DCS Static object by name when it is needed during API execution. -If the DCS Static object does not exist or is nil, the STATIC methods will return nil and log an exception in the DCS.log file.

- -

The STATIc class provides the following functions to retrieve quickly the relevant STATIC instance:

- -
    -
  • STATIC.FindByName(): Find a STATIC instance from the _DATABASE object using a DCS Static name.
  • -
- -

IMPORTANT: ONE SHOULD NEVER SANATIZE these STATIC OBJECT REFERENCES! (make the STATIC object references nil).

- - -

Global(s)

- - - - - -
STATIC - -
-

Type STATIC

- - - - - - - - - - - - - - - - - - - - - - - - - -
STATIC.ClassName - -
STATIC:FindByName(StaticName, RaiseError) -

Finds a STATIC from the _DATABASE using the relevant Static Name.

-
STATIC:GetDCSObject() - -
STATIC:GetThreatLevel() - -
STATIC:Register(StaticName) - -
STATIC.StaticName - -
- -

Global(s)

-
-
- - #STATIC - -STATIC - -
-
- - - -
-
-

Type Static

- -

Type STATIC

- -

The STATIC class

- -

Field(s)

-
-
- - #string - -STATIC.ClassName - -
-
- - - -
-
-
-
- - -STATIC:FindByName(StaticName, RaiseError) - -
-
- -

Finds a STATIC from the _DATABASE using the relevant Static Name.

- - -

As an optional parameter, a briefing text can be given also.

- -

Parameters

-
    -
  • - -

    #string StaticName : -Name of the DCS Static as defined within the Mission Editor.

    - -
  • -
  • - -

    #boolean RaiseError : -Raise an error if not found.

    - -
  • -
-

Return value

- -

#STATIC:

- - -
-
-
-
- - -STATIC:GetDCSObject() - -
-
- - - -
-
-
-
- - -STATIC:GetThreatLevel() - -
-
- - - -
-
-
-
- - -STATIC:Register(StaticName) - -
-
- - - -

Parameter

-
    -
  • - -

    StaticName :

    - -
  • -
-
-
-
-
- - - -STATIC.StaticName - -
-
- - - -
-
- -
- -
- - diff --git a/docs/Documentation/StaticObject.html b/docs/Documentation/StaticObject.html deleted file mode 100644 index 1a46c6616..000000000 --- a/docs/Documentation/StaticObject.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module StaticObject

- - - -

Global(s)

- - - - - -
StaticObject - -
-

Type StaticObject

- - - - - - - - - - - - - - - - - - - - - -
StaticObject.Desc -

Descriptor of StaticObject and Unit are equal. StaticObject is just a passive variant of Unit.

-
StaticObject.ID -

Identifier of a StaticObject. It assigned to an StaticObject by the Mission Editor automatically.

-
StaticObject.getByName(name) -

Returns static object by its name.

-
StaticObject:getDesc() -

Returns descriptor of the StaticObject.

-
StaticObject:getID() -

returns identifier of the static object.

-
- -

Global(s)

-
-
- - #StaticObject - -StaticObject - -
-
- - - -
-
-

Type DCSStaticObject

- -

Type StaticObject

- -

Represents static object added in the Mission Editor.

- -

Field(s)

-
-
- - #StaticObject.Desc - -StaticObject.Desc - -
-
- -

Descriptor of StaticObject and Unit are equal. StaticObject is just a passive variant of Unit.

- -
-
-
-
- - #StaticObject.ID - -StaticObject.ID - -
-
- -

Identifier of a StaticObject. It assigned to an StaticObject by the Mission Editor automatically.

- -
-
-
-
- - -StaticObject.getByName(name) - -
-
- -

Returns static object by its name.

- - -

If no static object found nil will be returned.

- -

Parameter

-
    -
  • - -

    #string name : -Name of static object to find.

    - -
  • -
-

Return value

- -

#StaticObject:

- - -
-
-
-
- - -StaticObject:getDesc() - -
-
- -

Returns descriptor of the StaticObject.

- -

Return value

- -

#StaticObject.Desc:

- - -
-
-
-
- - -StaticObject:getID() - -
-
- -

returns identifier of the static object.

- -

Return value

- -

#StaticObject.ID:

- - -
-
- -

Type StaticObject.Desc

- -

StaticObject descriptor.

- - -

Airdromes are unique and their types are unique, but helipads and ships are not always unique and may have the same type.

- - -

Type StaticObject.ID

- -
- -
- - diff --git a/docs/Documentation/Task.html b/docs/Documentation/Task.html deleted file mode 100644 index edde8df5d..000000000 --- a/docs/Documentation/Task.html +++ /dev/null @@ -1,2847 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Task

- -

Tasking -- This module contains the TASK class.

- - - -
- - -
- -

Authors: FlightControl - Design and Programming

- - -

Global(s)

- - - - - -
TASK -

TASK class, extends Base#BASE

- -

The TASK class implements the methods for task orchestration within MOOSE.

-
-

Type TASK

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TASK:Abort() -

FSM Abort synchronous event function for TASK.

-
TASK:AbortUnit(PlayerUnit) -

Abort a PlayerUnit from a Task.

-
TASK:AssignToGroup(TaskGroup) -

Assign the Task to a Group.

-
TASK:AssignToUnit(TaskUnit) -

Assign the Task to an alive Unit.

-
TASK:Cancel() -

FSM Cancel synchronous event function for TASK.

-
TASK.CommandCenter - -
TASK:CrashUnit(PlayerUnit) -

A PlayerUnit crashed in a Task.

-
TASK.Dispatcher - -
TASK:Fail() -

FSM Fail synchronous event function for TASK.

-
TASK:FailProcesses(TaskUnitName) - -
TASK.FsmTemplate - -
TASK:GetGroups() -

Gets the SET_GROUP assigned to the TASK.

-
TASK:GetID() -

Gets the ID of the Task

-
TASK:GetMission() -

Gets the Mission to where the TASK belongs.

-
TASK:GetName() -

Gets the Name of the Task

-
TASK:GetProcessTemplate(ProcessName) -

Get the default or currently assigned Process template with key ProcessName.

-
TASK:GetScoring() -

Gets the Scoring of the task

-
TASK:GetStateMachine(TaskUnit) -

Gets the FiniteStateMachine of Task with key TaskUnit

-
TASK:GetStateString() -

Gets the Task status.

-
TASK:GetTaskIndex() -

Gets the Task Index, which is a combination of the Task type, the Task name.

-
TASK:GetTaskName() -

Returns the Task name.

-
TASK:GetType() -

Gets the Type of the Task

-
TASK:GetUnitProcess(TaskUnit) -

Get the Task FSM Process Template

-
TASK:HasAliveUnits() -

Returns if the Task has still alive and assigned Units.

-
TASK:HasGroup(FindGroup) - -
TASK:HasStateMachine(TaskUnit) -

Checks if there is a FiniteStateMachine assigned to TaskUnit for Task

-
TASK:IsAssignedToGroup(TaskGroup) -

Returns if the Task is assigned to the Group.

-
TASK:IsStateAborted() -

Is the Task status Aborted.

-
TASK:IsStateAssigned() -

Is the Task status Assigned.

-
TASK:IsStateCancelled() -

Is the Task status Cancelled.

-
TASK:IsStateFailed() -

Is the Task status Failed.

-
TASK:IsStateHold() -

Is the Task status Hold.

-
TASK:IsStatePlanned() -

Is the Task status Planned.

-
TASK:IsStateReplanned() -

Is the Task status Replanned.

-
TASK:IsStateSuccess() -

Is the Task status Success.

-
TASK:JoinUnit(PlayerUnit, PlayerGroup) -

Add a PlayerUnit to join the Task.

-
TASK.MenuAssignToGroup(MenuParam) - -
TASK:MenuTaskAbort(TaskGroup) -

Report the task status.

-
TASK:MenuTaskStatus(TaskGroup) -

Report the task status.

-
TASK:MessageToGroups(Message) -

Send a message of the Task to the assigned Groups.

-
TASK.Mission - -
TASK:New(Mission, SetGroupAssign, TaskName, TaskType) -

Instantiates a new TASK.

-
TASK:OnAfterPlayerAborted(PlayerUnit, PlayerName) -

FSM PlayerAborted event handler prototype for TASK.

-
TASK:OnAfterPlayerCrashed(PlayerUnit, PlayerName) -

FSM PlayerCrashed event handler prototype for TASK.

-
TASK:OnAfterPlayerDead(PlayerUnit, PlayerName) -

FSM PlayerDead event handler prototype for TASK.

-
TASK:RemoveAssignedMenuForGroup(TaskGroup, MenuTime) -

Remove the assigned menu option of the Task for a Group.

-
TASK:RemoveMenu(MenuTime) -

Remove the menu options of the Task to all the groups in the SetGroup.

-
TASK:RemovePlannedMenuForGroup(TaskGroup, MenuTime) -

Remove the menu option of the Task for a Group.

-
TASK:RemoveStateMachine(TaskUnit) -

Remove FiniteStateMachines from Task with key TaskUnit

-
TASK:Replan() -

FSM Replan synchronous event function for TASK.

-
TASK:ReportDetails() -

Create a detailed report of the Task.

-
TASK:ReportSummary() -

Create a summary report of the Task.

-
TASK:SendBriefingToAssignedGroups() -

Send the briefng message of the Task to the assigned Groups.

-
TASK:SetAssignedMenuForGroup(TaskGroup, MenuTime) -

Set the assigned menu options of the Task.

-
TASK:SetBriefing(TaskBriefing) -

Sets a Task briefing.

-
TASK:SetDispatcher(Dispatcher) -

Set dispatcher of a task

-
TASK.SetGroup -

The Set of Groups assigned to the Task

-
TASK:SetID(TaskID) -

Sets the ID of the Task

-
TASK:SetMenu(MenuTime) -

Set the menu options of the Task to all the groups in the SetGroup.

-
TASK:SetMenuForGroup(MenuTime, TaskGroup) -

Set the Menu for a Group

-
TASK:SetName(TaskName) -

Sets the Name of the Task

-
TASK:SetPlannedMenuForGroup(TaskGroup, MenuText, MenuTime) -

Set the planned menu option of the Task.

-
TASK:SetStateMachine(TaskUnit, Fsm) -

Add a FiniteStateMachine to Task with key TaskUnit

-
TASK:SetTimeOut(Timer) -

Sets the TimeOut for the Task.

-
TASK:SetType(TaskType) -

Sets the Type of the Task

-
TASK:SetUnitProcess(Core, FsmTemplate) -

Sets the Task FSM Process Template

-
TASK:StateAborted() -

Sets a Task to status Aborted.

-
TASK:StateAssigned() -

Sets a Task to status Assigned.

-
TASK:StateCancelled() -

Sets a Task to status Cancelled.

-
TASK:StateFailed() -

Sets a Task to status Failed.

-
TASK:StateHold() -

Sets a Task to status Hold.

-
TASK:StatePlanned() -

Sets a Task to status Planned.

-
TASK:StateReplanned() -

Sets a Task to status Replanned.

-
TASK:StateSuccess() -

Sets a Task to status Success.

-
TASK:Success() -

FSM Success synchronous event function for TASK.

-
TASK.TaskBriefing - -
TASK.TaskID - -
TASK.TaskName - -
TASK.TaskScheduler - -
TASK.TaskType - -
TASK.TimeOut - -
TASK:UnAssignFromGroup(TaskGroup) -

UnAssign the Task from a Group.

-
TASK:UnAssignFromGroups() -

UnAssign the Task from the Groups.

-
TASK:UnAssignFromUnit(TaskUnit) -

UnAssign the Task from an alive Unit.

-
TASK:__Abort() -

FSM Abort asynchronous event function for TASK.

-
TASK:__Cancel() -

FSM Cancel asynchronous event function for TASK.

-
TASK:__Fail() -

FSM Fail asynchronous event function for TASK.

-
TASK:__Replan() -

FSM Replan asynchronous event function for TASK.

-
TASK:__Success() -

FSM Success asynchronous event function for TASK.

-
TASK:onafterReplan(From, Event, To) -

FSM function for a TASK

-
TASK:onbeforeTimeOut(Event, From, To) -

FSM function for a TASK

-
TASK:onenterAborted(From, Event, To) -

FSM function for a TASK

-
TASK:onenterAssigned(Event, From, To, PlayerUnit, PlayerName) -

FSM function for a TASK

-
TASK:onenterFailed(From, Event, To) -

FSM function for a TASK

-
TASK:onenterPlanned(Event, From, To) -

FSM function for a TASK

-
TASK:onenterSuccess(Event, From, To) -

FSM function for a TASK

-
TASK:onstatechange(Event, From, To) -

FSM function for a TASK

-
- -

Global(s)

-
-
- - #TASK - -TASK - -
-
- -

TASK class, extends Base#BASE

- -

The TASK class implements the methods for task orchestration within MOOSE.

- - - -

The class provides a couple of methods to:

- - - -

1.2) Set and enquire task status (beyond the task state machine processing).

- -

A task needs to implement as a minimum the following task states:

- -
    -
  • Success: Expresses the successful execution and finalization of the task.
  • -
  • Failed: Expresses the failure of a task.
  • -
  • Planned: Expresses that the task is created, but not yet in execution and is not assigned yet.
  • -
  • Assigned: Expresses that the task is assigned to a Group of players, and that the task is in execution mode.
  • -
- -

A task may also implement the following task states:

- -
    -
  • Rejected: Expresses that the task is rejected by a player, who was requested to accept the task.
  • -
  • Cancelled: Expresses that the task is cancelled by HQ or through a logical situation where a cancellation of the task is required.
  • -
- -

A task can implement more statusses than the ones outlined above. Please consult the documentation of the specific tasks to understand the different status modelled.

- -

The status of tasks can be set by the methods State followed by the task status. An example is StateAssigned(). -The status of tasks can be enquired by the methods IsState followed by the task status name. An example is if IsStateAssigned() then.

- -

1.3) Add scoring when reaching a certain task status:

- -

Upon reaching a certain task status in a task, additional scoring can be given. If the Mission has a scoring system attached, the scores will be added to the mission scoring. -Use the method TASK.AddScore() to add scores when a status is reached.

- -

1.4) Task briefing:

- -

A task briefing can be given that is shown to the player when he is assigned to the task.

- - -
-
-

Type Task

- -

Type TASK

-

Field(s)

-
-
- - -TASK:Abort() - -
-
- -

FSM Abort synchronous event function for TASK.

- - -

Use this event to Abort the Task.

- -
-
-
-
- - -TASK:AbortUnit(PlayerUnit) - -
-
- -

Abort a PlayerUnit from a Task.

- - -

If the Unit was not part of the Task, false is returned. -If the Unit is part of the Task, true is returned.

- -

Parameter

-
    -
  • - -

    Wrapper.Unit#UNIT PlayerUnit : -The CLIENT or UNIT of the Player aborting the Task.

    - -
  • -
-

Return value

- -

#boolean: -true if Unit is part of the Task.

- -
-
-
-
- - -TASK:AssignToGroup(TaskGroup) - -
-
- -

Assign the Task to a Group.

- -

Parameter

- -

Return value

- -

#TASK:

- - -
-
-
-
- - -TASK:AssignToUnit(TaskUnit) - -
-
- -

Assign the Task to an alive Unit.

- -

Parameter

- -

Return value

- -

#TASK: -self

- -
-
-
-
- - -TASK:Cancel() - -
-
- -

FSM Cancel synchronous event function for TASK.

- - -

Use this event to Cancel the Task.

- -
-
-
-
- - Tasking.CommandCenter#COMMANDCENTER - -TASK.CommandCenter - -
-
- - - -
-
-
-
- - -TASK:CrashUnit(PlayerUnit) - -
-
- -

A PlayerUnit crashed in a Task.

- - -

Abort the Player. -If the Unit was not part of the Task, false is returned. -If the Unit is part of the Task, true is returned.

- -

Parameter

-
    -
  • - -

    Wrapper.Unit#UNIT PlayerUnit : -The CLIENT or UNIT of the Player aborting the Task.

    - -
  • -
-

Return value

- -

#boolean: -true if Unit is part of the Task.

- -
-
-
-
- - - -TASK.Dispatcher - -
-
- - - -
-
-
-
- - -TASK:Fail() - -
-
- -

FSM Fail synchronous event function for TASK.

- - -

Use this event to Fail the Task.

- -
-
-
-
- - -TASK:FailProcesses(TaskUnitName) - -
-
- - - - -

TODO: Obscolete? -- Fail processes from Task with key Unit - @param #TASK self - @param #string TaskUnitName - @return #TASK self

- -

Parameter

-
    -
  • - -

    TaskUnitName :

    - -
  • -
-
-
-
-
- - Core.Fsm#FSM_PROCESS - -TASK.FsmTemplate - -
-
- - - -
-
-
-
- - -TASK:GetGroups() - -
-
- -

Gets the SET_GROUP assigned to the TASK.

- -

Return value

- -

Core.Set#SET_GROUP:

- - -
-
-
-
- - -TASK:GetID() - -
-
- -

Gets the ID of the Task

- -

Return value

- -

#string: -TaskID

- -
-
-
-
- - -TASK:GetMission() - -
-
- -

Gets the Mission to where the TASK belongs.

- -

Return value

- -

Tasking.Mission#MISSION:

- - -
-
-
-
- - -TASK:GetName() - -
-
- -

Gets the Name of the Task

- -

Return value

- -

#string: -The Task Name

- -
-
-
-
- - -TASK:GetProcessTemplate(ProcessName) - -
-
- -

Get the default or currently assigned Process template with key ProcessName.

- -

Parameter

-
    -
  • - -

    #string ProcessName :

    - -
  • -
-

Return value

- -

Core.Fsm#FSM_PROCESS:

- - -
-
-
-
- - -TASK:GetScoring() - -
-
- -

Gets the Scoring of the task

- -

Return value

- -

Functional.Scoring#SCORING: -Scoring

- -
-
-
-
- - -TASK:GetStateMachine(TaskUnit) - -
-
- -

Gets the FiniteStateMachine of Task with key TaskUnit

- -

Parameter

- -

Return value

- -

Core.Fsm#FSM_PROCESS:

- - -
-
-
-
- - -TASK:GetStateString() - -
-
- -

Gets the Task status.

- -
-
-
-
- - -TASK:GetTaskIndex() - -
-
- -

Gets the Task Index, which is a combination of the Task type, the Task name.

- -

Return value

- -

#string: -The Task ID

- -
-
-
-
- - -TASK:GetTaskName() - -
-
- -

Returns the Task name.

- -

Return value

- -

#string: -TaskName

- -
-
-
-
- - -TASK:GetType() - -
-
- -

Gets the Type of the Task

- -

Return value

- -

#string: -TaskType

- -
-
-
-
- - -TASK:GetUnitProcess(TaskUnit) - -
-
- -

Get the Task FSM Process Template

- -

Parameter

-
    -
  • - -

    TaskUnit :

    - -
  • -
-

Return value

- -

Core.Fsm#FSM_PROCESS:

- - -
-
-
-
- - -TASK:HasAliveUnits() - -
-
- -

Returns if the Task has still alive and assigned Units.

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -TASK:HasGroup(FindGroup) - -
-
- - - -

Parameter

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -TASK:HasStateMachine(TaskUnit) - -
-
- -

Checks if there is a FiniteStateMachine assigned to TaskUnit for Task

- -

Parameter

- -

Return value

- -

#TASK: -self

- -
-
-
-
- - -TASK:IsAssignedToGroup(TaskGroup) - -
-
- -

Returns if the Task is assigned to the Group.

- -

Parameter

- -

Return value

- -

#boolean:

- - -
-
-
-
- - -TASK:IsStateAborted() - -
-
- -

Is the Task status Aborted.

- -
-
-
-
- - -TASK:IsStateAssigned() - -
-
- -

Is the Task status Assigned.

- -
-
-
-
- - -TASK:IsStateCancelled() - -
-
- -

Is the Task status Cancelled.

- -
-
-
-
- - -TASK:IsStateFailed() - -
-
- -

Is the Task status Failed.

- -
-
-
-
- - -TASK:IsStateHold() - -
-
- -

Is the Task status Hold.

- -
-
-
-
- - -TASK:IsStatePlanned() - -
-
- -

Is the Task status Planned.

- -
-
-
-
- - -TASK:IsStateReplanned() - -
-
- -

Is the Task status Replanned.

- -
-
-
-
- - -TASK:IsStateSuccess() - -
-
- -

Is the Task status Success.

- -
-
-
-
- - -TASK:JoinUnit(PlayerUnit, PlayerGroup) - -
-
- -

Add a PlayerUnit to join the Task.

- - -

For each Group within the Task, the Unit is check if it can join the Task. -If the Unit was not part of the Task, false is returned. -If the Unit is part of the Task, true is returned.

- -

Parameters

-
    -
  • - -

    Wrapper.Unit#UNIT PlayerUnit : -The CLIENT or UNIT of the Player joining the Mission.

    - -
  • -
  • - -

    Wrapper.Group#GROUP PlayerGroup : -The GROUP of the player joining the Mission.

    - -
  • -
-

Return value

- -

#boolean: -true if Unit is part of the Task.

- -
-
-
-
- - -TASK.MenuAssignToGroup(MenuParam) - -
-
- - - -

Parameter

-
    -
  • - -

    MenuParam :

    - -
  • -
-
-
-
-
- - -TASK:MenuTaskAbort(TaskGroup) - -
-
- -

Report the task status.

- -

Parameter

-
    -
  • - -

    TaskGroup :

    - -
  • -
-
-
-
-
- - -TASK:MenuTaskStatus(TaskGroup) - -
-
- -

Report the task status.

- -

Parameter

-
    -
  • - -

    TaskGroup :

    - -
  • -
-
-
-
-
- - -TASK:MessageToGroups(Message) - -
-
- -

Send a message of the Task to the assigned Groups.

- -

Parameter

-
    -
  • - -

    Message :

    - -
  • -
-
-
-
-
- - Tasking.Mission#MISSION - -TASK.Mission - -
-
- - - -
-
-
-
- - -TASK:New(Mission, SetGroupAssign, TaskName, TaskType) - -
-
- -

Instantiates a new TASK.

- - -

Should never be used. Interface Class.

- -

Parameters

-
    -
  • - -

    Tasking.Mission#MISSION Mission : -The mission wherein the Task is registered.

    - -
  • -
  • - -

    Core.Set#SET_GROUP SetGroupAssign : -The set of groups for which the Task can be assigned.

    - -
  • -
  • - -

    #string TaskName : -The name of the Task

    - -
  • -
  • - -

    #string TaskType : -The type of the Task

    - -
  • -
-

Return value

- -

#TASK: -self

- -
-
-
-
- - -TASK:OnAfterPlayerAborted(PlayerUnit, PlayerName) - -
-
- -

FSM PlayerAborted event handler prototype for TASK.

- -

Parameters

-
    -
  • - -

    Wrapper.Unit#UNIT PlayerUnit : -The Unit of the Player when he went back to spectators or left the mission.

    - -
  • -
  • - -

    #string PlayerName : -The name of the Player.

    - -
  • -
-
-
-
-
- - -TASK:OnAfterPlayerCrashed(PlayerUnit, PlayerName) - -
-
- -

FSM PlayerCrashed event handler prototype for TASK.

- -

Parameters

-
    -
  • - -

    Wrapper.Unit#UNIT PlayerUnit : -The Unit of the Player when he crashed in the mission.

    - -
  • -
  • - -

    #string PlayerName : -The name of the Player.

    - -
  • -
-
-
-
-
- - -TASK:OnAfterPlayerDead(PlayerUnit, PlayerName) - -
-
- -

FSM PlayerDead event handler prototype for TASK.

- -

Parameters

-
    -
  • - -

    Wrapper.Unit#UNIT PlayerUnit : -The Unit of the Player when he died in the mission.

    - -
  • -
  • - -

    #string PlayerName : -The name of the Player.

    - -
  • -
-
-
-
-
- - -TASK:RemoveAssignedMenuForGroup(TaskGroup, MenuTime) - -
-
- -

Remove the assigned menu option of the Task for a Group.

- -

Parameters

- -

Return value

- -

#TASK: -self

- -
-
-
-
- - -TASK:RemoveMenu(MenuTime) - -
-
- -

Remove the menu options of the Task to all the groups in the SetGroup.

- -

Parameter

-
    -
  • - -

    #number MenuTime :

    - -
  • -
-

Return value

- -

#TASK:

- - -
-
-
-
- - -TASK:RemovePlannedMenuForGroup(TaskGroup, MenuTime) - -
-
- -

Remove the menu option of the Task for a Group.

- -

Parameters

- -

Return value

- -

#TASK: -self

- -
-
-
-
- - -TASK:RemoveStateMachine(TaskUnit) - -
-
- -

Remove FiniteStateMachines from Task with key TaskUnit

- -

Parameter

- -

Return value

- -

#TASK: -self

- -
-
-
-
- - -TASK:Replan() - -
-
- -

FSM Replan synchronous event function for TASK.

- - -

Use this event to Replan the Task.

- -
-
-
-
- - -TASK:ReportDetails() - -
-
- -

Create a detailed report of the Task.

- - -

List the Task Status, and the Players assigned to the Task.

- -

Return value

- -

#string:

- - -
-
-
-
- - -TASK:ReportSummary() - -
-
- -

Create a summary report of the Task.

- - -

List the Task Name and Status

- -

Return value

- -

#string:

- - -
-
-
-
- - -TASK:SendBriefingToAssignedGroups() - -
-
- -

Send the briefng message of the Task to the assigned Groups.

- -
-
-
-
- - -TASK:SetAssignedMenuForGroup(TaskGroup, MenuTime) - -
-
- -

Set the assigned menu options of the Task.

- -

Parameters

- -

Return value

- -

#TASK: -self

- -
-
-
-
- - -TASK:SetBriefing(TaskBriefing) - -
-
- -

Sets a Task briefing.

- -

Parameter

-
    -
  • - -

    #string TaskBriefing :

    - -
  • -
-

Return value

- -

#TASK: -self

- -
-
-
-
- - -TASK:SetDispatcher(Dispatcher) - -
-
- -

Set dispatcher of a task

- -

Parameter

- -

Return value

- -

#TASK:

- - -
-
-
-
- - Core.Set#SET_GROUP - -TASK.SetGroup - -
-
- -

The Set of Groups assigned to the Task

- -
-
-
-
- - -TASK:SetID(TaskID) - -
-
- -

Sets the ID of the Task

- -

Parameter

-
    -
  • - -

    #string TaskID :

    - -
  • -
-
-
-
-
- - -TASK:SetMenu(MenuTime) - -
-
- -

Set the menu options of the Task to all the groups in the SetGroup.

- -

Parameter

-
    -
  • - -

    #number MenuTime :

    - -
  • -
-

Return value

- -

#TASK:

- - -
-
-
-
- - -TASK:SetMenuForGroup(MenuTime, TaskGroup) - -
-
- -

Set the Menu for a Group

- -

Parameters

-
    -
  • - -

    #number MenuTime :

    - -
  • -
  • - -

    TaskGroup :

    - -
  • -
-

Return value

- -

#TASK:

- - -
-
-
-
- - -TASK:SetName(TaskName) - -
-
- -

Sets the Name of the Task

- -

Parameter

-
    -
  • - -

    #string TaskName :

    - -
  • -
-
-
-
-
- - -TASK:SetPlannedMenuForGroup(TaskGroup, MenuText, MenuTime) - -
-
- -

Set the planned menu option of the Task.

- -

Parameters

-
    -
  • - -

    Wrapper.Group#GROUP TaskGroup :

    - -
  • -
  • - -

    #string MenuText : -The menu text.

    - -
  • -
  • - -

    #number MenuTime :

    - -
  • -
-

Return value

- -

#TASK: -self

- -
-
-
-
- - -TASK:SetStateMachine(TaskUnit, Fsm) - -
-
- -

Add a FiniteStateMachine to Task with key TaskUnit

- -

Parameters

- -

Return value

- -

#TASK: -self

- -
-
-
-
- - -TASK:SetTimeOut(Timer) - -
-
- -

Sets the TimeOut for the Task.

- - -

If Task stayed planned for longer than TimeOut, it gets into Cancelled status.

- -

Parameter

-
    -
  • - -

    #integer Timer : -in seconds

    - -
  • -
-

Return value

- -

#TASK: -self

- -
-
-
-
- - -TASK:SetType(TaskType) - -
-
- -

Sets the Type of the Task

- -

Parameter

-
    -
  • - -

    #string TaskType :

    - -
  • -
-
-
-
-
- - -TASK:SetUnitProcess(Core, FsmTemplate) - -
-
- -

Sets the Task FSM Process Template

- -

Parameters

-
    -
  • - -

    Core : -Fsm#FSM_PROCESS

    - -
  • -
  • - -

    FsmTemplate :

    - -
  • -
-
-
-
-
- - -TASK:StateAborted() - -
-
- -

Sets a Task to status Aborted.

- -
-
-
-
- - -TASK:StateAssigned() - -
-
- -

Sets a Task to status Assigned.

- -
-
-
-
- - -TASK:StateCancelled() - -
-
- -

Sets a Task to status Cancelled.

- -
-
-
-
- - -TASK:StateFailed() - -
-
- -

Sets a Task to status Failed.

- -
-
-
-
- - -TASK:StateHold() - -
-
- -

Sets a Task to status Hold.

- -
-
-
-
- - -TASK:StatePlanned() - -
-
- -

Sets a Task to status Planned.

- -
-
-
-
- - -TASK:StateReplanned() - -
-
- -

Sets a Task to status Replanned.

- -
-
-
-
- - -TASK:StateSuccess() - -
-
- -

Sets a Task to status Success.

- -
-
-
-
- - -TASK:Success() - -
-
- -

FSM Success synchronous event function for TASK.

- - -

Use this event to make the Task a Success.

- -
-
-
-
- - - -TASK.TaskBriefing - -
-
- - - -
-
-
-
- - - -TASK.TaskID - -
-
- - - -
-
-
-
- - - -TASK.TaskName - -
-
- - - -
-
-
-
- - Core.Scheduler#SCHEDULER - -TASK.TaskScheduler - -
-
- - - -
-
-
-
- - - -TASK.TaskType - -
-
- - - -
-
-
-
- - - -TASK.TimeOut - -
-
- - - -
-
-
-
- - -TASK:UnAssignFromGroup(TaskGroup) - -
-
- -

UnAssign the Task from a Group.

- -

Parameter

-
    -
  • - -

    TaskGroup :

    - -
  • -
-
-
-
-
- - -TASK:UnAssignFromGroups() - -
-
- -

UnAssign the Task from the Groups.

- -
-
-
-
- - -TASK:UnAssignFromUnit(TaskUnit) - -
-
- -

UnAssign the Task from an alive Unit.

- -

Parameter

- -

Return value

- -

#TASK: -self

- -
-
-
-
- - -TASK:__Abort() - -
-
- -

FSM Abort asynchronous event function for TASK.

- - -

Use this event to Abort the Task.

- -
-
-
-
- - -TASK:__Cancel() - -
-
- -

FSM Cancel asynchronous event function for TASK.

- - -

Use this event to Cancel the Task.

- -
-
-
-
- - -TASK:__Fail() - -
-
- -

FSM Fail asynchronous event function for TASK.

- - -

Use this event to Fail the Task.

- -
-
-
-
- - -TASK:__Replan() - -
-
- -

FSM Replan asynchronous event function for TASK.

- - -

Use this event to Replan the Task.

- -
-
-
-
- - -TASK:__Success() - -
-
- -

FSM Success asynchronous event function for TASK.

- - -

Use this event to make the Task a Success.

- -
-
-
-
- - -TASK:onafterReplan(From, Event, To) - -
-
- -

FSM function for a TASK

- -

Parameters

-
    -
  • - -

    #string From :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string To :

    - -
  • -
-
-
-
-
- - -TASK:onbeforeTimeOut(Event, From, To) - -
-
- -

FSM function for a TASK

- -

Parameters

-
    -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
-
-
-
-
- - -TASK:onenterAborted(From, Event, To) - -
-
- -

FSM function for a TASK

- -

Parameters

-
    -
  • - -

    #string From :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string To :

    - -
  • -
-
-
-
-
- - -TASK:onenterAssigned(Event, From, To, PlayerUnit, PlayerName) - -
-
- -

FSM function for a TASK

- -

Parameters

-
    -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
  • - -

    PlayerUnit :

    - -
  • -
  • - -

    PlayerName :

    - -
  • -
-
-
-
-
- - -TASK:onenterFailed(From, Event, To) - -
-
- -

FSM function for a TASK

- -

Parameters

-
    -
  • - -

    #string From :

    - -
  • -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string To :

    - -
  • -
-
-
-
-
- - -TASK:onenterPlanned(Event, From, To) - -
-
- -

FSM function for a TASK

- -

Parameters

-
    -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
-
-
-
-
- - -TASK:onenterSuccess(Event, From, To) - -
-
- -

FSM function for a TASK

- -

Parameters

-
    -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
-
-
-
-
- - -TASK:onstatechange(Event, From, To) - -
-
- -

FSM function for a TASK

- -

Parameters

-
    -
  • - -

    #string Event :

    - -
  • -
  • - -

    #string From :

    - -
  • -
  • - -

    #string To :

    - -
  • -
-
-
- -

Type integer

- -
- -
- - diff --git a/docs/Documentation/Task_A2G.html b/docs/Documentation/Task_A2G.html deleted file mode 100644 index e497997f4..000000000 --- a/docs/Documentation/Task_A2G.html +++ /dev/null @@ -1,1149 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Task_A2G

- -

Tasking - The TASK_A2G models tasks for players in Air to Ground engagements.

- - - -

Banner Image

- - -

1) TaskA2G#TASKA2G class, extends Task#TASK

- -

The #TASK_A2G class defines Air To Ground tasks for a Set of Target Units, -based on the tasking capabilities defined in Task#TASK. -The TASK_A2G is implemented using a Statemachine#FSM_TASK, and has the following statuses:

- -
    -
  • None: Start of the process
  • -
  • Planned: The A2G task is planned.
  • -
  • Assigned: The A2G task is assigned to a Group#GROUP.
  • -
  • Success: The A2G task is successfully completed.
  • -
  • Failed: The A2G task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
  • -
- -

1.1) Set the scoring of achievements in an A2G attack.

- -

Scoring or penalties can be given in the following circumstances:

- - - -

2) TaskA2G#TASKSEAD class, extends TaskA2G#TASKA2G

- -

The #TASK_SEAD class defines a SEAD task for a Set of Target Units.

- -
- -

3) TaskA2G#TASKCAS class, extends TaskA2G#TASKA2G

- -

The #TASK_CAS class defines a CAS task for a Set of Target Units.

- -
- -

4) TaskA2G#TASKBAI class, extends TaskA2G#TASKA2G

- -

The #TASK_BAI class defines a BAI task for a Set of Target Units.

- -
- -

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-03-09: Revised version.

- -
- -

AUTHORS and CONTRIBUTIONS

- -

Contributions:

- -
    -
  • [WingThor]: Concept, Advice & Testing.
  • -
- -

Authors:

- -
    -
  • FlightControl: Concept, Design & Programming. -
  • -
- -

Global(s)

- - - - - - - - - - - - - - - - - -
TASK_A2G - -
TASK_BAI - -
TASK_CAS - -
TASK_SEAD - -
-

Type TASK_A2G

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TASK_A2G.ClassName - -
TASK_A2G:GetPlannedMenuText() - -
TASK_A2G:GetRendezVousPointVec2(TaskUnit) - -
TASK_A2G:GetRendezVousZone(TaskUnit) - -
TASK_A2G:GetTargetPointVec2(TaskUnit) - -
TASK_A2G:GetTargetZone(TaskUnit) - -
TASK_A2G:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit, TaskType) -

Instantiates a new TASK_A2G.

-
TASK_A2G:SetPenaltyOnFailed(Text, Penalty, TaskUnit) -

Set a penalty when the A2G attack has failed.

-
TASK_A2G:SetRendezVousPointVec2(RendezVousPointVec2, RendezVousRange, TaskUnit) - -
TASK_A2G:SetRendezVousZone(RendezVousZone, TaskUnit) - -
TASK_A2G:SetScoreOnDestroy(Text, Score, TaskUnit) -

Set a score when a target in scope of the A2G attack, has been destroyed .

-
TASK_A2G:SetScoreOnSuccess(Text, Score, TaskUnit) -

Set a score when all the targets in scope of the A2G attack, have been destroyed.

-
TASK_A2G:SetTargetPointVec2(TargetPointVec2, TaskUnit) - -
TASK_A2G:SetTargetZone(TargetZone, TaskUnit) - -
TASK_A2G.TargetSetUnit - -
- -

Type TASK_BAI

- - - - - - - - - - - - - -
TASK_BAI.ClassName - -
TASK_BAI:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit) -

Instantiates a new TASK_BAI.

-
TASK_BAI.TargetSetUnit - -
- -

Type TASK_CAS

- - - - - - - - - - - - - -
TASK_CAS.ClassName - -
TASK_CAS:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit) -

Instantiates a new TASK_CAS.

-
TASK_CAS.TargetSetUnit - -
- -

Type TASK_SEAD

- - - - - - - - - - - - - -
TASK_SEAD.ClassName - -
TASK_SEAD:New(Mission, SetGroup, TaskName, TargetSetUnit) -

Instantiates a new TASK_SEAD.

-
TASK_SEAD.TargetSetUnit - -
- -

Global(s)

-
-
- - #TASK_A2G - -TASK_A2G - -
-
- - - -
-
-
-
- - #TASK_BAI - -TASK_BAI - -
-
- - - -
-
-
-
- - #TASK_CAS - -TASK_CAS - -
-
- - - -
-
-
-
- - #TASK_SEAD - -TASK_SEAD - -
-
- - - -
-
-

Type Task_A2G

- -

Type FSM_PROCESS

- -

Type TASK_A2G

- -

The TASK_A2G class

- -

Field(s)

-
-
- - #string - -TASK_A2G.ClassName - -
-
- - - -
-
-
-
- - -TASK_A2G:GetPlannedMenuText() - -
-
- - - -
-
-
-
- - -TASK_A2G:GetRendezVousPointVec2(TaskUnit) - -
-
- - - -

Parameter

- -

Return values

-
    -
  1. - -

    Core.Point#POINT_VEC2: -The PointVec2 object referencing to the 2D point where the RendezVous point is located on the map.

    - -
  2. -
  3. - -

    #number: -The RendezVousRange that defines when the player is considered to have arrived at the RendezVous point.

    - -
  4. -
-
-
-
-
- - -TASK_A2G:GetRendezVousZone(TaskUnit) - -
-
- - - -

Parameter

- -

Return value

- -

Core.Zone#ZONE_BASE: -The Zone object where the RendezVous is located on the map.

- -
-
-
-
- - -TASK_A2G:GetTargetPointVec2(TaskUnit) - -
-
- - - -

Parameter

- -

Return value

- -

Core.Point#POINT_VEC2: -The PointVec2 object where the Target is located on the map.

- -
-
-
-
- - -TASK_A2G:GetTargetZone(TaskUnit) - -
-
- - - -

Parameter

- -

Return value

- -

Core.Zone#ZONE_BASE: -The Zone object where the Target is located on the map.

- -
-
-
-
- - -TASK_A2G:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit, TaskType) - -
-
- -

Instantiates a new TASK_A2G.

- -

Parameters

-
    -
  • - -

    Tasking.Mission#MISSION Mission :

    - -
  • -
  • - -

    Set#SET_GROUP SetGroup : -The set of groups for which the Task can be assigned.

    - -
  • -
  • - -

    #string TaskName : -The name of the Task.

    - -
  • -
  • - -

    Set#SET_UNIT UnitSetTargets :

    - -
  • -
  • - -

    #number TargetDistance : -The distance to Target when the Player is considered to have "arrived" at the engagement range.

    - -
  • -
  • - -

    Core.Zone#ZONE_BASE TargetZone : -The target zone, if known. -If the TargetZone parameter is specified, the player will be routed to the center of the zone where all the targets are assumed to be.

    - -
  • -
  • - -

    TargetSetUnit :

    - -
  • -
  • - -

    TaskType :

    - -
  • -
-

Return value

- -

#TASK_A2G: -self

- -
-
-
-
- - -TASK_A2G:SetPenaltyOnFailed(Text, Penalty, TaskUnit) - -
-
- -

Set a penalty when the A2G attack has failed.

- -

Parameters

-
    -
  • - -

    #string Text : -The text to display to the player, when the A2G attack has failed.

    - -
  • -
  • - -

    #number Penalty : -The penalty in points.

    - -
  • -
  • - -

    Wrapper.Unit#UNIT TaskUnit :

    - -
  • -
-

Return value

- -

#TASK_A2G:

- - -
-
-
-
- - -TASK_A2G:SetRendezVousPointVec2(RendezVousPointVec2, RendezVousRange, TaskUnit) - -
-
- - - -

Parameters

-
    -
  • - -

    Core.Point#POINT_VEC2 RendezVousPointVec2 : -The PointVec2 object referencing to the 2D point where the RendezVous point is located on the map.

    - -
  • -
  • - -

    #number RendezVousRange : -The RendezVousRange that defines when the player is considered to have arrived at the RendezVous point.

    - -
  • -
  • - -

    Wrapper.Unit#UNIT TaskUnit :

    - -
  • -
-
-
-
-
- - -TASK_A2G:SetRendezVousZone(RendezVousZone, TaskUnit) - -
-
- - - -

Parameters

- -
-
-
-
- - -TASK_A2G:SetScoreOnDestroy(Text, Score, TaskUnit) - -
-
- -

Set a score when a target in scope of the A2G attack, has been destroyed .

- -

Parameters

-
    -
  • - -

    #string Text : -The text to display to the player, when the target has been destroyed.

    - -
  • -
  • - -

    #number Score : -The score in points.

    - -
  • -
  • - -

    Wrapper.Unit#UNIT TaskUnit :

    - -
  • -
-

Return value

- -

#TASK_A2G:

- - -
-
-
-
- - -TASK_A2G:SetScoreOnSuccess(Text, Score, TaskUnit) - -
-
- -

Set a score when all the targets in scope of the A2G attack, have been destroyed.

- -

Parameters

-
    -
  • - -

    #string Text : -The text to display to the player, when all targets hav been destroyed.

    - -
  • -
  • - -

    #number Score : -The score in points.

    - -
  • -
  • - -

    Wrapper.Unit#UNIT TaskUnit :

    - -
  • -
-

Return value

- -

#TASK_A2G:

- - -
-
-
-
- - -TASK_A2G:SetTargetPointVec2(TargetPointVec2, TaskUnit) - -
-
- - - -

Parameters

- -
-
-
-
- - -TASK_A2G:SetTargetZone(TargetZone, TaskUnit) - -
-
- - - -

Parameters

- -
-
-
-
- - Set#SET_UNIT - -TASK_A2G.TargetSetUnit - -
-
- - - -
-
- -

Type TASK_BAI

- -

The TASK_BAI class

- -

Field(s)

-
-
- - #string - -TASK_BAI.ClassName - -
-
- - - -
-
-
-
- - -TASK_BAI:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit) - -
-
- -

Instantiates a new TASK_BAI.

- -

Parameters

-
    -
  • - -

    Tasking.Mission#MISSION Mission :

    - -
  • -
  • - -

    Set#SET_GROUP SetGroup : -The set of groups for which the Task can be assigned.

    - -
  • -
  • - -

    #string TaskName : -The name of the Task.

    - -
  • -
  • - -

    Set#SET_UNIT UnitSetTargets :

    - -
  • -
  • - -

    #number TargetDistance : -The distance to Target when the Player is considered to have "arrived" at the engagement range.

    - -
  • -
  • - -

    Core.Zone#ZONE_BASE TargetZone : -The target zone, if known. -If the TargetZone parameter is specified, the player will be routed to the center of the zone where all the targets are assumed to be.

    - -
  • -
  • - -

    TargetSetUnit :

    - -
  • -
-

Return value

- -

#TASK_BAI: -self

- -
-
-
-
- - Set#SET_UNIT - -TASK_BAI.TargetSetUnit - -
-
- - - -
-
- -

Type TASK_CAS

- -

The TASK_CAS class

- -

Field(s)

-
-
- - #string - -TASK_CAS.ClassName - -
-
- - - -
-
-
-
- - -TASK_CAS:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit) - -
-
- -

Instantiates a new TASK_CAS.

- -

Parameters

-
    -
  • - -

    Tasking.Mission#MISSION Mission :

    - -
  • -
  • - -

    Set#SET_GROUP SetGroup : -The set of groups for which the Task can be assigned.

    - -
  • -
  • - -

    #string TaskName : -The name of the Task.

    - -
  • -
  • - -

    Set#SET_UNIT UnitSetTargets :

    - -
  • -
  • - -

    #number TargetDistance : -The distance to Target when the Player is considered to have "arrived" at the engagement range.

    - -
  • -
  • - -

    Core.Zone#ZONE_BASE TargetZone : -The target zone, if known. -If the TargetZone parameter is specified, the player will be routed to the center of the zone where all the targets are assumed to be.

    - -
  • -
  • - -

    TargetSetUnit :

    - -
  • -
-

Return value

- -

#TASK_CAS: -self

- -
-
-
-
- - Set#SET_UNIT - -TASK_CAS.TargetSetUnit - -
-
- - - -
-
- -

Type TASK_SEAD

- -

The TASK_SEAD class

- -

Field(s)

-
-
- - #string - -TASK_SEAD.ClassName - -
-
- - - -
-
-
-
- - -TASK_SEAD:New(Mission, SetGroup, TaskName, TargetSetUnit) - -
-
- -

Instantiates a new TASK_SEAD.

- -

Parameters

- -

Return value

- -

#TASK_SEAD: -self

- -
-
-
-
- - Set#SET_UNIT - -TASK_SEAD.TargetSetUnit - -
-
- - - -
-
- -
- -
- - diff --git a/docs/Documentation/Task_A2G_Dispatcher.html b/docs/Documentation/Task_A2G_Dispatcher.html deleted file mode 100644 index 553474a4c..000000000 --- a/docs/Documentation/Task_A2G_Dispatcher.html +++ /dev/null @@ -1,556 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Task_A2G_Dispatcher

- -

Tasking - The TASKA2GDISPATCHER creates and manages player TASK_A2G tasks based on detected targets.

- - - -
- -

1) #TASKA2GDISPATCHER class, extends #DETECTION_MANAGER

- -

The #TASKA2GDISPATCHER class implements the dynamic dispatching of tasks upon groups of detected units determined a Set of FAC (groups). -The FAC will detect units, will group them, and will dispatch Tasks to groups. Depending on the type of target detected, different tasks will be dispatched. -Find a summary below describing for which situation a task type is created:

- -
    -
  • CAS Task: Is created when there are enemy ground units within range of the FAC, while there are friendly units in the FAC perimeter.
  • -
  • BAI Task: Is created when there are enemy ground units within range of the FAC, while there are NO other friendly units within the FAC perimeter.
  • -
  • SEAD Task: Is created when there are enemy ground units wihtin range of the FAC, with air search radars.
  • -
- -

Other task types will follow...

- -

3.1) TASKA2GDISPATCHER constructor:

-

The TASKA2GDISPATCHER.New() method creates a new TASKA2GDISPATCHER instance.

- -
- -

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-03-09: Initial class and API.

- -
- -

AUTHORS and CONTRIBUTIONS

- -

Contributions:

- -

Authors:

- -
    -
  • FlightControl: Concept, Design & Programming.
  • -
- - -

Global(s)

- - - - - -
TASK_A2G_DISPATCHER - -
-

Type TASK_A2G_DISPATCHER

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TASK_A2G_DISPATCHER.ClassName - -
TASK_A2G_DISPATCHER.Detection -

The DETECTION_BASE object that is used to report the detected objects.

-
TASK_A2G_DISPATCHER:EvaluateBAI(DetectedItem, FriendlyCoalition) -

Creates a BAI task when there are targets for it.

-
TASK_A2G_DISPATCHER:EvaluateCAS(DetectedItem) -

Creates a CAS task when there are targets for it.

-
TASK_A2G_DISPATCHER:EvaluateRemoveTask(Mission, Task, DetectedItem) -

Evaluates the removal of the Task from the Mission.

-
TASK_A2G_DISPATCHER:EvaluateSEAD(DetectedItem) -

Creates a SEAD task when there are targets for it.

-
TASK_A2G_DISPATCHER.Mission - -
TASK_A2G_DISPATCHER:New(Mission, SetGroup, Detection) -

TASKA2GDISPATCHER constructor.

-
TASK_A2G_DISPATCHER:OnAfterAssign(From, Event, To, Task, TaskUnit, PlayerName) -

OnAfter Transition Handler for Event Assign.

-
TASK_A2G_DISPATCHER:ProcessDetected(Detection) -

Assigns tasks in relation to the detected items to the Set#SET_GROUP.

-
TASK_A2G_DISPATCHER.SetGroup -

The groups to which the FAC will report to.

-
- -

Global(s)

-
-
- - #TASK_A2G_DISPATCHER - -TASK_A2G_DISPATCHER - -
-
- - - -
-
-

Type Task_A2G_Dispatcher

- -

Type TASK_A2G_DISPATCHER

- -

TASKA2GDISPATCHER class.

- -

Field(s)

-
-
- - #string - -TASK_A2G_DISPATCHER.ClassName - -
-
- - - -
-
-
-
- - Functional.Detection#DETECTION_BASE - -TASK_A2G_DISPATCHER.Detection - -
-
- -

The DETECTION_BASE object that is used to report the detected objects.

- -
-
-
-
- - -TASK_A2G_DISPATCHER:EvaluateBAI(DetectedItem, FriendlyCoalition) - -
-
- -

Creates a BAI task when there are targets for it.

- -

Parameters

- -

Return value

- -

Tasking.Task#TASK:

- - -
-
-
-
- - -TASK_A2G_DISPATCHER:EvaluateCAS(DetectedItem) - -
-
- -

Creates a CAS task when there are targets for it.

- -

Parameter

- -

Return value

- -

Tasking.Task#TASK:

- - -
-
-
-
- - -TASK_A2G_DISPATCHER:EvaluateRemoveTask(Mission, Task, DetectedItem) - -
-
- -

Evaluates the removal of the Task from the Mission.

- - -

Can only occur when the DetectedItem is Changed AND the state of the Task is "Planned".

- -

Parameters

- -

Return value

- -

Tasking.Task#TASK:

- - -
-
-
-
- - -TASK_A2G_DISPATCHER:EvaluateSEAD(DetectedItem) - -
-
- -

Creates a SEAD task when there are targets for it.

- -

Parameter

- -

Return values

-
    -
  1. - -

    Set#SET_UNIT: -TargetSetUnit: The target set of units.

    - -
  2. -
  3. - -

    #nil: -If there are no targets to be set.

    - -
  4. -
-
-
-
-
- - Tasking.Mission#MISSION - -TASK_A2G_DISPATCHER.Mission - -
-
- - - -
-
-
-
- - -TASK_A2G_DISPATCHER:New(Mission, SetGroup, Detection) - -
-
- -

TASKA2GDISPATCHER constructor.

- -

Parameters

- -

Return value

- -

#TASKA2GDISPATCHER: -self

- -
-
-
-
- - -TASK_A2G_DISPATCHER:OnAfterAssign(From, Event, To, Task, TaskUnit, PlayerName) - -
-
- -

OnAfter Transition Handler for Event Assign.

- -

Parameters

-
    -
  • - -

    #string From : -The From State string.

    - -
  • -
  • - -

    #string Event : -The Event string.

    - -
  • -
  • - -

    #string To : -The To State string.

    - -
  • -
  • - -

    Tasking.TaskA2G#TASKA2G Task :

    - -
  • -
  • - -

    Wrapper.Unit#UNIT TaskUnit :

    - -
  • -
  • - -

    #string PlayerName :

    - -
  • -
-
-
-
-
- - -TASK_A2G_DISPATCHER:ProcessDetected(Detection) - -
-
- -

Assigns tasks in relation to the detected items to the Set#SET_GROUP.

- -

Parameter

- -

Return value

- -

#boolean: -Return true if you want the task assigning to continue... false will cancel the loop.

- -
-
-
-
- - Set#SET_GROUP - -TASK_A2G_DISPATCHER.SetGroup - -
-
- -

The groups to which the FAC will report to.

- -
-
- -
- -
- - diff --git a/docs/Documentation/Task_Cargo.html b/docs/Documentation/Task_Cargo.html deleted file mode 100644 index d6a95cfc8..000000000 --- a/docs/Documentation/Task_Cargo.html +++ /dev/null @@ -1,943 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Task_Cargo

- -

Tasking (Release 2.1) -- The TASK_CARGO models tasks for players to transport Cargo.

- - - -

Banner Image

- -
- -

The Moose framework provides various CARGO classes that allow DCS phisical or logical objects to be transported or sling loaded by Carriers. -The CARGO_ classes, as part of the moose core, are able to Board, Load, UnBoard and UnLoad cargo between Carrier units.

- -

This collection of classes in this module define tasks for human players to handle these cargo objects. -Cargo can be transported, picked-up, deployed and sling-loaded from and to other places.

- -

The following classes are important to consider:

- -
    -
  • #TASKCARGOTRANSPORT: Defines a task for a human player to transport a set of cargo between various zones.
  • -
- -

==

- -

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-03-09: Revised version.

- -
- -

AUTHORS and CONTRIBUTIONS

- -

Contributions:

- -

Authors:

- -
    -
  • FlightControl: Concept, Design & Programming. -
  • -
- -

Global(s)

- - - - - - - - - -
TASK_CARGO -

TASK_CARGO class, extends Task#TASK

- -

A flexible tasking system

- -

The TASK_CARGO classes provide you with a flexible tasking sytem, -that allows you to transport cargo of various types between various locations -and various dedicated deployment zones.

-
TASK_CARGO_TRANSPORT - -
-

Type FSM_PROCESS

- - - - - - - - - -
FSM_PROCESS.Cargo - -
FSM_PROCESS.DeployZone - -
- -

Type TASK_CARGO

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TASK_CARGO:AddDeployZone(DeployZone, TaskUnit) - -
TASK_CARGO.DeployZones - -
TASK_CARGO:GetPlannedMenuText() - -
TASK_CARGO:GetTargetZone(TaskUnit) - -
TASK_CARGO:New(Mission, SetGroup, TaskName, SetCargo, TaskType) -

Instantiates a new TASK_CARGO.

-
TASK_CARGO:RemoveDeployZone(DeployZone, TaskUnit) - -
TASK_CARGO.SetCargo - -
TASK_CARGO:SetCargoPickup(Cargo, TaskUnit) - -
TASK_CARGO:SetDeployZone(DeployZone, TaskUnit) - -
TASK_CARGO:SetDeployZones(@, TaskUnit, DeployZones) - -
TASK_CARGO:SetPenaltyOnFailed(Text, Penalty, TaskUnit) -

Set a penalty when the A2G attack has failed.

-
TASK_CARGO:SetScoreOnDestroy(Text, Score, TaskUnit) -

Set a score when a target in scope of the A2G attack, has been destroyed .

-
TASK_CARGO:SetScoreOnSuccess(Text, Score, TaskUnit) -

Set a score when all the targets in scope of the A2G attack, have been destroyed.

-
TASK_CARGO.TaskType - -
- -

Type TASK_CARGO_TRANSPORT

- - - - - - - - - -
TASK_CARGO_TRANSPORT.ClassName - -
TASK_CARGO_TRANSPORT:New(Mission, SetGroup, TaskName, SetCargo) -

Instantiates a new TASKCARGOTRANSPORT.

-
- -

Global(s)

-
-
- - #TASK_CARGO - -TASK_CARGO - -
-
- -

TASK_CARGO class, extends Task#TASK

- -

A flexible tasking system

- -

The TASK_CARGO classes provide you with a flexible tasking sytem, -that allows you to transport cargo of various types between various locations -and various dedicated deployment zones.

- - - -

The cargo in scope of the TASKCARGO classes must be explicitly given, and is of type SETCARGO. -The SET_CARGO contains a collection of CARGO objects that must be handled by the players in the mission.

- - -

Task execution experience from the player perspective

- -

A human player can join the battle field in a client airborne slot or a ground vehicle within the CA module (ALT-J). -The player needs to accept the task from the task overview list within the mission, using the radio menus.

- -

Once the TASK_CARGO is assigned to the player and accepted by the player, the player will obtain -an extra Cargo Handling Radio Menu that contains the CARGO objects that need to be transported.

- -

Each CARGO object has a certain state:

- -
    -
  • UnLoaded: The CARGO is located within the battlefield. It may still need to be transported.
  • -
  • Loaded: The CARGO is loaded within a Carrier. This can be your air unit, or another air unit, or even a vehicle.
  • -
  • Boarding: The CARGO is running or moving towards your Carrier for loading.
  • -
  • UnBoarding: The CARGO is driving or jumping out of your Carrier and moves to a location in the Deployment Zone.
  • -
- -

Cargo must be transported towards different **Deployment Zones**.

- -

The Cargo Handling Radio Menu system allows to execute various actions to handle the cargo. -In the menu, you'll find for each CARGO, that is part of the scope of the task, various actions that can be completed. -Depending on the location of your Carrier unit, the menu options will vary.

- - -

Cargo Pickup and Boarding

- -

For cargo boarding, a cargo can only execute the boarding actions if it is within the foreseen Reporting Range. -Therefore, it is important that you steer your Carrier within the Reporting Range, -so that boarding actions can be executed on the cargo. -To Pickup and Board cargo, the following menu items will be shown in your carrier radio menu:

- -

Board Cargo

- -

If your Carrier is within the Reporting Range of the cargo, it will allow to pickup the cargo by selecting this menu option. -Depending on the Cargo type, the cargo will either move to your Carrier or you will receive instructions how to handle the cargo -pickup. If the cargo moves to your carrier, it will indicate the boarding status. -Note that multiple units need to board your Carrier, so it is required to await the full boarding process. -Once the cargo is fully boarded within your Carrier, you will be notified of this.

- -

Note that for airborne Carriers, it is required to land first before the Boarding process can be initiated. -If during boarding the Carrier gets airborne, the boarding process will be cancelled.

- -

Pickup Cargo

- -

If your Carrier is not within the Reporting Range of the cargo, the HQ will guide you to its location. -Routing information is shown in flight that directs you to the cargo within Reporting Range. -Upon arrival, the Cargo will contact you and further instructions will be given. -When your Carrier is airborne, you will receive instructions to land your Carrier. -The action will not be completed until you've landed your Carrier.

- - -

Cargo Deploy and UnBoarding

- -

Various Deployment Zones can be foreseen in the scope of the Cargo transportation. Each deployment zone can be of varying Zone type. -The Cargo Handling Radio Menu provides with menu options to execute an action to steer your Carrier to a specific Zone.

- -

UnBoard Cargo

- -

If your Carrier is already within a Deployment Zone, -then the Cargo Handling Radio Menu allows to UnBoard a specific cargo that is -loaded within your Carrier group into the Deployment Zone. -Note that the Unboarding process takes a while, as the cargo units (infantry or vehicles) must unload from your Carrier. -Ensure that you stay at the position or stay on the ground while Unboarding. -If any unforeseen manoeuvre is done by the Carrier, then the Unboarding will be cancelled.

- -

Deploy Cargo

- -

If your Carrier is not within a Deployment Zone, you'll need to fly towards one. -Fortunately, the Cargo Handling Radio Menu provides you with menu options to select a specific Deployment Zone to fly towards. -Once a Deployment Zone has been selected, your Carrier will receive routing information from HQ towards the Deployment Zone center. -Upon arrival, the HQ will provide you with further instructions. -When your Carrier is airborne, you will receive instructions to land your Carrier. -The action will not be completed until you've landed your Carrier!

- -

Handle TASK_CARGO Events ...

- -

The TASK_CARGO classes define Cargo transport tasks, -based on the tasking capabilities defined in Task#TASK.

- -

Specific TASK_CARGO Events

- -

Specific Cargo Handling event can be captured, that allow to trigger specific actions!

- -
    -
  • Boarded: Triggered when the Cargo has been Boarded into your Carrier.
  • -
  • UnBoarded: Triggered when the cargo has been Unboarded from your Carrier and has arrived at the Deployment Zone.
  • -
- -

Standard TASK_CARGO Events

- -

The TASK_CARGO is implemented using a Statemachine#FSM_TASK, and has the following standard statuses:

- -
    -
  • None: Start of the process.
  • -
  • Planned: The cargo task is planned.
  • -
  • Assigned: The cargo task is assigned to a Group#GROUP.
  • -
  • Success: The cargo task is successfully completed.
  • -
  • Failed: The cargo task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
  • -
- -
- - -
-
-
-
- - #TASK_CARGO_TRANSPORT - -TASK_CARGO_TRANSPORT - -
-
- - - -
-
-

Type Task_Cargo

- -

Type FSM_PROCESS

-

Field(s)

-
-
- - - -FSM_PROCESS.Cargo - -
-
- - - -
-
-
-
- - - -FSM_PROCESS.DeployZone - -
-
- - - -
-
- -

Type TASK_CARGO

-

Field(s)

-
-
- - -TASK_CARGO:AddDeployZone(DeployZone, TaskUnit) - -
-
- - - -

Parameters

- -

Return value

- -

#TASK_CARGO:

- - -
-
-
-
- - - -TASK_CARGO.DeployZones - -
-
- - - - -

setmetatable( {}, { __mode = "v" } ) -- weak table on value

- -
-
-
-
- - -TASK_CARGO:GetPlannedMenuText() - -
-
- - - -
-
-
-
- - -TASK_CARGO:GetTargetZone(TaskUnit) - -
-
- - - -

Parameter

- -

Return value

- -

Core.Zone#ZONE_BASE: -The Zone object where the Target is located on the map.

- -
-
-
-
- - -TASK_CARGO:New(Mission, SetGroup, TaskName, SetCargo, TaskType) - -
-
- -

Instantiates a new TASK_CARGO.

- -

Parameters

-
    -
  • - -

    Tasking.Mission#MISSION Mission :

    - -
  • -
  • - -

    Set#SET_GROUP SetGroup : -The set of groups for which the Task can be assigned.

    - -
  • -
  • - -

    #string TaskName : -The name of the Task.

    - -
  • -
  • - -

    Core.Set#SET_CARGO SetCargo : -The scope of the cargo to be transported.

    - -
  • -
  • - -

    #string TaskType : -The type of Cargo task.

    - -
  • -
-

Return value

- -

#TASK_CARGO: -self

- -
-
-
-
- - -TASK_CARGO:RemoveDeployZone(DeployZone, TaskUnit) - -
-
- - - -

Parameters

- -

Return value

- -

#TASK_CARGO:

- - -
-
-
-
- - - -TASK_CARGO.SetCargo - -
-
- - - -
-
-
-
- - -TASK_CARGO:SetCargoPickup(Cargo, TaskUnit) - -
-
- - - -

Parameters

- -

Return value

- -

#TASK_CARGO:

- - -
-
-
-
- - -TASK_CARGO:SetDeployZone(DeployZone, TaskUnit) - -
-
- - - -

Parameters

- -

Return value

- -

#TASK_CARGO:

- - -
-
-
-
- - -TASK_CARGO:SetDeployZones(@, TaskUnit, DeployZones) - -
-
- - - -

Parameters

-
    -
  • - -

    @ : -ist DeployZones

    - -
  • -
  • - -

    Wrapper.Unit#UNIT TaskUnit :

    - -
  • -
  • - -

    DeployZones :

    - -
  • -
-

Return value

- -

#TASK_CARGO:

- - -
-
-
-
- - -TASK_CARGO:SetPenaltyOnFailed(Text, Penalty, TaskUnit) - -
-
- -

Set a penalty when the A2G attack has failed.

- -

Parameters

-
    -
  • - -

    #string Text : -The text to display to the player, when the A2G attack has failed.

    - -
  • -
  • - -

    #number Penalty : -The penalty in points.

    - -
  • -
  • - -

    Wrapper.Unit#UNIT TaskUnit :

    - -
  • -
-

Return value

- -

#TASK_CARGO:

- - -
-
-
-
- - -TASK_CARGO:SetScoreOnDestroy(Text, Score, TaskUnit) - -
-
- -

Set a score when a target in scope of the A2G attack, has been destroyed .

- -

Parameters

-
    -
  • - -

    #string Text : -The text to display to the player, when the target has been destroyed.

    - -
  • -
  • - -

    #number Score : -The score in points.

    - -
  • -
  • - -

    Wrapper.Unit#UNIT TaskUnit :

    - -
  • -
-

Return value

- -

#TASK_CARGO:

- - -
-
-
-
- - -TASK_CARGO:SetScoreOnSuccess(Text, Score, TaskUnit) - -
-
- -

Set a score when all the targets in scope of the A2G attack, have been destroyed.

- -

Parameters

-
    -
  • - -

    #string Text : -The text to display to the player, when all targets hav been destroyed.

    - -
  • -
  • - -

    #number Score : -The score in points.

    - -
  • -
  • - -

    Wrapper.Unit#UNIT TaskUnit :

    - -
  • -
-

Return value

- -

#TASK_CARGO:

- - -
-
-
-
- - - -TASK_CARGO.TaskType - -
-
- - - -
-
- -

Type TASK_CARGO_TRANSPORT

- -

The TASKCARGOTRANSPORT class

- -

Field(s)

-
-
- - #string - -TASK_CARGO_TRANSPORT.ClassName - -
-
- - - -
-
-
-
- - -TASK_CARGO_TRANSPORT:New(Mission, SetGroup, TaskName, SetCargo) - -
-
- -

Instantiates a new TASKCARGOTRANSPORT.

- -

Parameters

- -

Return value

- -

#TASKCARGOTRANSPORT: -self

- -
-
- -
- -
- - diff --git a/docs/Documentation/Task_PICKUP.html b/docs/Documentation/Task_PICKUP.html deleted file mode 100644 index a26b39707..000000000 --- a/docs/Documentation/Task_PICKUP.html +++ /dev/null @@ -1,418 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Task_PICKUP

- -

This module contains the TASK_PICKUP classes.

- - - -

1) #TASK_PICKUP class, extends Task#TASK

-

The #TASK_PICKUP class defines a pickup task of a Set of CARGO objects defined within the mission. -based on the tasking capabilities defined in Task#TASK. -The TASK_PICKUP is implemented using a Statemachine#FSM_TASK, and has the following statuses:

- -
    -
  • None: Start of the process
  • -
  • Planned: The SEAD task is planned. Upon Planned, the sub-process ProcessFsm.Assign#ACTASSIGN_ACCEPT is started to accept the task.
  • -
  • Assigned: The SEAD task is assigned to a Group#GROUP. Upon Assigned, the sub-process ProcessFsm.Route#ACTROUTE is started to route the active Units in the Group to the attack zone.
  • -
  • Success: The SEAD task is successfully completed. Upon Success, the sub-process ProcessSEAD#PROCESSSEAD is started to follow-up successful SEADing of the targets assigned in the task.
  • -
  • Failed: The SEAD task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
  • -
- -
- -

Authors: FlightControl - Design and Programming

- - -

Global(s)

- - - - - -
TASK_PICKUP - -
-

Type TASK_PICKUP

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TASK_PICKUP:AssignToUnit(TaskUnit) -

Assign the Task to a Unit.

-
TASK_PICKUP.ClassName - -
TASK_PICKUP:CleanUp() -

Removes a TASK_PICKUP.

-
TASK_PICKUP:GetPlannedMenuText() - -
TASK_PICKUP:New(Mission, AssignedSetGroup, TaskName, TaskType, UnitSetTargets, TargetZone) -

Instantiates a new TASK_PICKUP.

-
TASK_PICKUP:OnNext(Fsm, Event, From, To, Event) -

StateMachine callback function for a TASK

-
TASK_PICKUP.TaskScheduler - -
TASK_PICKUP:_Schedule() - -
TASK_PICKUP:_Scheduler() - -
- -

Global(s)

-
-
- - #TASK_PICKUP - -TASK_PICKUP - -
-
- - - -
-
-

Type Task_PICKUP

- -

Type TASK_PICKUP

- -

The TASK_PICKUP class

- -

Field(s)

-
-
- - -TASK_PICKUP:AssignToUnit(TaskUnit) - -
-
- -

Assign the Task to a Unit.

- -

Parameter

- -

Return value

- -

#TASK_PICKUP: -self

- -
-
-
-
- - #string - -TASK_PICKUP.ClassName - -
-
- - - -
-
-
-
- - -TASK_PICKUP:CleanUp() - -
-
- -

Removes a TASK_PICKUP.

- -

Return value

- -

#nil:

- - -
-
-
-
- - -TASK_PICKUP:GetPlannedMenuText() - -
-
- - - -
-
-
-
- - -TASK_PICKUP:New(Mission, AssignedSetGroup, TaskName, TaskType, UnitSetTargets, TargetZone) - -
-
- -

Instantiates a new TASK_PICKUP.

- -

Parameters

- -

Return value

- -

#TASK_PICKUP: -self

- -
-
-
-
- - -TASK_PICKUP:OnNext(Fsm, Event, From, To, Event) - -
-
- -

StateMachine callback function for a TASK

- -

Parameters

- -
-
-
-
- - - -TASK_PICKUP.TaskScheduler - -
-
- - - -
-
-
-
- - -TASK_PICKUP:_Schedule() - -
-
- - - -
-
-
-
- - -TASK_PICKUP:_Scheduler() - -
-
- - - -
-
- -
- -
- - diff --git a/docs/Documentation/Task_SEAD.html b/docs/Documentation/Task_SEAD.html deleted file mode 100644 index a998527ee..000000000 --- a/docs/Documentation/Task_SEAD.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Task_SEAD

- -

This module contains the TASK_SEAD classes.

- - - -

1) #TASK_SEAD class, extends Task#TASK

-

The #TASK_SEAD class defines a SEAD task for a Set of Target Units, located at a Target Zone, -based on the tasking capabilities defined in Task#TASK. -The TASK_SEAD is implemented using a Statemachine#FSM_TASK, and has the following statuses:

- -
    -
  • None: Start of the process
  • -
  • Planned: The SEAD task is planned. Upon Planned, the sub-process ProcessFsm.Assign#ACTASSIGN_ACCEPT is started to accept the task.
  • -
  • Assigned: The SEAD task is assigned to a Group#GROUP. Upon Assigned, the sub-process ProcessFsm.Route#ACTROUTE is started to route the active Units in the Group to the attack zone.
  • -
  • Success: The SEAD task is successfully completed. Upon Success, the sub-process ProcessSEAD#PROCESSSEAD is started to follow-up successful SEADing of the targets assigned in the task.
  • -
  • Failed: The SEAD task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
  • -
- -
- -

Authors: FlightControl - Design and Programming

- - -

Global(s)

- - - - - -
TASK_SEAD - -
-

Type TASK_SEAD

- - - - - - - - - - - - - - - - - -
TASK_SEAD.ClassName - -
TASK_SEAD:GetPlannedMenuText() - -
TASK_SEAD:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetZone, TargetSetUnit) -

Instantiates a new TASK_SEAD.

-
TASK_SEAD.TargetSetUnit - -
- -

Global(s)

-
-
- - #TASK_SEAD - -TASK_SEAD - -
-
- - - -
-
-

Type Task_SEAD

- -

Type TASK_SEAD

- -

The TASK_SEAD class

- -

Field(s)

-
-
- - #string - -TASK_SEAD.ClassName - -
-
- - - -
-
-
-
- - -TASK_SEAD:GetPlannedMenuText() - -
-
- - - -
-
-
-
- - -TASK_SEAD:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetZone, TargetSetUnit) - -
-
- -

Instantiates a new TASK_SEAD.

- -

Parameters

- -

Return value

- -

#TASK_SEAD: -self

- -
-
-
-
- - Set#SET_UNIT - -TASK_SEAD.TargetSetUnit - -
-
- - - -
-
- -
- -
- - diff --git a/docs/Documentation/Unit.html b/docs/Documentation/Unit.html deleted file mode 100644 index d9cc8dfda..000000000 --- a/docs/Documentation/Unit.html +++ /dev/null @@ -1,1725 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Unit

- -

Wrapper - UNIT is a wrapper class for the DCS Class Unit.

- - - -
- -

The #UNIT class is a wrapper class to handle the DCS Unit objects:

- -
    -
  • Support all DCS Unit APIs.
  • -
  • Enhance with Unit specific APIs not in the DCS Unit API set.
  • -
  • Handle local Unit Controller.
  • -
  • Manage the "state" of the DCS Unit. -
  • -
- -

Global(s)

- - - - - -
UNIT -

UNIT class, extends Controllable#CONTROLLABLE

- -

For each DCS Unit object alive within a running mission, a UNIT wrapper object (instance) will be created within the _DATABASE object.

-
-

Type UNIT

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
UNIT:Find(DCSUnit) -

Finds a UNIT from the _DATABASE using a DCSUnit object.

-
UNIT:FindByName(UnitName) -

Find a UNIT in the _DATABASE using the name of an existing DCS Unit.

-
UNIT:Flare(FlareColor) -

Signal a flare at the position of the UNIT.

-
UNIT:FlareGreen() -

Signal a green flare at the position of the UNIT.

-
UNIT:FlareRed() -

Signal a red flare at the position of the UNIT.

-
UNIT:FlareWhite() -

Signal a white flare at the position of the UNIT.

-
UNIT:FlareYellow() -

Signal a yellow flare at the position of the UNIT.

-
UNIT:GetAmmo() -

Returns the Unit's ammunition.

-
UNIT:GetCallsign() -

Returns the Unit's callsign - the localized string.

-
UNIT:GetCategoryName() -

Returns the category name of the #UNIT.

-
UNIT:GetDCSObject() - -
UNIT:GetFuel() -

Returns relative amount of fuel (from 0.0 to 1.0) the unit has in its internal tanks.

-
UNIT:GetGroup() -

Returns the unit's group if it exist and nil otherwise.

-
UNIT:GetLife() -

Returns the unit's health.

-
UNIT:GetLife0() -

Returns the Unit's initial health.

-
UNIT:GetNumber() -

Returns the unit's number in the group.

-
UNIT:GetPlayerName() -

Returns name of the player that control the unit or nil if the unit is controlled by A.I.

-
UNIT:GetPrefix() -

Returns the prefix name of the DCS Unit.

-
UNIT:GetRadar() -

Returns two values:

- -
    -
  • First value indicates if at least one of the unit's radar(s) is on.
  • -
-
UNIT:GetSensors() -

Returns the unit sensors.

-
UNIT:GetThreatLevel() -

Returns the Unit's A2G threat level on a scale from 1 to 10 ...

-
UNIT:GetUnits() -

Returns the UNIT in a UNIT list of one element.

-
UNIT:HandleEvent(Event, EventFunction) -

Subscribe to a DCS Event.

-
UNIT:HasSEAD() -

Returns if the unit is SEADable.

-
UNIT:HasSensors(...) -

Returns if the unit has sensors of a certain type.

-
UNIT:InAir() -

Returns true if the UNIT is in the air.

-
UNIT:IsActive() -

Returns if the unit is activated.

-
UNIT:IsAir() -

Returns if the unit is of an air category.

-
UNIT:IsAlive() -

Returns if the Unit is alive.

-
UNIT:IsFriendly(FriendlyCoalition) -

Returns if the unit is a friendly unit.

-
UNIT:IsGround() -

Returns if the unit is of an ground category.

-
UNIT:IsInZone(Zone) -

Returns true if the unit is within a Zone.

-
UNIT:IsNotInZone(Zone) -

Returns true if the unit is not within a Zone.

-
UNIT:IsShip() -

Returns if the unit is of a ship category.

-
UNIT:Name() -

Return the name of the UNIT.

-
UNIT:OtherUnitInRadius(AwaitUnit, Radius) -

Returns true if there is an other DCS Unit within a radius of the current 2D point of the DCS Unit.

-
UNIT:ReSpawn(SpawnVec3, Heading) -

Respawn the Unit using a (tweaked) template of the parent Group.

-
UNIT:Register(UnitName) -

Create a new UNIT from DCSUnit.

-
UNIT:ResetEvents() -

Reset the subscriptions.

-
UNIT:Smoke(SmokeColor, Range) -

Smoke the UNIT.

-
UNIT:SmokeBlue() -

Smoke the UNIT Blue.

-
UNIT:SmokeGreen() -

Smoke the UNIT Green.

-
UNIT:SmokeOrange() -

Smoke the UNIT Orange.

-
UNIT:SmokeRed() -

Smoke the UNIT Red.

-
UNIT:SmokeWhite() -

Smoke the UNIT White.

-
UNIT:UnHandleEvent(Event) -

UnSubscribe to a DCS event.

-
- -

Type Unit.SensorType

- - - - - - - - - - - - - - - - - -
Unit.SensorType.IRST - -
Unit.SensorType.OPTIC - -
Unit.SensorType.RADAR - -
Unit.SensorType.RWR - -
- -

Global(s)

-
-
- - #UNIT - -UNIT - -
-
- -

UNIT class, extends Controllable#CONTROLLABLE

- -

For each DCS Unit object alive within a running mission, a UNIT wrapper object (instance) will be created within the _DATABASE object.

- - -

This is done at the beginning of the mission (when the mission starts), and dynamically when new DCS Unit objects are spawned (using the SPAWN class).

- -

The UNIT class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference -using the DCS Unit or the DCS UnitName.

- -

Another thing to know is that UNIT objects do not "contain" the DCS Unit object. -The UNIT methods will reference the DCS Unit object by name when it is needed during API execution. -If the DCS Unit object does not exist or is nil, the UNIT methods will return nil and log an exception in the DCS.log file.

- -

The UNIT class provides the following functions to retrieve quickly the relevant UNIT instance:

- -
    -
  • UNIT.Find(): Find a UNIT instance from the _DATABASE object using a DCS Unit object.
  • -
  • UNIT.FindByName(): Find a UNIT instance from the _DATABASE object using a DCS Unit name.
  • -
- -

IMPORTANT: ONE SHOULD NEVER SANATIZE these UNIT OBJECT REFERENCES! (make the UNIT object references nil).

- -

DCS UNIT APIs

- -

The DCS Unit APIs are used extensively within MOOSE. The UNIT class has for each DCS Unit API a corresponding method. -To be able to distinguish easily in your code the difference between a UNIT API call and a DCS Unit API call, -the first letter of the method is also capitalized. So, by example, the DCS Unit method DCSWrapper.Unit#Unit.getName() -is implemented in the UNIT class as UNIT.GetName().

- -

Smoke, Flare Units

- -

The UNIT class provides methods to smoke or flare units easily. -The UNIT.SmokeBlue(), UNIT.SmokeGreen(),UNIT.SmokeOrange(), UNIT.SmokeRed(), UNIT.SmokeRed() methods -will smoke the unit in the corresponding color. Note that smoking a unit is done at the current position of the DCS Unit. -When the DCS Unit moves for whatever reason, the smoking will still continue! -The UNIT.FlareGreen(), UNIT.FlareRed(), UNIT.FlareWhite(), UNIT.FlareYellow() -methods will fire off a flare in the air with the corresponding color. Note that a flare is a one-off shot and its effect is of very short duration.

- -

Location Position, Point

- -

The UNIT class provides methods to obtain the current point or position of the DCS Unit. -The UNIT.GetPointVec2(), UNIT.GetVec3() will obtain the current location of the DCS Unit in a Vec2 (2D) or a point in a Vec3 (3D) vector respectively. -If you want to obtain the complete 3D position including ori�ntation and direction vectors, consult the UNIT.GetPositionVec3() method respectively.

- -

Test if alive

- -

The UNIT.IsAlive(), UNIT.IsActive() methods determines if the DCS Unit is alive, meaning, it is existing and active.

- -

Test for proximity

- -

The UNIT class contains methods to test the location or proximity against zones or other objects.

- -

Zones

- -

To test whether the Unit is within a zone, use the UNIT.IsInZone() or the UNIT.IsNotInZone() methods. Any zone can be tested on, but the zone must be derived from Zone#ZONE_BASE.

- -

Units

- -

Test if another DCS Unit is within a given radius of the current DCS Unit, use the UNIT.OtherUnitInRadius() method.

- - -
-
-

Type Unit

- -

Type UNIT

-

Field(s)

-
-
- - -UNIT:Find(DCSUnit) - -
-
- -

Finds a UNIT from the _DATABASE using a DCSUnit object.

- -

Parameter

- -

Return value

- -

#UNIT: -self

- -
-
-
-
- - -UNIT:FindByName(UnitName) - -
-
- -

Find a UNIT in the _DATABASE using the name of an existing DCS Unit.

- -

Parameter

-
    -
  • - -

    #string UnitName : -The Unit Name.

    - -
  • -
-

Return value

- -

#UNIT: -self

- -
-
-
-
- - -UNIT:Flare(FlareColor) - -
-
- -

Signal a flare at the position of the UNIT.

- -

Parameter

- -
-
-
-
- - -UNIT:FlareGreen() - -
-
- -

Signal a green flare at the position of the UNIT.

- -
-
-
-
- - -UNIT:FlareRed() - -
-
- -

Signal a red flare at the position of the UNIT.

- -
-
-
-
- - -UNIT:FlareWhite() - -
-
- -

Signal a white flare at the position of the UNIT.

- -
-
-
-
- - -UNIT:FlareYellow() - -
-
- -

Signal a yellow flare at the position of the UNIT.

- -
-
-
-
- - -UNIT:GetAmmo() - -
-
- -

Returns the Unit's ammunition.

- -

Return values

-
    -
  1. - -

    Dcs.DCSWrapper.Unit#Unit.Ammo:

    - - -
  2. -
  3. - -

    #nil: -The DCS Unit is not existing or alive.

    - -
  4. -
-
-
-
-
- - -UNIT:GetCallsign() - -
-
- -

Returns the Unit's callsign - the localized string.

- -

Return values

-
    -
  1. - -

    #string: -The Callsign of the Unit.

    - -
  2. -
  3. - -

    #nil: -The DCS Unit is not existing or alive.

    - -
  4. -
-
-
-
-
- - -UNIT:GetCategoryName() - -
-
- -

Returns the category name of the #UNIT.

- -

Return value

- -

#string: -Category name = Helicopter, Airplane, Ground Unit, Ship

- -
-
-
-
- - -UNIT:GetDCSObject() - -
-
- - - -

Return value

- -

Dcs.DCSWrapper.Unit#Unit:

- - -
-
-
-
- - -UNIT:GetFuel() - -
-
- -

Returns relative amount of fuel (from 0.0 to 1.0) the unit has in its internal tanks.

- - -

If there are additional fuel tanks the value may be greater than 1.0.

- -

Return values

-
    -
  1. - -

    #number: -The relative amount of fuel (from 0.0 to 1.0).

    - -
  2. -
  3. - -

    #nil: -The DCS Unit is not existing or alive.

    - -
  4. -
-
-
-
-
- - -UNIT:GetGroup() - -
-
- -

Returns the unit's group if it exist and nil otherwise.

- -

Return values

-
    -
  1. - -

    Wrapper.Group#GROUP: -The Group of the Unit.

    - -
  2. -
  3. - -

    #nil: -The DCS Unit is not existing or alive.

    - -
  4. -
-
-
-
-
- - -UNIT:GetLife() - -
-
- -

Returns the unit's health.

- - -

Dead units has health <= 1.0.

- -

Return values

-
    -
  1. - -

    #number: -The Unit's health value.

    - -
  2. -
  3. - -

    #nil: -The DCS Unit is not existing or alive.

    - -
  4. -
-
-
-
-
- - -UNIT:GetLife0() - -
-
- -

Returns the Unit's initial health.

- -

Return values

-
    -
  1. - -

    #number: -The Unit's initial health value.

    - -
  2. -
  3. - -

    #nil: -The DCS Unit is not existing or alive.

    - -
  4. -
-
-
-
-
- - -UNIT:GetNumber() - -
-
- -

Returns the unit's number in the group.

- - -

The number is the same number the unit has in ME. -It may not be changed during the mission. -If any unit in the group is destroyed, the numbers of another units will not be changed.

- -

Return values

-
    -
  1. - -

    #number: -The Unit number.

    - -
  2. -
  3. - -

    #nil: -The DCS Unit is not existing or alive.

    - -
  4. -
-
-
-
-
- - -UNIT:GetPlayerName() - -
-
- -

Returns name of the player that control the unit or nil if the unit is controlled by A.I.

- -

Return values

-
    -
  1. - -

    #string: -Player Name

    - -
  2. -
  3. - -

    #nil: -The DCS Unit is not existing or alive.

    - -
  4. -
-
-
-
-
- - -UNIT:GetPrefix() - -
-
- -

Returns the prefix name of the DCS Unit.

- - -

A prefix name is a part of the name before a '#'-sign. -DCS Units spawned with the SPAWN class contain a '#'-sign to indicate the end of the (base) DCS Unit name. -The spawn sequence number and unit number are contained within the name after the '#' sign.

- -

Return values

-
    -
  1. - -

    #string: -The name of the DCS Unit.

    - -
  2. -
  3. - -

    #nil: -The DCS Unit is not existing or alive.

    - -
  4. -
-
-
-
-
- - -UNIT:GetRadar() - -
-
- -

Returns two values:

- -
    -
  • First value indicates if at least one of the unit's radar(s) is on.
  • -
- - -
    -
  • Second value is the object of the radar's interest. Not nil only if at least one radar of the unit is tracking a target.
  • -
- -

Return values

-
    -
  1. - -

    #boolean: - Indicates if at least one of the unit's radar(s) is on.

    - -
  2. -
  3. - -

    Dcs.DCSWrapper.Object#Object: -The object of the radar's interest. Not nil only if at least one radar of the unit is tracking a target.

    - -
  4. -
  5. - -

    #nil: -The DCS Unit is not existing or alive.

    - -
  6. -
-
-
-
-
- - -UNIT:GetSensors() - -
-
- -

Returns the unit sensors.

- -

Return values

-
    -
  1. - -

    Dcs.DCSWrapper.Unit#Unit.Sensors:

    - - -
  2. -
  3. - -

    #nil: -The DCS Unit is not existing or alive.

    - -
  4. -
-
-
-
-
- - -UNIT:GetThreatLevel() - -
-
- -

Returns the Unit's A2G threat level on a scale from 1 to 10 ...

- - -

The following threat levels are foreseen:

- -
    -
  • Threat level 0: Unit is unarmed.
  • -
  • Threat level 1: Unit is infantry.
  • -
  • Threat level 2: Unit is an infantry vehicle.
  • -
  • Threat level 3: Unit is ground artillery.
  • -
  • Threat level 4: Unit is a tank.
  • -
  • Threat level 5: Unit is a modern tank or ifv with ATGM.
  • -
  • Threat level 6: Unit is a AAA.
  • -
  • Threat level 7: Unit is a SAM or manpad, IR guided.
  • -
  • Threat level 8: Unit is a Short Range SAM, radar guided.
  • -
  • Threat level 9: Unit is a Medium Range SAM, radar guided.
  • -
  • Threat level 10: Unit is a Long Range SAM, radar guided.
  • -
- -
-
-
-
- - -UNIT:GetUnits() - -
-
- -

Returns the UNIT in a UNIT list of one element.

- -

Return value

- -

#list: -Wrapper.Unit#UNIT> The UNITs wrappers.

- -
-
-
-
- - -UNIT:HandleEvent(Event, EventFunction) - -
-
- -

Subscribe to a DCS Event.

- -

Parameters

-
    -
  • - -

    Core.Event#EVENTS Event :

    - -
  • -
  • - -

    #function EventFunction : -(optional) The function to be called when the event occurs for the unit.

    - -
  • -
-

Return value

- -

#UNIT:

- - -
-
-
-
- - -UNIT:HasSEAD() - -
-
- -

Returns if the unit is SEADable.

- -

Return values

-
    -
  1. - -

    #boolean: -returns true if the unit is SEADable.

    - -
  2. -
  3. - -

    #nil: -The DCS Unit is not existing or alive.

    - -
  4. -
-
-
-
-
- - -UNIT:HasSensors(...) - -
-
- -

Returns if the unit has sensors of a certain type.

- -

Parameter

-
    -
  • - -

    ... :

    - -
  • -
-

Return values

-
    -
  1. - -

    #boolean: -returns true if the unit has specified types of sensors. This function is more preferable than Unit.getSensors() if you don't want to get information about all the unit's sensors, and just want to check if the unit has specified types of sensors.

    - -
  2. -
  3. - -

    #nil: -The DCS Unit is not existing or alive.

    - -
  4. -
-
-
-
-
- - -UNIT:InAir() - -
-
- -

Returns true if the UNIT is in the air.

- -

Return values

-
    -
  1. - -

    #boolean: -true if in the air.

    - -
  2. -
  3. - -

    #nil: -The UNIT is not existing or alive.

    - -
  4. -
-
-
-
-
- - -UNIT:IsActive() - -
-
- -

Returns if the unit is activated.

- -

Return values

-
    -
  1. - -

    #boolean: -true if Unit is activated.

    - -
  2. -
  3. - -

    #nil: -The DCS Unit is not existing or alive.

    - -
  4. -
-
-
-
-
- - -UNIT:IsAir() - -
-
- -

Returns if the unit is of an air category.

- - -

If the unit is a helicopter or a plane, then this method will return true, otherwise false.

- -

Return value

- -

#boolean: -Air category evaluation result.

- -
-
-
-
- - -UNIT:IsAlive() - -
-
- -

Returns if the Unit is alive.

- - -

If the Unit is not alive, nil is returned.
-If the Unit is alive and active, true is returned.
-If the Unit is alive but not active, false is returned.

- -

Return values

-
    -
  1. - -

    #boolean: -true if Unit is alive and active.

    - -
  2. -
  3. - -

    #boolean: -false if Unit is alive but not active.

    - -
  4. -
  5. - -

    #nil: -if the Unit is not existing or is not alive.

    - -
  6. -
-
-
-
-
- - -UNIT:IsFriendly(FriendlyCoalition) - -
-
- -

Returns if the unit is a friendly unit.

- -

Parameter

-
    -
  • - -

    FriendlyCoalition :

    - -
  • -
-

Return value

- -

#boolean: -IsFriendly evaluation result.

- -
-
-
-
- - -UNIT:IsGround() - -
-
- -

Returns if the unit is of an ground category.

- - -

If the unit is a ground vehicle or infantry, this method will return true, otherwise false.

- -

Return value

- -

#boolean: -Ground category evaluation result.

- -
-
-
-
- - -UNIT:IsInZone(Zone) - -
-
- -

Returns true if the unit is within a Zone.

- -

Parameter

- -

Return value

- -

#boolean: -Returns true if the unit is within the Zone#ZONE_BASE

- -
-
-
-
- - -UNIT:IsNotInZone(Zone) - -
-
- -

Returns true if the unit is not within a Zone.

- -

Parameter

- -

Return value

- -

#boolean: -Returns true if the unit is not within the Zone#ZONE_BASE

- -
-
-
-
- - -UNIT:IsShip() - -
-
- -

Returns if the unit is of a ship category.

- - -

If the unit is a ship, this method will return true, otherwise false.

- -

Return value

- -

#boolean: -Ship category evaluation result.

- -
-
-
-
- - -UNIT:Name() - -
-
- -

Return the name of the UNIT.

- -

Return value

- -

#string: -The UNIT name.

- -
-
-
-
- - -UNIT:OtherUnitInRadius(AwaitUnit, Radius) - -
-
- -

Returns true if there is an other DCS Unit within a radius of the current 2D point of the DCS Unit.

- -

Parameters

-
    -
  • - -

    #UNIT AwaitUnit : -The other UNIT wrapper object.

    - -
  • -
  • - -

    Radius : -The radius in meters with the DCS Unit in the centre.

    - -
  • -
-

Return values

-
    -
  1. - - -

    true If the other DCS Unit is within the radius of the 2D point of the DCS Unit.

    - -
  2. -
  3. - -

    #nil: -The DCS Unit is not existing or alive.

    - -
  4. -
-
-
-
-
- - -UNIT:ReSpawn(SpawnVec3, Heading) - -
-
- -

Respawn the Unit using a (tweaked) template of the parent Group.

- - - -

This function will:

- -
    -
  • Get the current position and heading of the group.
  • -
  • When the unit is alive, it will tweak the template x, y and heading coordinates of the group and the embedded units to the current units positions.
  • -
  • Then it will respawn the re-modelled group. -
  • -
- -

Parameters

-
    -
  • - -

    Dcs.DCSTypes#Vec3 SpawnVec3 : -The position where to Spawn the new Unit at.

    - -
  • -
  • - -

    #number Heading : -The heading of the unit respawn.

    - -
  • -
-
-
-
-
- - -UNIT:Register(UnitName) - -
-
- -

Create a new UNIT from DCSUnit.

- -

Parameter

-
    -
  • - -

    #string UnitName : -The name of the DCS unit.

    - -
  • -
-

Return value

- -

#UNIT:

- - -
-
-
-
- - -UNIT:ResetEvents() - -
-
- -

Reset the subscriptions.

- -

Return value

- -

#UNIT:

- - -
-
-
-
- - -UNIT:Smoke(SmokeColor, Range) - -
-
- -

Smoke the UNIT.

- -

Parameters

-
    -
  • - -

    SmokeColor :

    - -
  • -
  • - -

    Range :

    - -
  • -
-
-
-
-
- - -UNIT:SmokeBlue() - -
-
- -

Smoke the UNIT Blue.

- -
-
-
-
- - -UNIT:SmokeGreen() - -
-
- -

Smoke the UNIT Green.

- -
-
-
-
- - -UNIT:SmokeOrange() - -
-
- -

Smoke the UNIT Orange.

- -
-
-
-
- - -UNIT:SmokeRed() - -
-
- -

Smoke the UNIT Red.

- -
-
-
-
- - -UNIT:SmokeWhite() - -
-
- -

Smoke the UNIT White.

- -
-
-
-
- - -UNIT:UnHandleEvent(Event) - -
-
- -

UnSubscribe to a DCS event.

- -

Parameter

- -

Return value

- -

#UNIT:

- - -
-
- -

Type Unit.SensorType

- -

Unit.SensorType

- -

Field(s)

-
-
- - -Unit.SensorType.IRST - -
-
- - - -
-
-
-
- - -Unit.SensorType.OPTIC - -
-
- - - -
-
-
-
- - -Unit.SensorType.RADAR - -
-
- - - -
-
-
-
- - -Unit.SensorType.RWR - -
-
- - - -
-
- -

Type list

- -
- -
- - diff --git a/docs/Documentation/Utils.html b/docs/Documentation/Utils.html deleted file mode 100644 index 553a2be0e..000000000 --- a/docs/Documentation/Utils.html +++ /dev/null @@ -1,874 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Utils

- -

This module contains derived utilities taken from the MIST framework, -which are excellent tools to be reused in an OO environment!.

- - - -

Authors:

- -
    -
  • Grimes : Design & Programming of the MIST framework.
  • -
- -

Contributions:

- -
    -
  • FlightControl : Rework to OO framework
  • -
- - -

Global(s)

- - - - - - - - - - - - - - - - - -
FLARECOLOR - -
SMOKECOLOR - -
UTILS - -
lookup_table - -
-

Type FLARECOLOR

- - - - - - - - - - - - - - - - - -
FLARECOLOR.Green - -
FLARECOLOR.Red - -
FLARECOLOR.White - -
FLARECOLOR.Yellow - -
- -

Type SMOKECOLOR

- - - - - - - - - - - - - - - - - - - - - -
SMOKECOLOR.Blue - -
SMOKECOLOR.Green - -
SMOKECOLOR.Orange - -
SMOKECOLOR.Red - -
SMOKECOLOR.White - -
- -

Type UTILS

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
UTILS.BasicSerialize(s) - -
UTILS.DeepCopy(object) - -
UTILS.DoString(s) - -
UTILS.FeetToMeters(feet) - -
UTILS.KmphToMps(kmph) - -
UTILS.KnotsToMps(knots) - -
UTILS.MetersToFeet(meters) - -
UTILS.MetersToNM(meters) - -
UTILS.MpsToKmph(mps) - -
UTILS.MpsToKnots(mps) - -
UTILS.NMToMeters(NM) - -
UTILS.OneLineSerialize(tbl) - -
UTILS.Round(num, idp) -

From http://lua-users.org/wiki/SimpleRound -use negative idp for rounding ahead of decimal place, positive for rounding after decimal place

-
UTILS.ToDegree(angle) - -
UTILS.ToRadian(angle) - -
UTILS.tostringLL(lat, lon, acc, DMS) - -
- -

Global(s)

-
-
- - #FLARECOLOR - -FLARECOLOR - -
-
- - - -
-
-
-
- - #SMOKECOLOR - -SMOKECOLOR - -
-
- - - -
-
-
-
- - #UTILS - -UTILS - -
-
- - - -
-
-
-
- - - -lookup_table - -
-
- - - -
-
-

Type Utils

- -

Type FLARECOLOR

-

Field(s)

-
-
- - -FLARECOLOR.Green - -
-
- - - -
-
-
-
- - -FLARECOLOR.Red - -
-
- - - -
-
-
-
- - -FLARECOLOR.White - -
-
- - - -
-
-
-
- - -FLARECOLOR.Yellow - -
-
- - - -
-
- -

Type SMOKECOLOR

-

Field(s)

-
-
- - -SMOKECOLOR.Blue - -
-
- - - -
-
-
-
- - -SMOKECOLOR.Green - -
-
- - - -
-
-
-
- - -SMOKECOLOR.Orange - -
-
- - - -
-
-
-
- - -SMOKECOLOR.Red - -
-
- - - -
-
-
-
- - -SMOKECOLOR.White - -
-
- - - -
-
- -

Type UTILS

- -

Utilities static class.

- -

Field(s)

-
-
- - -UTILS.BasicSerialize(s) - -
-
- - - - -

porting in Slmod's "safestring" basic serialize

- -

Parameter

-
    -
  • - -

    s :

    - -
  • -
-
-
-
-
- - -UTILS.DeepCopy(object) - -
-
- - - - -

from http://lua-users.org/wiki/CopyTable

- -

Parameter

-
    -
  • - -

    object :

    - -
  • -
-
-
-
-
- - -UTILS.DoString(s) - -
-
- - - - -

porting in Slmod's dostring

- -

Parameter

-
    -
  • - -

    s :

    - -
  • -
-
-
-
-
- - -UTILS.FeetToMeters(feet) - -
-
- - - -

Parameter

-
    -
  • - -

    feet :

    - -
  • -
-
-
-
-
- - -UTILS.KmphToMps(kmph) - -
-
- - - -

Parameter

-
    -
  • - -

    kmph :

    - -
  • -
-
-
-
-
- - -UTILS.KnotsToMps(knots) - -
-
- - - -

Parameter

-
    -
  • - -

    knots :

    - -
  • -
-
-
-
-
- - -UTILS.MetersToFeet(meters) - -
-
- - - -

Parameter

-
    -
  • - -

    meters :

    - -
  • -
-
-
-
-
- - -UTILS.MetersToNM(meters) - -
-
- - - -

Parameter

-
    -
  • - -

    meters :

    - -
  • -
-
-
-
-
- - -UTILS.MpsToKmph(mps) - -
-
- - - -

Parameter

-
    -
  • - -

    mps :

    - -
  • -
-
-
-
-
- - -UTILS.MpsToKnots(mps) - -
-
- - - -

Parameter

-
    -
  • - -

    mps :

    - -
  • -
-
-
-
-
- - -UTILS.NMToMeters(NM) - -
-
- - - -

Parameter

-
    -
  • - -

    NM :

    - -
  • -
-
-
-
-
- - -UTILS.OneLineSerialize(tbl) - -
-
- - - - -

porting in Slmod's serialize_slmod2

- -

Parameter

-
    -
  • - -

    tbl :

    - -
  • -
-
-
-
-
- - -UTILS.Round(num, idp) - -
-
- -

From http://lua-users.org/wiki/SimpleRound -use negative idp for rounding ahead of decimal place, positive for rounding after decimal place

- -

Parameters

-
    -
  • - -

    num :

    - -
  • -
  • - -

    idp :

    - -
  • -
-
-
-
-
- - -UTILS.ToDegree(angle) - -
-
- - - -

Parameter

-
    -
  • - -

    angle :

    - -
  • -
-
-
-
-
- - -UTILS.ToRadian(angle) - -
-
- - - -

Parameter

-
    -
  • - -

    angle :

    - -
  • -
-
-
-
-
- - -UTILS.tostringLL(lat, lon, acc, DMS) - -
-
- - - - -

acc: -in DM: decimal point of minutes. -In DMS: decimal point of seconds. -position after the decimal of the least significant digit: -So: -42.32 - acc of 2.

- - -

Parameters

-
    -
  • - -

    lat :

    - -
  • -
  • - -

    lon :

    - -
  • -
  • - -

    acc :

    - -
  • -
  • - -

    DMS :

    - -
  • -
-
-
- -
- -
- - diff --git a/docs/Documentation/Zone.html b/docs/Documentation/Zone.html deleted file mode 100644 index 57eba9a61..000000000 --- a/docs/Documentation/Zone.html +++ /dev/null @@ -1,2399 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module Zone

- -

Core - ZONE classes define zones within your mission of various forms, with various capabilities.

- - - -

Banner Image

- -
- -

There are essentially two core functions that zones accomodate:

- -
    -
  • Test if an object is within the zone boundaries.
  • -
  • Provide the zone behaviour. Some zones are static, while others are moveable.
  • -
- -

The object classes are using the zone classes to test the zone boundaries, which can take various forms:

- -
    -
  • Test if completely within the zone.
  • -
  • Test if partly within the zone (for Group#GROUP objects).
  • -
  • Test if not in the zone.
  • -
  • Distance to the nearest intersecting point of the zone.
  • -
  • Distance to the center of the zone.
  • -
  • ...
  • -
- -

Each of these ZONE classes have a zone name, and specific parameters defining the zone type:

- -
    -
  • #ZONE_BASE: The ZONE_BASE class defining the base for all other zone classes.
  • -
  • #ZONE_RADIUS: The ZONE_RADIUS class defined by a zone name, a location and a radius.
  • -
  • #ZONE: The ZONE class, defined by the zone name as defined within the Mission Editor.
  • -
  • #ZONE_UNIT: The ZONE_UNIT class defines by a zone around a Unit#UNIT with a radius.
  • -
  • #ZONE_GROUP: The ZONE_GROUP class defines by a zone around a Group#GROUP with a radius.
  • -
  • #ZONE_POLYGON: The ZONE_POLYGON class defines by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.
  • -
- -
- -

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-02-28: ZONE_BASE:IsVec2InZone() replaces ZONE_BASE:IsPointVec2InZone().
-2017-02-28: ZONE_BASE:IsVec3InZone() replaces ZONE_BASE:IsPointVec3InZone().
-2017-02-28: ZONE_RADIUS:IsVec2InZone() replaces ZONE_RADIUS:IsPointVec2InZone().
-2017-02-28: ZONE_RADIUS:IsVec3InZone() replaces ZONE_RADIUS:IsPointVec3InZone().
-2017-02-28: ZONE_POLYGON:IsVec2InZone() replaces ZONE_POLYGON:IsPointVec2InZone().
-2017-02-28: ZONE_POLYGON:IsVec3InZone() replaces ZONE_POLYGON:IsPointVec3InZone().

- -

2017-02-18: ZONE_POLYGON_BASE:GetRandomPointVec2() added.

- -

2017-02-18: ZONE_POLYGON_BASE:GetRandomPointVec3() added.

- -

2017-02-18: ZONE_RADIUS:GetRandomPointVec3( inner, outer ) added.

- -

2017-02-18: ZONE_RADIUS:GetRandomPointVec2( inner, outer ) added.

- -

2016-08-15: ZONE_BASE:GetName() added.

- -

2016-08-15: ZONE_BASE:SetZoneProbability( ZoneProbability ) added.

- -

2016-08-15: ZONE_BASE:GetZoneProbability() added.

- -

2016-08-15: ZONE_BASE:GetZoneMaybe() added.

- -
- - -

Global(s)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ZONE -

ZONE class, extends Zone#ZONE_RADIUS

- -

The ZONE class, defined by the zone name as defined within the Mission Editor.

-
ZONE_BASE -

ZONE_BASE class, extends Base#BASE

- -

This class is an abstract BASE class for derived classes, and is not meant to be instantiated.

-
ZONE_GROUP -

ZONE_GROUP class, extends Zone#ZONE_RADIUS

- -

The ZONE_GROUP class defines by a zone around a Group#GROUP with a radius.

-
ZONE_POLYGON -

ZONE_POLYGON class, extends Zone#ZONEPOLYGONBASE

- -

The ZONE_POLYGON class defined by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.

-
ZONE_POLYGON_BASE -

ZONEPOLYGONBASE class, extends Zone#ZONE_BASE

- -

The ZONEPOLYGONBASE class defined by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.

-
ZONE_RADIUS -

ZONE_RADIUS class, extends Zone#ZONE_BASE

- -

The ZONE_RADIUS class defined by a zone name, a location and a radius.

-
ZONE_UNIT -

ZONE_UNIT class, extends Zone#ZONE_RADIUS

- -

The ZONE_UNIT class defined by a zone around a Unit#UNIT with a radius.

-
-

Type ZONE

- - - - - -
ZONE:New(ZoneName) -

Constructor of ZONE, taking the zone name.

-
- -

Type ZONE_BASE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ZONE_BASE:BoundZone() -

Bound the zone boundaries with a tires.

-
ZONE_BASE:GetBoundingSquare() -

Get the bounding square the zone.

-
ZONE_BASE:GetName() -

Returns the name of the zone.

-
ZONE_BASE:GetPointVec2(Height) -

Returns a Point#POINT_VEC2 of the zone.

-
ZONE_BASE:GetPointVec3(Height) -

Returns a Point#POINT_VEC3 of the zone.

-
ZONE_BASE:GetRandomPointVec2() -

Define a random Point#POINT_VEC2 within the zone.

-
ZONE_BASE:GetRandomPointVec3() -

Define a random Point#POINT_VEC3 within the zone.

-
ZONE_BASE:GetRandomVec2() -

Define a random DCSTypes#Vec2 within the zone.

-
ZONE_BASE:GetVec2() -

Returns the DCSTypes#Vec2 coordinate of the zone.

-
ZONE_BASE:GetVec3(Height) -

Returns the DCSTypes#Vec3 of the zone.

-
ZONE_BASE:GetZoneMaybe() -

Get the zone taking into account the randomization probability of a zone to be selected.

-
ZONE_BASE:GetZoneProbability() -

Get the randomization probability of a zone to be selected.

-
ZONE_BASE:IsPointVec2InZone(PointVec2) -

Returns if a PointVec2 is within the zone.

-
ZONE_BASE:IsPointVec3InZone(PointVec3) -

Returns if a PointVec3 is within the zone.

-
ZONE_BASE:IsVec2InZone(Vec2) -

Returns if a Vec2 is within the zone.

-
ZONE_BASE:IsVec3InZone(Vec3) -

Returns if a Vec3 is within the zone.

-
ZONE_BASE:New(ZoneName) -

ZONE_BASE constructor

-
ZONE_BASE:SetZoneProbability(ZoneProbability) -

Set the randomization probability of a zone to be selected.

-
ZONE_BASE:SmokeZone(SmokeColor) -

Smokes the zone boundaries in a color.

-
ZONE_BASE.ZoneName -

Name of the zone.

-
ZONE_BASE.ZoneProbability -

A value between 0 and 1. 0 = 0% and 1 = 100% probability.

-
- -

Type ZONE_BASE.BoundingSquare

- - - - - - - - - - - - - - - - - -
ZONE_BASE.BoundingSquare.x1 -

The lower x coordinate (left down)

-
ZONE_BASE.BoundingSquare.x2 -

The higher x coordinate (right up)

-
ZONE_BASE.BoundingSquare.y1 -

The lower y coordinate (left down)

-
ZONE_BASE.BoundingSquare.y2 -

The higher y coordinate (right up)

-
- -

Type ZONE_GROUP

- - - - - - - - - - - - - - - - - -
ZONE_GROUP:GetRandomVec2() -

Returns a random location within the zone of the Group.

-
ZONE_GROUP:GetVec2() -

Returns the current location of the Group.

-
ZONE_GROUP:New(ZoneName, ZoneGROUP, Radius) -

Constructor to create a ZONE_GROUP instance, taking the zone name, a zone Group#GROUP and a radius.

-
ZONE_GROUP.ZoneGROUP - -
- -

Type ZONE_POLYGON

- - - - - -
ZONE_POLYGON:New(ZoneName, ZoneGroup) -

Constructor to create a ZONE_POLYGON instance, taking the zone name and the name of the Group#GROUP defined within the Mission Editor.

-
- -

Type ZONE_POLYGON_BASE

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ZONE_POLYGON_BASE:BoundZone(UnBound) -

Smokes the zone boundaries in a color.

-
ZONE_POLYGON_BASE:Flush() -

Flush polygon coordinates as a table in DCS.log.

-
ZONE_POLYGON_BASE:GetBoundingSquare() -

Get the bounding square the zone.

-
ZONE_POLYGON_BASE:GetRandomPointVec2() -

Return a Point#POINT_VEC2 object representing a random 2D point at landheight within the zone.

-
ZONE_POLYGON_BASE:GetRandomPointVec3() -

Return a Point#POINT_VEC3 object representing a random 3D point at landheight within the zone.

-
ZONE_POLYGON_BASE:GetRandomVec2() -

Define a random DCSTypes#Vec2 within the zone.

-
ZONE_POLYGON_BASE:GetVec2() -

Returns the center location of the polygon.

-
ZONE_POLYGON_BASE:IsVec2InZone(Vec2) -

Returns if a location is within the zone.

-
ZONE_POLYGON_BASE:New(ZoneName, PointsArray) -

Constructor to create a ZONEPOLYGONBASE instance, taking the zone name and an array of DCSTypes#Vec2, forming a polygon.

-
ZONE_POLYGON_BASE.Polygon -

The polygon defined by an array of DCSTypes#Vec2.

-
ZONE_POLYGON_BASE:SmokeZone(SmokeColor) -

Smokes the zone boundaries in a color.

-
- -

Type ZONE_RADIUS

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ZONE_RADIUS:BoundZone(Points, UnBound, CountryID) -

Bounds the zone with tires.

-
ZONE_RADIUS:FlareZone(FlareColor, Points, Azimuth) -

Flares the zone boundaries in a color.

-
ZONE_RADIUS:GetRadius() -

Returns the radius of the zone.

-
ZONE_RADIUS:GetRandomPointVec2(inner, outer) -

Returns a Point#POINT_VEC2 object reflecting a random 2D location within the zone.

-
ZONE_RADIUS:GetRandomPointVec3(inner, outer) -

Returns a Point#POINT_VEC3 object reflecting a random 3D location within the zone.

-
ZONE_RADIUS:GetRandomVec2(inner, outer) -

Returns a random Vec2 location within the zone.

-
ZONE_RADIUS:GetVec2() -

Returns the DCSTypes#Vec2 of the zone.

-
ZONE_RADIUS:GetVec3(Height) -

Returns the DCSTypes#Vec3 of the ZONE_RADIUS.

-
ZONE_RADIUS:IsVec2InZone(Vec2) -

Returns if a location is within the zone.

-
ZONE_RADIUS:IsVec3InZone(Vec3) -

Returns if a point is within the zone.

-
ZONE_RADIUS:New(ZoneName, Vec2, Radius) -

Constructor of #ZONE_RADIUS, taking the zone name, the zone location and a radius.

-
ZONE_RADIUS.Radius -

The radius of the zone.

-
ZONE_RADIUS:SetRadius(Radius) -

Sets the radius of the zone.

-
ZONE_RADIUS:SetVec2(Vec2) -

Sets the DCSTypes#Vec2 of the zone.

-
ZONE_RADIUS:SmokeZone(SmokeColor, Points) -

Smokes the zone boundaries in a color.

-
ZONE_RADIUS.Vec2 -

The current location of the zone.

-
- -

Type ZONE_UNIT

- - - - - - - - - - - - - - - - - - - - - - - - - -
ZONE_UNIT:GetRandomVec2() -

Returns a random location within the zone.

-
ZONE_UNIT:GetVec2() -

Returns the current location of the Unit#UNIT.

-
ZONE_UNIT:GetVec3(Height) -

Returns the DCSTypes#Vec3 of the ZONE_UNIT.

-
ZONE_UNIT.LastVec2 - -
ZONE_UNIT:New(ZoneName, ZoneUNIT, Radius) -

Constructor to create a ZONE_UNIT instance, taking the zone name, a zone unit and a radius.

-
ZONE_UNIT.ZoneUNIT - -
- -

Global(s)

-
-
- - #ZONE - -ZONE - -
-
- -

ZONE class, extends Zone#ZONE_RADIUS

- -

The ZONE class, defined by the zone name as defined within the Mission Editor.

- - -

This class implements the inherited functions from #ZONE_RADIUS taking into account the own zone format and properties.

- - -
-
-
-
- - #ZONE_BASE - -ZONE_BASE - -
-
- -

ZONE_BASE class, extends Base#BASE

- -

This class is an abstract BASE class for derived classes, and is not meant to be instantiated.

- - - -

Each zone has a name:

- - - -

Each zone implements two polymorphic functions defined in Zone#ZONE_BASE:

- - - -

A zone has a probability factor that can be set to randomize a selection between zones:

- -
    -
  • ZONE_BASE.SetRandomizeProbability(): Set the randomization probability of a zone to be selected, taking a value between 0 and 1 ( 0 = 0%, 1 = 100% )
  • -
  • ZONE_BASE.GetRandomizeProbability(): Get the randomization probability of a zone to be selected, passing a value between 0 and 1 ( 0 = 0%, 1 = 100% )
  • -
  • ZONE_BASE.GetZoneMaybe(): Get the zone taking into account the randomization probability. nil is returned if this zone is not a candidate.
  • -
- -

A zone manages Vectors:

- - - -

A zone has a bounding square:

- - - -

A zone can be marked:

- - - - -
-
-
-
- - #ZONE_GROUP - -ZONE_GROUP - -
-
- -

ZONE_GROUP class, extends Zone#ZONE_RADIUS

- -

The ZONE_GROUP class defines by a zone around a Group#GROUP with a radius.

- - -

The current leader of the group defines the center of the zone. -This class implements the inherited functions from Zone#ZONE_RADIUS taking into account the own zone format and properties.

- - -
-
-
-
- - #ZONE_POLYGON - -ZONE_POLYGON - -
-
- -

ZONE_POLYGON class, extends Zone#ZONEPOLYGONBASE

- -

The ZONE_POLYGON class defined by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.

- - -

This class implements the inherited functions from Zone#ZONE_RADIUS taking into account the own zone format and properties.

- - -
-
-
-
- - #ZONE_POLYGON_BASE - -ZONE_POLYGON_BASE - -
-
- -

ZONEPOLYGONBASE class, extends Zone#ZONE_BASE

- -

The ZONEPOLYGONBASE class defined by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.

- - -

This class implements the inherited functions from Zone#ZONE_RADIUS taking into account the own zone format and properties. -This class is an abstract BASE class for derived classes, and is not meant to be instantiated.

- -

Zone point randomization

- -

Various functions exist to find random points within the zone.

- - - - -
-
-
-
- - #ZONE_RADIUS - -ZONE_RADIUS - -
-
- -

ZONE_RADIUS class, extends Zone#ZONE_BASE

- -

The ZONE_RADIUS class defined by a zone name, a location and a radius.

- - -

This class implements the inherited functions from Core.Zone#ZONE_BASE taking into account the own zone format and properties.

- -

ZONE_RADIUS constructor

- - - -

Manage the radius of the zone

- - - -

Manage the location of the zone

- - - -

Zone point randomization

- -

Various functions exist to find random points within the zone.

- - - - -
-
-
-
- - #ZONE_UNIT - -ZONE_UNIT - -
-
- -

ZONE_UNIT class, extends Zone#ZONE_RADIUS

- -

The ZONE_UNIT class defined by a zone around a Unit#UNIT with a radius.

- - -

This class implements the inherited functions from #ZONE_RADIUS taking into account the own zone format and properties.

- - -
-
-

Type Zone

- -

Type ZONE

-

Field(s)

-
-
- - -ZONE:New(ZoneName) - -
-
- -

Constructor of ZONE, taking the zone name.

- -

Parameter

-
    -
  • - -

    #string ZoneName : -The name of the zone as defined within the mission editor.

    - -
  • -
-

Return value

- -

#ZONE:

- - -
-
- -

Type ZONE_BASE

- -

The ZONE_BASE class

- -

Field(s)

-
-
- - -ZONE_BASE:BoundZone() - -
-
- -

Bound the zone boundaries with a tires.

- -
-
-
-
- - -ZONE_BASE:GetBoundingSquare() - -
-
- -

Get the bounding square the zone.

- -

Return value

- -

#nil: -The bounding square.

- -
-
-
-
- - -ZONE_BASE:GetName() - -
-
- -

Returns the name of the zone.

- -

Return value

- -

#string: -The name of the zone.

- -
-
-
-
- - -ZONE_BASE:GetPointVec2(Height) - -
-
- -

Returns a Point#POINT_VEC2 of the zone.

- -

Parameter

-
    -
  • - -

    Dcs.DCSTypes#Distance Height : -The height to add to the land height where the center of the zone is located.

    - -
  • -
-

Return value

- -

Core.Point#POINT_VEC2: -The PointVec2 of the zone.

- -
-
-
-
- - -ZONE_BASE:GetPointVec3(Height) - -
-
- -

Returns a Point#POINT_VEC3 of the zone.

- -

Parameter

-
    -
  • - -

    Dcs.DCSTypes#Distance Height : -The height to add to the land height where the center of the zone is located.

    - -
  • -
-

Return value

- -

Core.Point#POINT_VEC3: -The PointVec3 of the zone.

- -
-
-
-
- - -ZONE_BASE:GetRandomPointVec2() - -
-
- -

Define a random Point#POINT_VEC2 within the zone.

- -

Return value

- -

Core.Point#POINT_VEC2: -The PointVec2 coordinates.

- -
-
-
-
- - -ZONE_BASE:GetRandomPointVec3() - -
-
- -

Define a random Point#POINT_VEC3 within the zone.

- -

Return value

- -

Core.Point#POINT_VEC3: -The PointVec3 coordinates.

- -
-
-
-
- - -ZONE_BASE:GetRandomVec2() - -
-
- -

Define a random DCSTypes#Vec2 within the zone.

- -

Return value

- -

Dcs.DCSTypes#Vec2: -The Vec2 coordinates.

- -
-
-
-
- - -ZONE_BASE:GetVec2() - -
-
- -

Returns the DCSTypes#Vec2 coordinate of the zone.

- -

Return value

- -

#nil:

- - -
-
-
-
- - -ZONE_BASE:GetVec3(Height) - -
-
- -

Returns the DCSTypes#Vec3 of the zone.

- -

Parameter

-
    -
  • - -

    Dcs.DCSTypes#Distance Height : -The height to add to the land height where the center of the zone is located.

    - -
  • -
-

Return value

- -

Dcs.DCSTypes#Vec3: -The Vec3 of the zone.

- -
-
-
-
- - -ZONE_BASE:GetZoneMaybe() - -
-
- -

Get the zone taking into account the randomization probability of a zone to be selected.

- -

Return values

-
    -
  1. - -

    #ZONE_BASE: -The zone is selected taking into account the randomization probability factor.

    - -
  2. -
  3. - -

    #nil: -The zone is not selected taking into account the randomization probability factor.

    - -
  4. -
-
-
-
-
- - -ZONE_BASE:GetZoneProbability() - -
-
- -

Get the randomization probability of a zone to be selected.

- -

Return value

- -

#number: -A value between 0 and 1. 0 = 0% and 1 = 100% probability.

- -
-
-
-
- - -ZONE_BASE:IsPointVec2InZone(PointVec2) - -
-
- -

Returns if a PointVec2 is within the zone.

- -

Parameter

- -

Return value

- -

#boolean: -true if the PointVec2 is within the zone.

- -
-
-
-
- - -ZONE_BASE:IsPointVec3InZone(PointVec3) - -
-
- -

Returns if a PointVec3 is within the zone.

- -

Parameter

- -

Return value

- -

#boolean: -true if the PointVec3 is within the zone.

- -
-
-
-
- - -ZONE_BASE:IsVec2InZone(Vec2) - -
-
- -

Returns if a Vec2 is within the zone.

- -

Parameter

- -

Return value

- -

#boolean: -true if the Vec2 is within the zone.

- -
-
-
-
- - -ZONE_BASE:IsVec3InZone(Vec3) - -
-
- -

Returns if a Vec3 is within the zone.

- -

Parameter

- -

Return value

- -

#boolean: -true if the Vec3 is within the zone.

- -
-
-
-
- - -ZONE_BASE:New(ZoneName) - -
-
- -

ZONE_BASE constructor

- -

Parameter

-
    -
  • - -

    #string ZoneName : -Name of the zone.

    - -
  • -
-

Return value

- -

#ZONE_BASE: -self

- -
-
-
-
- - -ZONE_BASE:SetZoneProbability(ZoneProbability) - -
-
- -

Set the randomization probability of a zone to be selected.

- -

Parameter

-
    -
  • - -

    ZoneProbability : -A value between 0 and 1. 0 = 0% and 1 = 100% probability.

    - -
  • -
-
-
-
-
- - -ZONE_BASE:SmokeZone(SmokeColor) - -
-
- -

Smokes the zone boundaries in a color.

- -

Parameter

- -
-
-
-
- - #string - -ZONE_BASE.ZoneName - -
-
- -

Name of the zone.

- -
-
-
-
- - #number - -ZONE_BASE.ZoneProbability - -
-
- -

A value between 0 and 1. 0 = 0% and 1 = 100% probability.

- -
-
- -

Type ZONE_BASE.BoundingSquare

- -

The ZONE_BASE.BoundingSquare

- -

Field(s)

-
-
- - Dcs.DCSTypes#Distance - -ZONE_BASE.BoundingSquare.x1 - -
-
- -

The lower x coordinate (left down)

- -
-
-
-
- - Dcs.DCSTypes#Distance - -ZONE_BASE.BoundingSquare.x2 - -
-
- -

The higher x coordinate (right up)

- -
-
-
-
- - Dcs.DCSTypes#Distance - -ZONE_BASE.BoundingSquare.y1 - -
-
- -

The lower y coordinate (left down)

- -
-
-
-
- - Dcs.DCSTypes#Distance - -ZONE_BASE.BoundingSquare.y2 - -
-
- -

The higher y coordinate (right up)

- -
-
- -

Type ZONE_GROUP

-

Field(s)

-
-
- - -ZONE_GROUP:GetRandomVec2() - -
-
- -

Returns a random location within the zone of the Group.

- -

Return value

- -

Dcs.DCSTypes#Vec2: -The random location of the zone based on the Group location.

- -
-
-
-
- - -ZONE_GROUP:GetVec2() - -
-
- -

Returns the current location of the Group.

- -

Return value

- -

Dcs.DCSTypes#Vec2: -The location of the zone based on the Group location.

- -
-
-
-
- - -ZONE_GROUP:New(ZoneName, ZoneGROUP, Radius) - -
-
- -

Constructor to create a ZONE_GROUP instance, taking the zone name, a zone Group#GROUP and a radius.

- -

Parameters

- -

Return value

- -

#ZONE_GROUP: -self

- -
-
-
-
- - Wrapper.Group#GROUP - -ZONE_GROUP.ZoneGROUP - -
-
- - - -
-
- -

Type ZONE_POLYGON

-

Field(s)

-
-
- - -ZONE_POLYGON:New(ZoneName, ZoneGroup) - -
-
- -

Constructor to create a ZONE_POLYGON instance, taking the zone name and the name of the Group#GROUP defined within the Mission Editor.

- - -

The Group#GROUP waypoints define the polygon corners. The first and the last point are automatically connected by ZONE_POLYGON.

- -

Parameters

-
    -
  • - -

    #string ZoneName : -Name of the zone.

    - -
  • -
  • - -

    Wrapper.Group#GROUP ZoneGroup : -The GROUP waypoints as defined within the Mission Editor define the polygon shape.

    - -
  • -
-

Return value

- -

#ZONE_POLYGON: -self

- -
-
- -

Type ZONE_POLYGON_BASE

-

Field(s)

-
-
- - -ZONE_POLYGON_BASE:BoundZone(UnBound) - -
-
- -

Smokes the zone boundaries in a color.

- -

Parameter

-
    -
  • - -

    #boolean UnBound : -If true, the tyres will be destroyed.

    - -
  • -
-

Return value

- -

#ZONEPOLYGONBASE: -self

- -
-
-
-
- - -ZONE_POLYGON_BASE:Flush() - -
-
- -

Flush polygon coordinates as a table in DCS.log.

- -

Return value

- -

#ZONEPOLYGONBASE: -self

- -
-
-
-
- - -ZONE_POLYGON_BASE:GetBoundingSquare() - -
-
- -

Get the bounding square the zone.

- -

Return value

- -

#ZONEPOLYGONBASE.BoundingSquare: -The bounding square.

- -
-
-
-
- - -ZONE_POLYGON_BASE:GetRandomPointVec2() - -
-
- -

Return a Point#POINT_VEC2 object representing a random 2D point at landheight within the zone.

- -

Return value

- - -

Point#POINT_VEC2

- -
-
-
-
- - -ZONE_POLYGON_BASE:GetRandomPointVec3() - -
-
- -

Return a Point#POINT_VEC3 object representing a random 3D point at landheight within the zone.

- -

Return value

- - -

Point#POINT_VEC3

- -
-
-
-
- - -ZONE_POLYGON_BASE:GetRandomVec2() - -
-
- -

Define a random DCSTypes#Vec2 within the zone.

- -

Return value

- -

Dcs.DCSTypes#Vec2: -The Vec2 coordinate.

- -
-
-
-
- - -ZONE_POLYGON_BASE:GetVec2() - -
-
- -

Returns the center location of the polygon.

- -

Return value

- -

Dcs.DCSTypes#Vec2: -The location of the zone based on the Group location.

- -
-
-
-
- - -ZONE_POLYGON_BASE:IsVec2InZone(Vec2) - -
-
- -

Returns if a location is within the zone.

- - -

Source learned and taken from: https://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html

- -

Parameter

- -

Return value

- -

#boolean: -true if the location is within the zone.

- -
-
-
-
- - -ZONE_POLYGON_BASE:New(ZoneName, PointsArray) - -
-
- -

Constructor to create a ZONEPOLYGONBASE instance, taking the zone name and an array of DCSTypes#Vec2, forming a polygon.

- - -

The Group#GROUP waypoints define the polygon corners. The first and the last point are automatically connected.

- -

Parameters

- -

Return value

- -

#ZONEPOLYGONBASE: -self

- -
-
-
-
- - #ZONE_POLYGON_BASE.ListVec2 - -ZONE_POLYGON_BASE.Polygon - -
-
- -

The polygon defined by an array of DCSTypes#Vec2.

- -
-
-
-
- - -ZONE_POLYGON_BASE:SmokeZone(SmokeColor) - -
-
- -

Smokes the zone boundaries in a color.

- -

Parameter

- -

Return value

- -

#ZONEPOLYGONBASE: -self

- -
-
- -

Type ZONE_POLYGON_BASE.BoundingSquare

- -

Type ZONE_POLYGON_BASE.ListVec2

- -

A points array.

- - -

Type ZONE_RADIUS

- -

The ZONE_RADIUS class, defined by a zone name, a location and a radius.

- -

Field(s)

-
-
- - -ZONE_RADIUS:BoundZone(Points, UnBound, CountryID) - -
-
- -

Bounds the zone with tires.

- -

Parameters

-
    -
  • - -

    #number Points : -(optional) The amount of points in the circle.

    - -
  • -
  • - -

    #boolean UnBound : -If true the tyres will be destroyed.

    - -
  • -
  • - -

    CountryID :

    - -
  • -
-

Return value

- -

#ZONE_RADIUS: -self

- -
-
-
-
- - -ZONE_RADIUS:FlareZone(FlareColor, Points, Azimuth) - -
-
- -

Flares the zone boundaries in a color.

- -

Parameters

-
    -
  • - -

    Utilities.Utils#FLARECOLOR FlareColor : -The flare color.

    - -
  • -
  • - -

    #number Points : -(optional) The amount of points in the circle.

    - -
  • -
  • - -

    Dcs.DCSTypes#Azimuth Azimuth : -(optional) Azimuth The azimuth of the flare.

    - -
  • -
-

Return value

- -

#ZONE_RADIUS: -self

- -
-
-
-
- - -ZONE_RADIUS:GetRadius() - -
-
- -

Returns the radius of the zone.

- -

Return value

- -

Dcs.DCSTypes#Distance: -The radius of the zone.

- -
-
-
-
- - -ZONE_RADIUS:GetRandomPointVec2(inner, outer) - -
-
- -

Returns a Point#POINT_VEC2 object reflecting a random 2D location within the zone.

- -

Parameters

-
    -
  • - -

    #number inner : -(optional) Minimal distance from the center of the zone. Default is 0.

    - -
  • -
  • - -

    #number outer : -(optional) Maximal distance from the outer edge of the zone. Default is the radius of the zone.

    - -
  • -
-

Return value

- -

Core.Point#POINT_VEC2: -The Point#POINT_VEC2 object reflecting the random 3D location within the zone.

- -
-
-
-
- - -ZONE_RADIUS:GetRandomPointVec3(inner, outer) - -
-
- -

Returns a Point#POINT_VEC3 object reflecting a random 3D location within the zone.

- -

Parameters

-
    -
  • - -

    #number inner : -(optional) Minimal distance from the center of the zone. Default is 0.

    - -
  • -
  • - -

    #number outer : -(optional) Maximal distance from the outer edge of the zone. Default is the radius of the zone.

    - -
  • -
-

Return value

- -

Core.Point#POINT_VEC3: -The Point#POINT_VEC3 object reflecting the random 3D location within the zone.

- -
-
-
-
- - -ZONE_RADIUS:GetRandomVec2(inner, outer) - -
-
- -

Returns a random Vec2 location within the zone.

- -

Parameters

-
    -
  • - -

    #number inner : -(optional) Minimal distance from the center of the zone. Default is 0.

    - -
  • -
  • - -

    #number outer : -(optional) Maximal distance from the outer edge of the zone. Default is the radius of the zone.

    - -
  • -
-

Return value

- -

Dcs.DCSTypes#Vec2: -The random location within the zone.

- -
-
-
-
- - -ZONE_RADIUS:GetVec2() - -
-
- -

Returns the DCSTypes#Vec2 of the zone.

- -

Return value

- -

Dcs.DCSTypes#Vec2: -The location of the zone.

- -
-
-
-
- - -ZONE_RADIUS:GetVec3(Height) - -
-
- -

Returns the DCSTypes#Vec3 of the ZONE_RADIUS.

- -

Parameter

-
    -
  • - -

    Dcs.DCSTypes#Distance Height : -The height to add to the land height where the center of the zone is located.

    - -
  • -
-

Return value

- -

Dcs.DCSTypes#Vec3: -The point of the zone.

- -
-
-
-
- - -ZONE_RADIUS:IsVec2InZone(Vec2) - -
-
- -

Returns if a location is within the zone.

- -

Parameter

- -

Return value

- -

#boolean: -true if the location is within the zone.

- -
-
-
-
- - -ZONE_RADIUS:IsVec3InZone(Vec3) - -
-
- -

Returns if a point is within the zone.

- -

Parameter

- -

Return value

- -

#boolean: -true if the point is within the zone.

- -
-
-
-
- - -ZONE_RADIUS:New(ZoneName, Vec2, Radius) - -
-
- -

Constructor of #ZONE_RADIUS, taking the zone name, the zone location and a radius.

- -

Parameters

- -

Return value

- -

#ZONE_RADIUS: -self

- -
-
-
-
- - Dcs.DCSTypes#Distance - -ZONE_RADIUS.Radius - -
-
- -

The radius of the zone.

- -
-
-
-
- - -ZONE_RADIUS:SetRadius(Radius) - -
-
- -

Sets the radius of the zone.

- -

Parameter

- -

Return value

- -

Dcs.DCSTypes#Distance: -The radius of the zone.

- -
-
-
-
- - -ZONE_RADIUS:SetVec2(Vec2) - -
-
- -

Sets the DCSTypes#Vec2 of the zone.

- -

Parameter

- -

Return value

- -

Dcs.DCSTypes#Vec2: -The new location of the zone.

- -
-
-
-
- - -ZONE_RADIUS:SmokeZone(SmokeColor, Points) - -
-
- -

Smokes the zone boundaries in a color.

- -

Parameters

-
    -
  • - -

    Utilities.Utils#SMOKECOLOR SmokeColor : -The smoke color.

    - -
  • -
  • - -

    #number Points : -(optional) The amount of points in the circle.

    - -
  • -
-

Return value

- -

#ZONE_RADIUS: -self

- -
-
-
-
- - Dcs.DCSTypes#Vec2 - -ZONE_RADIUS.Vec2 - -
-
- -

The current location of the zone.

- -
-
- -

Type ZONE_UNIT

-

Field(s)

-
-
- - -ZONE_UNIT:GetRandomVec2() - -
-
- -

Returns a random location within the zone.

- -

Return value

- -

Dcs.DCSTypes#Vec2: -The random location within the zone.

- -
-
-
-
- - -ZONE_UNIT:GetVec2() - -
-
- -

Returns the current location of the Unit#UNIT.

- -

Return value

- -

Dcs.DCSTypes#Vec2: -The location of the zone based on the Unit#UNITlocation.

- -
-
-
-
- - -ZONE_UNIT:GetVec3(Height) - -
-
- -

Returns the DCSTypes#Vec3 of the ZONE_UNIT.

- -

Parameter

-
    -
  • - -

    Dcs.DCSTypes#Distance Height : -The height to add to the land height where the center of the zone is located.

    - -
  • -
-

Return value

- -

Dcs.DCSTypes#Vec3: -The point of the zone.

- -
-
-
-
- - - -ZONE_UNIT.LastVec2 - -
-
- - - -
-
-
-
- - -ZONE_UNIT:New(ZoneName, ZoneUNIT, Radius) - -
-
- -

Constructor to create a ZONE_UNIT instance, taking the zone name, a zone unit and a radius.

- -

Parameters

-
    -
  • - -

    #string ZoneName : -Name of the zone.

    - -
  • -
  • - -

    Wrapper.Unit#UNIT ZoneUNIT : -The unit as the center of the zone.

    - -
  • -
  • - -

    Dcs.DCSTypes#Distance Radius : -The radius of the zone.

    - -
  • -
-

Return value

- -

#ZONE_UNIT: -self

- -
-
-
-
- - Wrapper.Unit#UNIT - -ZONE_UNIT.ZoneUNIT - -
-
- - - -
-
- -
- -
- - diff --git a/docs/Documentation/env.html b/docs/Documentation/env.html deleted file mode 100644 index 03986352d..000000000 --- a/docs/Documentation/env.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - -
-
- -
-
-
- - - diff --git a/docs/Documentation/index.html b/docs/Documentation/index.html deleted file mode 100644 index 91ea5f63f..000000000 --- a/docs/Documentation/index.html +++ /dev/null @@ -1,566 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AI_Balancer -

Single-Player:No / Multi-Player:Yes / AI:Yes / Human:No / Types:All -- AI Balancing will replace in multi player missions -non-occupied human slots with AI groups, in order to provide an engaging simulation environment, -even when there are hardly any players in the mission.

- -

Banner Image

- -
- -

1) AIBalancer#AIBALANCER class, extends Fsm#FSM_SET

- -

The AIBalancer#AIBALANCER class monitors and manages as many replacement AI groups as there are -CLIENTS in a SET_CLIENT collection, which are not occupied by human players.

-
AI_Cap -

AI - Execute Combat Air Patrol (CAP).

- -

Banner Image

- -
- -

AI CAP classes makes AI Controllables execute a Combat Air Patrol.

-
AI_Cas -

AI -- Provide Close Air Support to friendly ground troops.

- -

Banner Image

- -
- -

AI CAS classes makes AI Controllables execute a Close Air Support.

-
AI_Patrol -

AI -- Air Patrolling or Staging.

- -

Banner Image

- -
- -

AI PATROL classes makes AI Controllables execute an Patrol.

-
Account -

Actions - ACTACCOUNT classes account for (detect, count & report) various DCS events occuring on Units.

-
Airbase -

This module contains the AIRBASE classes.

-
AirbasePolice -

This module contains the AIRBASEPOLICE classes.

-
Assign -

(SP) (MP) (FSM) Accept or reject process for player (task) assignments.

-
Base -

Core - BASE forms the basis of the MOOSE framework.

-
Cargo -

Core -- Management of CARGO logistics, that can be transported from and to transportation carriers.

-
CleanUp -

The CLEANUP class keeps an area clean of crashing or colliding airplanes.

-
Client -

This module contains the CLIENT class.

-
CommandCenter -

A COMMANDCENTER is the owner of multiple missions within MOOSE.

-
Controllable -

This module contains the CONTROLLABLE class.

-
DCSAirbase - -
DCSCoalitionObject - -
DCSCommand - -
DCSController - -
DCSGroup - -
DCSObject - -
DCSTask - -
DCSTypes - -
DCSUnit - -
DCSVec3 - -
DCSWorld - -
DCSZone - -
DCScountry - -
DCStimer - -
DCStrigger - -
Database -

This module contains the DATABASE class, managing the database of mission objects.

-
Detection -

Functional - DETECTION_ classes model the detection of enemy units by FACs or RECCEs and group them according various methods.

-
DetectionManager -

This module contains the DETECTION_MANAGER class and derived classes.

-
Escort -

Taking the lead of AI escorting your flight.

-
Event -

Core - EVENT models DCS event dispatching using a publish-subscribe model.

-
Fsm -

Core - The FSM (Finite State Machine) class and derived FSM_ classes -are design patterns allowing efficient (long-lasting) processes and workflows.

-
Group -

Wrapper -- GROUP is a wrapper class for the DCS Class Group.

-
Identifiable -

This module contains the IDENTIFIABLE class.

-
Menu -

Core -- MENU_ classes model the definition of hierarchical menu structures and commands for players within a mission.

-
Message -

Core - MESSAGE class takes are of the real-time notifications and messages to players during a simulation.

-
MissileTrainer -

This module contains the MISSILETRAINER class.

-
Mission -

A MISSION is the main owner of a Mission orchestration within MOOSE .

-
Movement -

Limit the simultaneous movement of Groups within a running Mission.

-
Object -

This module contains the OBJECT class.

-
Point -

Core - POINT_VEC classes define an extensive API to manage 3D points in the simulation space.

-
Positionable -

This module contains the POSITIONABLE class.

-
Process_JTAC - -
Process_Pickup - -
Radio -

Core - The RADIO class is responsible for transmitting radio communications.

-
Route -

(SP) (MP) (FSM) Route AI or players through waypoints or to zones.

-
Scenery -

This module contains the SCENERY class.

-
ScheduleDispatcher -

This module defines the SCHEDULEDISPATCHER class, which is used by a central object called _SCHEDULEDISPATCHER.

-
Scheduler -

Core - SCHEDULER prepares and handles the execution of functions over scheduled time (intervals).

-
Scoring -

Single-Player:Yes / Multi-Player:Yes / Core:Yes -- Administer the scoring of player achievements, -and create a CSV file logging the scoring events for use at team or squadron websites.

- -

Banner Image

- -
- -

The #SCORING class administers the scoring of player achievements, -and creates a CSV file logging the scoring events and results for use at team or squadron websites.

-
Sead -

Provides defensive behaviour to a set of SAM sites within a running Mission.

-
Set -

Core - SET_ classes define collections of objects to perform bulk actions and logically group objects.

-
Smoke -

(SP) (MP) (FSM) Route AI or players through waypoints or to zones.

-
Spawn -

Functional -- Spawn dynamically new GROUPs in your missions.

-
SpawnStatic -

Core -- Spawn dynamically new STATICs in your missions.

-
Static -

This module contains the STATIC class.

-
StaticObject - -
Task -

Tasking -- This module contains the TASK class.

-
Task_A2G -

Tasking - The TASK_A2G models tasks for players in Air to Ground engagements.

-
Task_A2G_Dispatcher -

Tasking - The TASKA2GDISPATCHER creates and manages player TASK_A2G tasks based on detected targets.

-
Task_Cargo -

Tasking (Release 2.1) -- The TASK_CARGO models tasks for players to transport Cargo.

-
Task_PICKUP -

This module contains the TASK_PICKUP classes.

-
Unit -

Wrapper - UNIT is a wrapper class for the DCS Class Unit.

-
Utils -

This module contains derived utilities taken from the MIST framework, -which are excellent tools to be reused in an OO environment!.

-
Zone -

Core - ZONE classes define zones within your mission of various forms, with various capabilities.

-
env - -
land - -
routines -

Various routines

-
-
- -
- - diff --git a/docs/Documentation/land.html b/docs/Documentation/land.html deleted file mode 100644 index f6b7ca91c..000000000 --- a/docs/Documentation/land.html +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module land

- - - -

Global(s)

- - - - - -
land - -
-

Type land

- - - - - - - - - - - - - -
land.SurfaceType - -
land.getHeight(point) -

Returns altitude MSL of the point.

-
land.getSurfaceType(point) -

returns surface type at the given point.

-
- -

Type land.SurfaceType

- - - - - - - - - - - - - - - - - - - - - -
land.SurfaceType.LAND - -
land.SurfaceType.ROAD - -
land.SurfaceType.RUNWAY - -
land.SurfaceType.SHALLOW_WATER - -
land.SurfaceType.WATER - -
- -

Global(s)

-
-
- - #land - -land - -
-
- - - -
-
-

Type land

-

Field(s)

-
-
- - #land.SurfaceType - -land.SurfaceType - -
-
- - - -
-
-
-
- - -land.getHeight(point) - -
-
- -

Returns altitude MSL of the point.

- -

Parameter

-
    -
  • - -

    #Vec2 point : -point on the ground.

    - -
  • -
-

Return value

- -

Dcs.DCSTypes#Distance:

- - -
-
-
-
- - -land.getSurfaceType(point) - -
-
- -

returns surface type at the given point.

- -

Parameter

-
    -
  • - -

    #Vec2 point : -Point on the land.

    - -
  • -
-

Return value

- -

#land.SurfaceType:

- - -
-
- -

Type Vec2

- -

Type land.SurfaceType

-

Field(s)

-
-
- - -land.SurfaceType.LAND - -
-
- - - -
-
-
-
- - -land.SurfaceType.ROAD - -
-
- - - -
-
-
-
- - -land.SurfaceType.RUNWAY - -
-
- - - -
-
-
-
- - -land.SurfaceType.SHALLOW_WATER - -
-
- - - -
-
-
-
- - -land.SurfaceType.WATER - -
-
- - - -
-
- -
- -
- - diff --git a/docs/Documentation/routines.html b/docs/Documentation/routines.html deleted file mode 100644 index 2503b891b..000000000 --- a/docs/Documentation/routines.html +++ /dev/null @@ -1,1232 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
-

Module routines

- -

Various routines

- -

Global(s)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Alive - -
ChooseInfantry(TeleportPrefixTable, TeleportMax) - -
EscortCarrier(CarrierGroup, EscortPrefix, EscortLastWayPoint, EscortEngagementDistanceMax, EscortTargetTypes) - -
EscortCount - -
EscortMissionName - -
GetUnitHeight(CheckUnit) - -
GroupAlive(groupName) - -
LandCarrier(CarrierGroup, LandingZonePrefix) - -
MessageToAll(MsgText, MsgTime, MsgName) - -
MessageToBlue(MsgText, MsgTime, MsgName) - -
MessageToUnit(UnitName, MsgText, MsgTime, MsgName) - -
MusicRegister(SndRef, SndFile, SndTime) - -
MusicReset(flg) - -
MusicToPlayer(SndRef, PlayerName, SndContinue) - -
PlaneActivate(groupNameFormat, flg) - -
PlayerGroup - -
SendMessageToCarrier(CarrierGroup, CarrierMessage) - -
SpawnSettings - -
SpawnedInfantry - -
Su34AttackCarlVinson(groupName) - -
Su34AttackNorth(groupName) - -
Su34AttackWest(groupName) - -
Su34Destroyed(groupName) - -
Su34Hold(groupName) - -
Su34IsDead() - -
Su34Menu(groupName) - -
Su34MenuPath - -
Su34Menus - -
Su34Orbit(groupName) - -
Su34OverviewStatus() - -
Su34RTB(groupName) - -
Su34Status - -
Su34TakeOff(groupName) - -
TeleportPrefixTableCount - -
TeleportPrefixTableIndex - -
UpdateBoardMsg() - -
_MusicTable - -
boardMsgAll - -
boardMsgRed - -
getCarrierHeight(CarrierGroup) - -
lookup_table - -
routines - -
spairs(t, order) - -
-

Global(s)

-
-
- - - -Alive - -
-
- - - -
-
-
-
- - -ChooseInfantry(TeleportPrefixTable, TeleportMax) - -
-
- - - -

Parameters

-
    -
  • - -

    TeleportPrefixTable :

    - -
  • -
  • - -

    TeleportMax :

    - -
  • -
-
-
-
-
- - -EscortCarrier(CarrierGroup, EscortPrefix, EscortLastWayPoint, EscortEngagementDistanceMax, EscortTargetTypes) - -
-
- - - -

Parameters

-
    -
  • - -

    CarrierGroup :

    - -
  • -
  • - -

    EscortPrefix :

    - -
  • -
  • - -

    EscortLastWayPoint :

    - -
  • -
  • - -

    EscortEngagementDistanceMax :

    - -
  • -
  • - -

    EscortTargetTypes :

    - -
  • -
-
-
-
-
- - #number - -EscortCount - -
-
- - - -
-
-
-
- - - -EscortMissionName - -
-
- - - -
-
-
-
- - -GetUnitHeight(CheckUnit) - -
-
- - - -

Parameter

-
    -
  • - -

    CheckUnit :

    - -
  • -
-
-
-
-
- - -GroupAlive(groupName) - -
-
- - - -

Parameter

-
    -
  • - -

    groupName :

    - -
  • -
-
-
-
-
- - -LandCarrier(CarrierGroup, LandingZonePrefix) - -
-
- - - -

Parameters

-
    -
  • - -

    CarrierGroup :

    - -
  • -
  • - -

    LandingZonePrefix :

    - -
  • -
-
-
-
-
- - -MessageToAll(MsgText, MsgTime, MsgName) - -
-
- - - -

Parameters

-
    -
  • - -

    MsgText :

    - -
  • -
  • - -

    MsgTime :

    - -
  • -
  • - -

    MsgName :

    - -
  • -
-
-
-
-
- - -MessageToBlue(MsgText, MsgTime, MsgName) - -
-
- - - -

Parameters

-
    -
  • - -

    MsgText :

    - -
  • -
  • - -

    MsgTime :

    - -
  • -
  • - -

    MsgName :

    - -
  • -
-
-
-
-
- - -MessageToUnit(UnitName, MsgText, MsgTime, MsgName) - -
-
- - - -

Parameters

-
    -
  • - -

    UnitName :

    - -
  • -
  • - -

    MsgText :

    - -
  • -
  • - -

    MsgTime :

    - -
  • -
  • - -

    MsgName :

    - -
  • -
-
-
-
-
- - -MusicRegister(SndRef, SndFile, SndTime) - -
-
- - - -

Parameters

-
    -
  • - -

    SndRef :

    - -
  • -
  • - -

    SndFile :

    - -
  • -
  • - -

    SndTime :

    - -
  • -
-
-
-
-
- - -MusicReset(flg) - -
-
- - - -

Parameter

-
    -
  • - -

    flg :

    - -
  • -
-
-
-
-
- - -MusicToPlayer(SndRef, PlayerName, SndContinue) - -
-
- - - -

Parameters

-
    -
  • - -

    SndRef :

    - -
  • -
  • - -

    PlayerName :

    - -
  • -
  • - -

    SndContinue :

    - -
  • -
-
-
-
-
- - -PlaneActivate(groupNameFormat, flg) - -
-
- - - -

Parameters

-
    -
  • - -

    groupNameFormat :

    - -
  • -
  • - -

    flg :

    - -
  • -
-
-
-
-
- - - -PlayerGroup - -
-
- - - -
-
-
-
- - -SendMessageToCarrier(CarrierGroup, CarrierMessage) - -
-
- - - -

Parameters

-
    -
  • - -

    CarrierGroup :

    - -
  • -
  • - -

    CarrierMessage :

    - -
  • -
-
-
-
-
- - - -SpawnSettings - -
-
- - - -
-
-
-
- - #number - -SpawnedInfantry - -
-
- - - -
-
-
-
- - -Su34AttackCarlVinson(groupName) - -
-
- - - -

Parameter

-
    -
  • - -

    groupName :

    - -
  • -
-
-
-
-
- - -Su34AttackNorth(groupName) - -
-
- - - -

Parameter

-
    -
  • - -

    groupName :

    - -
  • -
-
-
-
-
- - -Su34AttackWest(groupName) - -
-
- - - -

Parameter

-
    -
  • - -

    groupName :

    - -
  • -
-
-
-
-
- - -Su34Destroyed(groupName) - -
-
- - - -

Parameter

-
    -
  • - -

    groupName :

    - -
  • -
-
-
-
-
- - -Su34Hold(groupName) - -
-
- - - -

Parameter

-
    -
  • - -

    groupName :

    - -
  • -
-
-
-
-
- - -Su34IsDead() - -
-
- - - -
-
-
-
- - -Su34Menu(groupName) - -
-
- - - -

Parameter

-
    -
  • - -

    groupName :

    - -
  • -
-
-
-
-
- - - -Su34MenuPath - -
-
- - - -
-
-
-
- - #number - -Su34Menus - -
-
- - - -
-
-
-
- - -Su34Orbit(groupName) - -
-
- - - -

Parameter

-
    -
  • - -

    groupName :

    - -
  • -
-
-
-
-
- - -Su34OverviewStatus() - -
-
- - - -
-
-
-
- - -Su34RTB(groupName) - -
-
- - - -

Parameter

-
    -
  • - -

    groupName :

    - -
  • -
-
-
-
-
- - - -Su34Status - -
-
- - - -
-
-
-
- - -Su34TakeOff(groupName) - -
-
- - - -

Parameter

-
    -
  • - -

    groupName :

    - -
  • -
-
-
-
-
- - -TeleportPrefixTableCount - -
-
- - - -
-
-
-
- - - -TeleportPrefixTableIndex - -
-
- - - -
-
-
-
- - -UpdateBoardMsg() - -
-
- - - -
-
-
-
- - - -_MusicTable - -
-
- - - -
-
-
-
- - - -boardMsgAll - -
-
- - - -
-
-
-
- - - -boardMsgRed - -
-
- - - -
-
-
-
- - -getCarrierHeight(CarrierGroup) - -
-
- - - -

Parameter

-
    -
  • - -

    CarrierGroup :

    - -
  • -
-
-
-
-
- - - -lookup_table - -
-
- - - -
-
-
-
- - - -routines - -
-
- - - -
-
-
-
- - -spairs(t, order) - -
-
- - - -

Parameters

-
    -
  • - -

    t :

    - -
  • -
  • - -

    order :

    - -
  • -
-
-
-

Type routines

- -
- -
- - From 4761e7150a97771ce071c2f8c9447920cecb397b Mon Sep 17 00:00:00 2001 From: FlightControl Date: Fri, 14 Apr 2017 09:49:29 +0200 Subject: [PATCH 4/4] Update web site --- docs/Documentation/AI_Balancer.html | 804 ++++ docs/Documentation/AI_Cap.html | 1723 +++++++ docs/Documentation/AI_Cas.html | 1858 ++++++++ docs/Documentation/AI_Patrol.html | 2857 ++++++++++++ docs/Documentation/Account.html | 849 ++++ docs/Documentation/Airbase.html | 339 ++ docs/Documentation/AirbasePolice.html | 378 ++ docs/Documentation/Assign.html | 1045 +++++ docs/Documentation/Base.html | 2292 ++++++++++ docs/Documentation/Cargo.html | 3271 +++++++++++++ docs/Documentation/CleanUp.html | 606 +++ docs/Documentation/Client.html | 1128 +++++ docs/Documentation/CommandCenter.html | 846 ++++ docs/Documentation/Controllable.html | 3222 +++++++++++++ docs/Documentation/DCSAirbase.html | 475 ++ docs/Documentation/DCSCoalitionObject.html | 207 + docs/Documentation/DCSCommand.html | 153 + docs/Documentation/DCSController.html | 750 +++ docs/Documentation/DCSGroup.html | 582 +++ docs/Documentation/DCSObject.html | 603 +++ docs/Documentation/DCSTask.html | 161 + docs/Documentation/DCSTypes.html | 2518 ++++++++++ docs/Documentation/DCSUnit.html | 2080 +++++++++ docs/Documentation/DCSVec3.html | 195 + docs/Documentation/DCSWorld.html | 637 +++ docs/Documentation/DCSZone.html | 175 + docs/Documentation/DCScountry.html | 523 +++ docs/Documentation/DCStimer.html | 329 ++ docs/Documentation/DCStrigger.html | 130 + docs/Documentation/Database.html | 2026 ++++++++ docs/Documentation/Detection.html | 4556 ++++++++++++++++++ docs/Documentation/DetectionManager.html | 708 +++ docs/Documentation/Escort.html | 2689 +++++++++++ docs/Documentation/Event.html | 2607 +++++++++++ docs/Documentation/Fsm.html | 2875 ++++++++++++ docs/Documentation/Group.html | 1951 ++++++++ docs/Documentation/Identifiable.html | 550 +++ docs/Documentation/Menu.html | 2212 +++++++++ docs/Documentation/Message.html | 594 +++ docs/Documentation/MissileTrainer.html | 1043 +++++ docs/Documentation/Mission.html | 2092 +++++++++ docs/Documentation/Movement.html | 423 ++ docs/Documentation/Object.html | 331 ++ docs/Documentation/Point.html | 2747 +++++++++++ docs/Documentation/Positionable.html | 1085 +++++ docs/Documentation/Process_JTAC.html | 611 +++ docs/Documentation/Process_Pickup.html | 702 +++ docs/Documentation/Radio.html | 841 ++++ docs/Documentation/Route.html | 1285 ++++++ docs/Documentation/Scenery.html | 241 + docs/Documentation/ScheduleDispatcher.html | 483 ++ docs/Documentation/Scheduler.html | 529 +++ docs/Documentation/Scoring.html | 2226 +++++++++ docs/Documentation/Sead.html | 291 ++ docs/Documentation/Set.html | 4577 +++++++++++++++++++ docs/Documentation/Smoke.html | 699 +++ docs/Documentation/Spawn.html | 3569 +++++++++++++++ docs/Documentation/SpawnStatic.html | 491 ++ docs/Documentation/Static.html | 318 ++ docs/Documentation/StaticObject.html | 272 ++ docs/Documentation/Task.html | 2847 ++++++++++++ docs/Documentation/Task_A2G.html | 1149 +++++ docs/Documentation/Task_A2G_Dispatcher.html | 556 +++ docs/Documentation/Task_Cargo.html | 943 ++++ docs/Documentation/Task_PICKUP.html | 418 ++ docs/Documentation/Unit.html | 1725 +++++++ docs/Documentation/Utils.html | 874 ++++ docs/Documentation/Zone.html | 2399 ++++++++++ docs/Documentation/env.html | 128 + docs/Documentation/index.html | 566 +++ docs/Documentation/land.html | 323 ++ docs/Documentation/routines.html | 1232 +++++ 72 files changed, 89520 insertions(+) create mode 100644 docs/Documentation/AI_Balancer.html create mode 100644 docs/Documentation/AI_Cap.html create mode 100644 docs/Documentation/AI_Cas.html create mode 100644 docs/Documentation/AI_Patrol.html create mode 100644 docs/Documentation/Account.html create mode 100644 docs/Documentation/Airbase.html create mode 100644 docs/Documentation/AirbasePolice.html create mode 100644 docs/Documentation/Assign.html create mode 100644 docs/Documentation/Base.html create mode 100644 docs/Documentation/Cargo.html create mode 100644 docs/Documentation/CleanUp.html create mode 100644 docs/Documentation/Client.html create mode 100644 docs/Documentation/CommandCenter.html create mode 100644 docs/Documentation/Controllable.html create mode 100644 docs/Documentation/DCSAirbase.html create mode 100644 docs/Documentation/DCSCoalitionObject.html create mode 100644 docs/Documentation/DCSCommand.html create mode 100644 docs/Documentation/DCSController.html create mode 100644 docs/Documentation/DCSGroup.html create mode 100644 docs/Documentation/DCSObject.html create mode 100644 docs/Documentation/DCSTask.html create mode 100644 docs/Documentation/DCSTypes.html create mode 100644 docs/Documentation/DCSUnit.html create mode 100644 docs/Documentation/DCSVec3.html create mode 100644 docs/Documentation/DCSWorld.html create mode 100644 docs/Documentation/DCSZone.html create mode 100644 docs/Documentation/DCScountry.html create mode 100644 docs/Documentation/DCStimer.html create mode 100644 docs/Documentation/DCStrigger.html create mode 100644 docs/Documentation/Database.html create mode 100644 docs/Documentation/Detection.html create mode 100644 docs/Documentation/DetectionManager.html create mode 100644 docs/Documentation/Escort.html create mode 100644 docs/Documentation/Event.html create mode 100644 docs/Documentation/Fsm.html create mode 100644 docs/Documentation/Group.html create mode 100644 docs/Documentation/Identifiable.html create mode 100644 docs/Documentation/Menu.html create mode 100644 docs/Documentation/Message.html create mode 100644 docs/Documentation/MissileTrainer.html create mode 100644 docs/Documentation/Mission.html create mode 100644 docs/Documentation/Movement.html create mode 100644 docs/Documentation/Object.html create mode 100644 docs/Documentation/Point.html create mode 100644 docs/Documentation/Positionable.html create mode 100644 docs/Documentation/Process_JTAC.html create mode 100644 docs/Documentation/Process_Pickup.html create mode 100644 docs/Documentation/Radio.html create mode 100644 docs/Documentation/Route.html create mode 100644 docs/Documentation/Scenery.html create mode 100644 docs/Documentation/ScheduleDispatcher.html create mode 100644 docs/Documentation/Scheduler.html create mode 100644 docs/Documentation/Scoring.html create mode 100644 docs/Documentation/Sead.html create mode 100644 docs/Documentation/Set.html create mode 100644 docs/Documentation/Smoke.html create mode 100644 docs/Documentation/Spawn.html create mode 100644 docs/Documentation/SpawnStatic.html create mode 100644 docs/Documentation/Static.html create mode 100644 docs/Documentation/StaticObject.html create mode 100644 docs/Documentation/Task.html create mode 100644 docs/Documentation/Task_A2G.html create mode 100644 docs/Documentation/Task_A2G_Dispatcher.html create mode 100644 docs/Documentation/Task_Cargo.html create mode 100644 docs/Documentation/Task_PICKUP.html create mode 100644 docs/Documentation/Unit.html create mode 100644 docs/Documentation/Utils.html create mode 100644 docs/Documentation/Zone.html create mode 100644 docs/Documentation/env.html create mode 100644 docs/Documentation/index.html create mode 100644 docs/Documentation/land.html create mode 100644 docs/Documentation/routines.html diff --git a/docs/Documentation/AI_Balancer.html b/docs/Documentation/AI_Balancer.html new file mode 100644 index 000000000..84f7b559e --- /dev/null +++ b/docs/Documentation/AI_Balancer.html @@ -0,0 +1,804 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module AI_Balancer

+ +

Single-Player:No / Multi-Player:Yes / AI:Yes / Human:No / Types:All -- AI Balancing will replace in multi player missions +non-occupied human slots with AI groups, in order to provide an engaging simulation environment, +even when there are hardly any players in the mission.

+ +

Banner Image

+ +
+ +

1) AIBalancer#AIBALANCER class, extends Fsm#FSM_SET

+ +

The AIBalancer#AIBALANCER class monitors and manages as many replacement AI groups as there are +CLIENTS in a SET_CLIENT collection, which are not occupied by human players.

+ + +

In other words, use AI_BALANCER to simulate human behaviour by spawning in replacement AI in multi player missions.

+ +

The parent class Fsm#FSM_SET manages the functionality to control the Finite State Machine (FSM). +The mission designer can tailor the behaviour of the AI_BALANCER, by defining event and state transition methods. +An explanation about state and event transition methods can be found in the FSM module documentation.

+ +

The mission designer can tailor the AI_BALANCER behaviour, by implementing a state or event handling method for the following:

+ + + +

1.1) AI_BALANCER construction

+ +

Create a new AI_BALANCER object with the AI_BALANCER.New() method:

+ +

1.2) AI_BALANCER is a FSM

+ +

Process

+ +

1.2.1) AI_BALANCER States

+ +
    +
  • Monitoring ( Set ): Monitoring the Set if all AI is spawned for the Clients.
  • +
  • Spawning ( Set, ClientName ): There is a new AI group spawned with ClientName as the name of reference.
  • +
  • Spawned ( Set, AIGroup ): A new AI has been spawned. You can handle this event to customize the AI behaviour with other AI FSMs or own processes.
  • +
  • Destroying ( Set, AIGroup ): The AI is being destroyed.
  • +
  • Returning ( Set, AIGroup ): The AI is returning to the airbase specified by the ReturnToAirbase methods. Handle this state to customize the return behaviour of the AI, if any.
  • +
+ +

1.2.2) AI_BALANCER Events

+ +
    +
  • Monitor ( Set ): Every 10 seconds, the Monitor event is triggered to monitor the Set.
  • +
  • Spawn ( Set, ClientName ): Triggers when there is a new AI group to be spawned with ClientName as the name of reference.
  • +
  • Spawned ( Set, AIGroup ): Triggers when a new AI has been spawned. You can handle this event to customize the AI behaviour with other AI FSMs or own processes.
  • +
  • Destroy ( Set, AIGroup ): The AI is being destroyed.
  • +
  • Return ( Set, AIGroup ): The AI is returning to the airbase specified by the ReturnToAirbase methods.
  • +
+ +

1.3) AI_BALANCER spawn interval for replacement AI

+ +

Use the method AI_BALANCER.InitSpawnInterval() to set the earliest and latest interval in seconds that is waited until a new replacement AI is spawned.

+ +

1.4) AI_BALANCER returns AI to Airbases

+ +

By default, When a human player joins a slot that is AI_BALANCED, the AI group will be destroyed by default. +However, there are 2 additional options that you can use to customize the destroy behaviour. +When a human player joins a slot, you can configure to let the AI return to:

+ + + +

Note that when AI returns to an airbase, the AIBALANCER will trigger the Return event and the AI will return, +otherwise the AIBALANCER will trigger a Destroy event, and the AI will be destroyed.

+ +
+ +

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-01-17: There is still a problem with AI being destroyed, but not respawned. Need to check further upon that.

+ +

2017-01-08: AI_BALANCER:InitSpawnInterval( Earliest, Latest ) added.

+ +
+ +

AUTHORS and CONTRIBUTIONS

+ +

Contributions:

+ +
    +
  • Dutch_Baron: Working together with James has resulted in the creation of the AI_BALANCER class. James has shared his ideas on balancing AI with air units, and together we made a first design which you can use now :-)
  • +
  • SNAFU: Had a couple of mails with the guys to validate, if the same concept in the GCI/CAP script could be reworked within MOOSE. None of the script code has been used however within the new AI_BALANCER moose class.
  • +
+ +

Authors:

+ +
    +
  • FlightControl: Framework Design & Programming and Documentation.
  • +
+ + +

Global(s)

+ + + + + +
AI_BALANCER + +
+

Type AI_BALANCER

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AI_BALANCER.AIGroups + +
AI_BALANCER.ClassName + +
AI_BALANCER.Earliest + +
AI_BALANCER:InitSpawnInterval(Earliest, Latest) +

Sets the earliest to the latest interval in seconds how long AI_BALANCER will wait to spawn a new AI.

+
AI_BALANCER.Latest + +
AI_BALANCER:New(SetClient, SpawnAI) +

Creates a new AI_BALANCER object

+
AI_BALANCER.PatrolZones + +
AI_BALANCER.ReturnAirbaseSet + +
AI_BALANCER:ReturnToHomeAirbase(ReturnTresholdRange) +

Returns the AI to the home Airbase#AIRBASE.

+
AI_BALANCER:ReturnToNearestAirbases(ReturnTresholdRange, ReturnAirbaseSet) +

Returns the AI to the nearest friendly Airbase#AIRBASE.

+
AI_BALANCER.ReturnTresholdRange + +
AI_BALANCER.SetClient + +
AI_BALANCER.SpawnAI + +
AI_BALANCER.Test + +
AI_BALANCER.ToHomeAirbase + +
AI_BALANCER.ToNearestAirbase + +
AI_BALANCER:onenterDestroying(SetGroup, AIGroup, From, Event, To, ClientName) + +
AI_BALANCER:onenterMonitoring(SetGroup) + +
AI_BALANCER:onenterReturning(SetGroup, AIGroup, From, Event, To) + +
AI_BALANCER:onenterSpawning(SetGroup, ClientName, AIGroup, From, Event, To) + +
+ +

Global(s)

+
+
+ + #AI_BALANCER + +AI_BALANCER + +
+
+ + + +
+
+

Type AI_Balancer

+ +

Type AI_BALANCER

+ +

AI_BALANCER class

+ +

Field(s)

+
+
+ + + +AI_BALANCER.AIGroups + +
+
+ + + +
+
+
+
+ + #string + +AI_BALANCER.ClassName + +
+
+ + + +
+
+
+
+ + + +AI_BALANCER.Earliest + +
+
+ + + +
+
+
+
+ + +AI_BALANCER:InitSpawnInterval(Earliest, Latest) + +
+
+ +

Sets the earliest to the latest interval in seconds how long AI_BALANCER will wait to spawn a new AI.

+ + +

Provide 2 identical seconds if the interval should be a fixed amount of seconds.

+ +

Parameters

+
    +
  • + +

    #number Earliest : +The earliest a new AI can be spawned in seconds.

    + +
  • +
  • + +

    #number Latest : +The latest a new AI can be spawned in seconds.

    + +
  • +
+

Return value

+ + +

self

+ +
+
+
+
+ + + +AI_BALANCER.Latest + +
+
+ + + +
+
+
+
+ + +AI_BALANCER:New(SetClient, SpawnAI) + +
+
+ +

Creates a new AI_BALANCER object

+ +

Parameters

+
    +
  • + +

    Core.Set#SET_CLIENT SetClient : +A SET_CLIENT object that will contain the CLIENT objects to be monitored if they are alive or not (joined by a player).

    + +
  • +
  • + +

    Functional.Spawn#SPAWN SpawnAI : +The default Spawn object to spawn new AI Groups when needed.

    + +
  • +
+

Return value

+ +

#AI_BALANCER:

+ + +
+
+
+
+ + + +AI_BALANCER.PatrolZones + +
+
+ + + +
+
+
+
+ + + +AI_BALANCER.ReturnAirbaseSet + +
+
+ + + +
+
+
+
+ + +AI_BALANCER:ReturnToHomeAirbase(ReturnTresholdRange) + +
+
+ +

Returns the AI to the home Airbase#AIRBASE.

+ +

Parameter

+ +
+
+
+
+ + +AI_BALANCER:ReturnToNearestAirbases(ReturnTresholdRange, ReturnAirbaseSet) + +
+
+ +

Returns the AI to the nearest friendly Airbase#AIRBASE.

+ +

Parameters

+ +
+
+
+
+ + + +AI_BALANCER.ReturnTresholdRange + +
+
+ + + +
+
+
+
+ + Core.Set#SET_CLIENT + +AI_BALANCER.SetClient + +
+
+ + + +
+
+
+
+ + Functional.Spawn#SPAWN + +AI_BALANCER.SpawnAI + +
+
+ + + +
+
+
+
+ + Wrapper.Group#GROUP + +AI_BALANCER.Test + +
+
+ + + +
+
+
+
+ + #boolean + +AI_BALANCER.ToHomeAirbase + +
+
+ + + +
+
+
+
+ + #boolean + +AI_BALANCER.ToNearestAirbase + +
+
+ + + +
+
+
+
+ + +AI_BALANCER:onenterDestroying(SetGroup, AIGroup, From, Event, To, ClientName) + +
+
+ + + +

Parameters

+ +
+
+
+
+ + +AI_BALANCER:onenterMonitoring(SetGroup) + +
+
+ + + +

Parameter

+
    +
  • + +

    SetGroup :

    + +
  • +
+
+
+
+
+ + +AI_BALANCER:onenterReturning(SetGroup, AIGroup, From, Event, To) + +
+
+ + + +

Parameters

+ +
+
+
+
+ + +AI_BALANCER:onenterSpawning(SetGroup, ClientName, AIGroup, From, Event, To) + +
+
+ + + +

Parameters

+ +
+
+ +
+ +
+ + diff --git a/docs/Documentation/AI_Cap.html b/docs/Documentation/AI_Cap.html new file mode 100644 index 000000000..7b1a109bc --- /dev/null +++ b/docs/Documentation/AI_Cap.html @@ -0,0 +1,1723 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module AI_Cap

+ +

AI - Execute Combat Air Patrol (CAP).

+ +

Banner Image

+ +
+ +

AI CAP classes makes AI Controllables execute a Combat Air Patrol.

+ + + +

There are the following types of CAP classes defined:

+ + + +
+ +

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-01-15: Initial class and API.

+ +
+ +

AUTHORS and CONTRIBUTIONS

+ +

Contributions:

+ + + +

Authors:

+ +
    +
  • FlightControl: Concept, Design & Programming.
  • +
+ + +

Global(s)

+ + + + + + + + + +
AI_CAP_ZONE +

1) #AICAPZONE class, extends AICAP#AIPATROL_ZONE

+ +

The #AICAPZONE class implements the core functions to patrol a Zone by an AI Controllable or Group +and automatically engage any airborne enemies that are within a certain range or within a certain zone.

+
_NewEngageCapRoute(AIControllable) + +
+

Type AI_CAP_ZONE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AI_CAP_ZONE.AIControllable +

The Controllable patrolling.

+
AI_CAP_ZONE:Abort() +

Synchronous Event Trigger for Event Abort.

+
AI_CAP_ZONE:Accomplish() +

Synchronous Event Trigger for Event Accomplish.

+
AI_CAP_ZONE.Accomplished + +
AI_CAP_ZONE:Destroy() +

Synchronous Event Trigger for Event Destroy.

+
AI_CAP_ZONE:Engage() +

Synchronous Event Trigger for Event Engage.

+
AI_CAP_ZONE.EngageRange + +
AI_CAP_ZONE.EngageZone + +
AI_CAP_ZONE.Engaging + +
AI_CAP_ZONE:Fired() +

Synchronous Event Trigger for Event Fired.

+
AI_CAP_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType) +

Creates a new AICAPZONE object

+
AI_CAP_ZONE:OnAfterAbort(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Abort.

+
AI_CAP_ZONE:OnAfterAccomplish(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Accomplish.

+
AI_CAP_ZONE:OnAfterDestroy(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Destroy.

+
AI_CAP_ZONE:OnAfterEngage(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Engage.

+
AI_CAP_ZONE:OnAfterFired(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Fired.

+
AI_CAP_ZONE:OnBeforeAbort(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Abort.

+
AI_CAP_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Accomplish.

+
AI_CAP_ZONE:OnBeforeDestroy(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Destroy.

+
AI_CAP_ZONE:OnBeforeEngage(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Engage.

+
AI_CAP_ZONE:OnBeforeFired(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Fired.

+
AI_CAP_ZONE:OnEnterEngaging(Controllable, From, Event, To) +

OnEnter Transition Handler for State Engaging.

+
AI_CAP_ZONE:OnEventDead(EventData) + +
AI_CAP_ZONE:OnLeaveEngaging(Controllable, From, Event, To) +

OnLeave Transition Handler for State Engaging.

+
AI_CAP_ZONE:SetEngageRange(EngageRange) +

Set the Engage Range when the AI will engage with airborne enemies.

+
AI_CAP_ZONE:SetEngageZone(EngageZone) +

Set the Engage Zone which defines where the AI will engage bogies.

+
AI_CAP_ZONE.TargetZone +

The Zone where the patrol needs to be executed.

+
AI_CAP_ZONE:__Abort(Delay) +

Asynchronous Event Trigger for Event Abort.

+
AI_CAP_ZONE:__Accomplish(Delay) +

Asynchronous Event Trigger for Event Accomplish.

+
AI_CAP_ZONE:__Destroy(Delay) +

Asynchronous Event Trigger for Event Destroy.

+
AI_CAP_ZONE:__Engage(Delay) +

Asynchronous Event Trigger for Event Engage.

+
AI_CAP_ZONE:__Fired(Delay) +

Asynchronous Event Trigger for Event Fired.

+
AI_CAP_ZONE:onafterAbort(Controllable, From, Event, To) + +
AI_CAP_ZONE:onafterAccomplish(Controllable, From, Event, To) + +
AI_CAP_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) + +
AI_CAP_ZONE:onafterDetected(Controllable, From, Event, To) + +
AI_CAP_ZONE:onafterEngage(Controllable, From, Event, To) + +
AI_CAP_ZONE:onafterStart(Controllable, From, Event, To) +

onafter State Transition for Event Start.

+
AI_CAP_ZONE:onbeforeEngage(Controllable, From, Event, To) + +
+ +

Global(s)

+
+
+ + #AI_CAP_ZONE + +AI_CAP_ZONE + +
+
+ +

1) #AICAPZONE class, extends AICAP#AIPATROL_ZONE

+ +

The #AICAPZONE class implements the core functions to patrol a Zone by an AI Controllable or Group +and automatically engage any airborne enemies that are within a certain range or within a certain zone.

+ + + +

Process

+ +

The AICAPZONE is assigned a Group and this must be done before the AICAPZONE process can be started using the Start event.

+ +

Process

+ +

The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits. +Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.

+ +

Process

+ +

This cycle will continue.

+ +

Process

+ +

During the patrol, the AI will detect enemy targets, which are reported through the Detected event.

+ +

Process

+ +

When enemies are detected, the AI will automatically engage the enemy.

+ +

Process

+ +

Until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB. +When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.

+ +

Process

+ +

1.1) AICAPZONE constructor

+ + + +

1.2) AICAPZONE is a FSM

+ +

Process

+ +

1.2.1) AICAPZONE States

+ +
    +
  • None ( Group ): The process is not started yet.
  • +
  • Patrolling ( Group ): The AI is patrolling the Patrol Zone.
  • +
  • Engaging ( Group ): The AI is engaging the bogeys.
  • +
  • Returning ( Group ): The AI is returning to Base..
  • +
+ +

1.2.2) AICAPZONE Events

+ + + +

1.3) Set the Range of Engagement

+ +

Range

+ +

An optional range can be set in meters, +that will define when the AI will engage with the detected airborne enemy targets. +The range can be beyond or smaller than the range of the Patrol Zone. +The range is applied at the position of the AI. +Use the method AICAP#AICAP_ZONE.SetEngageRange() to define that range.

+ +

1.4) Set the Zone of Engagement

+ +

Zone

+ +

An optional Zone can be set, +that will define when the AI will engage with the detected airborne enemy targets. +Use the method AICap#AICAP_ZONE.SetEngageZone() to define that Zone.

+ +
+ + +
+
+
+
+ + +_NewEngageCapRoute(AIControllable) + +
+
+ + + +

Parameter

+ +
+
+

Type AI_Cap

+ +

Type AI_CAP_ZONE

+

Field(s)

+
+
+ + Wrapper.Controllable#CONTROLLABLE + +AI_CAP_ZONE.AIControllable + +
+
+ +

The Controllable patrolling.

+ +
+
+
+
+ + +AI_CAP_ZONE:Abort() + +
+
+ +

Synchronous Event Trigger for Event Abort.

+ +
+
+
+
+ + +AI_CAP_ZONE:Accomplish() + +
+
+ +

Synchronous Event Trigger for Event Accomplish.

+ +
+
+
+
+ + #boolean + +AI_CAP_ZONE.Accomplished + +
+
+ + + +
+
+
+
+ + +AI_CAP_ZONE:Destroy() + +
+
+ +

Synchronous Event Trigger for Event Destroy.

+ +
+
+
+
+ + +AI_CAP_ZONE:Engage() + +
+
+ +

Synchronous Event Trigger for Event Engage.

+ +
+
+
+
+ + + +AI_CAP_ZONE.EngageRange + +
+
+ + + +
+
+
+
+ + + +AI_CAP_ZONE.EngageZone + +
+
+ + + +
+
+
+
+ + #boolean + +AI_CAP_ZONE.Engaging + +
+
+ + + +
+
+
+
+ + +AI_CAP_ZONE:Fired() + +
+
+ +

Synchronous Event Trigger for Event Fired.

+ +
+
+
+
+ + +AI_CAP_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType) + +
+
+ +

Creates a new AICAPZONE object

+ +

Parameters

+ +

Return value

+ +

#AICAPZONE: +self

+ +
+
+
+
+ + +AI_CAP_ZONE:OnAfterAbort(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Abort.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAP_ZONE:OnAfterAccomplish(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Accomplish.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAP_ZONE:OnAfterDestroy(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Destroy.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAP_ZONE:OnAfterEngage(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Engage.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAP_ZONE:OnAfterFired(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Fired.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAP_ZONE:OnBeforeAbort(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Abort.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_CAP_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Accomplish.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_CAP_ZONE:OnBeforeDestroy(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Destroy.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_CAP_ZONE:OnBeforeEngage(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Engage.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_CAP_ZONE:OnBeforeFired(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Fired.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_CAP_ZONE:OnEnterEngaging(Controllable, From, Event, To) + +
+
+ +

OnEnter Transition Handler for State Engaging.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAP_ZONE:OnEventDead(EventData) + +
+
+ + + +

Parameter

+ +
+
+
+
+ + +AI_CAP_ZONE:OnLeaveEngaging(Controllable, From, Event, To) + +
+
+ +

OnLeave Transition Handler for State Engaging.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_CAP_ZONE:SetEngageRange(EngageRange) + +
+
+ +

Set the Engage Range when the AI will engage with airborne enemies.

+ +

Parameter

+
    +
  • + +

    #number EngageRange : +The Engage Range.

    + +
  • +
+

Return value

+ +

#AICAPZONE: +self

+ +
+
+
+
+ + +AI_CAP_ZONE:SetEngageZone(EngageZone) + +
+
+ +

Set the Engage Zone which defines where the AI will engage bogies.

+ +

Parameter

+
    +
  • + +

    Core.Zone#ZONE EngageZone : +The zone where the AI is performing CAP.

    + +
  • +
+

Return value

+ +

#AICAPZONE: +self

+ +
+
+
+
+ + Core.Zone#ZONE_BASE + +AI_CAP_ZONE.TargetZone + +
+
+ +

The Zone where the patrol needs to be executed.

+ +
+
+
+
+ + +AI_CAP_ZONE:__Abort(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Abort.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_CAP_ZONE:__Accomplish(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Accomplish.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_CAP_ZONE:__Destroy(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Destroy.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_CAP_ZONE:__Engage(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Engage.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_CAP_ZONE:__Fired(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Fired.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_CAP_ZONE:onafterAbort(Controllable, From, Event, To) + +
+
+ + + +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAP_ZONE:onafterAccomplish(Controllable, From, Event, To) + +
+
+ + + +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAP_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) + +
+
+ + + +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
  • + +

    Core.Event#EVENTDATA EventData :

    + +
  • +
+
+
+
+
+ + +AI_CAP_ZONE:onafterDetected(Controllable, From, Event, To) + +
+
+ + + +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAP_ZONE:onafterEngage(Controllable, From, Event, To) + +
+
+ + + +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAP_ZONE:onafterStart(Controllable, From, Event, To) + +
+
+ +

onafter State Transition for Event Start.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAP_ZONE:onbeforeEngage(Controllable, From, Event, To) + +
+
+ + + +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+ +
+ +
+ + diff --git a/docs/Documentation/AI_Cas.html b/docs/Documentation/AI_Cas.html new file mode 100644 index 000000000..4c0163c84 --- /dev/null +++ b/docs/Documentation/AI_Cas.html @@ -0,0 +1,1858 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module AI_Cas

+ +

AI -- Provide Close Air Support to friendly ground troops.

+ +

Banner Image

+ +
+ +

AI CAS classes makes AI Controllables execute a Close Air Support.

+ + + +

There are the following types of CAS classes defined:

+ + + +
+ +

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-01-15: Initial class and API.

+ +
+ +

AUTHORS and CONTRIBUTIONS

+ +

Contributions:

+ +
    +
  • Quax: Concept, Advice & Testing.
  • +
  • Pikey: Concept, Advice & Testing.
  • +
  • Gunterlund: Test case revision.
  • +
+ +

Authors:

+ +
    +
  • FlightControl: Concept, Design & Programming.
  • +
+ + +

Global(s)

+ + + + + + + + + +
AI_CAS_ZONE +

1) #AICASZONE class, extends AIPatrol#AIPATROL_ZONE

+ +

#AICASZONE derives from the AIPatrol#AIPATROL_ZONE, inheriting its methods and behaviour.

+
_NewEngageRoute(AIControllable) + +
+

Type AI_CAS_ZONE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AI_CAS_ZONE.AIControllable +

The Controllable patrolling.

+
AI_CAS_ZONE:Abort() +

Synchronous Event Trigger for Event Abort.

+
AI_CAS_ZONE:Accomplish() +

Synchronous Event Trigger for Event Accomplish.

+
AI_CAS_ZONE.Accomplished + +
AI_CAS_ZONE:Destroy() +

Synchronous Event Trigger for Event Destroy.

+
AI_CAS_ZONE:Engage(EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) +

Synchronous Event Trigger for Event Engage.

+
AI_CAS_ZONE.EngageAltitude + +
AI_CAS_ZONE.EngageAttackQty + +
AI_CAS_ZONE.EngageDirection + +
AI_CAS_ZONE.EngageSpeed + +
AI_CAS_ZONE.EngageWeaponExpend + +
AI_CAS_ZONE.EngageZone + +
AI_CAS_ZONE:Fired() +

Synchronous Event Trigger for Event Fired.

+
AI_CAS_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageZone, PatrolAltType) +

Creates a new AICASZONE object

+
AI_CAS_ZONE:OnAfterAbort(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Abort.

+
AI_CAS_ZONE:OnAfterAccomplish(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Accomplish.

+
AI_CAS_ZONE:OnAfterDestroy(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Destroy.

+
AI_CAS_ZONE:OnAfterEngage(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Engage.

+
AI_CAS_ZONE:OnAfterFired(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Fired.

+
AI_CAS_ZONE:OnBeforeAbort(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Abort.

+
AI_CAS_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Accomplish.

+
AI_CAS_ZONE:OnBeforeDestroy(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Destroy.

+
AI_CAS_ZONE:OnBeforeEngage(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Engage.

+
AI_CAS_ZONE:OnBeforeFired(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Fired.

+
AI_CAS_ZONE:OnEnterEngaging(Controllable, From, Event, To) +

OnEnter Transition Handler for State Engaging.

+
AI_CAS_ZONE:OnEventDead(EventData) + +
AI_CAS_ZONE:OnLeaveEngaging(Controllable, From, Event, To) +

OnLeave Transition Handler for State Engaging.

+
AI_CAS_ZONE:SetEngageZone(EngageZone) +

Set the Engage Zone where the AI is performing CAS.

+
AI_CAS_ZONE.TargetZone +

The Zone where the patrol needs to be executed.

+
AI_CAS_ZONE:__Abort(Delay) +

Asynchronous Event Trigger for Event Abort.

+
AI_CAS_ZONE:__Accomplish(Delay) +

Asynchronous Event Trigger for Event Accomplish.

+
AI_CAS_ZONE:__Destroy(Delay) +

Asynchronous Event Trigger for Event Destroy.

+
AI_CAS_ZONE:__Engage(Delay, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) +

Asynchronous Event Trigger for Event Engage.

+
AI_CAS_ZONE:__Fired(Delay) +

Asynchronous Event Trigger for Event Fired.

+
AI_CAS_ZONE:onafterAbort(Controllable, From, Event, To) + +
AI_CAS_ZONE:onafterAccomplish(Controllable, From, Event, To) + +
AI_CAS_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) + +
AI_CAS_ZONE:onafterEngage(Controllable, From, Event, To, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) + +
AI_CAS_ZONE:onafterStart(Controllable, From, Event, To) +

onafter State Transition for Event Start.

+
AI_CAS_ZONE:onafterTarget(Controllable, From, Event, To) + +
AI_CAS_ZONE:onbeforeEngage(Controllable, From, Event, To) + +
+ +

Global(s)

+
+
+ + #AI_CAS_ZONE + +AI_CAS_ZONE + +
+
+ +

1) #AICASZONE class, extends AIPatrol#AIPATROL_ZONE

+ +

#AICASZONE derives from the AIPatrol#AIPATROL_ZONE, inheriting its methods and behaviour.

+ + +

+The #AICASZONE class implements the core functions to provide Close Air Support in an Engage Zone by an AIR Controllable or Group. +The AICASZONE runs a process. It holds an AI in a Patrol Zone and when the AI is commanded to engage, it will fly to an Engage Zone.

+ +

HoldAndEngage

+ +

The AICASZONE is assigned a Group and this must be done before the AICASZONE process can be started through the Start event.

+ +

Start Event

+ +

Upon started, The AI will Route itself towards the random 3D point within a patrol zone, +using a random speed within the given altitude and speed limits. +Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits. +This cycle will continue until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB.

+ +

Route Event

+ +

When the AI is commanded to provide Close Air Support (through the event Engage), the AI will fly towards the Engage Zone. +Any target that is detected in the Engage Zone will be reported and will be destroyed by the AI.

+ +

Engage Event

+ +

The AI will detect the targets and will only destroy the targets within the Engage Zone.

+ +

Engage Event

+ +

Every target that is destroyed, is reported< by the AI.

+ +

Engage Event

+ +

Note that the AI does not know when the Engage Zone is cleared, and therefore will keep circling in the zone.

+ +

Engage Event

+ +

Until it is notified through the event Accomplish, which is to be triggered by an observing party:

+ +
    +
  • a FAC
  • +
  • a timed event
  • +
  • a menu option selected by a human
  • +
  • a condition
  • +
  • others ...
  • +
+ +

Engage Event

+ +

When the AI has accomplished the CAS, it will fly back to the Patrol Zone.

+ +

Engage Event

+ +

It will keep patrolling there, until it is notified to RTB or move to another CAS Zone. +It can be notified to go RTB through the RTB event.

+ +

When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.

+ +

Engage Event

+ +

1.1) AICASZONE constructor

+ + + +

1.2) AICASZONE is a FSM

+ +

Process

+ +

1.2.1) AICASZONE States

+ +
    +
  • None ( Group ): The process is not started yet.
  • +
  • Patrolling ( Group ): The AI is patrolling the Patrol Zone.
  • +
  • Engaging ( Group ): The AI is engaging the targets in the Engage Zone, executing CAS.
  • +
  • Returning ( Group ): The AI is returning to Base..
  • +
+ +

1.2.2) AICASZONE Events

+ + + +
+ + +
+
+
+
+ + +_NewEngageRoute(AIControllable) + +
+
+ + + +

Parameter

+ +
+
+

Type AI_Cas

+ +

Type AI_CAS_ZONE

+ +

AICASZONE class

+ +

Field(s)

+
+
+ + Wrapper.Controllable#CONTROLLABLE + +AI_CAS_ZONE.AIControllable + +
+
+ +

The Controllable patrolling.

+ +
+
+
+
+ + +AI_CAS_ZONE:Abort() + +
+
+ +

Synchronous Event Trigger for Event Abort.

+ +
+
+
+
+ + +AI_CAS_ZONE:Accomplish() + +
+
+ +

Synchronous Event Trigger for Event Accomplish.

+ +
+
+
+
+ + #boolean + +AI_CAS_ZONE.Accomplished + +
+
+ + + +
+
+
+
+ + +AI_CAS_ZONE:Destroy() + +
+
+ +

Synchronous Event Trigger for Event Destroy.

+ +
+
+
+
+ + +AI_CAS_ZONE:Engage(EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) + +
+
+ +

Synchronous Event Trigger for Event Engage.

+ +

Parameters

+
    +
  • + +

    #number EngageSpeed : +(optional) The speed the Group will hold when engaging to the target zone.

    + +
  • +
  • + +

    Dcs.DCSTypes#Distance EngageAltitude : +(optional) Desired altitude to perform the unit engagement.

    + +
  • +
  • + +

    Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend : +(optional) Determines how much weapon will be released at each attack. +If parameter is not defined the unit / controllable will choose expend on its own discretion. +Use the structure DCSTypes#AI.Task.WeaponExpend to define the amount of weapons to be release at each attack.

    + +
  • +
  • + +

    #number EngageAttackQty : +(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    + +
  • +
  • + +

    Dcs.DCSTypes#Azimuth EngageDirection : +(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    + +
  • +
+
+
+
+
+ + +AI_CAS_ZONE.EngageAltitude + +
+
+ + + +
+
+
+
+ + + +AI_CAS_ZONE.EngageAttackQty + +
+
+ + + +
+
+
+
+ + + +AI_CAS_ZONE.EngageDirection + +
+
+ + + +
+
+
+
+ + +AI_CAS_ZONE.EngageSpeed + +
+
+ + + +
+
+
+
+ + + +AI_CAS_ZONE.EngageWeaponExpend + +
+
+ + + +
+
+
+
+ + + +AI_CAS_ZONE.EngageZone + +
+
+ + + +
+
+
+
+ + +AI_CAS_ZONE:Fired() + +
+
+ +

Synchronous Event Trigger for Event Fired.

+ +
+
+
+
+ + +AI_CAS_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, EngageZone, PatrolAltType) + +
+
+ +

Creates a new AICASZONE object

+ +

Parameters

+ +

Return value

+ +

#AICASZONE: +self

+ +
+
+
+
+ + +AI_CAS_ZONE:OnAfterAbort(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Abort.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAS_ZONE:OnAfterAccomplish(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Accomplish.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAS_ZONE:OnAfterDestroy(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Destroy.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAS_ZONE:OnAfterEngage(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Engage.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAS_ZONE:OnAfterFired(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Fired.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAS_ZONE:OnBeforeAbort(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Abort.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_CAS_ZONE:OnBeforeAccomplish(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Accomplish.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_CAS_ZONE:OnBeforeDestroy(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Destroy.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_CAS_ZONE:OnBeforeEngage(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Engage.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAS_ZONE:OnBeforeFired(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Fired.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_CAS_ZONE:OnEnterEngaging(Controllable, From, Event, To) + +
+
+ +

OnEnter Transition Handler for State Engaging.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAS_ZONE:OnEventDead(EventData) + +
+
+ + + +

Parameter

+ +
+
+
+
+ + +AI_CAS_ZONE:OnLeaveEngaging(Controllable, From, Event, To) + +
+
+ +

OnLeave Transition Handler for State Engaging.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_CAS_ZONE:SetEngageZone(EngageZone) + +
+
+ +

Set the Engage Zone where the AI is performing CAS.

+ + +

Note that if the EngageZone is changed, the AI needs to re-detect targets.

+ +

Parameter

+
    +
  • + +

    Core.Zone#ZONE EngageZone : +The zone where the AI is performing CAS.

    + +
  • +
+

Return value

+ +

#AICASZONE: +self

+ +
+
+
+
+ + Core.Zone#ZONE_BASE + +AI_CAS_ZONE.TargetZone + +
+
+ +

The Zone where the patrol needs to be executed.

+ +
+
+
+
+ + +AI_CAS_ZONE:__Abort(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Abort.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_CAS_ZONE:__Accomplish(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Accomplish.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_CAS_ZONE:__Destroy(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Destroy.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_CAS_ZONE:__Engage(Delay, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) + +
+
+ +

Asynchronous Event Trigger for Event Engage.

+ +

Parameters

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
  • + +

    #number EngageSpeed : +(optional) The speed the Group will hold when engaging to the target zone.

    + +
  • +
  • + +

    Dcs.DCSTypes#Distance EngageAltitude : +(optional) Desired altitude to perform the unit engagement.

    + +
  • +
  • + +

    Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend : +(optional) Determines how much weapon will be released at each attack. +If parameter is not defined the unit / controllable will choose expend on its own discretion. +Use the structure DCSTypes#AI.Task.WeaponExpend to define the amount of weapons to be release at each attack.

    + +
  • +
  • + +

    #number EngageAttackQty : +(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    + +
  • +
  • + +

    Dcs.DCSTypes#Azimuth EngageDirection : +(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    + +
  • +
+
+
+
+
+ + +AI_CAS_ZONE:__Fired(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Fired.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_CAS_ZONE:onafterAbort(Controllable, From, Event, To) + +
+
+ + + +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAS_ZONE:onafterAccomplish(Controllable, From, Event, To) + +
+
+ + + +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAS_ZONE:onafterDestroy(Controllable, From, Event, To, EventData) + +
+
+ + + +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
  • + +

    Core.Event#EVENTDATA EventData :

    + +
  • +
+
+
+
+
+ + +AI_CAS_ZONE:onafterEngage(Controllable, From, Event, To, EngageSpeed, EngageAltitude, EngageWeaponExpend, EngageAttackQty, EngageDirection) + +
+
+ + + +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
  • + +

    #number EngageSpeed : +(optional) The speed the Group will hold when engaging to the target zone.

    + +
  • +
  • + +

    Dcs.DCSTypes#Distance EngageAltitude : +(optional) Desired altitude to perform the unit engagement.

    + +
  • +
  • + +

    Dcs.DCSTypes#AI.Task.WeaponExpend EngageWeaponExpend : +(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    + +
  • +
  • + +

    #number EngageAttackQty : +(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    + +
  • +
  • + +

    Dcs.DCSTypes#Azimuth EngageDirection : +(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    + +
  • +
+
+
+
+
+ + +AI_CAS_ZONE:onafterStart(Controllable, From, Event, To) + +
+
+ +

onafter State Transition for Event Start.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAS_ZONE:onafterTarget(Controllable, From, Event, To) + +
+
+ + + +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_CAS_ZONE:onbeforeEngage(Controllable, From, Event, To) + +
+
+ + + +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+ +
+ +
+ + diff --git a/docs/Documentation/AI_Patrol.html b/docs/Documentation/AI_Patrol.html new file mode 100644 index 000000000..b6fa99328 --- /dev/null +++ b/docs/Documentation/AI_Patrol.html @@ -0,0 +1,2857 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module AI_Patrol

+ +

AI -- Air Patrolling or Staging.

+ +

Banner Image

+ +
+ +

AI PATROL classes makes AI Controllables execute an Patrol.

+ + + +

There are the following types of PATROL classes defined:

+ + + +
+ +

OPEN ISSUES

+ +

2017-01-17: When Spawned AI is located at an airbase, it will be routed first back to the airbase after take-off.

+ +

2016-01-17: + -- Fixed problem with AI returning to base too early and unexpected. + -- ReSpawning of AI will reset the AI_PATROL and derived classes. + -- Checked the correct workings of SCHEDULER, and it DOES work correctly.

+ +
+ +

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-01-17: Rename of class: AI_PATROL_ZONE is the new name for the old AI_PATROLZONE.

+ +

2017-01-15: Complete revision. AIPATROLZONE is the base class for other AI_PATROL like classes.

+ +

2016-09-01: Initial class and API.

+ +
+ +

AUTHORS and CONTRIBUTIONS

+ +

Contributions:

+ +
    +
  • Dutch_Baron: Working together with James has resulted in the creation of the AI_BALANCER class. James has shared his ideas on balancing AI with air units, and together we made a first design which you can use now :-)
  • +
  • Pikey: Testing and API concept review.
  • +
+ +

Authors:

+ +
    +
  • FlightControl: Design & Programming.
  • +
+ + +

Global(s)

+ + + + + +
AI_PATROL_ZONE +

1) #AIPATROLZONE class, extends Fsm#FSM_CONTROLLABLE

+ +

The #AIPATROLZONE class implements the core functions to patrol a Zone by an AI Controllable or Group.

+
+

Type AI_PATROL_ZONE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AI_PATROL_ZONE.AIControllable +

The Controllable patrolling.

+
AI_PATROL_ZONE.CheckStatus + +
AI_PATROL_ZONE:ClearDetectedUnits() +

Clears the list of Unit#UNITs that were detected by the AI.

+
AI_PATROL_ZONE.CoordTest + +
AI_PATROL_ZONE:Detect() +

Synchronous Event Trigger for Event Detect.

+
AI_PATROL_ZONE.DetectActivated + +
AI_PATROL_ZONE.DetectInterval + +
AI_PATROL_ZONE.DetectOn + +
AI_PATROL_ZONE.DetectZone + +
AI_PATROL_ZONE:Detected() +

Synchronous Event Trigger for Event Detected.

+
AI_PATROL_ZONE.DetectedUnits + +
AI_PATROL_ZONE:GetDetectedUnits() +

Gets a list of Unit#UNITs that were detected by the AI.

+
AI_PATROL_ZONE:ManageDamage(PatrolDamageTreshold) +

When the AI is damaged beyond a certain treshold, it is required that the AI returns to the home base.

+
AI_PATROL_ZONE:ManageFuel(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime) +

When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.

+
AI_PATROL_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType) +

Creates a new AIPATROLZONE object

+
AI_PATROL_ZONE:OnAfterDetect(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Detect.

+
AI_PATROL_ZONE:OnAfterDetected(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Detected.

+
AI_PATROL_ZONE:OnAfterRTB(Controllable, From, Event, To) +

OnAfter Transition Handler for Event RTB.

+
AI_PATROL_ZONE:OnAfterRoute(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Route.

+
AI_PATROL_ZONE:OnAfterStart(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Start.

+
AI_PATROL_ZONE:OnAfterStatus(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Status.

+
AI_PATROL_ZONE:OnAfterStop(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Stop.

+
AI_PATROL_ZONE:OnBeforeDetect(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Detect.

+
AI_PATROL_ZONE:OnBeforeDetected(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Detected.

+
AI_PATROL_ZONE:OnBeforeRTB(Controllable, From, Event, To) +

OnBefore Transition Handler for Event RTB.

+
AI_PATROL_ZONE:OnBeforeRoute(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Route.

+
AI_PATROL_ZONE:OnBeforeStart(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Start.

+
AI_PATROL_ZONE:OnBeforeStatus(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Status.

+
AI_PATROL_ZONE:OnBeforeStop(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Stop.

+
AI_PATROL_ZONE:OnCrash(EventData) + +
AI_PATROL_ZONE:OnEjection(EventData) + +
AI_PATROL_ZONE:OnEnterPatrolling(Controllable, From, Event, To) +

OnEnter Transition Handler for State Patrolling.

+
AI_PATROL_ZONE:OnEnterReturning(Controllable, From, Event, To) +

OnEnter Transition Handler for State Returning.

+
AI_PATROL_ZONE:OnEnterStopped(Controllable, From, Event, To) +

OnEnter Transition Handler for State Stopped.

+
AI_PATROL_ZONE:OnLeavePatrolling(Controllable, From, Event, To) +

OnLeave Transition Handler for State Patrolling.

+
AI_PATROL_ZONE:OnLeaveReturning(Controllable, From, Event, To) +

OnLeave Transition Handler for State Returning.

+
AI_PATROL_ZONE:OnLeaveStopped(Controllable, From, Event, To) +

OnLeave Transition Handler for State Stopped.

+
AI_PATROL_ZONE:OnPilotDead(EventData) + +
AI_PATROL_ZONE.PatrolAltType + +
AI_PATROL_ZONE.PatrolCeilingAltitude +

The highest altitude in meters where to execute the patrol.

+
AI_PATROL_ZONE.PatrolDamageTreshold + +
AI_PATROL_ZONE.PatrolFloorAltitude +

The lowest altitude in meters where to execute the patrol.

+
AI_PATROL_ZONE.PatrolFuelTresholdPercentage + +
AI_PATROL_ZONE.PatrolManageDamage + +
AI_PATROL_ZONE.PatrolManageFuel + +
AI_PATROL_ZONE.PatrolMaxSpeed +

The maximum speed of the Controllable in km/h.

+
AI_PATROL_ZONE.PatrolMinSpeed +

The minimum speed of the Controllable in km/h.

+
AI_PATROL_ZONE.PatrolOutOfFuelOrbitTime + +
AI_PATROL_ZONE.PatrolZone +

The Zone where the patrol needs to be executed.

+
AI_PATROL_ZONE:RTB() +

Synchronous Event Trigger for Event RTB.

+
AI_PATROL_ZONE:Route() +

Synchronous Event Trigger for Event Route.

+
AI_PATROL_ZONE:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude) +

Sets the floor and ceiling altitude of the patrol.

+
AI_PATROL_ZONE:SetDetectionActivated() +

Activate the detection.

+
AI_PATROL_ZONE:SetDetectionDeactivated() +

Deactivate the detection.

+
AI_PATROL_ZONE:SetDetectionInterval(Seconds) +

Set the interval in seconds between each detection executed by the AI.

+
AI_PATROL_ZONE:SetDetectionOff() +

Set the detection off.

+
AI_PATROL_ZONE:SetDetectionOn() +

Set the detection on.

+
AI_PATROL_ZONE:SetDetectionZone(DetectionZone) +

Set the detection zone where the AI is detecting targets.

+
AI_PATROL_ZONE:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed) +

Sets (modifies) the minimum and maximum speed of the patrol.

+
AI_PATROL_ZONE:SetStatusOff() +

Set the status checking off.

+
AI_PATROL_ZONE:Start() +

Synchronous Event Trigger for Event Start.

+
AI_PATROL_ZONE:Status() +

Synchronous Event Trigger for Event Status.

+
AI_PATROL_ZONE:Stop() +

Synchronous Event Trigger for Event Stop.

+
AI_PATROL_ZONE._NewPatrolRoute(AIControllable, self) + +
AI_PATROL_ZONE:__Detect(Delay) +

Asynchronous Event Trigger for Event Detect.

+
AI_PATROL_ZONE:__Detected(Delay) +

Asynchronous Event Trigger for Event Detected.

+
AI_PATROL_ZONE:__RTB(Delay) +

Asynchronous Event Trigger for Event RTB.

+
AI_PATROL_ZONE:__Route(Delay) +

Asynchronous Event Trigger for Event Route.

+
AI_PATROL_ZONE:__Start(Delay) +

Asynchronous Event Trigger for Event Start.

+
AI_PATROL_ZONE:__Status(Delay) +

Asynchronous Event Trigger for Event Status.

+
AI_PATROL_ZONE:__Stop(Delay) +

Asynchronous Event Trigger for Event Stop.

+
AI_PATROL_ZONE:onafterDead() + +
AI_PATROL_ZONE:onafterDetect(Controllable, From, Event, To) + +
AI_PATROL_ZONE:onafterRTB() + +
AI_PATROL_ZONE:onafterRoute(Controllable, From, Event, To) +

Defines a new patrol route using the Process_PatrolZone parameters and settings.

+
AI_PATROL_ZONE:onafterStart(Controllable, From, Event, To) +

Defines a new patrol route using the Process_PatrolZone parameters and settings.

+
AI_PATROL_ZONE:onafterStatus() + +
AI_PATROL_ZONE:onbeforeDetect(Controllable, From, Event, To) + +
AI_PATROL_ZONE:onbeforeStatus() + +
+ +

Global(s)

+
+
+ + #AI_PATROL_ZONE + +AI_PATROL_ZONE + +
+
+ +

1) #AIPATROLZONE class, extends Fsm#FSM_CONTROLLABLE

+ +

The #AIPATROLZONE class implements the core functions to patrol a Zone by an AI Controllable or Group.

+ + + +

Process

+ +

The AIPATROLZONE is assigned a Group and this must be done before the AIPATROLZONE process can be started using the Start event.

+ +

Process

+ +

The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits. +Upon arrival at the 3D point, a new random 3D point will be selected within the patrol zone using the given limits.

+ +

Process

+ +

This cycle will continue.

+ +

Process

+ +

During the patrol, the AI will detect enemy targets, which are reported through the Detected event.

+ +

Process

+ +

-- Note that the enemy is not engaged! To model enemy engagement, either tailor the Detected event, or +use derived AI_ classes to model AI offensive or defensive behaviour.

+ +

Process

+ +

Until a fuel or damage treshold has been reached by the AI, or when the AI is commanded to RTB. +When the fuel treshold has been reached, the airplane will fly towards the nearest friendly airbase and will land.

+ +

Process

+ +

1.1) AIPATROLZONE constructor

+ + + +

1.2) AIPATROLZONE is a FSM

+ +

Process

+ +

1.2.1) AIPATROLZONE States

+ +
    +
  • None ( Group ): The process is not started yet.
  • +
  • Patrolling ( Group ): The AI is patrolling the Patrol Zone.
  • +
  • Returning ( Group ): The AI is returning to Base.
  • +
  • Stopped ( Group ): The process is stopped.
  • +
  • Crashed ( Group ): The AI has crashed or is dead.
  • +
+ +

1.2.2) AIPATROLZONE Events

+ +
    +
  • Start ( Group ): Start the process.
  • +
  • Stop ( Group ): Stop the process.
  • +
  • Route ( Group ): Route the AI to a new random 3D point within the Patrol Zone.
  • +
  • RTB ( Group ): Route the AI to the home base.
  • +
  • Detect ( Group ): The AI is detecting targets.
  • +
  • Detected ( Group ): The AI has detected new targets.
  • +
  • Status ( Group ): The AI is checking status (fuel and damage). When the tresholds have been reached, the AI will RTB.
  • +
+ +

1.3) Set or Get the AI controllable

+ + + +

1.4) Set the Speed and Altitude boundaries of the AI controllable

+ + + +

1.5) Manage the detection process of the AI controllable

+ +

The detection process of the AI controllable can be manipulated. +Detection requires an amount of CPU power, which has an impact on your mission performance. +Only put detection on when absolutely necessary, and the frequency of the detection can also be set.

+ + + +

The detection frequency can be set with AIPATROLZONE.SetDetectionInterval( seconds ), where the amount of seconds specify how much seconds will be waited before the next detection. +Use the method AIPATROLZONE.GetDetectedUnits() to obtain a list of the Units detected by the AI.

+ +

The detection can be filtered to potential targets in a specific zone. +Use the method AIPATROLZONE.SetDetectionZone() to set the zone where targets need to be detected. +Note that when the zone is too far away, or the AI is not heading towards the zone, or the AI is too high, no targets may be detected +according the weather conditions.

+ +

1.6) Manage the "out of fuel" in the AIPATROLZONE

+ +

When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base. +Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. +When the fuel treshold is reached, the AI will continue for a given time its patrol task in orbit, +while a new AI is targetted to the AIPATROLZONE. +Once the time is finished, the old AI will return to the base. +Use the method AIPATROLZONE.ManageFuel() to have this proces in place.

+ +

1.7) Manage "damage" behaviour of the AI in the AIPATROLZONE

+ +

When the AI is damaged, it is required that a new AIControllable is started. However, damage cannon be foreseen early on. +Therefore, when the damage treshold is reached, the AI will return immediately to the home base (RTB). +Use the method AIPATROLZONE.ManageDamage() to have this proces in place.

+ +
+ + +
+
+

Type AI_Patrol

+ +

Type AI_PATROL_ZONE

+ +

AIPATROLZONE class

+ +

Field(s)

+
+
+ + Wrapper.Controllable#CONTROLLABLE + +AI_PATROL_ZONE.AIControllable + +
+
+ +

The Controllable patrolling.

+ +
+
+
+
+ + #boolean + +AI_PATROL_ZONE.CheckStatus + +
+
+ + + +
+
+
+
+ + +AI_PATROL_ZONE:ClearDetectedUnits() + +
+
+ +

Clears the list of Unit#UNITs that were detected by the AI.

+ +
+
+
+
+ + Functional.Spawn#SPAWN + +AI_PATROL_ZONE.CoordTest + +
+
+ + + +
+
+
+
+ + +AI_PATROL_ZONE:Detect() + +
+
+ +

Synchronous Event Trigger for Event Detect.

+ +
+
+
+
+ + #boolean + +AI_PATROL_ZONE.DetectActivated + +
+
+ + + +
+
+
+
+ + + +AI_PATROL_ZONE.DetectInterval + +
+
+ + + +
+
+
+
+ + #boolean + +AI_PATROL_ZONE.DetectOn + +
+
+ + + +
+
+
+
+ + + +AI_PATROL_ZONE.DetectZone + +
+
+ + + +
+
+
+
+ + +AI_PATROL_ZONE:Detected() + +
+
+ +

Synchronous Event Trigger for Event Detected.

+ +
+
+
+
+ + + +AI_PATROL_ZONE.DetectedUnits + +
+
+ + + + +

This table contains the targets detected during patrol.

+ +
+
+
+
+ + +AI_PATROL_ZONE:GetDetectedUnits() + +
+
+ +

Gets a list of Unit#UNITs that were detected by the AI.

+ + +

No filtering is applied, so, ANY detected UNIT can be in this list. +It is up to the mission designer to use the Unit class and methods to filter the targets.

+ +

Return value

+ +

#table: +The list of Unit#UNITs

+ +
+
+
+
+ + +AI_PATROL_ZONE:ManageDamage(PatrolDamageTreshold) + +
+
+ +

When the AI is damaged beyond a certain treshold, it is required that the AI returns to the home base.

+ + +

However, damage cannot be foreseen early on. +Therefore, when the damage treshold is reached, +the AI will return immediately to the home base (RTB). +Note that for groups, the average damage of the complete group will be calculated. +So, in a group of 4 airplanes, 2 lost and 2 with damage 0.2, the damage treshold will be 0.25.

+ +

Parameter

+
    +
  • + +

    #number PatrolDamageTreshold : +The treshold in percentage (between 0 and 1) when the AI is considered to be damaged.

    + +
  • +
+

Return value

+ +

#AIPATROLZONE: +self

+ +
+
+
+
+ + +AI_PATROL_ZONE:ManageFuel(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime) + +
+
+ +

When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.

+ + +

Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated. +When the fuel treshold is reached, the AI will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AIPATROLZONE. +Once the time is finished, the old AI will return to the base.

+ +

Parameters

+
    +
  • + +

    #number PatrolFuelTresholdPercentage : +The treshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel.

    + +
  • +
  • + +

    #number PatrolOutOfFuelOrbitTime : +The amount of seconds the out of fuel AIControllable will orbit before returning to the base.

    + +
  • +
+

Return value

+ +

#AIPATROLZONE: +self

+ +
+
+
+
+ + +AI_PATROL_ZONE:New(PatrolZone, PatrolFloorAltitude, PatrolCeilingAltitude, PatrolMinSpeed, PatrolMaxSpeed, PatrolAltType) + +
+
+ +

Creates a new AIPATROLZONE object

+ +

Parameters

+ +

Return value

+ +

#AIPATROLZONE: +self

+ +

Usage:

+
-- Define a new AI_PATROL_ZONE Object. This PatrolArea will patrol an AIControllable within PatrolZone between 3000 and 6000 meters, with a variying speed between 600 and 900 km/h.
+PatrolZone = ZONE:New( 'PatrolZone' )
+PatrolSpawn = SPAWN:New( 'Patrol Group' )
+PatrolArea = AI_PATROL_ZONE:New( PatrolZone, 3000, 6000, 600, 900 )
+ +
+
+
+
+ + +AI_PATROL_ZONE:OnAfterDetect(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Detect.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:OnAfterDetected(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Detected.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:OnAfterRTB(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event RTB.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:OnAfterRoute(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Route.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:OnAfterStart(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Start.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:OnAfterStatus(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Status.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:OnAfterStop(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Stop.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:OnBeforeDetect(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Detect.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_PATROL_ZONE:OnBeforeDetected(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Detected.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_PATROL_ZONE:OnBeforeRTB(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event RTB.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_PATROL_ZONE:OnBeforeRoute(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Route.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_PATROL_ZONE:OnBeforeStart(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Start.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_PATROL_ZONE:OnBeforeStatus(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Status.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_PATROL_ZONE:OnBeforeStop(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Stop.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_PATROL_ZONE:OnCrash(EventData) + +
+
+ + + +

Parameter

+ +
+
+
+
+ + +AI_PATROL_ZONE:OnEjection(EventData) + +
+
+ + + +

Parameter

+ +
+
+
+
+ + +AI_PATROL_ZONE:OnEnterPatrolling(Controllable, From, Event, To) + +
+
+ +

OnEnter Transition Handler for State Patrolling.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:OnEnterReturning(Controllable, From, Event, To) + +
+
+ +

OnEnter Transition Handler for State Returning.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:OnEnterStopped(Controllable, From, Event, To) + +
+
+ +

OnEnter Transition Handler for State Stopped.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:OnLeavePatrolling(Controllable, From, Event, To) + +
+
+ +

OnLeave Transition Handler for State Patrolling.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_PATROL_ZONE:OnLeaveReturning(Controllable, From, Event, To) + +
+
+ +

OnLeave Transition Handler for State Returning.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_PATROL_ZONE:OnLeaveStopped(Controllable, From, Event, To) + +
+
+ +

OnLeave Transition Handler for State Stopped.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +AI_PATROL_ZONE:OnPilotDead(EventData) + +
+
+ + + +

Parameter

+ +
+
+
+
+ + +AI_PATROL_ZONE.PatrolAltType + +
+
+ + + + +

defafult PatrolAltType to "RADIO" if not specified

+ +
+
+
+
+ + Dcs.DCSTypes#Altitude + +AI_PATROL_ZONE.PatrolCeilingAltitude + +
+
+ +

The highest altitude in meters where to execute the patrol.

+ +
+
+
+
+ + + +AI_PATROL_ZONE.PatrolDamageTreshold + +
+
+ + + +
+
+
+
+ + Dcs.DCSTypes#Altitude + +AI_PATROL_ZONE.PatrolFloorAltitude + +
+
+ +

The lowest altitude in meters where to execute the patrol.

+ +
+
+
+
+ + + +AI_PATROL_ZONE.PatrolFuelTresholdPercentage + +
+
+ + + +
+
+
+
+ + #boolean + +AI_PATROL_ZONE.PatrolManageDamage + +
+
+ + + +
+
+
+
+ + #boolean + +AI_PATROL_ZONE.PatrolManageFuel + +
+
+ + + +
+
+
+
+ + Dcs.DCSTypes#Speed + +AI_PATROL_ZONE.PatrolMaxSpeed + +
+
+ +

The maximum speed of the Controllable in km/h.

+ +
+
+
+
+ + Dcs.DCSTypes#Speed + +AI_PATROL_ZONE.PatrolMinSpeed + +
+
+ +

The minimum speed of the Controllable in km/h.

+ +
+
+
+
+ + + +AI_PATROL_ZONE.PatrolOutOfFuelOrbitTime + +
+
+ + + +
+
+
+
+ + Core.Zone#ZONE_BASE + +AI_PATROL_ZONE.PatrolZone + +
+
+ +

The Zone where the patrol needs to be executed.

+ +
+
+
+
+ + +AI_PATROL_ZONE:RTB() + +
+
+ +

Synchronous Event Trigger for Event RTB.

+ +
+
+
+
+ + +AI_PATROL_ZONE:Route() + +
+
+ +

Synchronous Event Trigger for Event Route.

+ +
+
+
+
+ + +AI_PATROL_ZONE:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude) + +
+
+ +

Sets the floor and ceiling altitude of the patrol.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Altitude PatrolFloorAltitude : +The lowest altitude in meters where to execute the patrol.

    + +
  • +
  • + +

    Dcs.DCSTypes#Altitude PatrolCeilingAltitude : +The highest altitude in meters where to execute the patrol.

    + +
  • +
+

Return value

+ +

#AIPATROLZONE: +self

+ +
+
+
+
+ + +AI_PATROL_ZONE:SetDetectionActivated() + +
+
+ +

Activate the detection.

+ + +

The AI will detect for targets if the Detection is switched On.

+ +

Return value

+ +

#AIPATROLZONE: +self

+ +
+
+
+
+ + +AI_PATROL_ZONE:SetDetectionDeactivated() + +
+
+ +

Deactivate the detection.

+ + +

The AI will NOT detect for targets.

+ +

Return value

+ +

#AIPATROLZONE: +self

+ +
+
+
+
+ + +AI_PATROL_ZONE:SetDetectionInterval(Seconds) + +
+
+ +

Set the interval in seconds between each detection executed by the AI.

+ + +

The list of already detected targets will be kept and updated. +Newly detected targets will be added, but already detected targets that were +not detected in this cycle, will NOT be removed! +The default interval is 30 seconds.

+ +

Parameter

+
    +
  • + +

    #number Seconds : +The interval in seconds.

    + +
  • +
+

Return value

+ +

#AIPATROLZONE: +self

+ +
+
+
+
+ + +AI_PATROL_ZONE:SetDetectionOff() + +
+
+ +

Set the detection off.

+ + +

The AI will NOT detect for targets. +However, the list of already detected targets will be kept and can be enquired!

+ +

Return value

+ +

#AIPATROLZONE: +self

+ +
+
+
+
+ + +AI_PATROL_ZONE:SetDetectionOn() + +
+
+ +

Set the detection on.

+ + +

The AI will detect for targets.

+ +

Return value

+ +

#AIPATROLZONE: +self

+ +
+
+
+
+ + +AI_PATROL_ZONE:SetDetectionZone(DetectionZone) + +
+
+ +

Set the detection zone where the AI is detecting targets.

+ +

Parameter

+
    +
  • + +

    Core.Zone#ZONE DetectionZone : +The zone where to detect targets.

    + +
  • +
+

Return value

+ +

#AIPATROLZONE: +self

+ +
+
+
+
+ + +AI_PATROL_ZONE:SetSpeed(PatrolMinSpeed, PatrolMaxSpeed) + +
+
+ +

Sets (modifies) the minimum and maximum speed of the patrol.

+ +

Parameters

+ +

Return value

+ +

#AIPATROLZONE: +self

+ +
+
+
+
+ + +AI_PATROL_ZONE:SetStatusOff() + +
+
+ +

Set the status checking off.

+ +

Return value

+ +

#AIPATROLZONE: +self

+ +
+
+
+
+ + +AI_PATROL_ZONE:Start() + +
+
+ +

Synchronous Event Trigger for Event Start.

+ +
+
+
+
+ + +AI_PATROL_ZONE:Status() + +
+
+ +

Synchronous Event Trigger for Event Status.

+ +
+
+
+
+ + +AI_PATROL_ZONE:Stop() + +
+
+ +

Synchronous Event Trigger for Event Stop.

+ +
+
+
+
+ + +AI_PATROL_ZONE._NewPatrolRoute(AIControllable, self) + +
+
+ + + +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE AIControllable : +This statis method is called from the route path within the last task at the last waaypoint of the Controllable. +Note that this method is required, as triggers the next route when patrolling for the Controllable.

    + +
  • +
  • + +

    self :

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:__Detect(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Detect.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:__Detected(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Detected.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:__RTB(Delay) + +
+
+ +

Asynchronous Event Trigger for Event RTB.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:__Route(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Route.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:__Start(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Start.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:__Status(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Status.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:__Stop(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Stop.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:onafterDead() + +
+
+ + + +
+
+
+
+ + +AI_PATROL_ZONE:onafterDetect(Controllable, From, Event, To) + +
+
+ + + +

Parameters

+
    +
  • + +

    Controllable :

    + +
  • +
  • + +

    From :

    + +
  • +
  • + +

    Event :

    + +
  • +
  • + +

    To :

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:onafterRTB() + +
+
+ + + +
+
+
+
+ + +AI_PATROL_ZONE:onafterRoute(Controllable, From, Event, To) + +
+
+ +

Defines a new patrol route using the Process_PatrolZone parameters and settings.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:onafterStart(Controllable, From, Event, To) + +
+
+ +

Defines a new patrol route using the Process_PatrolZone parameters and settings.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#AIPATROLZONE: +self

+ +
+
+
+
+ + +AI_PATROL_ZONE:onafterStatus() + +
+
+ + + +
+
+
+
+ + +AI_PATROL_ZONE:onbeforeDetect(Controllable, From, Event, To) + +
+
+ + + +

Parameters

+
    +
  • + +

    Controllable :

    + +
  • +
  • + +

    From :

    + +
  • +
  • + +

    Event :

    + +
  • +
  • + +

    To :

    + +
  • +
+
+
+
+
+ + +AI_PATROL_ZONE:onbeforeStatus() + +
+
+ + + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Account.html b/docs/Documentation/Account.html new file mode 100644 index 000000000..134b635fa --- /dev/null +++ b/docs/Documentation/Account.html @@ -0,0 +1,849 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Account

+ +

Actions - ACTACCOUNT classes account for (detect, count & report) various DCS events occuring on Units.

+ + + +

Banner Image

+ +
+ + +

Global(s)

+ + + + + + + + + +
ACT_ACCOUNT + +
ACT_ACCOUNT_DEADS + +
+

Type ACT_ACCOUNT

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ACT_ACCOUNT.ClassName + +
ACT_ACCOUNT.DisplayCount + +
ACT_ACCOUNT:New() +

Creates a new DESTROY process.

+
ACT_ACCOUNT.TargetSetUnit + +
ACT_ACCOUNT:onafterEvent(ProcessUnit, Event, From, To) +

StateMachine callback function

+
ACT_ACCOUNT:onafterStart(ProcessUnit, Event, From, To) +

StateMachine callback function

+
ACT_ACCOUNT:onenterWaiting(ProcessUnit, Event, From, To) +

StateMachine callback function

+
+ +

Type ACT_ACCOUNT_DEADS

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ACT_ACCOUNT_DEADS.ClassName + +
ACT_ACCOUNT_DEADS.DisplayCategory + +
ACT_ACCOUNT_DEADS.DisplayCount + +
ACT_ACCOUNT_DEADS.DisplayInterval + +
ACT_ACCOUNT_DEADS.DisplayMessage + +
ACT_ACCOUNT_DEADS.DisplayTime + +
ACT_ACCOUNT_DEADS:Init(FsmAccount) + +
ACT_ACCOUNT_DEADS:New(TargetSetUnit, TaskName) +

Creates a new DESTROY process.

+
ACT_ACCOUNT_DEADS.TargetSetUnit + +
ACT_ACCOUNT_DEADS.TaskName + +
ACT_ACCOUNT_DEADS:onafterEvent(ProcessUnit, Event, From, To, Task) +

StateMachine callback function

+
ACT_ACCOUNT_DEADS:onenterAccount(ProcessUnit, Event, From, To, Task, EventData) +

StateMachine callback function

+
ACT_ACCOUNT_DEADS:onenterReport(ProcessUnit, Event, From, To, Task) +

StateMachine callback function

+
ACT_ACCOUNT_DEADS:onfuncEventDead(EventData) + +
+ +

Global(s)

+
+
+ + #ACT_ACCOUNT + +ACT_ACCOUNT + +
+
+ + + +
+
+
+
+ + #ACT_ACCOUNT_DEADS + +ACT_ACCOUNT_DEADS + +
+
+ + + +
+
+

Type Account

+ +

Type ACT_ACCOUNT

+ +

#ACT_ACCOUNT FSM class, extends Fsm#FSM_PROCESS

+ +

ACT_ACCOUNT state machine:

+ +

This class is a state machine: it manages a process that is triggered by events causing state transitions to occur.

+ + +

All derived classes from this class will start with the class name, followed by a _. See the relevant derived class descriptions below. +Each derived class follows exactly the same process, using the same events and following the same state transitions, +but will have different implementation behaviour upon each event or state transition.

+ +

ACT_ACCOUNT States

+ +
    +
  • Asigned: The player is assigned.
  • +
  • Waiting: Waiting for an event.
  • +
  • Report: Reporting.
  • +
  • Account: Account for an event.
  • +
  • Accounted: All events have been accounted for, end of the process.
  • +
  • Failed: Failed the process.
  • +
+ +

ACT_ACCOUNT Events

+ +
    +
  • Start: Start the process.
  • +
  • Wait: Wait for an event.
  • +
  • Report: Report the status of the accounting.
  • +
  • Event: An event happened, process the event.
  • +
  • More: More targets.
  • +
  • NoMore (*): No more targets.
  • +
  • Fail (*): The action process has failed.
  • +
+ +

(*) End states of the process.

+ +

ACT_ACCOUNT state transition methods:

+ +

State transition functions can be set by the mission designer customizing or improving the behaviour of the state. +There are 2 moments when state transition methods will be called by the state machine:

+ +
    +
  • Before the state transition. + The state transition method needs to start with the name OnBefore + the name of the state. + If the state transition method returns false, then the processing of the state transition will not be done! + If you want to change the behaviour of the AIControllable at this event, return false, + but then you'll need to specify your own logic using the AIControllable!

  • +
  • After the state transition. + The state transition method needs to start with the name OnAfter + the name of the state. + These state transition methods need to provide a return value, which is specified at the function description.

    +
  • +
+ +

Field(s)

+
+
+ + #string + +ACT_ACCOUNT.ClassName + +
+
+ + + +
+
+
+
+ + #number + +ACT_ACCOUNT.DisplayCount + +
+
+ + + +
+
+
+
+ + +ACT_ACCOUNT:New() + +
+
+ +

Creates a new DESTROY process.

+ +

Return value

+ +

#ACT_ACCOUNT:

+ + +
+
+
+
+ + Set#SET_UNIT + +ACT_ACCOUNT.TargetSetUnit + +
+
+ + + +
+
+
+
+ + +ACT_ACCOUNT:onafterEvent(ProcessUnit, Event, From, To) + +
+
+ +

StateMachine callback function

+ +

Parameters

+ +
+
+
+
+ + +ACT_ACCOUNT:onafterStart(ProcessUnit, Event, From, To) + +
+
+ +

StateMachine callback function

+ +

Parameters

+ +
+
+
+
+ + +ACT_ACCOUNT:onenterWaiting(ProcessUnit, Event, From, To) + +
+
+ +

StateMachine callback function

+ +

Parameters

+ +
+
+ +

Type ACT_ACCOUNT_DEADS

+ +

#ACTACCOUNTDEADS FSM class, extends Fsm.Account#ACT_ACCOUNT

+ +

The ACTACCOUNTDEADS class accounts (detects, counts and reports) successful kills of DCS units.

+ + +

The process is given a Set of units that will be tracked upon successful destruction. +The process will end after each target has been successfully destroyed. +Each successful dead will trigger an Account state transition that can be scored, modified or administered.

+ + +

ACTACCOUNTDEADS constructor:

+ + + +

Field(s)

+
+
+ + #string + +ACT_ACCOUNT_DEADS.ClassName + +
+
+ + + +
+
+
+
+ + #string + +ACT_ACCOUNT_DEADS.DisplayCategory + +
+
+ + + + +

Targets is the default display category

+ +
+
+
+
+ + #number + +ACT_ACCOUNT_DEADS.DisplayCount + +
+
+ + + +
+
+
+
+ + #number + +ACT_ACCOUNT_DEADS.DisplayInterval + +
+
+ + + +
+
+
+
+ + #boolean + +ACT_ACCOUNT_DEADS.DisplayMessage + +
+
+ + + +
+
+
+
+ + #number + +ACT_ACCOUNT_DEADS.DisplayTime + +
+
+ + + + +

10 seconds is the default

+ +
+
+
+
+ + +ACT_ACCOUNT_DEADS:Init(FsmAccount) + +
+
+ + + +

Parameter

+
    +
  • + +

    FsmAccount :

    + +
  • +
+
+
+
+
+ + +ACT_ACCOUNT_DEADS:New(TargetSetUnit, TaskName) + +
+
+ +

Creates a new DESTROY process.

+ +

Parameters

+
    +
  • + +

    Set#SET_UNIT TargetSetUnit :

    + +
  • +
  • + +

    #string TaskName :

    + +
  • +
+
+
+
+
+ + Set#SET_UNIT + +ACT_ACCOUNT_DEADS.TargetSetUnit + +
+
+ + + +
+
+
+
+ + + +ACT_ACCOUNT_DEADS.TaskName + +
+
+ + + +
+
+
+
+ + +ACT_ACCOUNT_DEADS:onafterEvent(ProcessUnit, Event, From, To, Task) + +
+
+ +

StateMachine callback function

+ +

Parameters

+ +
+
+
+
+ + +ACT_ACCOUNT_DEADS:onenterAccount(ProcessUnit, Event, From, To, Task, EventData) + +
+
+ +

StateMachine callback function

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE ProcessUnit :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    Task :

    + +
  • +
  • + +

    EventData :

    + +
  • +
+
+
+
+
+ + +ACT_ACCOUNT_DEADS:onenterReport(ProcessUnit, Event, From, To, Task) + +
+
+ +

StateMachine callback function

+ +

Parameters

+ +
+
+
+
+ + +ACT_ACCOUNT_DEADS:onfuncEventDead(EventData) + +
+
+ + + +

Parameter

+ +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Airbase.html b/docs/Documentation/Airbase.html new file mode 100644 index 000000000..b08e91ce6 --- /dev/null +++ b/docs/Documentation/Airbase.html @@ -0,0 +1,339 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Airbase

+ +

This module contains the AIRBASE classes.

+ + + +
+ +

1) Airbase#AIRBASE class, extends Positionable#POSITIONABLE

+

The AIRBASE class is a wrapper class to handle the DCS Airbase objects:

+ +
    +
  • Support all DCS Airbase APIs.
  • +
  • Enhance with Airbase specific APIs not in the DCS Airbase API set.
  • +
+ + +

1.1) AIRBASE reference methods

+

For each DCS Airbase object alive within a running mission, a AIRBASE wrapper object (instance) will be created within the _DATABASE object. +This is done at the beginning of the mission (when the mission starts).

+ +

The AIRBASE class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference +using the DCS Airbase or the DCS AirbaseName.

+ +

Another thing to know is that AIRBASE objects do not "contain" the DCS Airbase object. +The AIRBASE methods will reference the DCS Airbase object by name when it is needed during API execution. +If the DCS Airbase object does not exist or is nil, the AIRBASE methods will return nil and log an exception in the DCS.log file.

+ +

The AIRBASE class provides the following functions to retrieve quickly the relevant AIRBASE instance:

+ +
    +
  • AIRBASE.Find(): Find a AIRBASE instance from the _DATABASE object using a DCS Airbase object.
  • +
  • AIRBASE.FindByName(): Find a AIRBASE instance from the _DATABASE object using a DCS Airbase name.
  • +
+ +

IMPORTANT: ONE SHOULD NEVER SANATIZE these AIRBASE OBJECT REFERENCES! (make the AIRBASE object references nil).

+ +

1.2) DCS AIRBASE APIs

+

The DCS Airbase APIs are used extensively within MOOSE. The AIRBASE class has for each DCS Airbase API a corresponding method. +To be able to distinguish easily in your code the difference between a AIRBASE API call and a DCS Airbase API call, +the first letter of the method is also capitalized. So, by example, the DCS Airbase method DCSWrapper.Airbase#Airbase.getName() +is implemented in the AIRBASE class as AIRBASE.GetName().

+ +

More functions will be added

+

During the MOOSE development, more functions will be added.

+ + +

Global(s)

+ + + + + +
AIRBASE + +
+

Type AIRBASE

+ + + + + + + + + + + + + + + + + + + + + + + + + +
AIRBASE.CategoryName + +
AIRBASE.ClassName + +
AIRBASE:Find(DCSAirbase) +

Finds a AIRBASE from the _DATABASE using a DCSAirbase object.

+
AIRBASE:FindByName(AirbaseName) +

Find a AIRBASE in the _DATABASE using the name of an existing DCS Airbase.

+
AIRBASE:GetDCSObject() + +
AIRBASE:Register(AirbaseName) +

Create a new AIRBASE from DCSAirbase.

+
+ +

Global(s)

+
+
+ + #AIRBASE + +AIRBASE + +
+
+ + + +
+
+

Type Airbase

+ +

Type AIRBASE

+ +

The AIRBASE class

+ +

Field(s)

+
+
+ + + +AIRBASE.CategoryName + +
+
+ + + +
+
+
+
+ + #string + +AIRBASE.ClassName + +
+
+ + + +
+
+
+
+ + +AIRBASE:Find(DCSAirbase) + +
+
+ +

Finds a AIRBASE from the _DATABASE using a DCSAirbase object.

+ +

Parameter

+ +

Return value

+ +

Wrapper.Airbase#AIRBASE: +self

+ +
+
+
+
+ + +AIRBASE:FindByName(AirbaseName) + +
+
+ +

Find a AIRBASE in the _DATABASE using the name of an existing DCS Airbase.

+ +

Parameter

+
    +
  • + +

    #string AirbaseName : +The Airbase Name.

    + +
  • +
+

Return value

+ +

Wrapper.Airbase#AIRBASE: +self

+ +
+
+
+
+ + +AIRBASE:GetDCSObject() + +
+
+ + + +
+
+
+
+ + +AIRBASE:Register(AirbaseName) + +
+
+ +

Create a new AIRBASE from DCSAirbase.

+ +

Parameter

+
    +
  • + +

    #string AirbaseName : +The name of the airbase.

    + +
  • +
+

Return value

+ +

Wrapper.Airbase#AIRBASE:

+ + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/AirbasePolice.html b/docs/Documentation/AirbasePolice.html new file mode 100644 index 000000000..698da3ed6 --- /dev/null +++ b/docs/Documentation/AirbasePolice.html @@ -0,0 +1,378 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module AirbasePolice

+ +

This module contains the AIRBASEPOLICE classes.

+ + + +
+ +

1) AirbasePolice#AIRBASEPOLICE_BASE class, extends Base#BASE

+

The AirbasePolice#AIRBASEPOLICE_BASE class provides the main methods to monitor CLIENT behaviour at airbases. +CLIENTS should not be allowed to:

+ +
    +
  • Don't taxi faster than 40 km/h.
  • +
  • Don't take-off on taxiways.
  • +
  • Avoid to hit other planes on the airbase.
  • +
  • Obey ground control orders.
  • +
+ +

2) AirbasePolice#AIRBASEPOLICE_CAUCASUS class, extends AirbasePolice#AIRBASEPOLICE_BASE

+

All the airbases on the caucasus map can be monitored using this class. +If you want to monitor specific airbases, you need to use the AIRBASEPOLICE_BASE.Monitor() method, which takes a table or airbase names. +The following names can be given: + * AnapaVityazevo + * Batumi + * Beslan + * Gelendzhik + * Gudauta + * Kobuleti + * KrasnodarCenter + * KrasnodarPashkovsky + * Krymsk + * Kutaisi + * MaykopKhanskaya + * MineralnyeVody + * Mozdok + * Nalchik + * Novorossiysk + * SenakiKolkhi + * SochiAdler + * Soganlug + * SukhumiBabushara + * TbilisiLochini + * Vaziani

+ +

3) AirbasePolice#AIRBASEPOLICE_NEVADA class, extends AirbasePolice#AIRBASEPOLICE_BASE

+

All the airbases on the NEVADA map can be monitored using this class. +If you want to monitor specific airbases, you need to use the AIRBASEPOLICE_BASE.Monitor() method, which takes a table or airbase names. +The following names can be given: + * Nellis + * McCarran + * Creech + * Groom Lake

+ +

Contributions: Dutch Baron - Concept & Testing

+

Author: FlightControl - Framework Design & Programming

+ + +

Global(s)

+ + + + + + + + + + + + + +
AIRBASEPOLICE_BASE + +
AIRBASEPOLICE_CAUCASUS + +
AIRBASEPOLICE_NEVADA + +
+

Type AIRBASEPOLICE_BASE

+ + + + + + + + + +
AIRBASEPOLICE_BASE.AirbaseNames + +
AIRBASEPOLICE_BASE.SetClient + +
+ +

Type AIRBASEPOLICE_CAUCASUS

+ + + + + +
AIRBASEPOLICE_CAUCASUS.SetClient + +
+ +

Type AIRBASEPOLICE_NEVADA

+ + + + + + + + + + + + + +
AIRBASEPOLICE_NEVADA.Airbases + +
AIRBASEPOLICE_NEVADA.ClassName + +
AIRBASEPOLICE_NEVADA:New(SetClient) +

Creates a new AIRBASEPOLICE_NEVADA object.

+
+ +

Global(s)

+
+
+ + + +AIRBASEPOLICE_BASE + +
+
+ + + +
+
+
+
+ + + +AIRBASEPOLICE_CAUCASUS + +
+
+ + + +
+
+
+
+ + #AIRBASEPOLICE_NEVADA + +AIRBASEPOLICE_NEVADA + +
+
+ + + +
+
+

Type AirbasePolice

+ +

Type AIRBASEPOLICE_BASE

+

Field(s)

+
+
+ + + +AIRBASEPOLICE_BASE.AirbaseNames + +
+
+ + + +
+
+
+
+ + Core.Set#SET_CLIENT + +AIRBASEPOLICE_BASE.SetClient + +
+
+ + + +
+
+ +

Type AIRBASEPOLICE_BASE.AirbaseNames

+ +

Type AIRBASEPOLICE_CAUCASUS

+

Field(s)

+
+
+ + Core.Set#SET_CLIENT + +AIRBASEPOLICE_CAUCASUS.SetClient + +
+
+ + + +
+
+ +

Type AIRBASEPOLICE_NEVADA

+

Field(s)

+
+
+ + + +AIRBASEPOLICE_NEVADA.Airbases + +
+
+ + + +
+
+
+
+ + #string + +AIRBASEPOLICE_NEVADA.ClassName + +
+
+ + + +
+
+
+
+ + +AIRBASEPOLICE_NEVADA:New(SetClient) + +
+
+ +

Creates a new AIRBASEPOLICE_NEVADA object.

+ +

Parameter

+
    +
  • + +

    SetClient : +A SET_CLIENT object that will contain the CLIENT objects to be monitored if they follow the rules of the airbase.

    + +
  • +
+

Return value

+ +

#AIRBASEPOLICE_NEVADA: +self

+ +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Assign.html b/docs/Documentation/Assign.html new file mode 100644 index 000000000..11f0041b7 --- /dev/null +++ b/docs/Documentation/Assign.html @@ -0,0 +1,1045 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Assign

+ +

(SP) (MP) (FSM) Accept or reject process for player (task) assignments.

+ + + +
+ +

#ACT_ASSIGN FSM template class, extends Fsm#FSM_PROCESS

+ +

ACT_ASSIGN state machine:

+ +

This class is a state machine: it manages a process that is triggered by events causing state transitions to occur. +All derived classes from this class will start with the class name, followed by a _. See the relevant derived class descriptions below. +Each derived class follows exactly the same process, using the same events and following the same state transitions, +but will have different implementation behaviour upon each event or state transition.

+ +

ACT_ASSIGN Events:

+ +

These are the events defined in this class:

+ +
    +
  • Start: Start the tasking acceptance process.
  • +
  • Assign: Assign the task.
  • +
  • Reject: Reject the task..
  • +
+ +

ACT_ASSIGN Event methods:

+ +

Event methods are available (dynamically allocated by the state machine), that accomodate for state transitions occurring in the process. +There are two types of event methods, which you can use to influence the normal mechanisms in the state machine:

+ +
    +
  • Immediate: The event method has exactly the name of the event.
  • +
  • Delayed: The event method starts with a __ + the name of the event. The first parameter of the event method is a number value, expressing the delay in seconds when the event will be executed.
  • +
+ +

ACT_ASSIGN States:

+ +
    +
  • UnAssigned: The player has not accepted the task.
  • +
  • Assigned (*): The player has accepted the task.
  • +
  • Rejected (*): The player has not accepted the task.
  • +
  • Waiting: The process is awaiting player feedback.
  • +
  • Failed (*): The process has failed.
  • +
+ +

(*) End states of the process.

+ +

ACT_ASSIGN state transition methods:

+ +

State transition functions can be set by the mission designer customizing or improving the behaviour of the state. +There are 2 moments when state transition methods will be called by the state machine:

+ +
    +
  • Before the state transition. + The state transition method needs to start with the name OnBefore + the name of the state. + If the state transition method returns false, then the processing of the state transition will not be done! + If you want to change the behaviour of the AIControllable at this event, return false, + but then you'll need to specify your own logic using the AIControllable!

  • +
  • After the state transition. + The state transition method needs to start with the name OnAfter + the name of the state. + These state transition methods need to provide a return value, which is specified at the function description.

  • +
+ +
+ +

1) #ACTASSIGNACCEPT class, extends Fsm.Assign#ACT_ASSIGN

+ +

The ACTASSIGNACCEPT class accepts by default a task for a player. No player intervention is allowed to reject the task.

+ +

1.1) ACTASSIGNACCEPT constructor:

+ + + +
+ +

2) #ACTASSIGNMENU_ACCEPT class, extends Fsm.Assign#ACT_ASSIGN

+ +

The ACTASSIGNMENU_ACCEPT class accepts a task when the player accepts the task through an added menu option. +This assignment type is useful to conditionally allow the player to choose whether or not he would accept the task. +The assignment type also allows to reject the task.

+ +

2.1) ACTASSIGNMENU_ACCEPT constructor:

+
+ + + +
+ + +

Global(s)

+ + + + + + + + + + + + + +
ACT_ASSIGN + +
ACT_ASSIGN_ACCEPT + +
ACT_ASSIGN_MENU_ACCEPT + +
+

Type ACT_ASSIGN

+ + + + + + + + + + + + + + + + + + + + + +
ACT_ASSIGN.ClassName + +
ACT_ASSIGN:New() +

Creates a new task assignment state machine.

+
ACT_ASSIGN.ProcessUnit + +
ACT_ASSIGN.TargetZone + +
ACT_ASSIGN.Task + +
+ +

Type ACT_ASSIGN_ACCEPT

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ACT_ASSIGN_ACCEPT.ClassName + +
ACT_ASSIGN_ACCEPT:Init(FsmAssign) + +
ACT_ASSIGN_ACCEPT:New(TaskBriefing) +

Creates a new task assignment state machine.

+
ACT_ASSIGN_ACCEPT.ProcessUnit + +
ACT_ASSIGN_ACCEPT.TargetZone + +
ACT_ASSIGN_ACCEPT.Task + +
ACT_ASSIGN_ACCEPT.TaskBriefing + +
ACT_ASSIGN_ACCEPT:onafterStart(ProcessUnit, Event, From, To) +

StateMachine callback function

+
ACT_ASSIGN_ACCEPT:onenterAssigned(ProcessUnit, Event, From, To) +

StateMachine callback function

+
+ +

Type ACT_ASSIGN_MENU_ACCEPT

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ACT_ASSIGN_MENU_ACCEPT.ClassName + +
ACT_ASSIGN_MENU_ACCEPT:Init(FsmAssign) + +
ACT_ASSIGN_MENU_ACCEPT.Menu + +
ACT_ASSIGN_MENU_ACCEPT.MenuAcceptTask + +
ACT_ASSIGN_MENU_ACCEPT:MenuAssign() +

Menu function.

+
ACT_ASSIGN_MENU_ACCEPT:MenuReject() +

Menu function.

+
ACT_ASSIGN_MENU_ACCEPT.MenuRejectTask + +
ACT_ASSIGN_MENU_ACCEPT:New(TaskName, TaskBriefing) +

Init.

+
ACT_ASSIGN_MENU_ACCEPT.ProcessUnit + +
ACT_ASSIGN_MENU_ACCEPT.TargetZone + +
ACT_ASSIGN_MENU_ACCEPT.Task + +
ACT_ASSIGN_MENU_ACCEPT.TaskBriefing + +
ACT_ASSIGN_MENU_ACCEPT.TaskName + +
ACT_ASSIGN_MENU_ACCEPT:onafterAssign(ProcessUnit, Event, From, To) +

StateMachine callback function

+
ACT_ASSIGN_MENU_ACCEPT:onafterReject(ProcessUnit, Event, From, To) +

StateMachine callback function

+
ACT_ASSIGN_MENU_ACCEPT:onafterStart(ProcessUnit, Event, From, To) +

StateMachine callback function

+
+ +

Global(s)

+
+
+ + #ACT_ASSIGN + +ACT_ASSIGN + +
+
+ + + +
+
+
+
+ + #ACT_ASSIGN_ACCEPT + +ACT_ASSIGN_ACCEPT + +
+
+ + + +
+
+
+
+ + #ACT_ASSIGN_MENU_ACCEPT + +ACT_ASSIGN_MENU_ACCEPT + +
+
+ + + +
+
+

Type Assign

+ +

Type ACT_ASSIGN

+ +

ACT_ASSIGN class

+ +

Field(s)

+
+
+ + #string + +ACT_ASSIGN.ClassName + +
+
+ + + +
+
+
+
+ + +ACT_ASSIGN:New() + +
+
+ +

Creates a new task assignment state machine.

+ + +

The process will accept the task by default, no player intervention accepted.

+ +

Return value

+ +

#ACT_ASSIGN: +The task acceptance process.

+ +
+
+
+
+ + Wrapper.Unit#UNIT + +ACT_ASSIGN.ProcessUnit + +
+
+ + + +
+
+
+
+ + Core.Zone#ZONE_BASE + +ACT_ASSIGN.TargetZone + +
+
+ + + +
+
+
+
+ + Tasking.Task#TASK + +ACT_ASSIGN.Task + +
+
+ + + +
+
+ +

Type ACT_ASSIGN_ACCEPT

+ +

ACTASSIGNACCEPT class

+ +

Field(s)

+
+
+ + #string + +ACT_ASSIGN_ACCEPT.ClassName + +
+
+ + + +
+
+
+
+ + +ACT_ASSIGN_ACCEPT:Init(FsmAssign) + +
+
+ + + +

Parameter

+
    +
  • + +

    FsmAssign :

    + +
  • +
+
+
+
+
+ + +ACT_ASSIGN_ACCEPT:New(TaskBriefing) + +
+
+ +

Creates a new task assignment state machine.

+ + +

The process will accept the task by default, no player intervention accepted.

+ +

Parameter

+
    +
  • + +

    #string TaskBriefing :

    + +
  • +
+
+
+
+
+ + Wrapper.Unit#UNIT + +ACT_ASSIGN_ACCEPT.ProcessUnit + +
+
+ + + +
+
+
+
+ + Core.Zone#ZONE_BASE + +ACT_ASSIGN_ACCEPT.TargetZone + +
+
+ + + +
+
+
+
+ + Tasking.Task#TASK + +ACT_ASSIGN_ACCEPT.Task + +
+
+ + + +
+
+
+
+ + + +ACT_ASSIGN_ACCEPT.TaskBriefing + +
+
+ + + +
+
+
+
+ + +ACT_ASSIGN_ACCEPT:onafterStart(ProcessUnit, Event, From, To) + +
+
+ +

StateMachine callback function

+ +

Parameters

+
    +
  • + +

    Wrapper.Unit#UNIT ProcessUnit :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
+
+
+
+
+ + +ACT_ASSIGN_ACCEPT:onenterAssigned(ProcessUnit, Event, From, To) + +
+
+ +

StateMachine callback function

+ +

Parameters

+
    +
  • + +

    Wrapper.Unit#UNIT ProcessUnit :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
+
+
+ +

Type ACT_ASSIGN_MENU_ACCEPT

+ +

ACTASSIGNMENU_ACCEPT class

+ +

Field(s)

+
+
+ + #string + +ACT_ASSIGN_MENU_ACCEPT.ClassName + +
+
+ + + +
+
+
+
+ + +ACT_ASSIGN_MENU_ACCEPT:Init(FsmAssign) + +
+
+ + + +

Parameter

+
    +
  • + +

    FsmAssign :

    + +
  • +
+
+
+
+
+ + + +ACT_ASSIGN_MENU_ACCEPT.Menu + +
+
+ + + +
+
+
+
+ + + +ACT_ASSIGN_MENU_ACCEPT.MenuAcceptTask + +
+
+ + + +
+
+
+
+ + +ACT_ASSIGN_MENU_ACCEPT:MenuAssign() + +
+
+ +

Menu function.

+ +
+
+
+
+ + +ACT_ASSIGN_MENU_ACCEPT:MenuReject() + +
+
+ +

Menu function.

+ +
+
+
+
+ + + +ACT_ASSIGN_MENU_ACCEPT.MenuRejectTask + +
+
+ + + +
+
+
+
+ + +ACT_ASSIGN_MENU_ACCEPT:New(TaskName, TaskBriefing) + +
+
+ +

Init.

+ +

Parameters

+
    +
  • + +

    #string TaskName :

    + +
  • +
  • + +

    #string TaskBriefing :

    + +
  • +
+

Return value

+ +

#ACTASSIGNMENU_ACCEPT: +self

+ +
+
+
+
+ + Wrapper.Unit#UNIT + +ACT_ASSIGN_MENU_ACCEPT.ProcessUnit + +
+
+ + + +
+
+
+
+ + Core.Zone#ZONE_BASE + +ACT_ASSIGN_MENU_ACCEPT.TargetZone + +
+
+ + + +
+
+
+
+ + Tasking.Task#TASK + +ACT_ASSIGN_MENU_ACCEPT.Task + +
+
+ + + +
+
+
+
+ + + +ACT_ASSIGN_MENU_ACCEPT.TaskBriefing + +
+
+ + + +
+
+
+
+ + + +ACT_ASSIGN_MENU_ACCEPT.TaskName + +
+
+ + + +
+
+
+
+ + +ACT_ASSIGN_MENU_ACCEPT:onafterAssign(ProcessUnit, Event, From, To) + +
+
+ +

StateMachine callback function

+ +

Parameters

+ +
+
+
+
+ + +ACT_ASSIGN_MENU_ACCEPT:onafterReject(ProcessUnit, Event, From, To) + +
+
+ +

StateMachine callback function

+ +

Parameters

+ +
+
+
+
+ + +ACT_ASSIGN_MENU_ACCEPT:onafterStart(ProcessUnit, Event, From, To) + +
+
+ +

StateMachine callback function

+ +

Parameters

+ +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Base.html b/docs/Documentation/Base.html new file mode 100644 index 000000000..7e2d36e6d --- /dev/null +++ b/docs/Documentation/Base.html @@ -0,0 +1,2292 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Base

+ +

Core - BASE forms the basis of the MOOSE framework.

+ + +

Each class within the MOOSE framework derives from BASE.

+ +

Banner Image

+ +
+ +

The #BASE class is the core root class from where every other class in moose is derived.

+ +
+ +

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

YYYY-MM-DD: CLASS:NewFunction( Params ) replaces CLASS:OldFunction( Params ) +YYYY-MM-DD: CLASS:NewFunction( Params ) added

+ +

Hereby the change log:

+ +
+ +

AUTHORS and CONTRIBUTIONS

+ +

Contributions:

+ +
    +
  • None.
  • +
+ +

Authors:

+ +
    +
  • FlightControl: Design & Programming
  • +
+ + +

Global(s)

+ + + + + + + + + +
BASE +

1) #BASE class

+ +

All classes within the MOOSE framework are derived from the BASE class.

+
FORMATION + +
+

Type BASE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BASE.ClassID +

The ID number of the class.

+
BASE.ClassName +

The name of the class.

+
BASE.ClassNameAndID +

The name of the class concatenated with the ID number of the class.

+
BASE:ClearState(Object, StateName) + +
BASE:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) +

Creation of a Birth Event.

+
BASE:CreateEventCrash(EventTime, Initiator) +

Creation of a Crash Event.

+
BASE:E(Arguments) +

Log an exception which will be traced always.

+
BASE:EventDispatcher() +

Returns the event dispatcher

+
BASE:EventRemoveAll() +

Remove all subscribed events

+
BASE:F(Arguments) +

Trace a function call.

+
BASE:F2(Arguments) +

Trace a function call level 2.

+
BASE:F3(Arguments) +

Trace a function call level 3.

+
BASE:GetClassID() +

Get the ClassID of the class instance.

+
BASE:GetClassName() +

Get the ClassName of the class instance.

+
BASE:GetClassNameAndID() +

Get the ClassName + ClassID of the class instance.

+
BASE:GetEventPriority() +

Get the Class Event processing Priority.

+
BASE:GetParent(Child) +

This is the worker method to retrieve the Parent class.

+
BASE:GetState(Object, Key, Value) +

Get a Value given a Key from the Object.

+
BASE:HandleEvent(Event, EventFunction) +

Subscribe to a DCS Event.

+
BASE:Inherit(Child, Parent) +

This is the worker method to inherit from a parent class.

+
BASE:IsTrace() +

Enquires if tracing is on (for the class).

+
BASE:New() +

BASE constructor.

+
BASE:OnEvent(EventData) +

Occurs when an object is completely destroyed.

+
BASE:OnEventBaseCaptured(EventData) +

Occurs when a ground unit captures either an airbase or a farp.

+
BASE:OnEventBirth(EventData) +

Occurs when any object is spawned into the mission.

+
BASE:OnEventCrash(EventData) +

Occurs when any aircraft crashes into the ground and is completely destroyed.

+
BASE:OnEventEjection(EventData) +

Occurs when a pilot ejects from an aircraft +initiator : The unit that has ejected

+
BASE:OnEventEngineShutdown(EventData) +

Occurs when any aircraft shuts down its engines.

+
BASE:OnEventEngineStartup(EventData) +

Occurs when any aircraft starts its engines.

+
BASE:OnEventHit(EventData) +

Occurs whenever an object is hit by a weapon.

+
BASE:OnEventHumanFailure(EventData) +

Occurs when any system fails on a human controlled aircraft.

+
BASE:OnEventLand(EventData) +

Occurs when an aircraft lands at an airbase, farp or ship +initiator : The unit that has landed +place: Object that the unit landed on.

+
BASE:OnEventMissionEnd(EventData) +

Occurs when a mission ends

+
BASE:OnEventMissionStart(EventData) +

Occurs when a mission starts

+
BASE:OnEventPilotDead(EventData) +

Occurs when the pilot of an aircraft is killed.

+
BASE:OnEventPlayerEnterUnit(EventData) +

Occurs when any player assumes direct control of a unit.

+
BASE:OnEventPlayerLeaveUnit(EventData) +

Occurs when any player relieves control of a unit to the AI.

+
BASE:OnEventRefueling(EventData) +

Occurs when an aircraft connects with a tanker and begins taking on fuel.

+
BASE:OnEventRefuelingStop(EventData) +

Occurs when an aircraft is finished taking fuel.

+
BASE:OnEventShootingEnd(EventData) +

Occurs when any unit stops firing its weapon.

+
BASE:OnEventShootingStart(EventData) +

Occurs when any unit begins firing a weapon that has a high rate of fire.

+
BASE:OnEventShot(EventData) +

Occurs whenever any unit in a mission fires a weapon.

+
BASE:OnEventTakeoff(EventData) +

Occurs when an aircraft takes off from an airbase, farp, or ship.

+
BASE:SetEventPriority(EventPriority) +

Set the Class Event processing Priority.

+
BASE:SetState(Object, Key, Value) +

Set a state or property of the Object given a Key and a Value.

+
BASE:T(Arguments) +

Trace a function logic level 1.

+
BASE:T2(Arguments) +

Trace a function logic level 2.

+
BASE:T3(Arguments) +

Trace a function logic level 3.

+
BASE:TraceAll(TraceAll) +

Trace all methods in MOOSE

+
BASE:TraceClass(Class) +

Set tracing for a class

+
BASE:TraceClassMethod(Class, Method) +

Set tracing for a specific method of class

+
BASE:TraceLevel(Level) +

Set trace level

+
BASE:TraceOnOff(TraceOnOff) +

Set trace on or off +Note that when trace is off, no debug statement is performed, increasing performance! +When Moose is loaded statically, (as one file), tracing is switched off by default.

+
BASE:UnHandleEvent(Event) +

UnSubscribe to a DCS event.

+
BASE:_Destructor() + +
BASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) +

Trace a function call.

+
BASE:_SetDestructor() + +
BASE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) +

Trace a function logic.

+
BASE:onEvent(event) + +
+ +

Type FORMATION

+ + + + + + + + + +
FORMATION.Cone +

A cone formation.

+
FORMATION.Vee + +
+ +

Global(s)

+
+
+ + #BASE + +BASE + +
+
+ +

1) #BASE class

+ +

All classes within the MOOSE framework are derived from the BASE class.

+ + +

+BASE provides facilities for :

+ +
    +
  • The construction and inheritance of MOOSE classes.
  • +
  • The class naming and numbering system.
  • +
  • The class hierarchy search system.
  • +
  • The tracing of information or objects during mission execution for debuggin purposes.
  • +
  • The subscription to DCS events for event handling in MOOSE objects.
  • +
+ +

Note: The BASE class is an abstract class and is not meant to be used directly.

+ +

1.1) BASE constructor

+ +

Any class derived from BASE, will use the Base#BASE.New constructor embedded in the Base#BASE.Inherit method. +See an example at the Base#BASE.New method how this is done.

+ +

1.2) Trace information for debugging

+ +

The BASE class contains trace methods to trace progress within a mission execution of a certain object. +These trace methods are inherited by each MOOSE class interiting BASE, soeach object created from derived class from BASE can use the tracing methods to trace its execution.

+ +

Any type of information can be passed to these tracing methods. See the following examples:

+ +
self:E( "Hello" )
+
+ +

Result in the word "Hello" in the dcs.log.

+ +
local Array = { 1, nil, "h", { "a","b" }, "x" }
+self:E( Array )
+
+ +

Results with the text [1]=1,[3]="h",[4]={[1]="a",[2]="b"},[5]="x"} in the dcs.log.

+ +
local Object1 = "Object1"
+local Object2 = 3
+local Object3 = { Object 1, Object 2 }
+self:E( { Object1, Object2, Object3 } )
+
+ +

Results with the text [1]={[1]="Object",[2]=3,[3]={[1]="Object",[2]=3}} in the dcs.log.

+ +
local SpawnObject = SPAWN:New( "Plane" )
+local GroupObject = GROUP:FindByName( "Group" )
+self:E( { Spawn = SpawnObject, Group = GroupObject } )
+
+ +

Results with the text [1]={Spawn={....),Group={...}} in the dcs.log.

+ +

Below a more detailed explanation of the different method types for tracing.

+ +

1.2.1) Tracing methods categories

+ +

There are basically 3 types of tracing methods available:

+ +
    +
  • BASE.F: Used to trace the entrance of a function and its given parameters. An F is indicated at column 44 in the DCS.log file.
  • +
  • BASE.T: Used to trace further logic within a function giving optional variables or parameters. A T is indicated at column 44 in the DCS.log file.
  • +
  • BASE.E: Used to always trace information giving optional variables or parameters. An E is indicated at column 44 in the DCS.log file.
  • +
+ +

1.2.2) Tracing levels

+ +

There are 3 tracing levels within MOOSE.
+These tracing levels were defined to avoid bulks of tracing to be generated by lots of objects.

+ +

As such, the F and T methods have additional variants to trace level 2 and 3 respectively:

+ +
    +
  • BASE.F2: Trace the beginning of a function and its given parameters with tracing level 2.
  • +
  • BASE.F3: Trace the beginning of a function and its given parameters with tracing level 3.
  • +
  • BASE.T2: Trace further logic within a function giving optional variables or parameters with tracing level 2.
  • +
  • BASE.T3: Trace further logic within a function giving optional variables or parameters with tracing level 3.
  • +
+ +

1.2.3) Trace activation.

+ +

Tracing can be activated in several ways:

+ +
    +
  • Switch tracing on or off through the BASE.TraceOnOff() method.
  • +
  • Activate all tracing through the BASE.TraceAll() method.
  • +
  • Activate only the tracing of a certain class (name) through the BASE.TraceClass() method.
  • +
  • Activate only the tracing of a certain method of a certain class through the BASE.TraceClassMethod() method.
  • +
  • Activate only the tracing of a certain level through the BASE.TraceLevel() method.
  • +
+ +

1.2.4) Check if tracing is on.

+ +

The method BASE.IsTrace() will validate if tracing is activated or not.

+ +

1.3 DCS simulator Event Handling

+ +

The BASE class provides methods to catch DCS Events. These are events that are triggered from within the DCS simulator, +and handled through lua scripting. MOOSE provides an encapsulation to handle these events more efficiently.

+ +

1.3.1 Subscribe / Unsubscribe to DCS Events

+ +

At first, the mission designer will need to Subscribe to a specific DCS event for the class. +So, when the DCS event occurs, the class will be notified of that event. +There are two methods which you use to subscribe to or unsubscribe from an event.

+ + + +

1.3.2 Event Handling of DCS Events

+ +

Once the class is subscribed to the event, an Event Handling method on the object or class needs to be written that will be called +when the DCS event occurs. The Event Handling method receives an Event#EVENTDATA structure, which contains a lot of information +about the event that occurred.

+ +

Find below an example of the prototype how to write an event handling function for two units:

+ +
 local Tank1 = UNIT:FindByName( "Tank A" )
+ local Tank2 = UNIT:FindByName( "Tank B" )
+
+ -- Here we subscribe to the Dead events. So, if one of these tanks dies, the Tank1 or Tank2 objects will be notified.
+ Tank1:HandleEvent( EVENTS.Dead )
+ Tank2:HandleEvent( EVENTS.Dead )
+
+ --- This function is an Event Handling function that will be called when Tank1 is Dead.
+ -- @param Wrapper.Unit#UNIT self 
+ -- @param Core.Event#EVENTDATA EventData
+ function Tank1:OnEventDead( EventData )
+
+   self:SmokeGreen()
+ end
+
+ --- This function is an Event Handling function that will be called when Tank2 is Dead.
+ -- @param Wrapper.Unit#UNIT self 
+ -- @param Core.Event#EVENTDATA EventData
+ function Tank2:OnEventDead( EventData )
+
+   self:SmokeBlue()
+ end
+
+ + + +

See the Event module for more information about event handling.

+ +

1.4) Class identification methods

+ +

BASE provides methods to get more information of each object:

+ +
    +
  • BASE.GetClassID(): Gets the ID (number) of the object. Each object created is assigned a number, that is incremented by one.
  • +
  • BASE.GetClassName(): Gets the name of the object, which is the name of the class the object was instantiated from.
  • +
  • BASE.GetClassNameAndID(): Gets the name and ID of the object.
  • +
+ +

1.5) All objects derived from BASE can have "States"

+ +

A mechanism is in place in MOOSE, that allows to let the objects administer states.
+States are essentially properties of objects, which are identified by a Key and a Value.

+ +

The method BASE.SetState() can be used to set a Value with a reference Key to the object.
+To read or retrieve a state Value based on a Key, use the BASE.GetState method.

+ +

These two methods provide a very handy way to keep state at long lasting processes. +Values can be stored within the objects, and later retrieved or changed when needed. +There is one other important thing to note, the BASE.SetState() and BASE.GetState methods +receive as the first parameter the object for which the state needs to be set. +Thus, if the state is to be set for the same object as the object for which the method is used, then provide the same +object name to the method.

+ +

1.10) Inheritance

+ +

The following methods are available to implement inheritance

+ +
    +
  • BASE.Inherit: Inherits from a class.
  • +
  • BASE.GetParent: Returns the parent object from the object it is handling, or nil if there is no parent object.
  • +
+ +
+ + +
+
+
+
+ + #FORMATION + +FORMATION + +
+
+ + + +
+
+

Type Base

+ +

Type BASE

+

Field(s)

+
+
+ + +BASE.ClassID + +
+
+ +

The ID number of the class.

+ +
+
+
+
+ + +BASE.ClassName + +
+
+ +

The name of the class.

+ +
+
+
+
+ + +BASE.ClassNameAndID + +
+
+ +

The name of the class concatenated with the ID number of the class.

+ +
+
+
+
+ + +BASE:ClearState(Object, StateName) + +
+
+ + + +

Parameters

+
    +
  • + +

    Object :

    + +
  • +
  • + +

    StateName :

    + +
  • +
+
+
+
+
+ + +BASE:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) + +
+
+ +

Creation of a Birth Event.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Time EventTime : +The time stamp of the event.

    + +
  • +
  • + +

    Dcs.DCSWrapper.Object#Object Initiator : +The initiating object of the event.

    + +
  • +
  • + +

    #string IniUnitName : +The initiating unit name.

    + +
  • +
  • + +

    place :

    + +
  • +
  • + +

    subplace :

    + +
  • +
+
+
+
+
+ + +BASE:CreateEventCrash(EventTime, Initiator) + +
+
+ +

Creation of a Crash Event.

+ +

Parameters

+ +
+
+
+
+ + +BASE:E(Arguments) + +
+
+ +

Log an exception which will be traced always.

+ + +

Can be anywhere within the function logic.

+ +

Parameter

+
    +
  • + +

    Arguments : +A #table or any field.

    + +
  • +
+
+
+
+
+ + +BASE:EventDispatcher() + +
+
+ +

Returns the event dispatcher

+ +

Return value

+ +

Core.Event#EVENT:

+ + +
+
+
+
+ + +BASE:EventRemoveAll() + +
+
+ +

Remove all subscribed events

+ +

Return value

+ +

#BASE:

+ + +
+
+
+
+ + +BASE:F(Arguments) + +
+
+ +

Trace a function call.

+ + +

Must be at the beginning of the function logic.

+ +

Parameter

+
    +
  • + +

    Arguments : +A #table or any field.

    + +
  • +
+
+
+
+
+ + +BASE:F2(Arguments) + +
+
+ +

Trace a function call level 2.

+ + +

Must be at the beginning of the function logic.

+ +

Parameter

+
    +
  • + +

    Arguments : +A #table or any field.

    + +
  • +
+
+
+
+
+ + +BASE:F3(Arguments) + +
+
+ +

Trace a function call level 3.

+ + +

Must be at the beginning of the function logic.

+ +

Parameter

+
    +
  • + +

    Arguments : +A #table or any field.

    + +
  • +
+
+
+
+
+ + +BASE:GetClassID() + +
+
+ +

Get the ClassID of the class instance.

+ +

Return value

+ +

#string: +The ClassID of the class instance.

+ +
+
+
+
+ + +BASE:GetClassName() + +
+
+ +

Get the ClassName of the class instance.

+ +

Return value

+ +

#string: +The ClassName of the class instance.

+ +
+
+
+
+ + +BASE:GetClassNameAndID() + +
+
+ +

Get the ClassName + ClassID of the class instance.

+ + +

The ClassName + ClassID is formatted as '%s#%09d'.

+ +

Return value

+ +

#string: +The ClassName + ClassID of the class instance.

+ +
+
+
+
+ + +BASE:GetEventPriority() + +
+
+ +

Get the Class Event processing Priority.

+ + +

The Event processing Priority is a number from 1 to 10, +reflecting the order of the classes subscribed to the Event to be processed.

+ +

Return value

+ +

#number: +The Event processing Priority.

+ +
+
+
+
+ + +BASE:GetParent(Child) + +
+
+ +

This is the worker method to retrieve the Parent class.

+ + +

Note that the Parent class must be passed to call the parent class method.

+ +
self:GetParent(self):ParentMethod()
+
+
+
+ +

Parameter

+
    +
  • + +

    #BASE Child : +is the Child class from which the Parent class needs to be retrieved.

    + +
  • +
+

Return value

+ +

#BASE:

+ + +
+
+
+
+ + +BASE:GetState(Object, Key, Value) + +
+
+ +

Get a Value given a Key from the Object.

+ + +

Note that if the Object is destroyed, nillified or garbage collected, then the Values and Keys will also be gone.

+ +

Parameters

+
    +
  • + +

    Object : +The object that holds the Value set by the Key.

    + +
  • +
  • + +

    Key : +The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!

    + +
  • +
  • + +

    Value : +The value to is stored in the Object.

    + +
  • +
+

Return value

+ + +

The Value retrieved.

+ +
+
+
+
+ + +BASE:HandleEvent(Event, EventFunction) + +
+
+ +

Subscribe to a DCS Event.

+ +

Parameters

+
    +
  • + +

    Core.Event#EVENTS Event :

    + +
  • +
  • + +

    #function EventFunction : +(optional) The function to be called when the event occurs for the unit.

    + +
  • +
+

Return value

+ +

#BASE:

+ + +
+
+
+
+ + +BASE:Inherit(Child, Parent) + +
+
+ +

This is the worker method to inherit from a parent class.

+ +

Parameters

+
    +
  • + +

    Child : +is the Child class that inherits.

    + +
  • +
  • + +

    #BASE Parent : +is the Parent class that the Child inherits from.

    + +
  • +
+

Return value

+ +

#BASE: +Child

+ +
+
+
+
+ + +BASE:IsTrace() + +
+
+ +

Enquires if tracing is on (for the class).

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +BASE:New() + +
+
+ +

BASE constructor.

+ + + +

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

+ +
function EVENT:New()
+  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
+  return self
+end
+  
+
+ +

Return value

+ +

#BASE:

+ + +
+
+
+
+ + +BASE:OnEvent(EventData) + +
+
+ +

Occurs when an object is completely destroyed.

+ + +

initiator : The unit that is was destroyed.

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventBaseCaptured(EventData) + +
+
+ +

Occurs when a ground unit captures either an airbase or a farp.

+ + +

initiator : The unit that captured the base +place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventBirth(EventData) + +
+
+ +

Occurs when any object is spawned into the mission.

+ + +

initiator : The unit that was spawned

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventCrash(EventData) + +
+
+ +

Occurs when any aircraft crashes into the ground and is completely destroyed.

+ + +

initiator : The unit that has crashed

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventEjection(EventData) + +
+
+ +

Occurs when a pilot ejects from an aircraft +initiator : The unit that has ejected

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventEngineShutdown(EventData) + +
+
+ +

Occurs when any aircraft shuts down its engines.

+ + +

initiator : The unit that is stopping its engines.

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventEngineStartup(EventData) + +
+
+ +

Occurs when any aircraft starts its engines.

+ + +

initiator : The unit that is starting its engines.

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventHit(EventData) + +
+
+ +

Occurs whenever an object is hit by a weapon.

+ + +

initiator : The unit object the fired the weapon +weapon: Weapon object that hit the target +target: The Object that was hit.

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventHumanFailure(EventData) + +
+
+ +

Occurs when any system fails on a human controlled aircraft.

+ + +

initiator : The unit that had the failure

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventLand(EventData) + +
+
+ +

Occurs when an aircraft lands at an airbase, farp or ship +initiator : The unit that has landed +place: Object that the unit landed on.

+ + +

Can be an Airbase Object, FARP, or Ships

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventMissionEnd(EventData) + +
+
+ +

Occurs when a mission ends

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventMissionStart(EventData) + +
+
+ +

Occurs when a mission starts

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventPilotDead(EventData) + +
+
+ +

Occurs when the pilot of an aircraft is killed.

+ + +

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. +initiator : The unit that the pilot has died in.

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventPlayerEnterUnit(EventData) + +
+
+ +

Occurs when any player assumes direct control of a unit.

+ + +

initiator : The unit that is being taken control of.

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventPlayerLeaveUnit(EventData) + +
+
+ +

Occurs when any player relieves control of a unit to the AI.

+ + +

initiator : The unit that the player left.

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventRefueling(EventData) + +
+
+ +

Occurs when an aircraft connects with a tanker and begins taking on fuel.

+ + +

initiator : The unit that is receiving fuel.

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventRefuelingStop(EventData) + +
+
+ +

Occurs when an aircraft is finished taking fuel.

+ + +

initiator : The unit that was receiving fuel.

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventShootingEnd(EventData) + +
+
+ +

Occurs when any unit stops firing its weapon.

+ + +

Event will always correspond with a shooting start event. +initiator : The unit that was doing the shooing.

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventShootingStart(EventData) + +
+
+ +

Occurs when any unit begins firing a weapon that has a high rate of fire.

+ + +

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. +initiator : The unit that is doing the shooing. +target: The unit that is being targeted.

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventShot(EventData) + +
+
+ +

Occurs whenever any unit in a mission fires a weapon.

+ + +

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart.

+ +

Parameter

+ +
+
+
+
+ + +BASE:OnEventTakeoff(EventData) + +
+
+ +

Occurs when an aircraft takes off from an airbase, farp, or ship.

+ + +

initiator : The unit that tookoff +place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

+ +

Parameter

+ +
+
+
+
+ + +BASE:SetEventPriority(EventPriority) + +
+
+ +

Set the Class Event processing Priority.

+ + +

The Event processing Priority is a number from 1 to 10, +reflecting the order of the classes subscribed to the Event to be processed.

+ +

Parameter

+
    +
  • + +

    #number EventPriority : +The Event processing Priority.

    + +
  • +
+

Return value

+ + +

self

+ +
+
+
+
+ + +BASE:SetState(Object, Key, Value) + +
+
+ +

Set a state or property of the Object given a Key and a Value.

+ + +

Note that if the Object is destroyed, nillified or garbage collected, then the Values and Keys will also be gone.

+ +

Parameters

+
    +
  • + +

    Object : +The object that will hold the Value set by the Key.

    + +
  • +
  • + +

    Key : +The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!

    + +
  • +
  • + +

    Value : +The value to is stored in the object.

    + +
  • +
+

Return values

+
    +
  1. + + +

    The Value set.

    + +
  2. +
  3. + +

    #nil: +The Key was not found and thus the Value could not be retrieved.

    + +
  4. +
+
+
+
+
+ + +BASE:T(Arguments) + +
+
+ +

Trace a function logic level 1.

+ + +

Can be anywhere within the function logic.

+ +

Parameter

+
    +
  • + +

    Arguments : +A #table or any field.

    + +
  • +
+
+
+
+
+ + +BASE:T2(Arguments) + +
+
+ +

Trace a function logic level 2.

+ + +

Can be anywhere within the function logic.

+ +

Parameter

+
    +
  • + +

    Arguments : +A #table or any field.

    + +
  • +
+
+
+
+
+ + +BASE:T3(Arguments) + +
+
+ +

Trace a function logic level 3.

+ + +

Can be anywhere within the function logic.

+ +

Parameter

+
    +
  • + +

    Arguments : +A #table or any field.

    + +
  • +
+
+
+
+
+ + +BASE:TraceAll(TraceAll) + +
+
+ +

Trace all methods in MOOSE

+ +

Parameter

+
    +
  • + +

    #boolean TraceAll : +true = trace all methods in MOOSE.

    + +
  • +
+
+
+
+
+ + +BASE:TraceClass(Class) + +
+
+ +

Set tracing for a class

+ +

Parameter

+
    +
  • + +

    #string Class :

    + +
  • +
+
+
+
+
+ + +BASE:TraceClassMethod(Class, Method) + +
+
+ +

Set tracing for a specific method of class

+ +

Parameters

+
    +
  • + +

    #string Class :

    + +
  • +
  • + +

    #string Method :

    + +
  • +
+
+
+
+
+ + +BASE:TraceLevel(Level) + +
+
+ +

Set trace level

+ +

Parameter

+
    +
  • + +

    #number Level :

    + +
  • +
+
+
+
+
+ + +BASE:TraceOnOff(TraceOnOff) + +
+
+ +

Set trace on or off +Note that when trace is off, no debug statement is performed, increasing performance! +When Moose is loaded statically, (as one file), tracing is switched off by default.

+ + +

So tracing must be switched on manually in your mission if you are using Moose statically. +When moose is loading dynamically (for moose class development), tracing is switched on by default.

+ +

Parameter

+
    +
  • + +

    #boolean TraceOnOff : +Switch the tracing on or off.

    + +
  • +
+

Usage:

+
-- Switch the tracing On
+BASE:TraceOnOff( true )
+
+-- Switch the tracing Off
+BASE:TraceOnOff( false )
+ +
+
+
+
+ + +BASE:UnHandleEvent(Event) + +
+
+ +

UnSubscribe to a DCS event.

+ +

Parameter

+ +

Return value

+ +

#BASE:

+ + +
+
+
+
+ + +BASE:_Destructor() + +
+
+ + + +
+
+
+
+ + +BASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) + +
+
+ +

Trace a function call.

+ + +

This function is private.

+ +

Parameters

+
    +
  • + +

    Arguments : +A #table or any field.

    + +
  • +
  • + +

    DebugInfoCurrentParam :

    + +
  • +
  • + +

    DebugInfoFromParam :

    + +
  • +
+
+
+
+
+ + +BASE:_SetDestructor() + +
+
+ + + + +

THIS IS WHY WE NEED LUA 5.2 ...

+ +
+
+
+
+ + +BASE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) + +
+
+ +

Trace a function logic.

+ +

Parameters

+
    +
  • + +

    Arguments : +A #table or any field.

    + +
  • +
  • + +

    DebugInfoCurrentParam :

    + +
  • +
  • + +

    DebugInfoFromParam :

    + +
  • +
+
+
+
+
+ + +BASE:onEvent(event) + +
+
+ + + + +

TODO: Complete Dcs.DCSTypes#Event structure.
+- The main event handling function... This function captures all events generated for the class. + @param #BASE self + @param Dcs.DCSTypes#Event event

+ +

Parameter

+
    +
  • + +

    event :

    + +
  • +
+
+
+ +

Type FORMATION

+ +

The Formation Class

+ +

Field(s)

+
+
+ + +FORMATION.Cone + +
+
+ +

A cone formation.

+ +
+
+
+
+ + #string + +FORMATION.Vee + +
+
+ + + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Cargo.html b/docs/Documentation/Cargo.html new file mode 100644 index 000000000..19046ba83 --- /dev/null +++ b/docs/Documentation/Cargo.html @@ -0,0 +1,3271 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Cargo

+ +

Core -- Management of CARGO logistics, that can be transported from and to transportation carriers.

+ + + +

Banner Image

+ +
+ +

Cargo can be of various forms, always are composed out of ONE object ( one unit or one static or one slingload crate ):

+ +
    +
  • CARGO_UNIT, represented by a Unit in a singleton Group: Cargo can be represented by a Unit in a Group. a CARGO_UNIT is representable...
  • +
  • CARGO_GROUP, represented by a Group. A CARGO_GROUP is reportable...
  • +
+ +
+ +

Demo Missions

+ +

CARGO Demo Missions source code

+ +

CARGO Demo Missions, only for beta testers

+ +

ALL Demo Missions pack of the last release

+ +
+ +

YouTube Channel

+ +

SPAWNSTATIC YouTube Channel

+ +
+ +

This module is still under construction, but is described above works already, and will keep working ...

+ + +

Global(s)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CARGO +

CARGO class, extends Fsm#FSM_PROCESS

+ +

The CARGO class defines the core functions that defines a cargo object within MOOSE.

+
CARGOS + +
CARGO_GROUP +

CARGO_GROUP class

+ +

The CARGO_GROUP class defines a cargo that is represented by a Group object within the simulator, and can be transported by a carrier.

+
CARGO_PACKAGE + +
CARGO_REPORTABLE + +
CARGO_REPRESENTABLE + +
CARGO_UNIT +

CARGO_UNIT class, extends #CARGO_REPRESENTABLE

+ +

The CARGO_UNIT class defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier.

+
+

Type CARGO

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CARGO:Board(ToCarrier, NearRadius) +

Boards the cargo to a Carrier.

+
CARGO.CargoCarrier +

The alive DCS object carrying the cargo. This value can be nil, meaning, that the cargo is not contained anywhere...

+
CARGO.CargoObject +

The alive DCS object representing the cargo. This value can be nil, meaning, that the cargo is not represented anywhere...

+
CARGO.Containable +

This flag defines if the cargo can be contained within a DCS Unit.

+
CARGO:GetName() +

Get the name of the Cargo.

+
CARGO:GetPointVec2() +

Get the current PointVec2 of the cargo.

+
CARGO:GetType() +

Get the type of the Cargo.

+
CARGO:IsInZone(Zone) +

Check if Cargo is the given Zone.

+
CARGO:IsLoaded() +

Check if cargo is loaded.

+
CARGO:IsNear(PointVec2, NearRadius) +

Check if CargoCarrier is near the Cargo to be Loaded.

+
CARGO:IsUnLoaded() +

Check if cargo is unloaded.

+
CARGO:Load(ToCarrier) +

Loads the cargo to a Carrier.

+
CARGO.Moveable +

This flag defines if the cargo is moveable.

+
CARGO.Name +

A string defining the name of the cargo. The name is the unique identifier of the cargo.

+
CARGO.NearRadius +

(optional) A number defining the radius in meters when the cargo is near to a Carrier, so that it can be loaded.

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

CARGO Constructor.

+
CARGO:OnEnterBoarding(Controllable, NearRadius) + +
CARGO:OnEnterLoaded(Controllable) + +
CARGO:OnEnterUnBoarding(Controllable) + +
CARGO:OnEnterUnLoaded(Controllable) + +
CARGO:OnLeaveBoarding(Controllable) + +
CARGO:OnLeaveLoaded(Controllable) + +
CARGO:OnLeaveUnBoarding(Controllable) + +
CARGO:OnLeaveUnLoaded(Controllable) + +
CARGO.Representable +

This flag defines if the cargo can be represented by a DCS Unit.

+
CARGO:SetWeight(Weight) +

Set the weight of the cargo.

+
CARGO.Slingloadable +

This flag defines if the cargo can be slingloaded.

+
CARGO:Spawn(PointVec2) +

Template method to spawn a new representation of the CARGO in the simulator.

+
CARGO.Type +

A string defining the type of the cargo. eg. Engineers, Equipment, Screwdrivers.

+
CARGO:UnBoard(ToPointVec2) +

UnBoards the cargo to a Carrier.

+
CARGO:UnLoad(ToPointVec2) +

UnLoads the cargo to a Carrier.

+
CARGO.Weight +

A number defining the weight of the cargo. The weight is expressed in kg.

+
CARGO:__Board(DelaySeconds, ToCarrier, NearRadius) +

Boards the cargo to a Carrier.

+
CARGO:__Load(DelaySeconds, ToCarrier) +

Loads the cargo to a Carrier.

+
CARGO:__UnBoard(DelaySeconds, ToPointVec2) +

UnBoards the cargo to a Carrier.

+
CARGO:__UnLoad(DelaySeconds, ToPointVec2) +

UnLoads the cargo to a Carrier.

+
+ +

Type CARGO_GROUP

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CARGO_GROUP.CargoCarrier + +
CARGO_GROUP.CargoSet + +
CARGO_GROUP:New(CargoGroup, Type, Name, ReportRadius, NearRadius) +

CARGO_GROUP constructor.

+
CARGO_GROUP:onafterUnBoarding(ToPointVec2, Event, From, To, NearRadius, ...) +

UnBoard Event.

+
CARGO_GROUP:onenterBoarding(CargoCarrier, Event, From, To, NearRadius, ...) +

Enter Boarding State.

+
CARGO_GROUP:onenterLoaded(CargoCarrier, Event, From, To, ...) +

Enter Loaded State.

+
CARGO_GROUP:onenterUnBoarding(ToPointVec2, Event, From, To, NearRadius, ...) +

Enter UnBoarding State.

+
CARGO_GROUP:onenterUnLoaded(Core, Event, From, To, ToPointVec2, ...) +

Enter UnLoaded State.

+
CARGO_GROUP:onleaveBoarding(CargoCarrier, Event, From, To, NearRadius, ...) +

Leave Boarding State.

+
CARGO_GROUP:onleaveUnBoarding(ToPointVec2, Event, From, To, NearRadius, ...) +

Leave UnBoarding State.

+
+ +

Type CARGO_PACKAGE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CARGO_PACKAGE.CargoCarrier + +
CARGO_PACKAGE.CargoInAir + +
CARGO_PACKAGE.ClassName + +
CARGO_PACKAGE:IsNear(CargoCarrier) +

Check if CargoCarrier is near the Cargo to be Loaded.

+
CARGO_PACKAGE:New(CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius) +

CARGO_PACKAGE Constructor.

+
CARGO_PACKAGE:onafterLoad(Event, From, To, CargoCarrier, Speed, LoadDistance, Angle) +

Load Event.

+
CARGO_PACKAGE:onafterOnBoard(Event, From, To, CargoCarrier, Speed, BoardDistance, Angle, LoadDistance) +

Board Event.

+
CARGO_PACKAGE:onafterOnBoarded(Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle) +

Boarded Event.

+
CARGO_PACKAGE:onafterUnBoard(Event, From, To, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle, CargoCarrier) +

UnBoard Event.

+
CARGO_PACKAGE:onafterUnBoarded(Event, From, To, CargoCarrier, Speed) +

UnBoarded Event.

+
CARGO_PACKAGE:onafterUnLoad(Event, From, To, Distance, Angle, CargoCarrier, Speed) +

UnLoad Event.

+
+ +

Type CARGO_REPORTABLE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CARGO_REPORTABLE.CargoObject + +
CARGO_REPORTABLE.ClassName + +
CARGO_REPORTABLE:GetBoardingRange() +

Get the range till cargo will board.

+
CARGO_REPORTABLE:IsInRadius(PointVec2) +

Check if CargoCarrier is in the ReportRadius for the Cargo to be Loaded.

+
CARGO_REPORTABLE:MessageToGroup(Message, TaskGroup, Name) +

Send a CC message to a GROUP.

+
CARGO_REPORTABLE:New(CargoObject, Type, Name, Weight, ReportRadius, NearRadius) +

CARGO_REPORTABLE Constructor.

+
CARGO_REPORTABLE.ReportRadius + +
+ +

Type CARGO_REPRESENTABLE

+ + + + + + + + + + + + + +
CARGO_REPRESENTABLE.ClassName + +
CARGO_REPRESENTABLE:New(CargoObject, Type, Name, Weight, ReportRadius, NearRadius) +

CARGO_REPRESENTABLE Constructor.

+
CARGO_REPRESENTABLE:RouteTo(ToPointVec2, Speed) +

Route a cargo unit to a PointVec2.

+
+ +

Type CARGO_UNIT

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CARGO_UNIT.CargoCarrier + +
CARGO_UNIT.CargoInAir + +
CARGO_UNIT.CargoObject + +
CARGO_UNIT:Destroy() +

CARGO_UNIT Destructor.

+
CARGO_UNIT:New(CargoUnit, Type, Name, Weight, ReportRadius, NearRadius) +

CARGO_UNIT Constructor.

+
CARGO_UNIT.OnUnLoadedCallBack + +
CARGO_UNIT:onafterBoard(Event, From, To, CargoCarrier, NearRadius, ...) +

Board Event.

+
CARGO_UNIT:onafterUnBoarding(Event, From, To, ToPointVec2, NearRadius) +

UnBoard Event.

+
CARGO_UNIT:onenterBoarding(Event, From, To, CargoCarrier, NearRadius, ...) +

Enter Boarding State.

+
CARGO_UNIT:onenterLoaded(Event, From, To, CargoCarrier) +

Loaded State.

+
CARGO_UNIT:onenterUnBoarding(Event, From, To, ToPointVec2, NearRadius) +

Enter UnBoarding State.

+
CARGO_UNIT:onenterUnLoaded(Event, From, To, Core, ToPointVec2) +

Enter UnLoaded State.

+
CARGO_UNIT:onleaveBoarding(Event, From, To, CargoCarrier, NearRadius, ...) +

Leave Boarding State.

+
CARGO_UNIT:onleaveUnBoarding(Event, From, To, ToPointVec2, NearRadius) +

Leave UnBoarding State.

+
+ +

Global(s)

+
+
+ + #CARGO + +CARGO + +
+
+ +

CARGO class, extends Fsm#FSM_PROCESS

+ +

The CARGO class defines the core functions that defines a cargo object within MOOSE.

+ + +

A cargo is a logical object defined that is available for transport, and has a life status within a simulation.

+ +

The CARGO is a state machine: it manages the different events and states of the cargo. +All derived classes from CARGO follow the same state machine, expose the same cargo event functions, and provide the same cargo states.

+ +

CARGO Events:

+ +
    +
  • CARGO.Board( ToCarrier ): Boards the cargo to a carrier.
  • +
  • CARGO.Load( ToCarrier ): Loads the cargo into a carrier, regardless of its position.
  • +
  • CARGO.UnBoard( ToPointVec2 ): UnBoard the cargo from a carrier. This will trigger a movement of the cargo to the option ToPointVec2.
  • +
  • CARGO.UnLoad( ToPointVec2 ): UnLoads the cargo from a carrier.
  • +
  • CARGO.Dead( Controllable ): The cargo is dead. The cargo process will be ended.
  • +
+ +

CARGO States:

+ +
    +
  • UnLoaded: The cargo is unloaded from a carrier.
  • +
  • Boarding: The cargo is currently boarding (= running) into a carrier.
  • +
  • Loaded: The cargo is loaded into a carrier.
  • +
  • UnBoarding: The cargo is currently unboarding (=running) from a carrier.
  • +
  • Dead: The cargo is dead ...
  • +
  • End: The process has come to an end.
  • +
+ +

CARGO state transition methods:

+ +

State transition functions can be set by the mission designer customizing or improving the behaviour of the state. +There are 2 moments when state transition methods will be called by the state machine:

+ +
    +
  • Leaving the state. + The state transition method needs to start with the name OnLeave + the name of the state. + If the state transition method returns false, then the processing of the state transition will not be done! + If you want to change the behaviour of the AIControllable at this event, return false, + but then you'll need to specify your own logic using the AIControllable!

  • +
  • Entering the state. + The state transition method needs to start with the name OnEnter + the name of the state. + These state transition methods need to provide a return value, which is specified at the function description.

  • +
+ + +
+
+
+
+ + + +CARGOS + +
+
+ + + +
+
+
+
+ + #CARGO_GROUP + +CARGO_GROUP + +
+
+ +

CARGO_GROUP class

+ +

The CARGO_GROUP class defines a cargo that is represented by a Group object within the simulator, and can be transported by a carrier.

+ + +

Use the event functions as described above to Load, UnLoad, Board, UnBoard the CARGO_GROUP to and from carrier.

+ + +
+
+
+
+ + #CARGO_PACKAGE + +CARGO_PACKAGE + +
+
+ + + +
+
+
+
+ + #CARGO_REPORTABLE + +CARGO_REPORTABLE + +
+
+ + + +
+
+
+
+ + #CARGO_REPRESENTABLE + +CARGO_REPRESENTABLE + +
+
+ + + +
+
+
+
+ + #CARGO_UNIT + +CARGO_UNIT + +
+
+ +

CARGO_UNIT class, extends #CARGO_REPRESENTABLE

+ +

The CARGO_UNIT class defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier.

+ + +

Use the event functions as described above to Load, UnLoad, Board, UnBoard the CARGO_UNIT objects to and from carriers.

+ +
+ + +
+
+

Type Cargo

+ +

Type CARGO

+

Field(s)

+
+
+ + +CARGO:Board(ToCarrier, NearRadius) + +
+
+ +

Boards the cargo to a Carrier.

+ + +

The event will create a movement (= running or driving) of the cargo to the Carrier. +The cargo must be in the UnLoaded state.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE ToCarrier : +The Carrier that will hold the cargo.

    + +
  • +
  • + +

    #number NearRadius : +The radius when the cargo will board the Carrier (to avoid collision).

    + +
  • +
+
+
+
+
+ + Wrapper.Controllable#CONTROLLABLE + +CARGO.CargoCarrier + +
+
+ +

The alive DCS object carrying the cargo. This value can be nil, meaning, that the cargo is not contained anywhere...

+ +
+
+
+
+ + Wrapper.Controllable#CONTROLLABLE + +CARGO.CargoObject + +
+
+ +

The alive DCS object representing the cargo. This value can be nil, meaning, that the cargo is not represented anywhere...

+ +
+
+
+
+ + #boolean + +CARGO.Containable + +
+
+ +

This flag defines if the cargo can be contained within a DCS Unit.

+ +
+
+
+
+ + +CARGO:GetName() + +
+
+ +

Get the name of the Cargo.

+ +

Return value

+ +

#string: +The name of the Cargo.

+ +
+
+
+
+ + +CARGO:GetPointVec2() + +
+
+ +

Get the current PointVec2 of the cargo.

+ +

Return value

+ +

Core.Point#POINT_VEC2:

+ + +
+
+
+
+ + +CARGO:GetType() + +
+
+ +

Get the type of the Cargo.

+ +

Return value

+ +

#string: +The type of the Cargo.

+ +
+
+
+
+ + +CARGO:IsInZone(Zone) + +
+
+ +

Check if Cargo is the given Zone.

+ +

Parameter

+ +

Return value

+ +

#boolean: +true if cargo is in the Zone, false if cargo is not in the Zone.

+ +
+
+
+
+ + +CARGO:IsLoaded() + +
+
+ +

Check if cargo is loaded.

+ +

Return value

+ +

#boolean: +true if loaded

+ +
+
+
+
+ + +CARGO:IsNear(PointVec2, NearRadius) + +
+
+ +

Check if CargoCarrier is near the Cargo to be Loaded.

+ +

Parameters

+
    +
  • + +

    Core.Point#POINT_VEC2 PointVec2 :

    + +
  • +
  • + +

    #number NearRadius : +The radius when the cargo will board the Carrier (to avoid collision).

    + +
  • +
+

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +CARGO:IsUnLoaded() + +
+
+ +

Check if cargo is unloaded.

+ +

Return value

+ +

#boolean: +true if unloaded

+ +
+
+
+
+ + +CARGO:Load(ToCarrier) + +
+
+ +

Loads the cargo to a Carrier.

+ + +

The event will load the cargo into the Carrier regardless of its position. There will be no movement simulated of the cargo loading. +The cargo must be in the UnLoaded state.

+ +

Parameter

+ +
+
+
+
+ + #boolean + +CARGO.Moveable + +
+
+ +

This flag defines if the cargo is moveable.

+ +
+
+
+
+ + #string + +CARGO.Name + +
+
+ +

A string defining the name of the cargo. The name is the unique identifier of the cargo.

+ +
+
+
+
+ + #number + +CARGO.NearRadius + +
+
+ +

(optional) A number defining the radius in meters when the cargo is near to a Carrier, so that it can be loaded.

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

CARGO Constructor.

+ + +

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

+ +

Parameters

+
    +
  • + +

    #string Type :

    + +
  • +
  • + +

    #string Name :

    + +
  • +
  • + +

    #number Weight :

    + +
  • +
  • + +

    #number NearRadius : +(optional)

    + +
  • +
+

Return value

+ +

#CARGO:

+ + +
+
+
+
+ + +CARGO:OnEnterBoarding(Controllable, NearRadius) + +
+
+ + + +

Parameters

+ +
+
+
+
+ + +CARGO:OnEnterLoaded(Controllable) + +
+
+ + + +

Parameter

+ +
+
+
+
+ + +CARGO:OnEnterUnBoarding(Controllable) + +
+
+ + + +

Parameter

+ +
+
+
+
+ + +CARGO:OnEnterUnLoaded(Controllable) + +
+
+ + + +

Parameter

+ +
+
+
+
+ + +CARGO:OnLeaveBoarding(Controllable) + +
+
+ + + +

Parameter

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +CARGO:OnLeaveLoaded(Controllable) + +
+
+ + + +

Parameter

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +CARGO:OnLeaveUnBoarding(Controllable) + +
+
+ + + +

Parameter

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +CARGO:OnLeaveUnLoaded(Controllable) + +
+
+ + + +

Parameter

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + #boolean + +CARGO.Representable + +
+
+ +

This flag defines if the cargo can be represented by a DCS Unit.

+ +
+
+
+
+ + +CARGO:SetWeight(Weight) + +
+
+ +

Set the weight of the cargo.

+ +

Parameter

+
    +
  • + +

    #number Weight : +The weight in kg.

    + +
  • +
+

Return value

+ +

#CARGO:

+ + +
+
+
+
+ + #boolean + +CARGO.Slingloadable + +
+
+ +

This flag defines if the cargo can be slingloaded.

+ +
+
+
+
+ + +CARGO:Spawn(PointVec2) + +
+
+ +

Template method to spawn a new representation of the CARGO in the simulator.

+ +

Parameter

+
    +
  • + +

    PointVec2 :

    + +
  • +
+

Return value

+ +

#CARGO:

+ + +
+
+
+
+ + #string + +CARGO.Type + +
+
+ +

A string defining the type of the cargo. eg. Engineers, Equipment, Screwdrivers.

+ +
+
+
+
+ + +CARGO:UnBoard(ToPointVec2) + +
+
+ +

UnBoards the cargo to a Carrier.

+ + +

The event will create a movement (= running or driving) of the cargo from the Carrier. +The cargo must be in the Loaded state.

+ +

Parameter

+
    +
  • + +

    Core.Point#POINT_VEC2 ToPointVec2 : +(optional) @{Point#POINT_VEC2) to where the cargo should run after onboarding. If not provided, the cargo will run to 60 meters behind the Carrier location.

    + +
  • +
+
+
+
+
+ + +CARGO:UnLoad(ToPointVec2) + +
+
+ +

UnLoads the cargo to a Carrier.

+ + +

The event will unload the cargo from the Carrier. There will be no movement simulated of the cargo loading. +The cargo must be in the Loaded state.

+ +

Parameter

+
    +
  • + +

    Core.Point#POINT_VEC2 ToPointVec2 : +(optional) @{Point#POINT_VEC2) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location.

    + +
  • +
+
+
+
+
+ + #number + +CARGO.Weight + +
+
+ +

A number defining the weight of the cargo. The weight is expressed in kg.

+ +
+
+
+
+ + +CARGO:__Board(DelaySeconds, ToCarrier, NearRadius) + +
+
+ +

Boards the cargo to a Carrier.

+ + +

The event will create a movement (= running or driving) of the cargo to the Carrier. +The cargo must be in the UnLoaded state.

+ +

Parameters

+
    +
  • + +

    #number DelaySeconds : +The amount of seconds to delay the action.

    + +
  • +
  • + +

    Wrapper.Controllable#CONTROLLABLE ToCarrier : +The Carrier that will hold the cargo.

    + +
  • +
  • + +

    #number NearRadius : +The radius when the cargo will board the Carrier (to avoid collision).

    + +
  • +
+
+
+
+
+ + +CARGO:__Load(DelaySeconds, ToCarrier) + +
+
+ +

Loads the cargo to a Carrier.

+ + +

The event will load the cargo into the Carrier regardless of its position. There will be no movement simulated of the cargo loading. +The cargo must be in the UnLoaded state.

+ +

Parameters

+
    +
  • + +

    #number DelaySeconds : +The amount of seconds to delay the action.

    + +
  • +
  • + +

    Wrapper.Controllable#CONTROLLABLE ToCarrier : +The Carrier that will hold the cargo.

    + +
  • +
+
+
+
+
+ + +CARGO:__UnBoard(DelaySeconds, ToPointVec2) + +
+
+ +

UnBoards the cargo to a Carrier.

+ + +

The event will create a movement (= running or driving) of the cargo from the Carrier. +The cargo must be in the Loaded state.

+ +

Parameters

+
    +
  • + +

    #number DelaySeconds : +The amount of seconds to delay the action.

    + +
  • +
  • + +

    Core.Point#POINT_VEC2 ToPointVec2 : +(optional) @{Point#POINT_VEC2) to where the cargo should run after onboarding. If not provided, the cargo will run to 60 meters behind the Carrier location.

    + +
  • +
+
+
+
+
+ + +CARGO:__UnLoad(DelaySeconds, ToPointVec2) + +
+
+ +

UnLoads the cargo to a Carrier.

+ + +

The event will unload the cargo from the Carrier. There will be no movement simulated of the cargo loading. +The cargo must be in the Loaded state.

+ +

Parameters

+
    +
  • + +

    #number DelaySeconds : +The amount of seconds to delay the action.

    + +
  • +
  • + +

    Core.Point#POINT_VEC2 ToPointVec2 : +(optional) @{Point#POINT_VEC2) to where the cargo will be placed after unloading. If not provided, the cargo will be placed 60 meters behind the Carrier location.

    + +
  • +
+
+
+ +

Type CARGO.CargoObjects

+ +

Type CARGO_GROUP

+

Field(s)

+
+
+ + + +CARGO_GROUP.CargoCarrier + +
+
+ + + +
+
+
+
+ + + +CARGO_GROUP.CargoSet + +
+
+ + + +
+
+
+
+ + +CARGO_GROUP:New(CargoGroup, Type, Name, ReportRadius, NearRadius) + +
+
+ +

CARGO_GROUP constructor.

+ +

Parameters

+
    +
  • + +

    Wrapper.Group#GROUP CargoGroup :

    + +
  • +
  • + +

    #string Type :

    + +
  • +
  • + +

    #string Name :

    + +
  • +
  • + +

    #number ReportRadius : +(optional)

    + +
  • +
  • + +

    #number NearRadius : +(optional)

    + +
  • +
+

Return value

+ +

#CARGO_GROUP:

+ + +
+
+
+
+ + +CARGO_GROUP:onafterUnBoarding(ToPointVec2, Event, From, To, NearRadius, ...) + +
+
+ +

UnBoard Event.

+ +

Parameters

+
    +
  • + +

    Core.Point#POINT_VEC2 ToPointVec2 :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    NearRadius :

    + +
  • +
  • + +

    ... :

    + +
  • +
+
+
+
+
+ + +CARGO_GROUP:onenterBoarding(CargoCarrier, Event, From, To, NearRadius, ...) + +
+
+ +

Enter Boarding State.

+ +

Parameters

+
    +
  • + +

    Wrapper.Unit#UNIT CargoCarrier :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    NearRadius :

    + +
  • +
  • + +

    ... :

    + +
  • +
+
+
+
+
+ + +CARGO_GROUP:onenterLoaded(CargoCarrier, Event, From, To, ...) + +
+
+ +

Enter Loaded State.

+ +

Parameters

+
    +
  • + +

    Wrapper.Unit#UNIT CargoCarrier :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    ... :

    + +
  • +
+
+
+
+
+ + +CARGO_GROUP:onenterUnBoarding(ToPointVec2, Event, From, To, NearRadius, ...) + +
+
+ +

Enter UnBoarding State.

+ +

Parameters

+
    +
  • + +

    Core.Point#POINT_VEC2 ToPointVec2 :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    NearRadius :

    + +
  • +
  • + +

    ... :

    + +
  • +
+
+
+
+
+ + +CARGO_GROUP:onenterUnLoaded(Core, Event, From, To, ToPointVec2, ...) + +
+
+ +

Enter UnLoaded State.

+ +

Parameters

+
    +
  • + +

    Core : +Point#POINT_VEC2

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    ToPointVec2 :

    + +
  • +
  • + +

    ... :

    + +
  • +
+
+
+
+
+ + +CARGO_GROUP:onleaveBoarding(CargoCarrier, Event, From, To, NearRadius, ...) + +
+
+ +

Leave Boarding State.

+ +

Parameters

+
    +
  • + +

    Wrapper.Unit#UNIT CargoCarrier :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    NearRadius :

    + +
  • +
  • + +

    ... :

    + +
  • +
+
+
+
+
+ + +CARGO_GROUP:onleaveUnBoarding(ToPointVec2, Event, From, To, NearRadius, ...) + +
+
+ +

Leave UnBoarding State.

+ +

Parameters

+
    +
  • + +

    Core.Point#POINT_VEC2 ToPointVec2 :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    NearRadius :

    + +
  • +
  • + +

    ... :

    + +
  • +
+
+
+ +

Type CARGO_PACKAGE

+

Field(s)

+
+
+ + + +CARGO_PACKAGE.CargoCarrier + +
+
+ + + +
+
+
+
+ + + +CARGO_PACKAGE.CargoInAir + +
+
+ + + +
+
+
+
+ + #string + +CARGO_PACKAGE.ClassName + +
+
+ + + +
+
+
+
+ + +CARGO_PACKAGE:IsNear(CargoCarrier) + +
+
+ +

Check if CargoCarrier is near the Cargo to be Loaded.

+ +

Parameter

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +CARGO_PACKAGE:New(CargoCarrier, Type, Name, Weight, ReportRadius, NearRadius) + +
+
+ +

CARGO_PACKAGE Constructor.

+ +

Parameters

+
    +
  • + +

    Wrapper.Unit#UNIT CargoCarrier : +The UNIT carrying the package.

    + +
  • +
  • + +

    #string Type :

    + +
  • +
  • + +

    #string Name :

    + +
  • +
  • + +

    #number Weight :

    + +
  • +
  • + +

    #number ReportRadius : +(optional)

    + +
  • +
  • + +

    #number NearRadius : +(optional)

    + +
  • +
+

Return value

+ +

#CARGO_PACKAGE:

+ + +
+
+
+
+ + +CARGO_PACKAGE:onafterLoad(Event, From, To, CargoCarrier, Speed, LoadDistance, Angle) + +
+
+ +

Load Event.

+ +

Parameters

+
    +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    Wrapper.Unit#UNIT CargoCarrier :

    + +
  • +
  • + +

    #number Speed :

    + +
  • +
  • + +

    #number LoadDistance :

    + +
  • +
  • + +

    #number Angle :

    + +
  • +
+
+
+
+
+ + +CARGO_PACKAGE:onafterOnBoard(Event, From, To, CargoCarrier, Speed, BoardDistance, Angle, LoadDistance) + +
+
+ +

Board Event.

+ +

Parameters

+
    +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    Wrapper.Unit#UNIT CargoCarrier :

    + +
  • +
  • + +

    #number Speed :

    + +
  • +
  • + +

    #number BoardDistance :

    + +
  • +
  • + +

    #number Angle :

    + +
  • +
  • + +

    LoadDistance :

    + +
  • +
+
+
+
+
+ + +CARGO_PACKAGE:onafterOnBoarded(Event, From, To, CargoCarrier, Speed, BoardDistance, LoadDistance, Angle) + +
+
+ +

Boarded Event.

+ +

Parameters

+
    +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    Wrapper.Unit#UNIT CargoCarrier :

    + +
  • +
  • + +

    Speed :

    + +
  • +
  • + +

    BoardDistance :

    + +
  • +
  • + +

    LoadDistance :

    + +
  • +
  • + +

    Angle :

    + +
  • +
+
+
+
+
+ + +CARGO_PACKAGE:onafterUnBoard(Event, From, To, Speed, UnLoadDistance, UnBoardDistance, Radius, Angle, CargoCarrier) + +
+
+ +

UnBoard Event.

+ +

Parameters

+
    +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    #number Speed :

    + +
  • +
  • + +

    #number UnLoadDistance :

    + +
  • +
  • + +

    #number UnBoardDistance :

    + +
  • +
  • + +

    #number Radius :

    + +
  • +
  • + +

    #number Angle :

    + +
  • +
  • + +

    CargoCarrier :

    + +
  • +
+
+
+
+
+ + +CARGO_PACKAGE:onafterUnBoarded(Event, From, To, CargoCarrier, Speed) + +
+
+ +

UnBoarded Event.

+ +

Parameters

+
    +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    Wrapper.Unit#UNIT CargoCarrier :

    + +
  • +
  • + +

    Speed :

    + +
  • +
+
+
+
+
+ + +CARGO_PACKAGE:onafterUnLoad(Event, From, To, Distance, Angle, CargoCarrier, Speed) + +
+
+ +

UnLoad Event.

+ +

Parameters

+
    +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    #number Distance :

    + +
  • +
  • + +

    #number Angle :

    + +
  • +
  • + +

    CargoCarrier :

    + +
  • +
  • + +

    Speed :

    + +
  • +
+
+
+ +

Type CARGO_REPORTABLE

+

Field(s)

+
+
+ + + +CARGO_REPORTABLE.CargoObject + +
+
+ + + +
+
+
+
+ + #string + +CARGO_REPORTABLE.ClassName + +
+
+ + + +
+
+
+
+ + +CARGO_REPORTABLE:GetBoardingRange() + +
+
+ +

Get the range till cargo will board.

+ +

Return value

+ +

#number: +The range till cargo will board.

+ +
+
+
+
+ + +CARGO_REPORTABLE:IsInRadius(PointVec2) + +
+
+ +

Check if CargoCarrier is in the ReportRadius for the Cargo to be Loaded.

+ +

Parameter

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +CARGO_REPORTABLE:MessageToGroup(Message, TaskGroup, Name) + +
+
+ +

Send a CC message to a GROUP.

+ +

Parameters

+
    +
  • + +

    #string Message :

    + +
  • +
  • + +

    Wrapper.Group#GROUP TaskGroup :

    + +
  • +
  • + +

    #sring Name : +(optional) The name of the Group used as a prefix for the message to the Group. If not provided, there will be nothing shown.

    + +
  • +
+
+
+
+
+ + +CARGO_REPORTABLE:New(CargoObject, Type, Name, Weight, ReportRadius, NearRadius) + +
+
+ +

CARGO_REPORTABLE Constructor.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#Controllable CargoObject :

    + +
  • +
  • + +

    #string Type :

    + +
  • +
  • + +

    #string Name :

    + +
  • +
  • + +

    #number Weight :

    + +
  • +
  • + +

    #number ReportRadius : +(optional)

    + +
  • +
  • + +

    #number NearRadius : +(optional)

    + +
  • +
+

Return value

+ +

#CARGO_REPORTABLE:

+ + +
+
+
+
+ + +CARGO_REPORTABLE.ReportRadius + +
+
+ + + +
+
+ +

Type CARGO_REPRESENTABLE

+

Field(s)

+
+
+ + #string + +CARGO_REPRESENTABLE.ClassName + +
+
+ + + +
+
+
+
+ + +CARGO_REPRESENTABLE:New(CargoObject, Type, Name, Weight, ReportRadius, NearRadius) + +
+
+ +

CARGO_REPRESENTABLE Constructor.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#Controllable CargoObject :

    + +
  • +
  • + +

    #string Type :

    + +
  • +
  • + +

    #string Name :

    + +
  • +
  • + +

    #number Weight :

    + +
  • +
  • + +

    #number ReportRadius : +(optional)

    + +
  • +
  • + +

    #number NearRadius : +(optional)

    + +
  • +
+

Return value

+ +

#CARGO_REPRESENTABLE:

+ + +
+
+
+
+ + +CARGO_REPRESENTABLE:RouteTo(ToPointVec2, Speed) + +
+
+ +

Route a cargo unit to a PointVec2.

+ +

Parameters

+ +

Return value

+ +

#CARGO_REPRESENTABLE:

+ + +
+
+ +

Type CARGO_UNIT

+

Field(s)

+
+
+ + + +CARGO_UNIT.CargoCarrier + +
+
+ + + +
+
+
+
+ + + +CARGO_UNIT.CargoInAir + +
+
+ + + +
+
+
+
+ + + +CARGO_UNIT.CargoObject + +
+
+ + + +
+
+
+
+ + +CARGO_UNIT:Destroy() + +
+
+ +

CARGO_UNIT Destructor.

+ +

Return value

+ +

#CARGO_UNIT:

+ + +
+
+
+
+ + +CARGO_UNIT:New(CargoUnit, Type, Name, Weight, ReportRadius, NearRadius) + +
+
+ +

CARGO_UNIT Constructor.

+ +

Parameters

+
    +
  • + +

    Wrapper.Unit#UNIT CargoUnit :

    + +
  • +
  • + +

    #string Type :

    + +
  • +
  • + +

    #string Name :

    + +
  • +
  • + +

    #number Weight :

    + +
  • +
  • + +

    #number ReportRadius : +(optional)

    + +
  • +
  • + +

    #number NearRadius : +(optional)

    + +
  • +
+

Return value

+ +

#CARGO_UNIT:

+ + +
+
+
+
+ + +CARGO_UNIT.OnUnLoadedCallBack + +
+
+ + + +
+
+
+
+ + +CARGO_UNIT:onafterBoard(Event, From, To, CargoCarrier, NearRadius, ...) + +
+
+ +

Board Event.

+ +

Parameters

+
    +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    CargoCarrier :

    + +
  • +
  • + +

    NearRadius :

    + +
  • +
  • + +

    ... :

    + +
  • +
+
+
+
+
+ + +CARGO_UNIT:onafterUnBoarding(Event, From, To, ToPointVec2, NearRadius) + +
+
+ +

UnBoard Event.

+ +

Parameters

+
    +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    Core.Point#POINT_VEC2 ToPointVec2 :

    + +
  • +
  • + +

    NearRadius :

    + +
  • +
+
+
+
+
+ + +CARGO_UNIT:onenterBoarding(Event, From, To, CargoCarrier, NearRadius, ...) + +
+
+ +

Enter Boarding State.

+ +

Parameters

+
    +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    Wrapper.Unit#UNIT CargoCarrier :

    + +
  • +
  • + +

    NearRadius :

    + +
  • +
  • + +

    ... :

    + +
  • +
+
+
+
+
+ + +CARGO_UNIT:onenterLoaded(Event, From, To, CargoCarrier) + +
+
+ +

Loaded State.

+ +

Parameters

+
    +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    Wrapper.Unit#UNIT CargoCarrier :

    + +
  • +
+
+
+
+
+ + +CARGO_UNIT:onenterUnBoarding(Event, From, To, ToPointVec2, NearRadius) + +
+
+ +

Enter UnBoarding State.

+ +

Parameters

+
    +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    Core.Point#POINT_VEC2 ToPointVec2 :

    + +
  • +
  • + +

    NearRadius :

    + +
  • +
+
+
+
+
+ + +CARGO_UNIT:onenterUnLoaded(Event, From, To, Core, ToPointVec2) + +
+
+ +

Enter UnLoaded State.

+ +

Parameters

+
    +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    Core : +Point#POINT_VEC2

    + +
  • +
  • + +

    ToPointVec2 :

    + +
  • +
+
+
+
+
+ + +CARGO_UNIT:onleaveBoarding(Event, From, To, CargoCarrier, NearRadius, ...) + +
+
+ +

Leave Boarding State.

+ +

Parameters

+
    +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    Wrapper.Unit#UNIT CargoCarrier :

    + +
  • +
  • + +

    NearRadius :

    + +
  • +
  • + +

    ... :

    + +
  • +
+
+
+
+
+ + +CARGO_UNIT:onleaveUnBoarding(Event, From, To, ToPointVec2, NearRadius) + +
+
+ +

Leave UnBoarding State.

+ +

Parameters

+
    +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    Core.Point#POINT_VEC2 ToPointVec2 :

    + +
  • +
  • + +

    NearRadius :

    + +
  • +
+
+
+ +

Type COMMANDCENTER

+ +

Type sring

+ +
+ +
+ + diff --git a/docs/Documentation/CleanUp.html b/docs/Documentation/CleanUp.html new file mode 100644 index 000000000..fa84131e1 --- /dev/null +++ b/docs/Documentation/CleanUp.html @@ -0,0 +1,606 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module CleanUp

+ +

The CLEANUP class keeps an area clean of crashing or colliding airplanes.

+ + +

It also prevents airplanes from firing within this area.

+ +

Global(s)

+ + + + + +
CLEANUP + +
+

Type CLEANUP

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CLEANUP.ClassName + +
CLEANUP.CleanUpList + +
CLEANUP.CleanUpScheduler + +
CLEANUP:New(ZoneNames, TimeInterval) +

Creates the main object which is handling the cleaning of the debris within the given Zone Names.

+
CLEANUP.TimeInterval + +
CLEANUP.ZoneNames + +
CLEANUP:_AddForCleanUp(CleanUpUnit, CleanUpUnitName) +

Add the DCSWrapper.Unit#Unit to the CleanUpList for CleanUp.

+
CLEANUP:_CleanUpScheduler() +

At the defined time interval, CleanUp the Groups within the CleanUpList.

+
CLEANUP:_DestroyGroup(GroupObject, CleanUpGroupName) +

Destroys a group from the simulator, but checks first if it is still existing!

+
CLEANUP:_DestroyMissile(MissileObject) + +
CLEANUP:_DestroyUnit(CleanUpUnit, CleanUpUnitName) +

Destroys a DCSWrapper.Unit#Unit from the simulator, but checks first if it is still existing!

+
CLEANUP:_EventAddForCleanUp(event, Event) +

Detects if the Unit has an SEVENTENGINESHUTDOWN or an SEVENT_HIT within the given ZoneNames.

+
CLEANUP:_EventCrash(event, Event) +

Detects if a crash event occurs.

+
CLEANUP:_EventHitCleanUp(event, Event) +

Detects if the Unit has an SEVENTHIT within the given ZoneNames.

+
CLEANUP:_EventShot(event, Event) +

Detects if a unit shoots a missile.

+
CLEANUP:_OnEventBirth(EventData) + +
+ +

Global(s)

+
+
+ + #CLEANUP + +CLEANUP + +
+
+ + + +
+
+

Type CleanUp

+ +

Type CLEANUP

+ +

The CLEANUP class.

+ +

Field(s)

+
+
+ + #string + +CLEANUP.ClassName + +
+
+ + + +
+
+
+
+ + + +CLEANUP.CleanUpList + +
+
+ + + +
+
+
+
+ + + +CLEANUP.CleanUpScheduler + +
+
+ + + +
+
+
+
+ + +CLEANUP:New(ZoneNames, TimeInterval) + +
+
+ +

Creates the main object which is handling the cleaning of the debris within the given Zone Names.

+ +

Parameters

+
    +
  • + +

    #table ZoneNames : +Is a table of zone names where the debris should be cleaned. Also a single string can be passed with one zone name.

    + +
  • +
  • + +

    #number TimeInterval : +The interval in seconds when the clean activity takes place. The default is 300 seconds, thus every 5 minutes.

    + +
  • +
+

Return value

+ +

#CLEANUP:

+ + +

Usage:

+
 -- Clean these Zones.
+CleanUpAirports = CLEANUP:New( { 'CLEAN Tbilisi', 'CLEAN Kutaisi' }, 150 )
+or
+CleanUpTbilisi = CLEANUP:New( 'CLEAN Tbilisi', 150 )
+CleanUpKutaisi = CLEANUP:New( 'CLEAN Kutaisi', 600 )
+ +
+
+
+
+ + + +CLEANUP.TimeInterval + +
+
+ + + +
+
+
+
+ + + +CLEANUP.ZoneNames + +
+
+ + + +
+
+
+
+ + +CLEANUP:_AddForCleanUp(CleanUpUnit, CleanUpUnitName) + +
+
+ +

Add the DCSWrapper.Unit#Unit to the CleanUpList for CleanUp.

+ +

Parameters

+
    +
  • + +

    CleanUpUnit :

    + +
  • +
  • + +

    CleanUpUnitName :

    + +
  • +
+
+
+
+
+ + +CLEANUP:_CleanUpScheduler() + +
+
+ +

At the defined time interval, CleanUp the Groups within the CleanUpList.

+ +
+
+
+
+ + +CLEANUP:_DestroyGroup(GroupObject, CleanUpGroupName) + +
+
+ +

Destroys a group from the simulator, but checks first if it is still existing!

+ +

Parameters

+
    +
  • + +

    Dcs.DCSWrapper.Group#Group GroupObject : +The object to be destroyed.

    + +
  • +
  • + +

    #string CleanUpGroupName : +The groupname...

    + +
  • +
+
+
+
+
+ + +CLEANUP:_DestroyMissile(MissileObject) + +
+
+ + + + +

TODO check Dcs.DCSTypes#Weapon +- Destroys a missile from the simulator, but checks first if it is still existing! + @param #CLEANUP self + @param Dcs.DCSTypes#Weapon MissileObject

+ +

Parameter

+
    +
  • + +

    MissileObject :

    + +
  • +
+
+
+
+
+ + +CLEANUP:_DestroyUnit(CleanUpUnit, CleanUpUnitName) + +
+
+ +

Destroys a DCSWrapper.Unit#Unit from the simulator, but checks first if it is still existing!

+ +

Parameters

+
    +
  • + +

    Dcs.DCSWrapper.Unit#Unit CleanUpUnit : +The object to be destroyed.

    + +
  • +
  • + +

    #string CleanUpUnitName : +The Unit name ...

    + +
  • +
+
+
+
+
+ + +CLEANUP:_EventAddForCleanUp(event, Event) + +
+
+ +

Detects if the Unit has an SEVENTENGINESHUTDOWN or an SEVENT_HIT within the given ZoneNames.

+ + +

If this is the case, add the Group to the CLEANUP List.

+ +

Parameters

+ +
+
+
+
+ + +CLEANUP:_EventCrash(event, Event) + +
+
+ +

Detects if a crash event occurs.

+ + +

Crashed units go into a CleanUpList for removal.

+ +

Parameters

+ +
+
+
+
+ + +CLEANUP:_EventHitCleanUp(event, Event) + +
+
+ +

Detects if the Unit has an SEVENTHIT within the given ZoneNames.

+ + +

If this is the case, destroy the unit.

+ +

Parameters

+ +
+
+
+
+ + +CLEANUP:_EventShot(event, Event) + +
+
+ +

Detects if a unit shoots a missile.

+ + +

If this occurs within one of the zones, then the weapon used must be destroyed.

+ +

Parameters

+ +
+
+
+
+ + +CLEANUP:_OnEventBirth(EventData) + +
+
+ + + +

Parameter

+ +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Client.html b/docs/Documentation/Client.html new file mode 100644 index 000000000..d4c925d9b --- /dev/null +++ b/docs/Documentation/Client.html @@ -0,0 +1,1128 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Client

+ +

This module contains the CLIENT class.

+ + + +

1) Client#CLIENT class, extends Unit#UNIT

+

Clients are those Units defined within the Mission Editor that have the skillset defined as Client or Player. +Note that clients are NOT the same as Units, they are NOT necessarily alive. +The Client#CLIENT class is a wrapper class to handle the DCS Unit objects that have the skillset defined as Client or Player:

+ +
    +
  • Wraps the DCS Unit objects with skill level set to Player or Client.
  • +
  • Support all DCS Unit APIs.
  • +
  • Enhance with Unit specific APIs not in the DCS Group API set.
  • +
  • When player joins Unit, execute alive init logic.
  • +
  • Handles messages to players.
  • +
  • Manage the "state" of the DCS Unit.
  • +
+ +

Clients are being used by the MISSION class to follow players and register their successes.

+ +

1.1) CLIENT reference methods

+

For each DCS Unit having skill level Player or Client, a CLIENT wrapper object (instance) will be created within the _DATABASE object. +This is done at the beginning of the mission (when the mission starts).

+ +

The CLIENT class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference +using the DCS Unit or the DCS UnitName.

+ +

Another thing to know is that CLIENT objects do not "contain" the DCS Unit object. +The CLIENT methods will reference the DCS Unit object by name when it is needed during API execution. +If the DCS Unit object does not exist or is nil, the CLIENT methods will return nil and log an exception in the DCS.log file.

+ +

The CLIENT class provides the following functions to retrieve quickly the relevant CLIENT instance:

+ +
    +
  • CLIENT.Find(): Find a CLIENT instance from the _DATABASE object using a DCS Unit object.
  • +
  • CLIENT.FindByName(): Find a CLIENT instance from the _DATABASE object using a DCS Unit name.
  • +
+ +

IMPORTANT: ONE SHOULD NEVER SANATIZE these CLIENT OBJECT REFERENCES! (make the CLIENT object references nil).

+ + +

Global(s)

+ + + + + +
CLIENT + +
+

Type CLIENT

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CLIENT:AddBriefing(ClientBriefing) +

AddBriefing adds a briefing to a CLIENT when a player joins a mission.

+
CLIENT:Alive(CallBackFunction, ...) +

Checks for a client alive event and calls a function on a continuous basis.

+
CLIENT.ClassName + +
CLIENT.ClientAlive + +
CLIENT.ClientAlive2 + +
CLIENT.ClientBriefing + +
CLIENT.ClientBriefingShown + +
CLIENT.ClientCallBack + +
CLIENT.ClientGroupID + +
CLIENT.ClientGroupName + +
CLIENT.ClientGroupUnit + +
CLIENT.ClientName + +
CLIENT.ClientParameters + +
CLIENT.ClientTransport + +
CLIENT:Find(ClientName, ClientBriefing, DCSUnit, Error) +

Finds a CLIENT from the _DATABASE using the relevant DCS Unit.

+
CLIENT:FindByName(ClientName, ClientBriefing, Error) +

Finds a CLIENT from the _DATABASE using the relevant Client Unit Name.

+
CLIENT:GetClientGroupDCSUnit() +

Returns the DCSUnit of the CLIENT.

+
CLIENT:GetClientGroupID() + +
CLIENT:GetClientGroupName() +

Get the name of the group of the client.

+
CLIENT:GetClientGroupUnit() +

Returns the UNIT of the CLIENT.

+
CLIENT:GetDCSGroup() +

Return the DCSGroup of a Client.

+
CLIENT:IsMultiSeated() +

Checks if the CLIENT is a multi-seated UNIT.

+
CLIENT:IsTransport() +

Evaluates if the CLIENT is a transport.

+
CLIENT:Message(Message, MessageDuration, MessageCategory, MessageInterval, MessageID) +

The main message driver for the CLIENT.

+
CLIENT.Messages + +
CLIENT.ONBOARDSIDE + +
CLIENT:Register(ClientName) + +
CLIENT:Reset(ClientName) +

Resets a CLIENT.

+
CLIENT:ShowBriefing() +

Show the briefing of a CLIENT.

+
CLIENT:ShowCargo() +

Shows the AI_Cargo#CARGO contained within the CLIENT to the player as a message.

+
CLIENT:ShowMissionBriefing(MissionBriefing) +

Show the mission briefing of a MISSION to the CLIENT.

+
CLIENT.SwitchMessages(PrmTable) + +
CLIENT:Transport() +

Transport defines that the Client is a Transport.

+
CLIENT:_AliveCheckScheduler(SchedulerName) + +
CLIENT._Menus + +
CLIENT._Tasks + +
+ +

Global(s)

+
+
+ + #CLIENT + +CLIENT + +
+
+ + + +
+
+

Type Client

+ +

Type CLIENT

+ +

The CLIENT class

+ +

Field(s)

+
+
+ + +CLIENT:AddBriefing(ClientBriefing) + +
+
+ +

AddBriefing adds a briefing to a CLIENT when a player joins a mission.

+ +

Parameter

+
    +
  • + +

    #string ClientBriefing : +is the text defining the Mission briefing.

    + +
  • +
+

Return value

+ +

#CLIENT: +self

+ +
+
+
+
+ + +CLIENT:Alive(CallBackFunction, ...) + +
+
+ +

Checks for a client alive event and calls a function on a continuous basis.

+ +

Parameters

+
    +
  • + +

    #function CallBackFunction : +Create a function that will be called when a player joins the slot.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#CLIENT:

+ + +
+
+
+
+ + #string + +CLIENT.ClassName + +
+
+ + + +
+
+
+
+ + #boolean + +CLIENT.ClientAlive + +
+
+ + + +
+
+
+
+ + #boolean + +CLIENT.ClientAlive2 + +
+
+ + + +
+
+
+
+ + + +CLIENT.ClientBriefing + +
+
+ + + +
+
+
+
+ + #boolean + +CLIENT.ClientBriefingShown + +
+
+ + + +
+
+
+
+ + + +CLIENT.ClientCallBack + +
+
+ + + +
+
+
+
+ + + +CLIENT.ClientGroupID + +
+
+ + + +
+
+
+
+ + + +CLIENT.ClientGroupName + +
+
+ + + +
+
+
+
+ + +CLIENT.ClientGroupUnit + +
+
+ + + +
+
+
+
+ + +CLIENT.ClientName + +
+
+ + + +
+
+
+
+ + + +CLIENT.ClientParameters + +
+
+ + + +
+
+
+
+ + #boolean + +CLIENT.ClientTransport + +
+
+ + + +
+
+
+
+ + +CLIENT:Find(ClientName, ClientBriefing, DCSUnit, Error) + +
+
+ +

Finds a CLIENT from the _DATABASE using the relevant DCS Unit.

+ +

Parameters

+
    +
  • + +

    #string ClientName : +Name of the DCS Unit as defined within the Mission Editor.

    + +
  • +
  • + +

    #string ClientBriefing : +Text that describes the briefing of the mission when a Player logs into the Client.

    + +
  • +
  • + +

    DCSUnit :

    + +
  • +
  • + +

    Error :

    + +
  • +
+

Return value

+ +

#CLIENT:

+ + +

Usage:

+
-- Create new Clients.
+ local Mission = MISSIONSCHEDULER.AddMission( 'Russia Transport Troops SA-6', 'Operational', 'Transport troops from the control center to one of the SA-6 SAM sites to activate their operation.', 'Russia' )
+ Mission:AddGoal( DeploySA6TroopsGoal )
+
+ Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 1' ):Transport() )
+ Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 3' ):Transport() )
+ Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 2' ):Transport() )
+ Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 4' ):Transport() )
+ +
+
+
+
+ + +CLIENT:FindByName(ClientName, ClientBriefing, Error) + +
+
+ +

Finds a CLIENT from the _DATABASE using the relevant Client Unit Name.

+ + +

As an optional parameter, a briefing text can be given also.

+ +

Parameters

+
    +
  • + +

    #string ClientName : +Name of the DCS Unit as defined within the Mission Editor.

    + +
  • +
  • + +

    #string ClientBriefing : +Text that describes the briefing of the mission when a Player logs into the Client.

    + +
  • +
  • + +

    #boolean Error : +A flag that indicates whether an error should be raised if the CLIENT cannot be found. By default an error will be raised.

    + +
  • +
+

Return value

+ +

#CLIENT:

+ + +

Usage:

+
-- Create new Clients.
+	local Mission = MISSIONSCHEDULER.AddMission( 'Russia Transport Troops SA-6', 'Operational', 'Transport troops from the control center to one of the SA-6 SAM sites to activate their operation.', 'Russia' )
+	Mission:AddGoal( DeploySA6TroopsGoal )
+
+	Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 1' ):Transport() )
+	Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 3' ):Transport() )
+	Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*HOT-Deploy Troops 2' ):Transport() )
+	Mission:AddClient( CLIENT:FindByName( 'RU MI-8MTV2*RAMP-Deploy Troops 4' ):Transport() )
+ +
+
+
+
+ + +CLIENT:GetClientGroupDCSUnit() + +
+
+ +

Returns the DCSUnit of the CLIENT.

+ +

Return value

+ +

Dcs.DCSTypes#Unit:

+ + +
+
+
+
+ + +CLIENT:GetClientGroupID() + +
+
+ + + + +

TODO: Check Dcs.DCSTypes#Group.ID +- Get the group ID of the client. + @param #CLIENT self + @return Dcs.DCSTypes#Group.ID

+ +
+
+
+
+ + +CLIENT:GetClientGroupName() + +
+
+ +

Get the name of the group of the client.

+ +

Return value

+ +

#string:

+ + +
+
+
+
+ + +CLIENT:GetClientGroupUnit() + +
+
+ +

Returns the UNIT of the CLIENT.

+ +

Return value

+ +

Wrapper.Unit#UNIT:

+ + +
+
+
+
+ + +CLIENT:GetDCSGroup() + +
+
+ +

Return the DCSGroup of a Client.

+ + +

This function is modified to deal with a couple of bugs in DCS 1.5.3

+ +

Return value

+ +

Dcs.DCSWrapper.Group#Group:

+ + +
+
+
+
+ + +CLIENT:IsMultiSeated() + +
+
+ +

Checks if the CLIENT is a multi-seated UNIT.

+ +

Return value

+ +

#boolean: +true if multi-seated.

+ +
+
+
+
+ + +CLIENT:IsTransport() + +
+
+ +

Evaluates if the CLIENT is a transport.

+ +

Return value

+ +

#boolean: +true is a transport.

+ +
+
+
+
+ + +CLIENT:Message(Message, MessageDuration, MessageCategory, MessageInterval, MessageID) + +
+
+ +

The main message driver for the CLIENT.

+ + +

This function displays various messages to the Player logged into the CLIENT through the DCS World Messaging system.

+ +

Parameters

+
    +
  • + +

    #string Message : +is the text describing the message.

    + +
  • +
  • + +

    #number MessageDuration : +is the duration in seconds that the Message should be displayed.

    + +
  • +
  • + +

    #string MessageCategory : +is the category of the message (the title).

    + +
  • +
  • + +

    #number MessageInterval : +is the interval in seconds between the display of the Message#MESSAGE when the CLIENT is in the air.

    + +
  • +
  • + +

    #string MessageID : +is the identifier of the message when displayed with intervals.

    + +
  • +
+
+
+
+
+ + + +CLIENT.Messages + +
+
+ + + +
+
+
+
+ + + +CLIENT.ONBOARDSIDE + +
+
+ + + +
+
+
+
+ + +CLIENT:Register(ClientName) + +
+
+ + + +

Parameter

+
    +
  • + +

    ClientName :

    + +
  • +
+
+
+
+
+ + +CLIENT:Reset(ClientName) + +
+
+ +

Resets a CLIENT.

+ +

Parameter

+
    +
  • + +

    #string ClientName : +Name of the Group as defined within the Mission Editor. The Group must have a Unit with the type Client.

    + +
  • +
+
+
+
+
+ + +CLIENT:ShowBriefing() + +
+
+ +

Show the briefing of a CLIENT.

+ +

Return value

+ +

#CLIENT: +self

+ +
+
+
+
+ + +CLIENT:ShowCargo() + +
+
+ +

Shows the AI_Cargo#CARGO contained within the CLIENT to the player as a message.

+ + +

The AI_Cargo#CARGO is shown using the Message#MESSAGE distribution system.

+ +
+
+
+
+ + +CLIENT:ShowMissionBriefing(MissionBriefing) + +
+
+ +

Show the mission briefing of a MISSION to the CLIENT.

+ +

Parameter

+
    +
  • + +

    #string MissionBriefing :

    + +
  • +
+

Return value

+ +

#CLIENT: +self

+ +
+
+
+
+ + +CLIENT.SwitchMessages(PrmTable) + +
+
+ + + + +

TODO (1) I urgently need to revise this. +- A local function called by the DCS World Menu system to switch off messages.

+ +

Parameter

+
    +
  • + +

    PrmTable :

    + +
  • +
+
+
+
+
+ + +CLIENT:Transport() + +
+
+ +

Transport defines that the Client is a Transport.

+ + +

Transports show cargo.

+ +

Return value

+ +

#CLIENT:

+ + +
+
+
+
+ + +CLIENT:_AliveCheckScheduler(SchedulerName) + +
+
+ + + +

Parameter

+
    +
  • + +

    SchedulerName :

    + +
  • +
+
+
+
+
+ + + +CLIENT._Menus + +
+
+ + + +
+
+
+
+ + + +CLIENT._Tasks + +
+
+ + + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/CommandCenter.html b/docs/Documentation/CommandCenter.html new file mode 100644 index 000000000..c3e048507 --- /dev/null +++ b/docs/Documentation/CommandCenter.html @@ -0,0 +1,846 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module CommandCenter

+ +

A COMMANDCENTER is the owner of multiple missions within MOOSE.

+ + +

A COMMANDCENTER governs multiple missions, the tasking and the reporting.

+ +

Global(s)

+ + + + + + + + + +
COMMANDCENTER + +
REPORT + +
+

Type COMMANDCENTER

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
COMMANDCENTER:AddMission(Mission) +

Add a MISSION to be governed by the HQ command center.

+
COMMANDCENTER.ClassName + +
COMMANDCENTER.CommandCenterCoalition + +
COMMANDCENTER.CommandCenterMenu + +
COMMANDCENTER.CommandCenterName + +
COMMANDCENTER.CommandCenterPositionable + +
COMMANDCENTER:GetMenu() +

Gets the commandcenter menu structure governed by the HQ command center.

+
COMMANDCENTER:GetMissions() +

Get the Missions governed by the HQ command center.

+
COMMANDCENTER:GetName() +

Gets the name of the HQ command center.

+
COMMANDCENTER:GetPositionable() +

Gets the POSITIONABLE of the HQ command center.

+
COMMANDCENTER.HQ + +
COMMANDCENTER:HasGroup(Wrapper, MissionGroup) +

Checks of the COMMANDCENTER has a GROUP.

+
COMMANDCENTER:MessageToAll(Message) +

Send a CC message to the coalition of the CC.

+
COMMANDCENTER:MessageToCoalition(Message) +

Send a CC message to the coalition of the CC.

+
COMMANDCENTER:MessageToGroup(Message, TaskGroup, Name) +

Send a CC message to a GROUP.

+
COMMANDCENTER.Name + +
COMMANDCENTER:New(CommandCenterPositionable, CommandCenterName) +

The constructor takes an IDENTIFIABLE as the HQ command center.

+
COMMANDCENTER:RemoveMission(Mission) +

Removes a MISSION to be governed by the HQ command center.

+
COMMANDCENTER:ReportDetails(ReportGroup, Task) +

Report the status of a Task to a Group.

+
COMMANDCENTER:ReportSummary(ReportGroup) +

Report the status of all MISSIONs to a GROUP.

+
COMMANDCENTER:SetMenu() +

Sets the menu structure of the Missions governed by the HQ command center.

+
+ +

Type REPORT

+ + + + + + + + + + + + + + + + + +
REPORT:Add(Text) +

Add a new line to a REPORT.

+
REPORT.ClassName + +
REPORT:New(Title) +

Create a new REPORT.

+
REPORT:Text(Delimiter) +

Produces the text of the report, taking into account an optional delimeter, which is \n by default.

+
+ +

Global(s)

+
+
+ + #COMMANDCENTER + +COMMANDCENTER + +
+
+ + + +
+
+
+
+ + #REPORT + +REPORT + +
+
+ + + +
+
+

Type CommandCenter

+ +

Type COMMANDCENTER

+ +

The COMMANDCENTER class

+ +

Field(s)

+
+
+ + +COMMANDCENTER:AddMission(Mission) + +
+
+ +

Add a MISSION to be governed by the HQ command center.

+ +

Parameter

+ +

Return value

+ +

Tasking.Mission#MISSION:

+ + +
+
+
+
+ + #string + +COMMANDCENTER.ClassName + +
+
+ + + +
+
+
+
+ + Dcs.DCSCoalitionWrapper.Object#coalition + +COMMANDCENTER.CommandCenterCoalition + +
+
+ + + +
+
+
+
+ + +COMMANDCENTER.CommandCenterMenu + +
+
+ + + +
+
+
+
+ + #string + +COMMANDCENTER.CommandCenterName + +
+
+ + + +
+
+
+
+ + +COMMANDCENTER.CommandCenterPositionable + +
+
+ + + +
+
+
+
+ + +COMMANDCENTER:GetMenu() + +
+
+ +

Gets the commandcenter menu structure governed by the HQ command center.

+ +

Return value

+ +

Core.Menu#MENU_COALITION:

+ + +
+
+
+
+ + +COMMANDCENTER:GetMissions() + +
+
+ +

Get the Missions governed by the HQ command center.

+ +

Return value

+ +

#list: +Tasking.Mission#MISSION>

+ +
+
+
+
+ + +COMMANDCENTER:GetName() + +
+
+ +

Gets the name of the HQ command center.

+ +

Return value

+ +

#string:

+ + +
+
+
+
+ + +COMMANDCENTER:GetPositionable() + +
+
+ +

Gets the POSITIONABLE of the HQ command center.

+ +

Return value

+ +

Wrapper.Positionable#POSITIONABLE:

+ + +
+
+
+
+ + Wrapper.Group#GROUP + +COMMANDCENTER.HQ + +
+
+ + + +
+
+
+
+ + +COMMANDCENTER:HasGroup(Wrapper, MissionGroup) + +
+
+ +

Checks of the COMMANDCENTER has a GROUP.

+ +

Parameters

+
    +
  • + +

    Wrapper : +Group#GROUP

    + +
  • +
  • + +

    MissionGroup :

    + +
  • +
+

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +COMMANDCENTER:MessageToAll(Message) + +
+
+ +

Send a CC message to the coalition of the CC.

+ +

Parameter

+
    +
  • + +

    Message :

    + +
  • +
+
+
+
+
+ + +COMMANDCENTER:MessageToCoalition(Message) + +
+
+ +

Send a CC message to the coalition of the CC.

+ +

Parameter

+
    +
  • + +

    Message :

    + +
  • +
+
+
+
+
+ + +COMMANDCENTER:MessageToGroup(Message, TaskGroup, Name) + +
+
+ +

Send a CC message to a GROUP.

+ +

Parameters

+
    +
  • + +

    #string Message :

    + +
  • +
  • + +

    Wrapper.Group#GROUP TaskGroup :

    + +
  • +
  • + +

    #sring Name : +(optional) The name of the Group used as a prefix for the message to the Group. If not provided, there will be nothing shown.

    + +
  • +
+
+
+
+
+ + #string + +COMMANDCENTER.Name + +
+
+ + + +
+
+
+
+ + +COMMANDCENTER:New(CommandCenterPositionable, CommandCenterName) + +
+
+ +

The constructor takes an IDENTIFIABLE as the HQ command center.

+ +

Parameters

+ +

Return value

+ +

#COMMANDCENTER:

+ + +
+
+
+
+ + +COMMANDCENTER:RemoveMission(Mission) + +
+
+ +

Removes a MISSION to be governed by the HQ command center.

+ + +

The given Mission is not nilified.

+ +

Parameter

+ +

Return value

+ +

Tasking.Mission#MISSION:

+ + +
+
+
+
+ + +COMMANDCENTER:ReportDetails(ReportGroup, Task) + +
+
+ +

Report the status of a Task to a Group.

+ + +

Report the details of a Mission, listing the Mission, and all the Task details.

+ +

Parameters

+
    +
  • + +

    ReportGroup :

    + +
  • +
  • + +

    Task :

    + +
  • +
+
+
+
+
+ + +COMMANDCENTER:ReportSummary(ReportGroup) + +
+
+ +

Report the status of all MISSIONs to a GROUP.

+ + +

Each Mission is listed, with an indication how many Tasks are still to be completed.

+ +

Parameter

+
    +
  • + +

    ReportGroup :

    + +
  • +
+
+
+
+
+ + +COMMANDCENTER:SetMenu() + +
+
+ +

Sets the menu structure of the Missions governed by the HQ command center.

+ +
+
+ +

Type REPORT

+ +

The REPORT class

+ +

Field(s)

+
+
+ + +REPORT:Add(Text) + +
+
+ +

Add a new line to a REPORT.

+ +

Parameter

+
    +
  • + +

    #string Text :

    + +
  • +
+

Return value

+ +

#REPORT:

+ + +
+
+
+
+ + #string + +REPORT.ClassName + +
+
+ + + +
+
+
+
+ + +REPORT:New(Title) + +
+
+ +

Create a new REPORT.

+ +

Parameter

+
    +
  • + +

    #string Title :

    + +
  • +
+

Return value

+ +

#REPORT:

+ + +
+
+
+
+ + +REPORT:Text(Delimiter) + +
+
+ +

Produces the text of the report, taking into account an optional delimeter, which is \n by default.

+ +

Parameter

+
    +
  • + +

    #string Delimiter : +(optional) A delimiter text.

    + +
  • +
+

Return value

+ +

#string: +The report text.

+ +
+
+ +

Type TASK

+ +

Type list

+ +

Type sring

+ +
+ +
+ + diff --git a/docs/Documentation/Controllable.html b/docs/Documentation/Controllable.html new file mode 100644 index 000000000..2aeac8f53 --- /dev/null +++ b/docs/Documentation/Controllable.html @@ -0,0 +1,3222 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Controllable

+ +

This module contains the CONTROLLABLE class.

+ + + +

1) Controllable#CONTROLLABLE class, extends Positionable#POSITIONABLE

+

The Controllable#CONTROLLABLE class is a wrapper class to handle the DCS Controllable objects:

+ +
    +
  • Support all DCS Controllable APIs.
  • +
  • Enhance with Controllable specific APIs not in the DCS Controllable API set.
  • +
  • Handle local Controllable Controller.
  • +
  • Manage the "state" of the DCS Controllable.
  • +
+ +

1.1) CONTROLLABLE constructor

+

The CONTROLLABLE class provides the following functions to construct a CONTROLLABLE instance:

+ + + +

1.2) CONTROLLABLE task methods

+

Several controllable task methods are available that help you to prepare tasks. +These methods return a string consisting of the task description, which can then be given to either a Controllable#CONTROLLABLE.PushTask or Controllable#SetTask method to assign the task to the CONTROLLABLE. +Tasks are specific for the category of the CONTROLLABLE, more specific, for AIR, GROUND or AIR and GROUND. +Each task description where applicable indicates for which controllable category the task is valid. +There are 2 main subdivisions of tasks: Assigned tasks and EnRoute tasks.

+ +

1.2.1) Assigned task methods

+ +

Assigned task methods make the controllable execute the task where the location of the (possible) targets of the task are known before being detected. +This is different from the EnRoute tasks, where the targets of the task need to be detected before the task can be executed.

+ +

Find below a list of the assigned task methods:

+ + + +

1.2.2) EnRoute task methods

+ +

EnRoute tasks require the targets of the task need to be detected by the controllable (using its sensors) before the task can be executed:

+ + + +

1.2.3) Preparation task methods

+ +

There are certain task methods that allow to tailor the task behaviour:

+ + + +

1.2.4) Obtain the mission from controllable templates

+ +

Controllable templates contain complete mission descriptions. Sometimes you want to copy a complete mission from a controllable and assign it to another:

+ + + +

1.3) CONTROLLABLE Command methods

+

Controllable command methods prepare the execution of commands using the CONTROLLABLE.SetCommand method:

+ + + +

1.4) CONTROLLABLE Option methods

+

Controllable Option methods change the behaviour of the Controllable while being alive.

+ +

1.4.1) Rule of Engagement:

+ + + +

To check whether an ROE option is valid for a specific controllable, use:

+ + + +

1.4.2) Rule on thread:

+ + + +

To test whether an ROT option is valid for a specific controllable, use:

+ + + +
+ + +

Global(s)

+ + + + + +
CONTROLLABLE + +
+

Type CONTROLLABLE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CONTROLLABLE.ClassName + +
CONTROLLABLE:ClearTasks() +

Clear all tasks from the controllable.

+
CONTROLLABLE:CommandDoScript(DoScript) +

Do Script command

+
CONTROLLABLE:CommandStopRoute(StopRoute) +

Create a stop route command, which returns a string containing the command.

+
CONTROLLABLE:CommandSwitchWayPoint(FromWayPoint, ToWayPoint) +

Perform a switch waypoint command

+
CONTROLLABLE.ControllableName +

The name of the controllable.

+
CONTROLLABLE:CopyRoute(Begin, End, Randomize, Radius) +

Return the route of a controllable by using the Database#DATABASE class.

+
CONTROLLABLE.DCSControllable +

The DCS controllable class.

+
CONTROLLABLE:EnRouteTaskAWACS() +

(AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts).

+
CONTROLLABLE:EnRouteTaskEWR() +

(GROUND) Ground unit (EW-radar) will act as an EWR for friendly units (will provide them with information about contacts).

+
CONTROLLABLE:EnRouteTaskEngageGroup(AttackGroup, Priority, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit) +

(AIR) Engaging a controllable.

+
CONTROLLABLE:EnRouteTaskEngageTargets(Distance, TargetTypes, Priority) +

(AIR) Engaging targets of defined types.

+
CONTROLLABLE:EnRouteTaskEngageUnit(EngageUnit, Priority, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, ControllableAttack) +

(AIR) Search and attack the Unit.

+
CONTROLLABLE:EnRouteTaskFAC(Radius, Priority) +

(AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose a targets (enemy ground controllable) around as well as other assigned targets.

+
CONTROLLABLE:EnRouteTaskFAC_EngageGroup(AttackGroup, Priority, WeaponType, Designation, Datalink) +

(AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose the target (enemy ground controllable) as well as other assigned targets.

+
CONTROLLABLE:EnRouteTaskTanker() +

(AIR) Aircraft will act as a tanker for friendly units.

+
CONTROLLABLE:GetDetectedTargets(DetectVisual, DetectOptical, DetectRadar, DetectIRST, DetectRWR, DetectDLINK) +

Return the detected targets of the controllable.

+
CONTROLLABLE:GetLife() +

Returns the health.

+
CONTROLLABLE:GetTaskMission() +

Return the mission template of the controllable.

+
CONTROLLABLE:GetTaskRoute() +

Return the mission route of the controllable.

+
CONTROLLABLE:GetUnits() +

Returns the UNITs wrappers of the DCS Units of the Controllable (default is a GROUP).

+
CONTROLLABLE:GetWayPoints() +

Get the current WayPoints set with the WayPoint functions( Note that the WayPoints can be nil, although there ARE waypoints).

+
CONTROLLABLE:IsTargetDetected(DCSObject) + +
CONTROLLABLE:New(ControllableName) +

Create a new CONTROLLABLE from a DCSControllable

+
CONTROLLABLE:OptionROEHoldFire() +

Holding weapons.

+
CONTROLLABLE:OptionROEHoldFirePossible() +

Can the CONTROLLABLE hold their weapons?

+
CONTROLLABLE:OptionROEOpenFire() +

Openfire.

+
CONTROLLABLE:OptionROEOpenFirePossible() +

Can the CONTROLLABLE attack designated targets?

+
CONTROLLABLE:OptionROEReturnFire() +

Return fire.

+
CONTROLLABLE:OptionROEReturnFirePossible() +

Can the CONTROLLABLE attack returning on enemy fire?

+
CONTROLLABLE:OptionROEWeaponFree() +

Weapon free.

+
CONTROLLABLE:OptionROEWeaponFreePossible() +

Can the CONTROLLABLE attack targets of opportunity?

+
CONTROLLABLE:OptionROTEvadeFire() +

Evade on fire.

+
CONTROLLABLE:OptionROTEvadeFirePossible() +

Can the CONTROLLABLE evade on enemy fire?

+
CONTROLLABLE:OptionROTNoReaction() +

No evasion on enemy threats.

+
CONTROLLABLE:OptionROTNoReactionPossible() +

Can the CONTROLLABLE ignore enemy fire?

+
CONTROLLABLE:OptionROTPassiveDefense() +

Evasion passive defense.

+
CONTROLLABLE:OptionROTPassiveDefensePossible() +

Can the CONTROLLABLE evade using passive defenses?

+
CONTROLLABLE:OptionROTVertical() +

Evade on fire using vertical manoeuvres.

+
CONTROLLABLE:OptionROTVerticalPossible() +

Can the CONTROLLABLE evade on fire using vertical manoeuvres?

+
CONTROLLABLE:PopCurrentTask() +

Popping current Task from the controllable.

+
CONTROLLABLE:PushTask(DCSTask, WaitTime) +

Pushing Task on the queue from the controllable.

+
CONTROLLABLE:Route(GoPoints) +

Make the controllable to follow a given route.

+
CONTROLLABLE:RouteToVec2(Point, Speed) +

(AIR + GROUND) Make the Controllable move to fly to a given point.

+
CONTROLLABLE:RouteToVec3(Point, Speed) +

(AIR + GROUND) Make the Controllable move to a given point.

+
CONTROLLABLE:SetCommand(DCSCommand) +

Executes a command action

+
CONTROLLABLE:SetTask(DCSTask, WaitTime) +

Clearing the Task Queue and Setting the Task on the queue from the controllable.

+
CONTROLLABLE:TaskAttackGroup(AttackGroup, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit) +

(AIR) Attack a Controllable.

+
CONTROLLABLE:TaskAttackMapObject(Vec2, WeaponType, WeaponExpend, AttackQty, Direction, ControllableAttack) +

(AIR) Attacking the map object (building, structure, e.t.c).

+
CONTROLLABLE:TaskAttackUnit(AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, WeaponType) +

(AIR) Attack the Unit.

+
CONTROLLABLE:TaskBombing(Vec2, WeaponType, WeaponExpend, AttackQty, Direction, ControllableAttack) +

(AIR) Delivering weapon at the point on the ground.

+
CONTROLLABLE:TaskBombingRunway(Airbase, WeaponType, WeaponExpend, AttackQty, Direction, ControllableAttack) +

(AIR) Delivering weapon on the runway.

+
CONTROLLABLE:TaskCombo(DCSTasks) +

Return a Combo Task taking an array of Tasks.

+
CONTROLLABLE:TaskCondition(time, userFlag, userFlagValue, condition, duration, lastWayPoint) +

Return a condition section for a controlled task.

+
CONTROLLABLE:TaskControlled(DCSTask, DCSStopCondition) +

Return a Controlled Task taking a Task and a TaskCondition.

+
CONTROLLABLE:TaskEmbarkToTransport(Point, Radius) +

Move to a defined Vec2 Point, and embark to a controllable when arrived within a defined Radius.

+
CONTROLLABLE:TaskEmbarking(Point, Duration, EmbarkingControllable) +

(AIR) Move the controllable to a Vec2 Point, wait for a defined duration and embark a controllable.

+
CONTROLLABLE:TaskEscort(EscortControllable, Vec3, LastWaypointIndex, EngagementDistanceMax, TargetTypes, FollowControllable, EngagementDistance) +

(AIR) Escort another airborne controllable.

+
CONTROLLABLE:TaskFAC_AttackGroup(AttackGroup, WeaponType, Designation, Datalink) +

(AIR + GROUND) The task makes the controllable/unit a FAC and orders the FAC to control the target (enemy ground controllable) destruction.

+
CONTROLLABLE:TaskFireAtPoint(Vec2, Radius, AmmoCount) +

(GROUND) Fire at a VEC2 point until ammunition is finished.

+
CONTROLLABLE:TaskFollow(FollowControllable, Vec3, LastWaypointIndex) +

(AIR) Following another airborne controllable.

+
CONTROLLABLE:TaskFunction(WayPoint, WayPointIndex, FunctionString, FunctionArguments) + +
CONTROLLABLE:TaskHold() +

(GROUND) Hold ground controllable from moving.

+
CONTROLLABLE:TaskHoldPosition(Duration) +

(AIR) Hold position at the current position of the first unit of the controllable.

+
CONTROLLABLE:TaskLandAtVec2(Point, Duration) +

(AIR HELICOPTER) Landing at the ground.

+
CONTROLLABLE:TaskLandAtZone(Zone, Duration, RandomPoint) +

(AIR) Land the controllable at a @{Zone#ZONE_RADIUS).

+
CONTROLLABLE:TaskMission(TaskMission) +

(AIR + GROUND) Return a mission task from a mission template.

+
CONTROLLABLE:TaskOrbitCircle(Altitude, Speed) +

(AIR) Orbit at the current position of the first unit of the controllable at a specified alititude.

+
CONTROLLABLE:TaskOrbitCircleAtVec2(Point, Altitude, Speed) +

(AIR) Orbit at a specified position at a specified alititude during a specified duration with a specified speed.

+
CONTROLLABLE:TaskRefueling() +

(AIR) Refueling from the nearest tanker.

+
CONTROLLABLE:TaskRoute(Points) +

Return a Misson task to follow a given route defined by Points.

+
CONTROLLABLE:TaskRouteToZone(Zone, Randomize, Speed, Formation) +

(AIR + GROUND) Route the controllable to a given zone.

+
CONTROLLABLE:TaskWrappedAction(DCSCommand, Index) +

Return a WrappedAction Task taking a Command.

+
CONTROLLABLE:WayPointExecute(WayPoint, WaitTime) +

Executes the WayPoint plan.

+
CONTROLLABLE:WayPointFunction(WayPoint, WayPointIndex, WayPointFunction, ...) +

Registers a waypoint function that will be executed when the controllable moves over the WayPoint.

+
CONTROLLABLE.WayPointFunctions + +
CONTROLLABLE:WayPointInitialize(WayPoints) +

Retrieve the controllable mission and allow to place function hooks within the mission waypoint plan.

+
CONTROLLABLE.WayPoints + +
CONTROLLABLE:_GetController() +

Get the controller for the CONTROLLABLE.

+
+ +

Global(s)

+
+
+ + #CONTROLLABLE + +CONTROLLABLE + +
+
+ + + +
+
+

Type Controllable

+ +

Type CONTROLLABLE

+ +

The CONTROLLABLE class

+ +

Field(s)

+
+
+ + #string + +CONTROLLABLE.ClassName + +
+
+ + + +
+
+
+
+ + +CONTROLLABLE:ClearTasks() + +
+
+ +

Clear all tasks from the controllable.

+ +

Return value

+ +

#CONTROLLABLE:

+ + +
+
+
+
+ + +CONTROLLABLE:CommandDoScript(DoScript) + +
+
+ +

Do Script command

+ +

Parameter

+
    +
  • + +

    #string DoScript :

    + +
  • +
+

Return value

+ +

#DCSCommand:

+ + +
+
+
+
+ + +CONTROLLABLE:CommandStopRoute(StopRoute) + +
+
+ +

Create a stop route command, which returns a string containing the command.

+ + +

Use the result in the method CONTROLLABLE.SetCommand(). +A value of true will make the ground group stop, a value of false will make it continue. +Note that this can only work on GROUP level, although individual UNITs can be commanded, the whole GROUP will react.

+ +

Example missions:

+ +
    +
  • GRP-310 +
  • +
+ +

Parameter

+
    +
  • + +

    #boolean StopRoute : +true if the ground unit needs to stop, false if it needs to continue to move.

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task:

+ + +
+
+
+
+ + +CONTROLLABLE:CommandSwitchWayPoint(FromWayPoint, ToWayPoint) + +
+
+ +

Perform a switch waypoint command

+ +

Parameters

+
    +
  • + +

    #number FromWayPoint :

    + +
  • +
  • + +

    #number ToWayPoint :

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task:

+ + +

Usage:

+
--- This test demonstrates the use(s) of the SwitchWayPoint method of the GROUP class.
+HeliGroup = GROUP:FindByName( "Helicopter" )
+
+--- Route the helicopter back to the FARP after 60 seconds.
+-- We use the SCHEDULER class to do this.
+SCHEDULER:New( nil,
+  function( HeliGroup )
+   local CommandRTB = HeliGroup:CommandSwitchWayPoint( 2, 8 )
+   HeliGroup:SetCommand( CommandRTB )
+ end, { HeliGroup }, 90 
+)
+ +
+
+
+
+ + #string + +CONTROLLABLE.ControllableName + +
+
+ +

The name of the controllable.

+ +
+
+
+
+ + +CONTROLLABLE:CopyRoute(Begin, End, Randomize, Radius) + +
+
+ +

Return the route of a controllable by using the Database#DATABASE class.

+ +

Parameters

+
    +
  • + +

    #number Begin : +The route point from where the copy will start. The base route point is 0.

    + +
  • +
  • + +

    #number End : +The route point where the copy will end. The End point is the last point - the End point. The last point has base 0.

    + +
  • +
  • + +

    #boolean Randomize : +Randomization of the route, when true.

    + +
  • +
  • + +

    #number Radius : +When randomization is on, the randomization is within the radius.

    + +
  • +
+
+
+
+
+ + Dcs.DCSWrapper.Controllable#Controllable + +CONTROLLABLE.DCSControllable + +
+
+ +

The DCS controllable class.

+ +
+
+
+
+ + +CONTROLLABLE:EnRouteTaskAWACS() + +
+
+ +

(AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts).

+ + +

No parameters.

+ +

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:EnRouteTaskEWR() + +
+
+ +

(GROUND) Ground unit (EW-radar) will act as an EWR for friendly units (will provide them with information about contacts).

+ + +

No parameters.

+ +

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:EnRouteTaskEngageGroup(AttackGroup, Priority, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit) + +
+
+ +

(AIR) Engaging a controllable.

+ + +

The task does not assign the target controllable to the unit/controllable to attack now; it just allows the unit/controllable to engage the target controllable as well as other assigned targets.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE AttackGroup : +The Controllable to be attacked.

    + +
  • +
  • + +

    #number Priority : +All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

    + +
  • +
  • + +

    #number WeaponType : +(optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

    + +
  • +
  • + +

    Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : +(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    + +
  • +
  • + +

    #number AttackQty : +(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    + +
  • +
  • + +

    Dcs.DCSTypes#Azimuth Direction : +(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    + +
  • +
  • + +

    Dcs.DCSTypes#Distance Altitude : +(optional) Desired attack start altitude. Controllable/aircraft will make its attacks from the altitude. If the altitude is too low or too high to use weapon aircraft/controllable will choose closest altitude to the desired attack start altitude. If the desired altitude is defined controllable/aircraft will not attack from safe altitude.

    + +
  • +
  • + +

    #boolean AttackQtyLimit : +(optional) The flag determines how to interpret attackQty parameter. If the flag is true then attackQty is a limit on maximal attack quantity for "AttackGroup" and "AttackUnit" tasks. If the flag is false then attackQty is a desired attack quantity for "Bombing" and "BombingRunway" tasks.

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:EnRouteTaskEngageTargets(Distance, TargetTypes, Priority) + +
+
+ +

(AIR) Engaging targets of defined types.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Distance Distance : +Maximal distance from the target to a route leg. If the target is on a greater distance it will be ignored.

    + +
  • +
  • + +

    Dcs.DCSTypes#AttributeNameArray TargetTypes : +Array of target categories allowed to engage.

    + +
  • +
  • + +

    #number Priority : +All enroute tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:EnRouteTaskEngageUnit(EngageUnit, Priority, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, ControllableAttack) + +
+
+ +

(AIR) Search and attack the Unit.

+ +

Parameters

+
    +
  • + +

    Wrapper.Unit#UNIT EngageUnit : +The UNIT.

    + +
  • +
  • + +

    #number Priority : +(optional) All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

    + +
  • +
  • + +

    #boolean GroupAttack : +(optional) If true, all units in the group will attack the Unit when found.

    + +
  • +
  • + +

    Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : +(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    + +
  • +
  • + +

    #number AttackQty : +(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    + +
  • +
  • + +

    Dcs.DCSTypes#Azimuth Direction : +(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    + +
  • +
  • + +

    Dcs.DCSTypes#Distance Altitude : +(optional) Desired altitude to perform the unit engagement.

    + +
  • +
  • + +

    #boolean Visible : +(optional) Unit must be visible.

    + +
  • +
  • + +

    #boolean ControllableAttack : +(optional) Flag indicates that the target must be engaged by all aircrafts of the controllable. Has effect only if the task is assigned to a controllable, not to a single aircraft.

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:EnRouteTaskFAC(Radius, Priority) + +
+
+ +

(AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose a targets (enemy ground controllable) around as well as other assigned targets.

+ + +

The killer is player-controlled allied CAS-aircraft that is in contact with the FAC. +If the task is assigned to the controllable lead unit will be a FAC.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Distance Radius : + The maximal distance from the FAC to a target.

    + +
  • +
  • + +

    #number Priority : +All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:EnRouteTaskFAC_EngageGroup(AttackGroup, Priority, WeaponType, Designation, Datalink) + +
+
+ +

(AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose the target (enemy ground controllable) as well as other assigned targets.

+ + +

The killer is player-controlled allied CAS-aircraft that is in contact with the FAC. +If the task is assigned to the controllable lead unit will be a FAC.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE AttackGroup : +Target CONTROLLABLE.

    + +
  • +
  • + +

    #number Priority : +All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.

    + +
  • +
  • + +

    #number WeaponType : +Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

    + +
  • +
  • + +

    Dcs.DCSTypes#AI.Task.Designation Designation : +(optional) Designation type.

    + +
  • +
  • + +

    #boolean Datalink : +(optional) Allows to use datalink to send the target information to attack aircraft. Enabled by default.

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:EnRouteTaskTanker() + +
+
+ +

(AIR) Aircraft will act as a tanker for friendly units.

+ + +

No parameters.

+ +

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:GetDetectedTargets(DetectVisual, DetectOptical, DetectRadar, DetectIRST, DetectRWR, DetectDLINK) + +
+
+ +

Return the detected targets of the controllable.

+ + +

The optional parametes specify the detection methods that can be applied. +If no detection method is given, the detection will use all the available methods by default.

+ +

Parameters

+
    +
  • + +

    #boolean DetectVisual : +(optional)

    + +
  • +
  • + +

    #boolean DetectOptical : +(optional)

    + +
  • +
  • + +

    #boolean DetectRadar : +(optional)

    + +
  • +
  • + +

    #boolean DetectIRST : +(optional)

    + +
  • +
  • + +

    #boolean DetectRWR : +(optional)

    + +
  • +
  • + +

    #boolean DetectDLINK : +(optional)

    + +
  • +
+

Return value

+ +

#table: +DetectedTargets

+ +
+
+
+
+ + +CONTROLLABLE:GetLife() + +
+
+ +

Returns the health.

+ + +

Dead controllables have health <= 1.0.

+ +

Return values

+
    +
  1. + +

    #number: +The controllable health value (unit or group average).

    + +
  2. +
  3. + +

    #nil: +The controllable is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +CONTROLLABLE:GetTaskMission() + +
+
+ +

Return the mission template of the controllable.

+ +

Return value

+ +

#table: +The MissionTemplate +TODO: Rework the method how to retrieve a template ...

+ +
+
+
+
+ + +CONTROLLABLE:GetTaskRoute() + +
+
+ +

Return the mission route of the controllable.

+ +

Return value

+ +

#table: +The mission route defined by points.

+ +
+
+
+
+ + +CONTROLLABLE:GetUnits() + +
+
+ +

Returns the UNITs wrappers of the DCS Units of the Controllable (default is a GROUP).

+ +

Return value

+ +

#list: +Wrapper.Unit#UNIT> The UNITs wrappers.

+ +
+
+
+
+ + +CONTROLLABLE:GetWayPoints() + +
+
+ +

Get the current WayPoints set with the WayPoint functions( Note that the WayPoints can be nil, although there ARE waypoints).

+ +

Return value

+ +

#table: +WayPoints If WayPoints is given, then return the WayPoints structure.

+ +
+
+
+
+ + +CONTROLLABLE:IsTargetDetected(DCSObject) + +
+
+ + + +

Parameter

+
    +
  • + +

    DCSObject :

    + +
  • +
+
+
+
+
+ + +CONTROLLABLE:New(ControllableName) + +
+
+ +

Create a new CONTROLLABLE from a DCSControllable

+ +

Parameter

+ +

Return value

+ +

#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:OptionROEHoldFire() + +
+
+ +

Holding weapons.

+ +

Return value

+ +

Wrapper.Controllable#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:OptionROEHoldFirePossible() + +
+
+ +

Can the CONTROLLABLE hold their weapons?

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +CONTROLLABLE:OptionROEOpenFire() + +
+
+ +

Openfire.

+ +

Return value

+ +

#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:OptionROEOpenFirePossible() + +
+
+ +

Can the CONTROLLABLE attack designated targets?

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +CONTROLLABLE:OptionROEReturnFire() + +
+
+ +

Return fire.

+ +

Return value

+ +

#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:OptionROEReturnFirePossible() + +
+
+ +

Can the CONTROLLABLE attack returning on enemy fire?

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +CONTROLLABLE:OptionROEWeaponFree() + +
+
+ +

Weapon free.

+ +

Return value

+ +

#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:OptionROEWeaponFreePossible() + +
+
+ +

Can the CONTROLLABLE attack targets of opportunity?

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +CONTROLLABLE:OptionROTEvadeFire() + +
+
+ +

Evade on fire.

+ +

Return value

+ +

#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:OptionROTEvadeFirePossible() + +
+
+ +

Can the CONTROLLABLE evade on enemy fire?

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +CONTROLLABLE:OptionROTNoReaction() + +
+
+ +

No evasion on enemy threats.

+ +

Return value

+ +

#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:OptionROTNoReactionPossible() + +
+
+ +

Can the CONTROLLABLE ignore enemy fire?

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +CONTROLLABLE:OptionROTPassiveDefense() + +
+
+ +

Evasion passive defense.

+ +

Return value

+ +

#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:OptionROTPassiveDefensePossible() + +
+
+ +

Can the CONTROLLABLE evade using passive defenses?

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +CONTROLLABLE:OptionROTVertical() + +
+
+ +

Evade on fire using vertical manoeuvres.

+ +

Return value

+ +

#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:OptionROTVerticalPossible() + +
+
+ +

Can the CONTROLLABLE evade on fire using vertical manoeuvres?

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +CONTROLLABLE:PopCurrentTask() + +
+
+ +

Popping current Task from the controllable.

+ +

Return value

+ +

Wrapper.Controllable#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:PushTask(DCSTask, WaitTime) + +
+
+ +

Pushing Task on the queue from the controllable.

+ +

Parameters

+
    +
  • + +

    DCSTask :

    + +
  • +
  • + +

    WaitTime :

    + +
  • +
+

Return value

+ +

Wrapper.Controllable#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:Route(GoPoints) + +
+
+ +

Make the controllable to follow a given route.

+ +

Parameter

+
    +
  • + +

    #table GoPoints : +A table of Route Points.

    + +
  • +
+

Return value

+ +

#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:RouteToVec2(Point, Speed) + +
+
+ +

(AIR + GROUND) Make the Controllable move to fly to a given point.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Vec3 Point : +The destination point in Vec3 format.

    + +
  • +
  • + +

    #number Speed : +The speed to travel.

    + +
  • +
+

Return value

+ +

#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:RouteToVec3(Point, Speed) + +
+
+ +

(AIR + GROUND) Make the Controllable move to a given point.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Vec3 Point : +The destination point in Vec3 format.

    + +
  • +
  • + +

    #number Speed : +The speed to travel.

    + +
  • +
+

Return value

+ +

#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:SetCommand(DCSCommand) + +
+
+ +

Executes a command action

+ +

Parameter

+ +

Return value

+ +

#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:SetTask(DCSTask, WaitTime) + +
+
+ +

Clearing the Task Queue and Setting the Task on the queue from the controllable.

+ +

Parameters

+
    +
  • + +

    DCSTask :

    + +
  • +
  • + +

    WaitTime :

    + +
  • +
+

Return value

+ +

Wrapper.Controllable#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:TaskAttackGroup(AttackGroup, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit) + +
+
+ +

(AIR) Attack a Controllable.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE AttackGroup : +The Controllable to be attacked.

    + +
  • +
  • + +

    #number WeaponType : +(optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

    + +
  • +
  • + +

    Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : +(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    + +
  • +
  • + +

    #number AttackQty : +(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    + +
  • +
  • + +

    Dcs.DCSTypes#Azimuth Direction : +(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    + +
  • +
  • + +

    Dcs.DCSTypes#Distance Altitude : +(optional) Desired attack start altitude. Controllable/aircraft will make its attacks from the altitude. If the altitude is too low or too high to use weapon aircraft/controllable will choose closest altitude to the desired attack start altitude. If the desired altitude is defined controllable/aircraft will not attack from safe altitude.

    + +
  • +
  • + +

    #boolean AttackQtyLimit : +(optional) The flag determines how to interpret attackQty parameter. If the flag is true then attackQty is a limit on maximal attack quantity for "AttackGroup" and "AttackUnit" tasks. If the flag is false then attackQty is a desired attack quantity for "Bombing" and "BombingRunway" tasks.

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:TaskAttackMapObject(Vec2, WeaponType, WeaponExpend, AttackQty, Direction, ControllableAttack) + +
+
+ +

(AIR) Attacking the map object (building, structure, e.t.c).

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Vec2 Vec2 : +2D-coordinates of the point the map object is closest to. The distance between the point and the map object must not be greater than 2000 meters. Object id is not used here because Mission Editor doesn't support map object identificators.

    + +
  • +
  • + +

    #number WeaponType : +(optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

    + +
  • +
  • + +

    Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : +(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    + +
  • +
  • + +

    #number AttackQty : +(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    + +
  • +
  • + +

    Dcs.DCSTypes#Azimuth Direction : +(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    + +
  • +
  • + +

    #boolean ControllableAttack : +(optional) Flag indicates that the target must be engaged by all aircrafts of the controllable. Has effect only if the task is assigned to a controllable, not to a single aircraft.

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:TaskAttackUnit(AttackUnit, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, Visible, WeaponType) + +
+
+ +

(AIR) Attack the Unit.

+ +

Parameters

+
    +
  • + +

    Wrapper.Unit#UNIT AttackUnit : +The UNIT.

    + +
  • +
  • + +

    #boolean GroupAttack : +(optional) If true, all units in the group will attack the Unit when found.

    + +
  • +
  • + +

    Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : +(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    + +
  • +
  • + +

    #number AttackQty : +(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    + +
  • +
  • + +

    Dcs.DCSTypes#Azimuth Direction : +(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    + +
  • +
  • + +

    #number Altitude : +(optional) The altitude from where to attack.

    + +
  • +
  • + +

    #boolean Visible : +(optional) not a clue.

    + +
  • +
  • + +

    #number WeaponType : +(optional) The WeaponType.

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:TaskBombing(Vec2, WeaponType, WeaponExpend, AttackQty, Direction, ControllableAttack) + +
+
+ +

(AIR) Delivering weapon at the point on the ground.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Vec2 Vec2 : +2D-coordinates of the point to deliver weapon at.

    + +
  • +
  • + +

    #number WeaponType : +(optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

    + +
  • +
  • + +

    Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : +(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    + +
  • +
  • + +

    #number AttackQty : +(optional) Desired quantity of passes. The parameter is not the same in AttackGroup and AttackUnit tasks.

    + +
  • +
  • + +

    Dcs.DCSTypes#Azimuth Direction : +(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    + +
  • +
  • + +

    #boolean ControllableAttack : +(optional) Flag indicates that the target must be engaged by all aircrafts of the controllable. Has effect only if the task is assigned to a controllable, not to a single aircraft.

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:TaskBombingRunway(Airbase, WeaponType, WeaponExpend, AttackQty, Direction, ControllableAttack) + +
+
+ +

(AIR) Delivering weapon on the runway.

+ +

Parameters

+
    +
  • + +

    Wrapper.Airbase#AIRBASE Airbase : +Airbase to attack.

    + +
  • +
  • + +

    #number WeaponType : +(optional) Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

    + +
  • +
  • + +

    Dcs.DCSTypes#AI.Task.WeaponExpend WeaponExpend : +(optional) Determines how much weapon will be released at each attack. If parameter is not defined the unit / controllable will choose expend on its own discretion.

    + +
  • +
  • + +

    #number AttackQty : +(optional) This parameter limits maximal quantity of attack. The aicraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aicraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.

    + +
  • +
  • + +

    Dcs.DCSTypes#Azimuth Direction : +(optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.

    + +
  • +
  • + +

    #boolean ControllableAttack : +(optional) Flag indicates that the target must be engaged by all aircrafts of the controllable. Has effect only if the task is assigned to a controllable, not to a single aircraft.

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:TaskCombo(DCSTasks) + +
+
+ +

Return a Combo Task taking an array of Tasks.

+ +

Parameter

+ +

Return value

+ +

Dcs.DCSTasking.Task#Task:

+ + +
+
+
+
+ + +CONTROLLABLE:TaskCondition(time, userFlag, userFlagValue, condition, duration, lastWayPoint) + +
+
+ +

Return a condition section for a controlled task.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTime#Time time :

    + +
  • +
  • + +

    #string userFlag :

    + +
  • +
  • + +

    #boolean userFlagValue :

    + +
  • +
  • + +

    #string condition :

    + +
  • +
  • + +

    Dcs.DCSTime#Time duration :

    + +
  • +
  • + +

    #number lastWayPoint : +return Dcs.DCSTasking.Task#Task

    + +
  • +
+
+
+
+
+ + +CONTROLLABLE:TaskControlled(DCSTask, DCSStopCondition) + +
+
+ +

Return a Controlled Task taking a Task and a TaskCondition.

+ +

Parameters

+ +

Return value

+ +

Dcs.DCSTasking.Task#Task:

+ + +
+
+
+
+ + +CONTROLLABLE:TaskEmbarkToTransport(Point, Radius) + +
+
+ +

Move to a defined Vec2 Point, and embark to a controllable when arrived within a defined Radius.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Vec2 Point : +The point where to wait.

    + +
  • +
  • + +

    #number Radius : +The radius of the embarking zone around the Point.

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:TaskEmbarking(Point, Duration, EmbarkingControllable) + +
+
+ +

(AIR) Move the controllable to a Vec2 Point, wait for a defined duration and embark a controllable.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Vec2 Point : +The point where to wait.

    + +
  • +
  • + +

    #number Duration : +The duration in seconds to wait.

    + +
  • +
  • + +

    #CONTROLLABLE EmbarkingControllable : +The controllable to be embarked.

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure

+ +
+
+
+
+ + +CONTROLLABLE:TaskEscort(EscortControllable, Vec3, LastWaypointIndex, EngagementDistanceMax, TargetTypes, FollowControllable, EngagementDistance) + +
+
+ +

(AIR) Escort another airborne controllable.

+ + +

The unit / controllable will follow lead unit of another controllable, wingmens of both controllables will continue following their leaders. +The unit / controllable will also protect that controllable from threats of specified types.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE EscortControllable : +The controllable to be escorted.

    + +
  • +
  • + +

    Dcs.DCSTypes#Vec3 Vec3 : +Position of the unit / lead unit of the controllable relative lead unit of another controllable in frame reference oriented by course of lead unit of another controllable. If another controllable is on land the unit / controllable will orbit around.

    + +
  • +
  • + +

    #number LastWaypointIndex : +Detach waypoint of another controllable. Once reached the unit / controllable Follow task is finished.

    + +
  • +
  • + +

    #number EngagementDistanceMax : +Maximal distance from escorted controllable to threat. If the threat is already engaged by escort escort will disengage if the distance becomes greater than 1.5 * engagementDistMax.

    + +
  • +
  • + +

    Dcs.DCSTypes#AttributeNameArray TargetTypes : +Array of AttributeName that is contains threat categories allowed to engage.

    + +
  • +
  • + +

    FollowControllable :

    + +
  • +
  • + +

    EngagementDistance :

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:TaskFAC_AttackGroup(AttackGroup, WeaponType, Designation, Datalink) + +
+
+ +

(AIR + GROUND) The task makes the controllable/unit a FAC and orders the FAC to control the target (enemy ground controllable) destruction.

+ + +

The killer is player-controlled allied CAS-aircraft that is in contact with the FAC. +If the task is assigned to the controllable lead unit will be a FAC.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE AttackGroup : +Target CONTROLLABLE.

    + +
  • +
  • + +

    #number WeaponType : +Bitmask of weapon types those allowed to use. If parameter is not defined that means no limits on weapon usage.

    + +
  • +
  • + +

    Dcs.DCSTypes#AI.Task.Designation Designation : +(optional) Designation type.

    + +
  • +
  • + +

    #boolean Datalink : +(optional) Allows to use datalink to send the target information to attack aircraft. Enabled by default.

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:TaskFireAtPoint(Vec2, Radius, AmmoCount) + +
+
+ +

(GROUND) Fire at a VEC2 point until ammunition is finished.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Vec2 Vec2 : +The point to fire at.

    + +
  • +
  • + +

    Dcs.DCSTypes#Distance Radius : +The radius of the zone to deploy the fire at.

    + +
  • +
  • + +

    #number AmmoCount : +(optional) Quantity of ammunition to expand (omit to fire until ammunition is depleted).

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:TaskFollow(FollowControllable, Vec3, LastWaypointIndex) + +
+
+ +

(AIR) Following another airborne controllable.

+ + +

The unit / controllable will follow lead unit of another controllable, wingmens of both controllables will continue following their leaders. +If another controllable is on land the unit / controllable will orbit around.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE FollowControllable : +The controllable to be followed.

    + +
  • +
  • + +

    Dcs.DCSTypes#Vec3 Vec3 : +Position of the unit / lead unit of the controllable relative lead unit of another controllable in frame reference oriented by course of lead unit of another controllable. If another controllable is on land the unit / controllable will orbit around.

    + +
  • +
  • + +

    #number LastWaypointIndex : +Detach waypoint of another controllable. Once reached the unit / controllable Follow task is finished.

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:TaskFunction(WayPoint, WayPointIndex, FunctionString, FunctionArguments) + +
+
+ + + +

Parameters

+
    +
  • + +

    WayPoint :

    + +
  • +
  • + +

    WayPointIndex :

    + +
  • +
  • + +

    FunctionString :

    + +
  • +
  • + +

    FunctionArguments :

    + +
  • +
+
+
+
+
+ + +CONTROLLABLE:TaskHold() + +
+
+ +

(GROUND) Hold ground controllable from moving.

+ +

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:TaskHoldPosition(Duration) + +
+
+ +

(AIR) Hold position at the current position of the first unit of the controllable.

+ +

Parameter

+
    +
  • + +

    #number Duration : +The maximum duration in seconds to hold the position.

    + +
  • +
+

Return value

+ +

#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:TaskLandAtVec2(Point, Duration) + +
+
+ +

(AIR HELICOPTER) Landing at the ground.

+ + +

For helicopters only.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Vec2 Point : +The point where to land.

    + +
  • +
  • + +

    #number Duration : +The duration in seconds to stay on the ground.

    + +
  • +
+

Return value

+ +

#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:TaskLandAtZone(Zone, Duration, RandomPoint) + +
+
+ +

(AIR) Land the controllable at a @{Zone#ZONE_RADIUS).

+ +

Parameters

+
    +
  • + +

    Core.Zone#ZONE Zone : +The zone where to land.

    + +
  • +
  • + +

    #number Duration : +The duration in seconds to stay on the ground.

    + +
  • +
  • + +

    RandomPoint :

    + +
  • +
+

Return value

+ +

#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:TaskMission(TaskMission) + +
+
+ +

(AIR + GROUND) Return a mission task from a mission template.

+ +

Parameter

+
    +
  • + +

    #table TaskMission : +A table containing the mission task.

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task:

+ + +
+
+
+
+ + +CONTROLLABLE:TaskOrbitCircle(Altitude, Speed) + +
+
+ +

(AIR) Orbit at the current position of the first unit of the controllable at a specified alititude.

+ +

Parameters

+
    +
  • + +

    #number Altitude : +The altitude to hold the position.

    + +
  • +
  • + +

    #number Speed : +The speed flying when holding the position.

    + +
  • +
+

Return value

+ +

#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:TaskOrbitCircleAtVec2(Point, Altitude, Speed) + +
+
+ +

(AIR) Orbit at a specified position at a specified alititude during a specified duration with a specified speed.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Vec2 Point : +The point to hold the position.

    + +
  • +
  • + +

    #number Altitude : +The altitude to hold the position.

    + +
  • +
  • + +

    #number Speed : +The speed flying when holding the position.

    + +
  • +
+

Return value

+ +

#CONTROLLABLE: +self

+ +
+
+
+
+ + +CONTROLLABLE:TaskRefueling() + +
+
+ +

(AIR) Refueling from the nearest tanker.

+ + +

No parameters.

+ +

Return value

+ +

Dcs.DCSTasking.Task#Task: +The DCS task structure.

+ +
+
+
+
+ + +CONTROLLABLE:TaskRoute(Points) + +
+
+ +

Return a Misson task to follow a given route defined by Points.

+ +

Parameter

+
    +
  • + +

    #table Points : +A table of route points.

    + +
  • +
+

Return value

+ +

Dcs.DCSTasking.Task#Task:

+ + +
+
+
+
+ + +CONTROLLABLE:TaskRouteToZone(Zone, Randomize, Speed, Formation) + +
+
+ +

(AIR + GROUND) Route the controllable to a given zone.

+ + +

The controllable final destination point can be randomized. +A speed can be given in km/h. +A given formation can be given.

+ +

Parameters

+
    +
  • + +

    Core.Zone#ZONE Zone : +The zone where to route to.

    + +
  • +
  • + +

    #boolean Randomize : +Defines whether to target point gets randomized within the Zone.

    + +
  • +
  • + +

    #number Speed : +The speed.

    + +
  • +
  • + +

    Base#FORMATION Formation : +The formation string.

    + +
  • +
+
+
+
+
+ + +CONTROLLABLE:TaskWrappedAction(DCSCommand, Index) + +
+
+ +

Return a WrappedAction Task taking a Command.

+ +

Parameters

+ +

Return value

+ +

Dcs.DCSTasking.Task#Task:

+ + +
+
+
+
+ + +CONTROLLABLE:WayPointExecute(WayPoint, WaitTime) + +
+
+ +

Executes the WayPoint plan.

+ + +

The function gets a WayPoint parameter, that you can use to restart the mission at a specific WayPoint. +Note that when the WayPoint parameter is used, the new start mission waypoint of the controllable will be 1!

+ +

Parameters

+
    +
  • + +

    #number WayPoint : +The WayPoint from where to execute the mission.

    + +
  • +
  • + +

    #number WaitTime : +The amount seconds to wait before initiating the mission.

    + +
  • +
+

Return value

+ +

#CONTROLLABLE:

+ + +
+
+
+
+ + +CONTROLLABLE:WayPointFunction(WayPoint, WayPointIndex, WayPointFunction, ...) + +
+
+ +

Registers a waypoint function that will be executed when the controllable moves over the WayPoint.

+ +

Parameters

+
    +
  • + +

    #number WayPoint : +The waypoint number. Note that the start waypoint on the route is WayPoint 1!

    + +
  • +
  • + +

    #number WayPointIndex : +When defining multiple WayPoint functions for one WayPoint, use WayPointIndex to set the sequence of actions.

    + +
  • +
  • + +

    #function WayPointFunction : +The waypoint function to be called when the controllable moves over the waypoint. The waypoint function takes variable parameters.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#CONTROLLABLE:

+ + +
+
+
+
+ + + +CONTROLLABLE.WayPointFunctions + +
+
+ + + +
+
+
+
+ + +CONTROLLABLE:WayPointInitialize(WayPoints) + +
+
+ +

Retrieve the controllable mission and allow to place function hooks within the mission waypoint plan.

+ + +

Use the method Controllable#CONTROLLABLE to define the hook functions for specific waypoints. + Use the method @{Controllable@CONTROLLABLE:WayPointExecute) to start the execution of the new mission plan. + Note that when WayPointInitialize is called, the Mission of the controllable is RESTARTED!

+ +

Parameter

+
    +
  • + +

    #table WayPoints : +If WayPoints is given, then use the route.

    + +
  • +
+

Return value

+ +

#CONTROLLABLE:

+ + +
+
+
+
+ + + +CONTROLLABLE.WayPoints + +
+
+ + + +
+
+
+
+ + +CONTROLLABLE:_GetController() + +
+
+ +

Get the controller for the CONTROLLABLE.

+ +

Return value

+ +

Dcs.DCSController#Controller:

+ + +
+
+ +

Type DCSCommand

+ +

Type DCSStopCondition

+ +

Type list

+ +
+ +
+ + diff --git a/docs/Documentation/DCSAirbase.html b/docs/Documentation/DCSAirbase.html new file mode 100644 index 000000000..bcd075f7d --- /dev/null +++ b/docs/Documentation/DCSAirbase.html @@ -0,0 +1,475 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module DCSAirbase

+ + + +

Global(s)

+ + + + + +
Airbase + +
+

Type Airbase

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Airbase.Category +

enum contains identifiers of airbase categories.

+
Airbase.Desc +

Airbase descriptor. Airdromes are unique and their types are unique, but helipads and ships are not always unique and may have the same type.

+
Airbase.ID +

Identifier of an airbase. It assigned to an airbase by the Mission Editor automatically. This identifier is used in AI tasks to refer an airbase that exists (spawned and not dead) or not.

+
Airbase.getByName(name) +

Returns airbase by its name.

+
Airbase:getCallsign() +

Returns the airbase's callsign - the localized string.

+
Airbase:getDesc() +

Returns descriptor of the airbase.

+
Airbase.getDescByName(typeName) +

Returns airbase descriptor by type name.

+
Airbase:getID() +

Returns identifier of the airbase.

+
Airbase:getUnit() +

Returns Unit that is corresponded to the airbase.

+
+ +

Type Airbase.Category

+ + + + + + + + + + + + + +
Airbase.Category.AIRDROME + +
Airbase.Category.HELIPAD + +
Airbase.Category.SHIP + +
+ +

Type Airbase.Desc

+ + + + + +
Airbase.Desc.category +

Category of the airbase type.

+
+ +

Global(s)

+
+
+ + #Airbase + +Airbase + +
+
+ + + +
+
+

Type DCSAirbase

+ +

Type Airbase

+ +

Represents airbases: airdromes, helipads and ships with flying decks or landing pads.

+ + +

+ +

Field(s)

+
+
+ + #Airbase.Category + +Airbase.Category + +
+
+ +

enum contains identifiers of airbase categories.

+ +
+
+
+
+ + #Airbase.Desc + +Airbase.Desc + +
+
+ +

Airbase descriptor. Airdromes are unique and their types are unique, but helipads and ships are not always unique and may have the same type.

+ +
+
+
+
+ + #Airbase.ID + +Airbase.ID + +
+
+ +

Identifier of an airbase. It assigned to an airbase by the Mission Editor automatically. This identifier is used in AI tasks to refer an airbase that exists (spawned and not dead) or not.

+ +
+
+
+
+ + +Airbase.getByName(name) + +
+
+ +

Returns airbase by its name.

+ + +

If no airbase found the function will return nil.

+ +

Parameter

+
    +
  • + +

    #string name :

    + +
  • +
+

Return value

+ +

#Airbase:

+ + +
+
+
+
+ + +Airbase:getCallsign() + +
+
+ +

Returns the airbase's callsign - the localized string.

+ +

Return value

+ +

#string:

+ + +
+
+
+
+ + +Airbase:getDesc() + +
+
+ +

Returns descriptor of the airbase.

+ +

Return value

+ +

#Airbase.Desc:

+ + +
+
+
+
+ + +Airbase.getDescByName(typeName) + +
+
+ +

Returns airbase descriptor by type name.

+ + +

If no descriptor is found the function will return nil.

+ +

Parameter

+
    +
  • + +

    #TypeName typeName : +Airbase type name.

    + +
  • +
+

Return value

+ +

#Airbase.Desc:

+ + +
+
+
+
+ + +Airbase:getID() + +
+
+ +

Returns identifier of the airbase.

+ +

Return value

+ +

#Airbase.ID:

+ + +
+
+
+
+ + +Airbase:getUnit() + +
+
+ +

Returns Unit that is corresponded to the airbase.

+ + +

Works only for ships.

+ +

Return value

+ +

Wrapper.Unit#Unit:

+ + +
+
+ +

Type Airbase.Category

+ +

Enum contains identifiers of airbase categories.

+ +

Field(s)

+
+
+ + +Airbase.Category.AIRDROME + +
+
+ + + +
+
+
+
+ + +Airbase.Category.HELIPAD + +
+
+ + + +
+
+
+
+ + +Airbase.Category.SHIP + +
+
+ + + +
+
+ +

Type Airbase.Desc

+ +

Airbase descriptor.

+ + +

Airdromes are unique and their types are unique, but helipads and ships are not always unique and may have the same type.

+ +

Field(s)

+
+
+ + #Airbase.Category + +Airbase.Desc.category + +
+
+ +

Category of the airbase type.

+ +
+
+ +

Type Airbase.ID

+ +

Type TypeName

+ +
+ +
+ + diff --git a/docs/Documentation/DCSCoalitionObject.html b/docs/Documentation/DCSCoalitionObject.html new file mode 100644 index 000000000..ab1cd3fc9 --- /dev/null +++ b/docs/Documentation/DCSCoalitionObject.html @@ -0,0 +1,207 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module DCSCoalitionObject

+ + + +

Global(s)

+ + + + + + + + + +
CoalitionObject + +
coalition + +
+

Type CoalitionObject

+ + + + + + + + + +
CoalitionObject:getCoalition() +

Returns coalition of the object.

+
CoalitionObject:getCountry() +

Returns object country.

+
+ +

Global(s)

+
+
+ + #CoalitionObject + +CoalitionObject + +
+
+ + + +
+
+
+
+ + #coalition + +coalition + +
+
+ + + +
+
+

Type DCSCoalitionObject

+ +

Type CoalitionObject

+

Field(s)

+
+
+ + +CoalitionObject:getCoalition() + +
+
+ +

Returns coalition of the object.

+ +

Return value

+ +

Dcs.DCSTypes#coalition.side:

+ + +
+
+
+
+ + +CoalitionObject:getCountry() + +
+
+ +

Returns object country.

+ +

Return value

+ +

#country.id:

+ + +
+
+ +

Type coalition

+ +

Type country.id

+ +
+ +
+ + diff --git a/docs/Documentation/DCSCommand.html b/docs/Documentation/DCSCommand.html new file mode 100644 index 000000000..8f1be1fb1 --- /dev/null +++ b/docs/Documentation/DCSCommand.html @@ -0,0 +1,153 @@ + + + + + + +
+
+ +
+
+
+ + + diff --git a/docs/Documentation/DCSController.html b/docs/Documentation/DCSController.html new file mode 100644 index 000000000..180e4d977 --- /dev/null +++ b/docs/Documentation/DCSController.html @@ -0,0 +1,750 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module DCSController

+ + + +

Global(s)

+ + + + + +
Controller + +
+

Type Controller

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Controller.Detection +

Enum contains identifiers of surface types.

+
Controller:getDetectedTargets(detection) +

Returns list of detected targets.

+
Controller:hasTask() +

Returns true if the controller has a task.

+
Controller:isTargetDetected(target, detection) +

Checks if the target is detected or not.

+
Controller:knowTarget(object, type, distance) +

Know a target.

+
Controller:popTask() +

Pops current (front) task from the queue and makes active next task in the queue (if exists).

+
Controller:pushTask(task) +

Pushes the task to the front of the queue and makes the task active.

+
Controller:resetTask() +

Resets current task of the controller.

+
Controller:setOnOff(value) +

Enables and disables the controller.

+
Controller:setOption(optionId, optionValue) +

Sets the option to the controller.

+
Controller:setTask(task) +

Resets current task and then sets the task to the controller.

+
+ +

Type Controller.Detection

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Controller.Detection.DLINK + +
Controller.Detection.IRST + +
Controller.Detection.OPTIC + +
Controller.Detection.RADAR + +
Controller.Detection.RWR + +
Controller.Detection.VISUAL + +
+ +

Type DetectedTarget

+ + + + + + + + + + + + + + + + + +
DetectedTarget.distance +

Distance to the target is known

+
DetectedTarget.object +

The target

+
DetectedTarget.type +

The target type is known

+
DetectedTarget.visible +

The target is visible

+
+ +

Global(s)

+
+
+ + #Controller + +Controller + +
+
+ + + +
+
+

Type DCSController

+ +

Type Controller

+ +

Controller is an object that performs A.I.-routines.

+ + +

Other words controller is an instance of A.I.. Controller stores current main task, active enroute tasks and behavior options. Controller performs commands. Please, read DCS A-10C GUI Manual EN.pdf chapter "Task Planning for Unit Groups", page 91 to understand A.I. system of DCS:A-10C.

+ +

This class has 2 types of functions:

+ +
    +
  • Tasks
  • +
  • Commands: Commands are instant actions those required zero time to perform. Commands may be used both for control unit/group behavior and control game mechanics.
  • +
+ +

Field(s)

+
+
+ + #Controller.Detection + +Controller.Detection + +
+
+ +

Enum contains identifiers of surface types.

+ +
+
+
+
+ + +Controller:getDetectedTargets(detection) + +
+
+ +

Returns list of detected targets.

+ + +

If one or more detection method is specified the function will return targets which were detected by at least one of these methods. If no detection methods are specified the function will return targets which were detected by any method.

+ +

Parameter

+
    +
  • + +

    #Controller.Detection detection : +Controller.Detection detection1, Controller.Detection detection2, ... Controller.Detection detectionN

    + +
  • +
+

Return value

+ +

#list:

+

DetectedTarget> array of DetectedTarget

+ +
+
+
+
+ + +Controller:hasTask() + +
+
+ +

Returns true if the controller has a task.

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +Controller:isTargetDetected(target, detection) + +
+
+ +

Checks if the target is detected or not.

+ + +

If one or more detection method is specified the function will return true if the target is detected by at least one of these methods. If no detection methods are specified the function will return true if the target is detected by any method.

+ +

Parameters

+ +

Return values

+
    +
  1. + +

    #boolean: +detected True if the target is detected.

    + +
  2. +
  3. + +

    #boolean: +visible Has effect only if detected is true. True if the target is visible now.

    + +
  4. +
  5. + +

    #ModelTime: +lastTime Has effect only if visible is false. Last time when target was seen.

    + +
  6. +
  7. + +

    #boolean: +type Has effect only if detected is true. True if the target type is known.

    + +
  8. +
  9. + +

    #boolean: +distance Has effect only if detected is true. True if the distance to the target is known.

    + +
  10. +
  11. + +

    #Vec3: +lastPos Has effect only if visible is false. Last position of the target when it was seen.

    + +
  12. +
  13. + +

    #Vec3: +lastVel Has effect only if visible is false. Last velocity of the target when it was seen.

    + +
  14. +
+
+
+
+
+ + +Controller:knowTarget(object, type, distance) + +
+
+ +

Know a target.

+ +

Parameters

+
    +
  • + +

    Wrapper.Object#Object object : +The target.

    + +
  • +
  • + +

    #boolean type : +Target type is known.

    + +
  • +
  • + +

    #boolean distance : +Distance to target is known.

    + +
  • +
+
+
+
+
+ + +Controller:popTask() + +
+
+ +

Pops current (front) task from the queue and makes active next task in the queue (if exists).

+ + +

If no more tasks in the queue the function works like function Controller.resetTask() function. Does nothing if the queue is empty.

+ +
+
+
+
+ + +Controller:pushTask(task) + +
+
+ +

Pushes the task to the front of the queue and makes the task active.

+ + +

Further call of function Controller.setTask() function will stop current task, clear the queue and set the new task active. If the task queue is empty the function will work like function Controller.setTask() function.

+ +

Parameter

+
    +
  • + +

    #Task task :

    + +
  • +
+
+
+
+
+ + +Controller:resetTask() + +
+
+ +

Resets current task of the controller.

+ +
+
+
+
+ + +Controller:setOnOff(value) + +
+
+ +

Enables and disables the controller.

+ + +

Note: Now it works only for ground / naval groups!

+ +

Parameter

+
    +
  • + +

    #boolean value : +Enable / Disable.

    + +
  • +
+
+
+
+
+ + +Controller:setOption(optionId, optionValue) + +
+
+ +

Sets the option to the controller.

+ + +

Option is a pair of identifier and value. Behavior options are global parameters those affect controller behavior in all tasks it performs. +Option identifiers and values are stored in table AI.Option in subtables Air, Ground and Naval.

+ +

OptionId = AI.Option.Air.id or AI.Option.Ground.id or AI.Option.Naval.id +OptionValue = AI.Option.Air.val[optionName] or AI.Option.Ground.val[optionName] or AI.Option.Naval.val[optionName]

+ + +

Parameters

+
    +
  • + +

    #OptionId optionId : +Option identifier.

    + +
  • +
  • + +

    #OptionValue optionValue : +Value of the option.

    + +
  • +
+
+
+
+
+ + +Controller:setTask(task) + +
+
+ +

Resets current task and then sets the task to the controller.

+ + +

Task is a table that contains task identifier and task parameters.

+ +

Parameter

+
    +
  • + +

    #Task task :

    + +
  • +
+
+
+ +

Type Controller.Detection

+ +

Enum contains identifiers of surface types.

+ +

Field(s)

+
+
+ + +Controller.Detection.DLINK + +
+
+ + + +
+
+
+
+ + +Controller.Detection.IRST + +
+
+ + + +
+
+
+
+ + +Controller.Detection.OPTIC + +
+
+ + + +
+
+
+
+ + +Controller.Detection.RADAR + +
+
+ + + +
+
+
+
+ + +Controller.Detection.RWR + +
+
+ + + +
+
+
+
+ + +Controller.Detection.VISUAL + +
+
+ + + +
+
+ +

Type DetectedTarget

+ +

Detected target.

+ +

Field(s)

+
+
+ + #boolean + +DetectedTarget.distance + +
+
+ +

Distance to the target is known

+ +
+
+
+
+ + Wrapper.Object#Object + +DetectedTarget.object + +
+
+ +

The target

+ +
+
+
+
+ + #boolean + +DetectedTarget.type + +
+
+ +

The target type is known

+ +
+
+
+
+ + #boolean + +DetectedTarget.visible + +
+
+ +

The target is visible

+ +
+
+ +

Type ModelTime

+ +

Type OptionId

+ +

Type OptionValue

+ +

Type Task

+ +

Type Vec3

+ +

Type list

+ +
+ +
+ + diff --git a/docs/Documentation/DCSGroup.html b/docs/Documentation/DCSGroup.html new file mode 100644 index 000000000..958ed0031 --- /dev/null +++ b/docs/Documentation/DCSGroup.html @@ -0,0 +1,582 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module DCSGroup

+ + + +

Global(s)

+ + + + + +
Group + +
+

Type Group

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Group.Category +

Enum contains identifiers of group types.

+
Group.ID +

Identifier of a group. It is assigned to a group by Mission Editor automatically.

+
Group:destroy() +

Destroys the group and all of its units.

+
Group.getByName(name) +

Returns group by the name assigned to the group in Mission Editor.

+
Group:getCategory() +

Returns category of the group.

+
Group:getCoalition() +

Returns the coalition of the group.

+
Group:getController() +

Returns controller of the group.

+
Group:getID() +

Returns the group identifier.

+
Group:getInitialSize() +

Returns initial size of the group.

+
Group:getName() +

Returns the group's name.

+
Group:getSize() +

Returns current size of the group.

+
Group:getUnit(unitNumber) +

Returns the unit with number unitNumber.

+
Group:getUnits() +

Returns array of the units present in the group now.

+
Group:isExist() +

returns true if the group exist or false otherwise.

+
+ +

Type Group.Category

+ + + + + + + + + + + + + + + + + +
Group.Category.AIRPLANE + +
Group.Category.GROUND + +
Group.Category.HELICOPTER + +
Group.Category.SHIP + +
+ +

Global(s)

+
+
+ + #Group + +Group + +
+
+ + + +
+
+

Type DCSGroup

+ +

Type Group

+ +

Represents group of Units.

+ +

Field(s)

+
+
+ + #Group.Category + +Group.Category + +
+
+ +

Enum contains identifiers of group types.

+ +
+
+
+
+ + #ID + +Group.ID + +
+
+ +

Identifier of a group. It is assigned to a group by Mission Editor automatically.

+ +
+
+
+
+ + +Group:destroy() + +
+
+ +

Destroys the group and all of its units.

+ +
+
+
+
+ + +Group.getByName(name) + +
+
+ +

Returns group by the name assigned to the group in Mission Editor.

+ +

Parameter

+
    +
  • + +

    #string name :

    + +
  • +
+

Return value

+ +

#Group:

+ + +
+
+
+
+ + +Group:getCategory() + +
+
+ +

Returns category of the group.

+ +

Return value

+ +

#Group.Category:

+ + +
+
+
+
+ + +Group:getCoalition() + +
+
+ +

Returns the coalition of the group.

+ +

Return value

+ +

Dcs.DCSCoalitionWrapper.Object#coalition.side:

+ + +
+
+
+
+ + +Group:getController() + +
+
+ +

Returns controller of the group.

+ +

Return value

+ +

Controller#Controller:

+ + +
+
+
+
+ + +Group:getID() + +
+
+ +

Returns the group identifier.

+ +

Return value

+ +

#ID:

+ + +
+
+
+
+ + +Group:getInitialSize() + +
+
+ +

Returns initial size of the group.

+ + +

If some of the units will be destroyed, initial size of the group will not be changed. Initial size limits the unitNumber parameter for Group.getUnit() function.

+ +

Return value

+ +

#number:

+ + +
+
+
+
+ + +Group:getName() + +
+
+ +

Returns the group's name.

+ + +

This is the same name assigned to the group in Mission Editor.

+ +

Return value

+ +

#string:

+ + +
+
+
+
+ + +Group:getSize() + +
+
+ +

Returns current size of the group.

+ + +

If some of the units will be destroyed, As units are destroyed the size of the group will be changed.

+ +

Return value

+ +

#number:

+ + +
+
+
+
+ + +Group:getUnit(unitNumber) + +
+
+ +

Returns the unit with number unitNumber.

+ + +

If the unit is not exists the function will return nil.

+ +

Parameter

+
    +
  • + +

    #number unitNumber :

    + +
  • +
+

Return value

+ +

Dcs.DCSWrapper.Unit#Unit:

+ + +
+
+
+
+ + +Group:getUnits() + +
+
+ +

Returns array of the units present in the group now.

+ + +

Destroyed units will not be enlisted at all.

+ +

Return value

+ +

#list: +Dcs.DCSWrapper.Unit#Unit> array of Units

+ +
+
+
+
+ + +Group:isExist() + +
+
+ +

returns true if the group exist or false otherwise.

+ +

Return value

+ +

#boolean:

+ + +
+
+ +

Type Group.Category

+ +

Enum contains identifiers of group types.

+ +

Field(s)

+
+
+ + +Group.Category.AIRPLANE + +
+
+ + + +
+
+
+
+ + +Group.Category.GROUND + +
+
+ + + +
+
+
+
+ + +Group.Category.HELICOPTER + +
+
+ + + +
+
+
+
+ + +Group.Category.SHIP + +
+
+ + + +
+
+ +

Type ID

+ +

Type list

+ +
+ +
+ + diff --git a/docs/Documentation/DCSObject.html b/docs/Documentation/DCSObject.html new file mode 100644 index 000000000..88b67d3a5 --- /dev/null +++ b/docs/Documentation/DCSObject.html @@ -0,0 +1,603 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module DCSObject

+ + + +

Global(s)

+ + + + + +
Object + +
+

Type Object

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Object.Category + +
Object.Desc + +
Object:destroy() + +
Object:getCategory() + +
Object:getDesc() +

Returns object descriptor.

+
Object:getName() +

Returns name of the object.

+
Object:getPoint() +

Returns object coordinates for current time.

+
Object:getPosition() +

Returns object position for current time.

+
Object:getTypeName() +

Returns type name of the Object.

+
Object:getVelocity() +

Returns the unit's velocity vector.

+
Object:hasAttribute(attributeName) +

Returns true if the object belongs to the category.

+
Object:inAir() +

Returns true if the unit is in air.

+
Object:isExist() + +
+ +

Type Object.Category

+ + + + + + + + + + + + + + + + + + + + + +
Object.Category.BASE + +
Object.Category.SCENERY + +
Object.Category.STATIC + +
Object.Category.UNIT + +
Object.Category.WEAPON + +
+ +

Type Object.Desc

+ + + + + + + + + +
Object.Desc.box +

bounding box of collision geometry

+
Object.Desc.life +

initial life level

+
+ +

Global(s)

+
+
+ + #Object + +Object + +
+
+ + + +
+
+

Type DCSObject

+ +

Type AttributeName

+ +

Type Box3

+ +

Type Object

+

Field(s)

+
+
+ + #Object.Category + +Object.Category + +
+
+ + + +
+
+
+
+ + #Object.Desc + +Object.Desc + +
+
+ + + +
+
+
+
+ + +Object:destroy() + +
+
+ + + +
+
+
+
+ + +Object:getCategory() + +
+
+ + + +

Return value

+ +

#Object.Category:

+ + +
+
+
+
+ + +Object:getDesc() + +
+
+ +

Returns object descriptor.

+ +

Return value

+ +

#Object.Desc:

+ + +
+
+
+
+ + +Object:getName() + +
+
+ +

Returns name of the object.

+ + +

This is the name that is assigned to the object in the Mission Editor.

+ +

Return value

+ +

#string:

+ + +
+
+
+
+ + +Object:getPoint() + +
+
+ +

Returns object coordinates for current time.

+ +

Return value

+ +

#Vec3:

+ + +
+
+
+
+ + +Object:getPosition() + +
+
+ +

Returns object position for current time.

+ +

Return value

+ +

#Position3:

+ + +
+
+
+
+ + +Object:getTypeName() + +
+
+ +

Returns type name of the Object.

+ +

Return value

+ +

#string:

+ + +
+
+
+
+ + +Object:getVelocity() + +
+
+ +

Returns the unit's velocity vector.

+ +

Return value

+ +

#Vec3:

+ + +
+
+
+
+ + +Object:hasAttribute(attributeName) + +
+
+ +

Returns true if the object belongs to the category.

+ +

Parameter

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +Object:inAir() + +
+
+ +

Returns true if the unit is in air.

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +Object:isExist() + +
+
+ + + +

Return value

+ +

#boolean:

+ + +
+
+ +

Type Object.Category

+

Field(s)

+
+
+ + +Object.Category.BASE + +
+
+ + + +
+
+
+
+ + +Object.Category.SCENERY + +
+
+ + + +
+
+
+
+ + +Object.Category.STATIC + +
+
+ + + +
+
+
+
+ + +Object.Category.UNIT + +
+
+ + + +
+
+
+
+ + +Object.Category.WEAPON + +
+
+ + + +
+
+ +

Type Object.Desc

+

Field(s)

+
+
+ + #Box3 + +Object.Desc.box + +
+
+ +

bounding box of collision geometry

+ +
+
+
+
+ + #number + +Object.Desc.life + +
+
+ +

initial life level

+ +
+
+ +

Type Position3

+ +

Type Vec3

+ +
+ +
+ + diff --git a/docs/Documentation/DCSTask.html b/docs/Documentation/DCSTask.html new file mode 100644 index 000000000..32a1bd5a7 --- /dev/null +++ b/docs/Documentation/DCSTask.html @@ -0,0 +1,161 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module DCSTask

+ + + +

Type Task

+ + + + + + + + + +
Task.id + +
Task.param + +
+ +

Type DCSTask

+ +

Type Task

+ +

A task descriptor (internal structure for DCS World)

+ +

Field(s)

+
+
+ + #string + +Task.id + +
+
+ + + +
+
+
+
+ + #Task.param + +Task.param + +
+
+ + + +
+
+ +

Type Task.param

+ +

Type TaskArray

+ +

List of #Task

+ + +
+ +
+ + diff --git a/docs/Documentation/DCSTypes.html b/docs/Documentation/DCSTypes.html new file mode 100644 index 000000000..eac45e2ae --- /dev/null +++ b/docs/Documentation/DCSTypes.html @@ -0,0 +1,2518 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module DCSTypes

+ + + +

Global(s)

+ + + + + +
AI + +
+

Type AI

+ + + + + + + + + + + + + +
AI.Option + +
AI.Skill + +
AI.Task + +
+ +

Type AI.Option

+ + + + + + + + + + + + + +
AI.Option.Air + +
AI.Option.Ground + +
AI.Option.Naval + +
+ +

Type AI.Option.Air

+ + + + + + + + + +
AI.Option.Air.id + +
AI.Option.Air.val + +
+ +

Type AI.Option.Air.val

+ + + + + + + + + + + + + + + + + +
AI.Option.Air.val.FLARE_USING + +
AI.Option.Air.val.RADAR_USING + +
AI.Option.Air.val.REACTION_ON_THREAT + +
AI.Option.Air.val.ROE + +
+ +

Type AI.Option.Air.val.FLARE_USING

+ + + + + + + + + + + + + + + + + +
AI.Option.Air.val.FLARE_USING.AGAINST_FIRED_MISSILE + +
AI.Option.Air.val.FLARE_USING.NEVER + +
AI.Option.Air.val.FLARE_USING.WHEN_FLYING_IN_SAM_WEZ + +
AI.Option.Air.val.FLARE_USING.WHEN_FLYING_NEAR_ENEMIES + +
+ +

Type AI.Option.Air.val.RADAR_USING

+ + + + + + + + + + + + + + + + + +
AI.Option.Air.val.RADAR_USING.FOR_ATTACK_ONLY + +
AI.Option.Air.val.RADAR_USING.FOR_CONTINUOUS_SEARCH + +
AI.Option.Air.val.RADAR_USING.FOR_SEARCH_IF_REQUIRED + +
AI.Option.Air.val.RADAR_USING.NEVER + +
+ +

Type AI.Option.Air.val.REACTION_ON_THREAT

+ + + + + + + + + + + + + + + + + + + + + +
AI.Option.Air.val.REACTION_ON_THREAT.ALLOW_ABORT_MISSION + +
AI.Option.Air.val.REACTION_ON_THREAT.BYPASS_AND_ESCAPE + +
AI.Option.Air.val.REACTION_ON_THREAT.EVADE_FIRE + +
AI.Option.Air.val.REACTION_ON_THREAT.NO_REACTION + +
AI.Option.Air.val.REACTION_ON_THREAT.PASSIVE_DEFENCE + +
+ +

Type AI.Option.Air.val.ROE

+ + + + + + + + + + + + + + + + + + + + + +
AI.Option.Air.val.ROE.OPEN_FIRE + +
AI.Option.Air.val.ROE.OPEN_FIRE_WEAPON_FREE + +
AI.Option.Air.val.ROE.RETURN_FIRE + +
AI.Option.Air.val.ROE.WEAPON_FREE + +
AI.Option.Air.val.ROE.WEAPON_HOLD + +
+ +

Type AI.Option.Ground

+ + + + + + + + + +
AI.Option.Ground.id + +
AI.Option.Ground.val + +
+ +

Type AI.Option.Ground.id

+ + + + + + + + + + + + + + + + + +
AI.Option.Ground.id.ALARM_STATE +

AI.Option.Ground.val.ALARM_STATE

+
AI.Option.Ground.id.DISPERSE_ON_ATTACK +

true or false

+
AI.Option.Ground.id.NO_OPTION + +
AI.Option.Ground.id.ROE +

AI.Option.Ground.val.ROE

+
+ +

Type AI.Option.Ground.val

+ + + + + + + + + +
AI.Option.Ground.val.ALARM_STATE + +
AI.Option.Ground.val.ROE + +
+ +

Type AI.Option.Ground.val.ALARM_STATE

+ + + + + + + + + + + + + +
AI.Option.Ground.val.ALARM_STATE.AUTO + +
AI.Option.Ground.val.ALARM_STATE.GREEN + +
AI.Option.Ground.val.ALARM_STATE.RED + +
+ +

Type AI.Option.Ground.val.ROE

+ + + + + + + + + + + + + +
AI.Option.Ground.val.ROE.OPEN_FIRE + +
AI.Option.Ground.val.ROE.RETURN_FIRE + +
AI.Option.Ground.val.ROE.WEAPON_HOLD + +
+ +

Type AI.Option.Naval

+ + + + + + + + + +
AI.Option.Naval.id + +
AI.Option.Naval.val + +
+ +

Type AI.Option.Naval.id

+ + + + + + + + + +
AI.Option.Naval.id.NO_OPTION + +
AI.Option.Naval.id.ROE + +
+ +

Type AI.Option.Naval.val

+ + + + + +
AI.Option.Naval.val.ROE + +
+ +

Type AI.Option.Naval.val.ROE

+ + + + + + + + + + + + + +
AI.Option.Naval.val.ROE.OPEN_FIRE + +
AI.Option.Naval.val.ROE.RETURN_FIRE + +
AI.Option.Naval.val.ROE.WEAPON_HOLD + +
+ +

Type AI.Skill

+ + + + + + + + + + + + + + + + + + + + + + + + + +
AI.Skill.AVERAGE + +
AI.Skill.CLIENT + +
AI.Skill.EXCELLENT + +
AI.Skill.GOOD + +
AI.Skill.HIGH + +
AI.Skill.PLAYER + +
+ +

Type AI.Task

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AI.Task.AltitudeType + +
AI.Task.Designation + +
AI.Task.OrbitPattern + +
AI.Task.TurnMethod + +
AI.Task.VehicleFormation + +
AI.Task.WaypointType + +
AI.Task.WeaponExpend + +
+ +

Type AI.Task.AltitudeType

+ + + + + + + + + +
AI.Task.AltitudeType.BARO + +
AI.Task.AltitudeType.RADIO + +
+ +

Type AI.Task.Designation

+ + + + + + + + + + + + + + + + + + + + + +
AI.Task.Designation.AUTO + +
AI.Task.Designation.IR_POINTER + +
AI.Task.Designation.LASER + +
AI.Task.Designation.NO + +
AI.Task.Designation.WP + +
+ +

Type AI.Task.OrbitPattern

+ + + + + + + + + +
AI.Task.OrbitPattern.CIRCLE + +
AI.Task.OrbitPattern.RACE_TRACK + +
+ +

Type AI.Task.TurnMethod

+ + + + + + + + + +
AI.Task.TurnMethod.FIN_POINT + +
AI.Task.TurnMethod.FLY_OVER_POINT + +
+ +

Type AI.Task.VehicleFormation

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AI.Task.VehicleFormation.CONE + +
AI.Task.VehicleFormation.DIAMOND + +
AI.Task.VehicleFormation.ECHELON_LEFT + +
AI.Task.VehicleFormation.ECHELON_RIGHT + +
AI.Task.VehicleFormation.OFF_ROAD + +
AI.Task.VehicleFormation.ON_ROAD + +
AI.Task.VehicleFormation.RANK + +
AI.Task.VehicleFormation.VEE + +
+ +

Type AI.Task.WaypointType

+ + + + + + + + + + + + + + + + + +
AI.Task.WaypointType.LAND + +
AI.Task.WaypointType.TAKEOFF + +
AI.Task.WaypointType.TAKEOFF_PARKING + +
AI.Task.WaypointType.TURNING_POINT + +
+ +

Type AI.Task.WeaponExpend

+ + + + + + + + + + + + + + + + + + + + + + + + + +
AI.Task.WeaponExpend.ALL + +
AI.Task.WeaponExpend.FOUR + +
AI.Task.WeaponExpend.HALF + +
AI.Task.WeaponExpend.ONE + +
AI.Task.WeaponExpend.QUARTER + +
AI.Task.WeaponExpend.TWO + +
+ +

Type Box3

+ + + + + + + + + +
Box3.max + +
Box3.min + +
+ +

Type Desc

+ + + + + + + + + + + + + +
Desc.attributes +

object type attributes

+
Desc.displayName +

localized display name

+
Desc.typeName +

type name

+
+ +

Type Position3

+ + + + + + + + + + + + + + + + + +
Position3.p + +
Position3.x + +
Position3.y + +
Position3.z + +
+ +

Type Vec2

+ + + + + + + + + +
Vec2.x +

Vec2.x = Vec3.x

+
Vec2.y +

Vec2.y = Vec3.z

+
+ +

Type Vec3

+ + + + + + + + + + + + + +
Vec3.x +

is directed to the north

+
Vec3.y +

is directed up

+
Vec3.z +

is directed to the east

+
+ +

Global(s)

+
+
+ + #AI + +AI + +
+
+ + + +
+
+

Type DCSTypes

+ +

Type AI

+

Field(s)

+
+
+ + #AI.Option + +AI.Option + +
+
+ + + +
+
+
+
+ + #AI.Skill + +AI.Skill + +
+
+ + + +
+
+
+
+ + #AI.Task + +AI.Task + +
+
+ + + +
+
+ +

Type AI.Option

+

Field(s)

+
+
+ + #AI.Option.Air + +AI.Option.Air + +
+
+ + + +
+
+
+
+ + #AI.Option.Ground + +AI.Option.Ground + +
+
+ + + +
+
+
+
+ + #AI.Option.Naval + +AI.Option.Naval + +
+
+ + + +
+
+ +

Type AI.Option.Air

+

Field(s)

+
+
+ + #AI.Option.Air.id + +AI.Option.Air.id + +
+
+ + + +
+
+
+
+ + #AI.Option.Air.val + +AI.Option.Air.val + +
+
+ + + +
+
+ +

Type AI.Option.Air.id

+ +

Type AI.Option.Air.val

+

Field(s)

+
+
+ + #AI.Option.Air.val.FLARE_USING + +AI.Option.Air.val.FLARE_USING + +
+
+ + + +
+
+
+
+ + #AI.Option.Air.val.RADAR_USING + +AI.Option.Air.val.RADAR_USING + +
+
+ + + +
+
+
+
+ + #AI.Option.Air.val.REACTION_ON_THREAT + +AI.Option.Air.val.REACTION_ON_THREAT + +
+
+ + + +
+
+
+
+ + #AI.Option.Air.val.ROE + +AI.Option.Air.val.ROE + +
+
+ + + +
+
+ +

Type AI.Option.Air.val.FLARE_USING

+

Field(s)

+
+
+ + +AI.Option.Air.val.FLARE_USING.AGAINST_FIRED_MISSILE + +
+
+ + + +
+
+
+
+ + +AI.Option.Air.val.FLARE_USING.NEVER + +
+
+ + + +
+
+
+
+ + +AI.Option.Air.val.FLARE_USING.WHEN_FLYING_IN_SAM_WEZ + +
+
+ + + +
+
+
+
+ + +AI.Option.Air.val.FLARE_USING.WHEN_FLYING_NEAR_ENEMIES + +
+
+ + + +
+
+ +

Type AI.Option.Air.val.RADAR_USING

+

Field(s)

+
+
+ + +AI.Option.Air.val.RADAR_USING.FOR_ATTACK_ONLY + +
+
+ + + +
+
+
+
+ + +AI.Option.Air.val.RADAR_USING.FOR_CONTINUOUS_SEARCH + +
+
+ + + +
+
+
+
+ + +AI.Option.Air.val.RADAR_USING.FOR_SEARCH_IF_REQUIRED + +
+
+ + + +
+
+
+
+ + +AI.Option.Air.val.RADAR_USING.NEVER + +
+
+ + + +
+
+ +

Type AI.Option.Air.val.REACTION_ON_THREAT

+

Field(s)

+
+
+ + +AI.Option.Air.val.REACTION_ON_THREAT.ALLOW_ABORT_MISSION + +
+
+ + + +
+
+
+
+ + +AI.Option.Air.val.REACTION_ON_THREAT.BYPASS_AND_ESCAPE + +
+
+ + + +
+
+
+
+ + +AI.Option.Air.val.REACTION_ON_THREAT.EVADE_FIRE + +
+
+ + + +
+
+
+
+ + +AI.Option.Air.val.REACTION_ON_THREAT.NO_REACTION + +
+
+ + + +
+
+
+
+ + +AI.Option.Air.val.REACTION_ON_THREAT.PASSIVE_DEFENCE + +
+
+ + + +
+
+ +

Type AI.Option.Air.val.ROE

+

Field(s)

+
+
+ + +AI.Option.Air.val.ROE.OPEN_FIRE + +
+
+ + + +
+
+
+
+ + +AI.Option.Air.val.ROE.OPEN_FIRE_WEAPON_FREE + +
+
+ + + +
+
+
+
+ + +AI.Option.Air.val.ROE.RETURN_FIRE + +
+
+ + + +
+
+
+
+ + +AI.Option.Air.val.ROE.WEAPON_FREE + +
+
+ + + +
+
+
+
+ + +AI.Option.Air.val.ROE.WEAPON_HOLD + +
+
+ + + +
+
+ +

Type AI.Option.Ground

+

Field(s)

+
+
+ + #AI.Option.Ground.id + +AI.Option.Ground.id + +
+
+ + + +
+
+
+
+ + #AI.Option.Ground.val + +AI.Option.Ground.val + +
+
+ + + +
+
+ +

Type AI.Option.Ground.id

+

Field(s)

+
+
+ + +AI.Option.Ground.id.ALARM_STATE + +
+
+ +

AI.Option.Ground.val.ALARM_STATE

+ +
+
+
+
+ + +AI.Option.Ground.id.DISPERSE_ON_ATTACK + +
+
+ +

true or false

+ +
+
+
+
+ + +AI.Option.Ground.id.NO_OPTION + +
+
+ + + +
+
+
+
+ + +AI.Option.Ground.id.ROE + +
+
+ +

AI.Option.Ground.val.ROE

+ +
+
+ +

Type AI.Option.Ground.val

+

Field(s)

+
+
+ + #AI.Option.Ground.val.ALARM_STATE + +AI.Option.Ground.val.ALARM_STATE + +
+
+ + + +
+
+
+
+ + #AI.Option.Ground.val.ROE + +AI.Option.Ground.val.ROE + +
+
+ + + +
+
+ +

Type AI.Option.Ground.val.ALARM_STATE

+

Field(s)

+
+
+ + +AI.Option.Ground.val.ALARM_STATE.AUTO + +
+
+ + + +
+
+
+
+ + +AI.Option.Ground.val.ALARM_STATE.GREEN + +
+
+ + + +
+
+
+
+ + +AI.Option.Ground.val.ALARM_STATE.RED + +
+
+ + + +
+
+ +

Type AI.Option.Ground.val.ROE

+

Field(s)

+
+
+ + +AI.Option.Ground.val.ROE.OPEN_FIRE + +
+
+ + + +
+
+
+
+ + +AI.Option.Ground.val.ROE.RETURN_FIRE + +
+
+ + + +
+
+
+
+ + +AI.Option.Ground.val.ROE.WEAPON_HOLD + +
+
+ + + +
+
+ +

Type AI.Option.Naval

+

Field(s)

+
+
+ + #AI.Option.Naval.id + +AI.Option.Naval.id + +
+
+ + + +
+
+
+
+ + #AI.Option.Naval.val + +AI.Option.Naval.val + +
+
+ + + +
+
+ +

Type AI.Option.Naval.id

+

Field(s)

+
+
+ + +AI.Option.Naval.id.NO_OPTION + +
+
+ + + +
+
+
+
+ + +AI.Option.Naval.id.ROE + +
+
+ + + +
+
+ +

Type AI.Option.Naval.val

+

Field(s)

+
+
+ + #AI.Option.Naval.val.ROE + +AI.Option.Naval.val.ROE + +
+
+ + + +
+
+ +

Type AI.Option.Naval.val.ROE

+

Field(s)

+
+
+ + +AI.Option.Naval.val.ROE.OPEN_FIRE + +
+
+ + + +
+
+
+
+ + +AI.Option.Naval.val.ROE.RETURN_FIRE + +
+
+ + + +
+
+
+
+ + +AI.Option.Naval.val.ROE.WEAPON_HOLD + +
+
+ + + +
+
+ +

Type AI.Skill

+

Field(s)

+
+
+ + +AI.Skill.AVERAGE + +
+
+ + + +
+
+
+
+ + +AI.Skill.CLIENT + +
+
+ + + +
+
+
+
+ + +AI.Skill.EXCELLENT + +
+
+ + + +
+
+
+
+ + +AI.Skill.GOOD + +
+
+ + + +
+
+
+
+ + +AI.Skill.HIGH + +
+
+ + + +
+
+
+
+ + +AI.Skill.PLAYER + +
+
+ + + +
+
+ +

Type AI.Task

+

Field(s)

+
+
+ + #AI.Task.AltitudeType + +AI.Task.AltitudeType + +
+
+ + + +
+
+
+
+ + #AI.Task.Designation + +AI.Task.Designation + +
+
+ + + +
+
+
+
+ + #AI.Task.OrbitPattern + +AI.Task.OrbitPattern + +
+
+ + + +
+
+
+
+ + #AI.Task.TurnMethod + +AI.Task.TurnMethod + +
+
+ + + +
+
+
+
+ + #AI.Task.VehicleFormation + +AI.Task.VehicleFormation + +
+
+ + + +
+
+
+
+ + #AI.Task.WaypointType + +AI.Task.WaypointType + +
+
+ + + +
+
+
+
+ + #AI.Task.WeaponExpend + +AI.Task.WeaponExpend + +
+
+ + + +
+
+ +

Type AI.Task.AltitudeType

+

Field(s)

+
+
+ + +AI.Task.AltitudeType.BARO + +
+
+ + + +
+
+
+
+ + +AI.Task.AltitudeType.RADIO + +
+
+ + + +
+
+ +

Type AI.Task.Designation

+

Field(s)

+
+
+ + +AI.Task.Designation.AUTO + +
+
+ + + +
+
+
+
+ + +AI.Task.Designation.IR_POINTER + +
+
+ + + +
+
+
+
+ + +AI.Task.Designation.LASER + +
+
+ + + +
+
+
+
+ + +AI.Task.Designation.NO + +
+
+ + + +
+
+
+
+ + +AI.Task.Designation.WP + +
+
+ + + +
+
+ +

Type AI.Task.OrbitPattern

+

Field(s)

+
+
+ + +AI.Task.OrbitPattern.CIRCLE + +
+
+ + + +
+
+
+
+ + +AI.Task.OrbitPattern.RACE_TRACK + +
+
+ + + +
+
+ +

Type AI.Task.TurnMethod

+

Field(s)

+
+
+ + +AI.Task.TurnMethod.FIN_POINT + +
+
+ + + +
+
+
+
+ + +AI.Task.TurnMethod.FLY_OVER_POINT + +
+
+ + + +
+
+ +

Type AI.Task.VehicleFormation

+

Field(s)

+
+
+ + +AI.Task.VehicleFormation.CONE + +
+
+ + + +
+
+
+
+ + +AI.Task.VehicleFormation.DIAMOND + +
+
+ + + +
+
+
+
+ + +AI.Task.VehicleFormation.ECHELON_LEFT + +
+
+ + + +
+
+
+
+ + +AI.Task.VehicleFormation.ECHELON_RIGHT + +
+
+ + + +
+
+
+
+ + +AI.Task.VehicleFormation.OFF_ROAD + +
+
+ + + +
+
+
+
+ + +AI.Task.VehicleFormation.ON_ROAD + +
+
+ + + +
+
+
+
+ + +AI.Task.VehicleFormation.RANK + +
+
+ + + +
+
+
+
+ + +AI.Task.VehicleFormation.VEE + +
+
+ + + +
+
+ +

Type AI.Task.WaypointType

+

Field(s)

+
+
+ + +AI.Task.WaypointType.LAND + +
+
+ + + +
+
+
+
+ + +AI.Task.WaypointType.TAKEOFF + +
+
+ + + +
+
+
+
+ + +AI.Task.WaypointType.TAKEOFF_PARKING + +
+
+ + + +
+
+
+
+ + +AI.Task.WaypointType.TURNING_POINT + +
+
+ + + +
+
+ +

Type AI.Task.WeaponExpend

+

Field(s)

+
+
+ + +AI.Task.WeaponExpend.ALL + +
+
+ + + +
+
+
+
+ + +AI.Task.WeaponExpend.FOUR + +
+
+ + + +
+
+
+
+ + +AI.Task.WeaponExpend.HALF + +
+
+ + + +
+
+
+
+ + +AI.Task.WeaponExpend.ONE + +
+
+ + + +
+
+
+
+ + +AI.Task.WeaponExpend.QUARTER + +
+
+ + + +
+
+
+
+ + +AI.Task.WeaponExpend.TWO + +
+
+ + + +
+
+ +

Type Angle

+ +

An angle type

+ + +

Type AttributeName

+ +

AttributeName = string +Each object type may have attributes.

+ + +

Attributes are enlisted in ./Scripts/Database/db_attributes.Lua. +To know what attributes the object type has, look for the unit type script in sub-directories planes/, helicopter/s, vehicles, navy/ of ./Scripts/Database/ directory.

+ + +

Type AttributeNameArray

+ +

List of #AttributeName

+ + +

Type Azimuth

+ +

Azimuth is an angle of rotation around world axis y counter-clockwise.

+ + +

Type Box3

+ +

3-dimensional box.

+ +

Field(s)

+
+
+ + #Vec3 + +Box3.max + +
+
+ + + +
+
+
+
+ + #Vec3 + +Box3.min + +
+
+ + + +
+
+ +

Type Desc

+

Field(s)

+
+
+ + #table + +Desc.attributes + +
+
+ +

object type attributes

+ +
+
+
+
+ + #string + +Desc.displayName + +
+
+ +

localized display name

+ +
+
+
+
+ + #TypeName + +Desc.typeName + +
+
+ +

type name

+ +
+
+ +

Type Distance

+ +

A distance type

+ + +

Type Mass

+ +

Mass is given in kilograms.

+ + +

Type MissionTime

+ +

Mission time is a model time plus time of the mission start.

+ + +

Type ModelTime

+ +

Model time is the time that drives the simulation.

+ + +

Model time may be stopped, accelerated and decelerated relative real time.

+ + +

Type Position3

+ +

Position is a composite structure.

+ + +

It consists of both coordinate vector and orientation matrix. Position3 (also known as "Pos3" for short) is a table that has following format:

+ +

Field(s)

+
+
+ + #Vec3 + +Position3.p + +
+
+ + + +
+
+
+
+ + #Vec3 + +Position3.x + +
+
+ + + +
+
+
+
+ + #Vec3 + +Position3.y + +
+
+ + + +
+
+
+
+ + #Vec3 + +Position3.z + +
+
+ + + +
+
+ +

Type Time

+ +

Time is given in seconds.

+ + +

Type TypeName

+ +

Each object belongs to a type.

+ + +

Object type is a named couple of properties those independent of mission and common for all units of the same type. Name of unit type is a string. Samples of unit type: "Su-27", "KAMAZ" and "M2 Bradley".

+ + +

Type Vec2

+ +

Vec2 is a 2D-vector for the ground plane as a reference plane.

+ +

Field(s)

+
+
+ + #Distance + +Vec2.x + +
+
+ +

Vec2.x = Vec3.x

+ +
+
+
+
+ + #Distance + +Vec2.y + +
+
+ +

Vec2.y = Vec3.z

+ +
+
+ +

Type Vec3

+ +

Vec3 type is a 3D-vector.

+ + +

DCS world has 3-dimensional coordinate system. DCS ground is an infinite plain.

+ +

Field(s)

+
+
+ + #Distance + +Vec3.x + +
+
+ +

is directed to the north

+ +
+
+
+
+ + #Distance + +Vec3.y + +
+
+ +

is directed up

+ +
+
+
+
+ + #Distance + +Vec3.z + +
+
+ +

is directed to the east

+ +
+
+ +
+ +
+ + diff --git a/docs/Documentation/DCSUnit.html b/docs/Documentation/DCSUnit.html new file mode 100644 index 000000000..27f223811 --- /dev/null +++ b/docs/Documentation/DCSUnit.html @@ -0,0 +1,2080 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module DCSUnit

+ + + +

Global(s)

+ + + + + +
Unit + +
+

Type Unit

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Unit.< +

Unit.AmmoItem> Ammo

+
Unit.AmmoItem + +
Unit.Category + +
Unit.Desc + +
Unit.DescAircraft + +
Unit.DescAirplane + +
Unit.DescHelicopter + +
Unit.DescShip + +
Unit.DescVehicle + +
Unit.ID +

Identifier of an unit. It assigned to an unit by the Mission Editor automatically.

+
Unit.IRST + +
Unit.Optic + +
Unit.OpticType + +
Unit.Radar + +
Unit.RadarType + +
Unit.RefuelingSystem + +
Unit.Sensor + +
Unit.SensorType + +
Unit:getAmmo() +

Returns the unit ammunition.

+
Unit.getByName(name) +

Returns unit object by the name assigned to the unit in Mission Editor.

+
Unit:getCallsign() +

Returns the unit's callsign - the localized string.

+
Unit:getController() +

Returns controller of the unit if it exist and nil otherwise

+
Unit:getDesc() +

Returns unit descriptor.

+
Unit:getFuel() +

Returns relative amount of fuel (from 0.0 to 1.0) the unit has in its internal tanks.

+
Unit:getGroup() +

Returns the unit's group if it exist and nil otherwise

+
Unit:getID() +

returns the unit's unique identifier.

+
Unit:getLife() +

Returns the unit's health.

+
Unit:getLife0() +

returns the unit's initial health.

+
Unit:getNumber() +

Returns the unit's number in the group.

+
Unit:getPlayerName() +

Returns name of the player that control the unit or nil if the unit is controlled by A.I.

+
Unit:getRadar() +

returns two values: +First value indicates if at least one of the unit's radar(s) is on.

+
Unit:getSensors() +

Returns the unit sensors.

+
Unit:hasSensors(sensorType, ...) +

Returns true if the unit has specified types of sensors.

+
Unit:isActive() +

Returns if the unit is activated.

+
+ +

Type Unit.AmmoItem

+ + + + + + + + + +
Unit.AmmoItem.count +

ammunition count

+
Unit.AmmoItem.desc +

ammunition descriptor

+
+ +

Type Unit.Category

+ + + + + + + + + + + + + + + + + + + + + +
Unit.Category.AIRPLANE + +
Unit.Category.GROUND_UNIT + +
Unit.Category.HELICOPTER + +
Unit.Category.SHIP + +
Unit.Category.STRUCTURE + +
+ +

Type Unit.Desc

+ + + + + + + + + + + + + +
Unit.Desc.category +

Unit Category

+
Unit.Desc.massEmpty +

mass of empty unit

+
Unit.Desc.speedMax +

istance / Time, --maximal velocity

+
+ +

Type Unit.DescAircraft

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Unit.DescAircraft.Hmax +

Ceiling

+
Unit.DescAircraft.NyMax +

maximal safe acceleration

+
Unit.DescAircraft.NyMin +

minimal safe acceleration

+
Unit.DescAircraft.VyMax +

#Distance / #Time, --maximal climb rate

+
Unit.DescAircraft.fuelMassMax +

maximal inner fuel mass

+
Unit.DescAircraft.range +

Operational range

+
Unit.DescAircraft.tankerType +

refueling system type

+
+ +

Type Unit.DescAirplane

+ + + + + + + + + +
Unit.DescAirplane.speedMax0 +

Distance / Time maximal TAS at ground level

+
Unit.DescAirplane.speedMax10K +

Distance / Time maximal TAS at altitude of 10 km

+
+ +

Type Unit.DescHelicopter

+ + + + + +
Unit.DescHelicopter.HmaxStat +

static ceiling

+
+ +

Type Unit.DescVehicle

+ + + + + + + + + +
Unit.DescVehicle.maxSlopeAngle +

maximal slope angle

+
Unit.DescVehicle.riverCrossing +

can the vehicle cross a rivers

+
+ +

Type Unit.Optic

+ + + + + +
Unit.Optic.opticType + +
+ +

Type Unit.OpticType

+ + + + + + + + + + + + + +
Unit.OpticType.IR +

Infra-Red optic sensor

+
Unit.OpticType.LLTV +

Low-level TV-sensor

+
Unit.OpticType.TV +

TV-sensor

+
+ +

Type Unit.Radar

+ + + + + + + + + + + + + +
Unit.Radar.detectionDistanceAir +

detection distance for RCS=1m^2 airborne target, nil if radar doesn't support air search

+
Unit.Radar.detectionDistanceHRM +

detection distance for RCS=1m^2 in high-resolution mapping mode, nil if radar has no HRM

+
Unit.Radar.detectionDistanceRBM +

detection distance for RCS=1m^2 in real-beam mapping mode, nil if radar doesn't support surface/land search

+
+ +

Type Unit.Radar.detectionDistanceAir

+ + + + + + + + + +
Unit.Radar.detectionDistanceAir.lowerHemisphere + +
Unit.Radar.detectionDistanceAir.upperHemisphere + +
+ +

Type Unit.Radar.detectionDistanceAir.lowerHemisphere

+ + + + + + + + + +
Unit.Radar.detectionDistanceAir.lowerHemisphere.headOn + +
Unit.Radar.detectionDistanceAir.lowerHemisphere.tailOn + +
+ +

Type Unit.Radar.detectionDistanceAir.upperHemisphere

+ + + + + + + + + +
Unit.Radar.detectionDistanceAir.upperHemisphere.headOn + +
Unit.Radar.detectionDistanceAir.upperHemisphere.tailOn + +
+ +

Type Unit.RadarType

+ + + + + + + + + +
Unit.RadarType.AS +

air search radar

+
Unit.RadarType.SS +

surface/land search radar

+
+ +

Type Unit.RefuelingSystem

+ + + + + + + + + +
Unit.RefuelingSystem.BOOM_AND_RECEPTACLE + +
Unit.RefuelingSystem.PROBE_AND_DROGUE + +
+ +

Type Unit.Sensor

+ + + + + + + + + +
Unit.Sensor.type + +
Unit.Sensor.typeName + +
+ +

Type Unit.SensorType

+ + + + + + + + + + + + + + + + + +
Unit.SensorType.IRST + +
Unit.SensorType.OPTIC + +
Unit.SensorType.RADAR + +
Unit.SensorType.RWR + +
+ +

Type Wrapper.Unit

+ + + + + + + + + + + + + +
Wrapper.Unit.detectionDistanceAfterburner +

..., engines are in afterburner mode

+
Wrapper.Unit.detectionDistanceIdle +

detection of tail-on target with heat signature = 1 in upper hemisphere, engines are in idle

+
Wrapper.Unit.detectionDistanceMaximal +

..., engines are in maximal mode

+
+ +

Global(s)

+
+
+ + #Unit + +Unit + +
+
+ + + +
+
+

Type DCSUnit

+ +

Type Angle

+ +

Type Controller

+ +

Type Distance

+ +

Type Mass

+ +

Type TypeName

+ +

Type Unit

+

Field(s)

+
+
+ + #list + +Unit.< + +
+
+ +

Unit.AmmoItem> Ammo

+ +
+
+
+
+ + #Unit.AmmoItem + +Unit.AmmoItem + +
+
+ + + +
+
+
+
+ + #Unit.Category + +Unit.Category + +
+
+ + + +
+
+
+
+ + #Unit.Desc + +Unit.Desc + +
+
+ + + +
+
+
+
+ + #Unit.DescAircraft + +Unit.DescAircraft + +
+
+ + + +
+
+
+
+ + #Unit.DescAirplane + +Unit.DescAirplane + +
+
+ + + +
+
+
+
+ + #Unit.DescHelicopter + +Unit.DescHelicopter + +
+
+ + + +
+
+
+
+ + #Unit.DescShip + +Unit.DescShip + +
+
+ + + +
+
+
+
+ + #Unit.DescVehicle + +Unit.DescVehicle + +
+
+ + + +
+
+
+
+ + +Unit.ID + +
+
+ +

Identifier of an unit. It assigned to an unit by the Mission Editor automatically.

+ +
+
+
+
+ + #Unit.IRST + +Unit.IRST + +
+
+ + + +
+
+
+
+ + #Unit.Optic + +Unit.Optic + +
+
+ + + +
+
+
+
+ + #Unit.OpticType + +Unit.OpticType + +
+
+ + + +
+
+
+
+ + #Unit.Radar + +Unit.Radar + +
+
+ + + +
+
+
+
+ + #Unit.RadarType + +Unit.RadarType + +
+
+ + + +
+
+
+
+ + #Unit.RefuelingSystem + +Unit.RefuelingSystem + +
+
+ + + +
+
+
+
+ + #Unit.Sensor + +Unit.Sensor + +
+
+ + + +
+
+
+
+ + #Unit.SensorType + +Unit.SensorType + +
+
+ + + +
+
+
+
+ + +Unit:getAmmo() + +
+
+ +

Returns the unit ammunition.

+ +

Return value

+ +

#Unit.Ammo:

+ + +
+
+
+
+ + +Unit.getByName(name) + +
+
+ +

Returns unit object by the name assigned to the unit in Mission Editor.

+ + +

If there is unit with such name or the unit is destroyed the function will return nil. The function provides access to non-activated units too.

+ +

Parameter

+
    +
  • + +

    #string name :

    + +
  • +
+

Return value

+ +

#Unit:

+ + +
+
+
+
+ + +Unit:getCallsign() + +
+
+ +

Returns the unit's callsign - the localized string.

+ +

Return value

+ +

#string:

+ + +
+
+
+
+ + +Unit:getController() + +
+
+ +

Returns controller of the unit if it exist and nil otherwise

+ +

Return value

+ +

#Controller:

+ + +
+
+
+
+ + +Unit:getDesc() + +
+
+ +

Returns unit descriptor.

+ + +

Descriptor type depends on unit category.

+ +

Return value

+ +

#Unit.Desc:

+ + +
+
+
+
+ + +Unit:getFuel() + +
+
+ +

Returns relative amount of fuel (from 0.0 to 1.0) the unit has in its internal tanks.

+ + +

If there are additional fuel tanks the value may be greater than 1.0.

+ +

Return value

+ +

#number:

+ + +
+
+
+
+ + +Unit:getGroup() + +
+
+ +

Returns the unit's group if it exist and nil otherwise

+ +

Return value

+ +

Dcs.DCSWrapper.Group#Group:

+ + +
+
+
+
+ + +Unit:getID() + +
+
+ +

returns the unit's unique identifier.

+ +

Return value

+ +

#Unit.ID:

+ + +
+
+
+
+ + +Unit:getLife() + +
+
+ +

Returns the unit's health.

+ + +

Dead units has health <= 1.0

+ +

Return value

+ +

#number:

+ + +
+
+
+
+ + +Unit:getLife0() + +
+
+ +

returns the unit's initial health.

+ +

Return value

+ +

#number:

+ + +
+
+
+
+ + +Unit:getNumber() + +
+
+ +

Returns the unit's number in the group.

+ + +

The number is the same number the unit has in ME. It may not be changed during the mission. If any unit in the group is destroyed, the numbers of another units will not be changed.

+ +

Return value

+ +

#number:

+ + +
+
+
+
+ + +Unit:getPlayerName() + +
+
+ +

Returns name of the player that control the unit or nil if the unit is controlled by A.I.

+ +

Return value

+ +

#string:

+ + +
+
+
+
+ + +Unit:getRadar() + +
+
+ +

returns two values: +First value indicates if at least one of the unit's radar(s) is on.

+ + +

Second value is the object of the radar's interest. Not nil only if at least one radar of the unit is tracking a target.

+ +

Return value

+ +

#boolean, Wrapper.Object#Object:

+ + +
+
+
+
+ + +Unit:getSensors() + +
+
+ +

Returns the unit sensors.

+ +

Return value

+ +

#Unit.Sensors:

+ + +
+
+
+
+ + +Unit:hasSensors(sensorType, ...) + +
+
+ +

Returns true if the unit has specified types of sensors.

+ + +

This function is more preferable than Unit.getSensors() if you don't want to get information about all the unit's sensors, and just want to check if the unit has specified types of sensors.

+ +

Parameters

+
    +
  • + +

    #Unit.SensorType sensorType : +(= nil) Sensor type.

    + +
  • +
  • + +

    ... : +Additional parameters.

    + +
  • +
+

Return value

+ +

#boolean:

+ + +

Usage:

+
If sensorType is Unit.SensorType.OPTIC, additional parameters are optic sensor types. Following example checks if the unit has LLTV or IR optics:
+unit:hasSensors(Unit.SensorType.OPTIC, Unit.OpticType.LLTV, Unit.OpticType.IR)
+If sensorType is Unit.SensorType.RADAR, additional parameters are radar types. Following example checks if the unit has air search radars:
+unit:hasSensors(Unit.SensorType.RADAR, Unit.RadarType.AS)
+If no additional parameters are specified the function returns true if the unit has at least one sensor of specified type.
+If sensor type is not specified the function returns true if the unit has at least one sensor of any type.
+
+ +
+
+
+
+ + +Unit:isActive() + +
+
+ +

Returns if the unit is activated.

+ +

Return value

+ +

#boolean:

+ + +
+
+ +

Type Unit.Ammo

+ +

Type Unit.AmmoItem

+ +

ammunition item: "type-count" pair.

+ +

Field(s)

+
+
+ + #number + +Unit.AmmoItem.count + +
+
+ +

ammunition count

+ +
+
+
+
+ + #Weapon.Desc + +Unit.AmmoItem.desc + +
+
+ +

ammunition descriptor

+ +
+
+ +

Type Unit.Category

+ +

Enum that stores unit categories.

+ +

Field(s)

+
+
+ + +Unit.Category.AIRPLANE + +
+
+ + + +
+
+
+
+ + +Unit.Category.GROUND_UNIT + +
+
+ + + +
+
+
+
+ + +Unit.Category.HELICOPTER + +
+
+ + + +
+
+
+
+ + +Unit.Category.SHIP + +
+
+ + + +
+
+
+
+ + +Unit.Category.STRUCTURE + +
+
+ + + +
+
+ +

Type Unit.Desc

+ +

A unit descriptor.

+ +

Field(s)

+
+
+ + #Unit.Category + +Unit.Desc.category + +
+
+ +

Unit Category

+ +
+
+
+
+ + #Mass + +Unit.Desc.massEmpty + +
+
+ +

mass of empty unit

+ +
+
+
+
+ + #number + +Unit.Desc.speedMax + +
+
+ +

istance / Time, --maximal velocity

+ +
+
+ +

Type Unit.DescAircraft

+ +

An aircraft descriptor.

+ +

Field(s)

+
+
+ + #Distance + +Unit.DescAircraft.Hmax + +
+
+ +

Ceiling

+ +
+
+
+
+ + #number + +Unit.DescAircraft.NyMax + +
+
+ +

maximal safe acceleration

+ +
+
+
+
+ + #number + +Unit.DescAircraft.NyMin + +
+
+ +

minimal safe acceleration

+ +
+
+
+
+ + #number + +Unit.DescAircraft.VyMax + +
+
+ +

#Distance / #Time, --maximal climb rate

+ +
+
+
+
+ + #Mass + +Unit.DescAircraft.fuelMassMax + +
+
+ +

maximal inner fuel mass

+ +
+
+
+
+ + #Distance + +Unit.DescAircraft.range + +
+
+ +

Operational range

+ +
+
+
+
+ + #Unit.RefuelingSystem + +Unit.DescAircraft.tankerType + +
+
+ +

refueling system type

+ +
+
+ +

Type Unit.DescAirplane

+ +

An airplane descriptor.

+ +

Field(s)

+
+
+ + #number + +Unit.DescAirplane.speedMax0 + +
+
+ +

Distance / Time maximal TAS at ground level

+ +
+
+
+
+ + #number + +Unit.DescAirplane.speedMax10K + +
+
+ +

Distance / Time maximal TAS at altitude of 10 km

+ +
+
+ +

Type Unit.DescHelicopter

+ +

A helicopter descriptor.

+ +

Field(s)

+
+
+ + #Distance + +Unit.DescHelicopter.HmaxStat + +
+
+ +

static ceiling

+ +
+
+ +

Type Unit.DescShip

+ +

A ship descriptor.

+ + +

Type Unit.DescVehicle

+ +

A vehicle descriptor.

+ +

Field(s)

+
+
+ + #Angle + +Unit.DescVehicle.maxSlopeAngle + +
+
+ +

maximal slope angle

+ +
+
+
+
+ + #boolean + +Unit.DescVehicle.riverCrossing + +
+
+ +

can the vehicle cross a rivers

+ +
+
+ +

Type Unit.ID

+ +

Type Unit.IRST

+ +

Type Unit.Optic

+ +

An optic sensor.

+ +

Field(s)

+
+
+ + #Unit.OpticType + +Unit.Optic.opticType + +
+
+ + + +
+
+ +

Type Unit.OpticType

+ +

Enum that stores types of optic sensors.

+ +

Field(s)

+
+
+ + +Unit.OpticType.IR + +
+
+ +

Infra-Red optic sensor

+ +
+
+
+
+ + +Unit.OpticType.LLTV + +
+
+ +

Low-level TV-sensor

+ +
+
+
+
+ + +Unit.OpticType.TV + +
+
+ +

TV-sensor

+ +
+
+ +

Type Unit.RWR

+ +

An RWR.

+ + +

Type Unit.Radar

+ +

A radar.

+ +

Field(s)

+
+
+ + #Unit.Radar.detectionDistanceAir + +Unit.Radar.detectionDistanceAir + +
+
+ +

detection distance for RCS=1m^2 airborne target, nil if radar doesn't support air search

+ +
+
+
+
+ + #Distance + +Unit.Radar.detectionDistanceHRM + +
+
+ +

detection distance for RCS=1m^2 in high-resolution mapping mode, nil if radar has no HRM

+ +
+
+
+
+ + #Distance + +Unit.Radar.detectionDistanceRBM + +
+
+ +

detection distance for RCS=1m^2 in real-beam mapping mode, nil if radar doesn't support surface/land search

+ +
+
+ +

Type Unit.Radar.detectionDistanceAir

+

Field(s)

+
+
+ + #Unit.Radar.detectionDistanceAir.lowerHemisphere + +Unit.Radar.detectionDistanceAir.lowerHemisphere + +
+
+ + + +
+
+
+
+ + #Unit.Radar.detectionDistanceAir.upperHemisphere + +Unit.Radar.detectionDistanceAir.upperHemisphere + +
+
+ + + +
+
+ +

Type Unit.Radar.detectionDistanceAir.lowerHemisphere

+

Field(s)

+
+
+ + #Distance + +Unit.Radar.detectionDistanceAir.lowerHemisphere.headOn + +
+
+ + + +
+
+
+
+ + #Distance + +Unit.Radar.detectionDistanceAir.lowerHemisphere.tailOn + +
+
+ + + +
+
+ +

Type Unit.Radar.detectionDistanceAir.upperHemisphere

+

Field(s)

+
+
+ + #Distance + +Unit.Radar.detectionDistanceAir.upperHemisphere.headOn + +
+
+ + + +
+
+
+
+ + #Distance + +Unit.Radar.detectionDistanceAir.upperHemisphere.tailOn + +
+
+ + + +
+
+ +

Type Unit.RadarType

+ +

Enum that stores radar types.

+ +

Field(s)

+
+
+ + +Unit.RadarType.AS + +
+
+ +

air search radar

+ +
+
+
+
+ + +Unit.RadarType.SS + +
+
+ +

surface/land search radar

+ +
+
+ +

Type Unit.RefuelingSystem

+ +

Enum that stores aircraft refueling system types.

+ +

Field(s)

+
+
+ + +Unit.RefuelingSystem.BOOM_AND_RECEPTACLE + +
+
+ + + +
+
+
+
+ + +Unit.RefuelingSystem.PROBE_AND_DROGUE + +
+
+ + + +
+
+ +

Type Unit.Sensor

+ +

A unit sensor.

+ +

Field(s)

+
+
+ + #Unit.SensorType + +Unit.Sensor.type + +
+
+ + + +
+
+
+
+ + #TypeName + +Unit.Sensor.typeName + +
+
+ + + +
+
+ +

Type Unit.SensorType

+ +

Enum that stores sensor types.

+ +

Field(s)

+
+
+ + +Unit.SensorType.IRST + +
+
+ + + +
+
+
+
+ + +Unit.SensorType.OPTIC + +
+
+ + + +
+
+
+
+ + +Unit.SensorType.RADAR + +
+
+ + + +
+
+
+
+ + +Unit.SensorType.RWR + +
+
+ + + +
+
+ +

Type Unit.Sensors

+ +

Type Weapon.Desc

+ +

Type Wrapper.Unit

+ +

An IRST.

+ +

Field(s)

+
+
+ + #Distance + +Wrapper.Unit.detectionDistanceAfterburner + +
+
+ +

..., engines are in afterburner mode

+ +
+
+
+
+ + #Distance + +Wrapper.Unit.detectionDistanceIdle + +
+
+ +

detection of tail-on target with heat signature = 1 in upper hemisphere, engines are in idle

+ +
+
+
+
+ + #Distance + +Wrapper.Unit.detectionDistanceMaximal + +
+
+ +

..., engines are in maximal mode

+ +
+
+ +

Type list

+ +
+ +
+ + diff --git a/docs/Documentation/DCSVec3.html b/docs/Documentation/DCSVec3.html new file mode 100644 index 000000000..16c845eb4 --- /dev/null +++ b/docs/Documentation/DCSVec3.html @@ -0,0 +1,195 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module DCSVec3

+ + + +

Global(s)

+ + + + + +
Vec3 + +
+

Type Vec3

+ + + + + + + + + + + + + +
Vec3.x + +
Vec3.y + +
Vec3.z + +
+ +

Global(s)

+
+
+ + #Vec3 + +Vec3 + +
+
+ + + +
+
+

Type DCSVec3

+ +

Type Vec3

+

Field(s)

+
+
+ + #number + +Vec3.x + +
+
+ + + +
+
+
+
+ + #number + +Vec3.y + +
+
+ + + +
+
+
+
+ + #number + +Vec3.z + +
+
+ + + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/DCSWorld.html b/docs/Documentation/DCSWorld.html new file mode 100644 index 000000000..b4188357b --- /dev/null +++ b/docs/Documentation/DCSWorld.html @@ -0,0 +1,637 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module DCSWorld

+ + + +

Global(s)

+ + + + + +
world + +
+

Type world

+ + + + + +
world.event + +
+ +

Type world.event

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
world.event.S_EVENT_BASE_CAPTURED + +
world.event.S_EVENT_BIRTH + +
world.event.S_EVENT_CRASH + +
world.event.S_EVENT_DEAD + +
world.event.S_EVENT_EJECTION + +
world.event.S_EVENT_ENGINE_SHUTDOWN + +
world.event.S_EVENT_ENGINE_STARTUP + +
world.event.S_EVENT_HIT + +
world.event.S_EVENT_HUMAN_FAILURE + +
world.event.S_EVENT_INVALID + +
world.event.S_EVENT_LAND + +
world.event.S_EVENT_MAX + +
world.event.S_EVENT_MISSION_END + +
world.event.S_EVENT_MISSION_START + +
world.event.S_EVENT_PILOT_DEAD + +
world.event.S_EVENT_PLAYER_COMMENT + +
world.event.S_EVENT_PLAYER_ENTER_UNIT + +
world.event.S_EVENT_PLAYER_LEAVE_UNIT + +
world.event.S_EVENT_REFUELING + +
world.event.S_EVENT_REFUELING_STOP + +
world.event.S_EVENT_SHOOTING_END + +
world.event.S_EVENT_SHOOTING_START + +
world.event.S_EVENT_SHOT + +
world.event.S_EVENT_TAKEOFF + +
world.event.S_EVENT_TOOK_CONTROL + +
+ +

Global(s)

+
+
+ + #world + +world + +
+
+ + + +
+
+

Type DCSWorld

+ +

Type world

+

Field(s)

+
+
+ + #world.event + +world.event + +
+
+ + + +
+
+ +

Type world.event

+

Field(s)

+
+
+ + +world.event.S_EVENT_BASE_CAPTURED + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_BIRTH + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_CRASH + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_DEAD + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_EJECTION + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_ENGINE_SHUTDOWN + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_ENGINE_STARTUP + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_HIT + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_HUMAN_FAILURE + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_INVALID + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_LAND + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_MAX + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_MISSION_END + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_MISSION_START + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_PILOT_DEAD + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_PLAYER_COMMENT + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_PLAYER_ENTER_UNIT + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_PLAYER_LEAVE_UNIT + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_REFUELING + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_REFUELING_STOP + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_SHOOTING_END + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_SHOOTING_START + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_SHOT + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_TAKEOFF + +
+
+ + + +
+
+
+
+ + +world.event.S_EVENT_TOOK_CONTROL + +
+
+ + + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/DCSZone.html b/docs/Documentation/DCSZone.html new file mode 100644 index 000000000..97af5943c --- /dev/null +++ b/docs/Documentation/DCSZone.html @@ -0,0 +1,175 @@ + + + + + + +
+
+ +
+
+
+ + + diff --git a/docs/Documentation/DCScountry.html b/docs/Documentation/DCScountry.html new file mode 100644 index 000000000..e62671d74 --- /dev/null +++ b/docs/Documentation/DCScountry.html @@ -0,0 +1,523 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module DCScountry

+ + + +

Global(s)

+ + + + + +
country + +
+

Type country

+ + + + + +
country.id + +
+ +

Type country.id

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
country.id.ABKHAZIA + +
country.id.BELGIUM + +
country.id.CANADA + +
country.id.DENMARK + +
country.id.FRANCE + +
country.id.GEORGIA + +
country.id.GERMANY + +
country.id.INSURGENTS + +
country.id.ISRAEL + +
country.id.ITALY + +
country.id.NORWAY + +
country.id.RUSSIA + +
country.id.SOUTH_OSETIA + +
country.id.SPAIN + +
country.id.THE_NETHERLANDS + +
country.id.TURKEY + +
country.id.UK + +
country.id.UKRAINE + +
country.id.USA + +
+ +

Global(s)

+
+
+ + #country + +country + +
+
+ + + +
+
+

Type DCScountry

+ +

Type country

+

Field(s)

+
+
+ + #country.id + +country.id + +
+
+ + + +
+
+ +

Type country.id

+

Field(s)

+
+
+ + +country.id.ABKHAZIA + +
+
+ + + +
+
+
+
+ + +country.id.BELGIUM + +
+
+ + + +
+
+
+
+ + +country.id.CANADA + +
+
+ + + +
+
+
+
+ + +country.id.DENMARK + +
+
+ + + +
+
+
+
+ + +country.id.FRANCE + +
+
+ + + +
+
+
+
+ + +country.id.GEORGIA + +
+
+ + + +
+
+
+
+ + +country.id.GERMANY + +
+
+ + + +
+
+
+
+ + +country.id.INSURGENTS + +
+
+ + + +
+
+
+
+ + +country.id.ISRAEL + +
+
+ + + +
+
+
+
+ + +country.id.ITALY + +
+
+ + + +
+
+
+
+ + +country.id.NORWAY + +
+
+ + + +
+
+
+
+ + +country.id.RUSSIA + +
+
+ + + +
+
+
+
+ + +country.id.SOUTH_OSETIA + +
+
+ + + +
+
+
+
+ + +country.id.SPAIN + +
+
+ + + +
+
+
+
+ + +country.id.THE_NETHERLANDS + +
+
+ + + +
+
+
+
+ + +country.id.TURKEY + +
+
+ + + +
+
+
+
+ + +country.id.UK + +
+
+ + + +
+
+
+
+ + +country.id.UKRAINE + +
+
+ + + +
+
+
+
+ + +country.id.USA + +
+
+ + + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/DCStimer.html b/docs/Documentation/DCStimer.html new file mode 100644 index 000000000..d4d84f593 --- /dev/null +++ b/docs/Documentation/DCStimer.html @@ -0,0 +1,329 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module DCStimer

+ + + +

Global(s)

+ + + + + +
timer + +
+

Type timer

+ + + + + + + + + + + + + + + + + + + + + + + + + +
timer.getAbsTime() +

Returns mission time in seconds.

+
timer.getTime() +

Returns model time in seconds.

+
timer.getTime0() +

Returns mission start time in seconds.

+
timer.removeFunction(functionId) +

Removes the function from schedule.

+
timer.scheduleFunction(functionToCall, functionArgument, time) +

Schedules function to call at desired model time.

+
timer.setFunctionTime(functionId, time) +

Re-schedules function to call at another model time.

+
+ +

Global(s)

+
+
+ + #timer + +timer + +
+
+ + + +
+
+

Type DCStimer

+ +

Type FunctionToCall

+ +

Type Time

+ +

Type timer

+

Field(s)

+
+
+ + +timer.getAbsTime() + +
+
+ +

Returns mission time in seconds.

+ +

Return value

+ +

#Time:

+ + +
+
+
+
+ + +timer.getTime() + +
+
+ +

Returns model time in seconds.

+ +

Return value

+ +

#Time: +

+ +
+
+
+
+ + +timer.getTime0() + +
+
+ +

Returns mission start time in seconds.

+ +

Return value

+ +

#Time:

+ + +
+
+
+
+ + +timer.removeFunction(functionId) + +
+
+ +

Removes the function from schedule.

+ +

Parameter

+
    +
  • + +

    functionId : +Function identifier to remove from schedule

    + +
  • +
+
+
+
+
+ + +timer.scheduleFunction(functionToCall, functionArgument, time) + +
+
+ +

Schedules function to call at desired model time.

+ + +

Time function FunctionToCall(any argument, Time time)

+ +

...

+ +

return ...

+ +

end

+ +

Must return model time of next call or nil. Note that the DCS scheduler calls the function in protected mode and any Lua errors in the called function will be trapped and not reported. If the function triggers a Lua error then it will be terminated and not scheduled to run again.

+ +

Parameters

+
    +
  • + +

    #FunctionToCall functionToCall : +Lua-function to call. Must have prototype of FunctionToCall.

    + +
  • +
  • + +

    functionArgument : +Function argument of any type to pass to functionToCall.

    + +
  • +
  • + +

    #Time time : +Model time of the function call.

    + +
  • +
+

Return value

+ + +

functionId

+ +
+
+
+
+ + +timer.setFunctionTime(functionId, time) + +
+
+ +

Re-schedules function to call at another model time.

+ +

Parameters

+
    +
  • + +

    functionId : +Lua-function to call. Must have prototype of FunctionToCall.

    + +
  • +
  • + +

    #Time time : +Model time of the function call.

    + +
  • +
+
+
+ +
+ +
+ + diff --git a/docs/Documentation/DCStrigger.html b/docs/Documentation/DCStrigger.html new file mode 100644 index 000000000..06e11aa76 --- /dev/null +++ b/docs/Documentation/DCStrigger.html @@ -0,0 +1,130 @@ + + + + + + +
+
+ +
+
+
+ + + diff --git a/docs/Documentation/Database.html b/docs/Documentation/Database.html new file mode 100644 index 000000000..dfc8a9bb5 --- /dev/null +++ b/docs/Documentation/Database.html @@ -0,0 +1,2026 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Database

+ +

This module contains the DATABASE class, managing the database of mission objects.

+ + + +
+ +

1) #DATABASE class, extends Base#BASE

+

Mission designers can use the DATABASE class to refer to:

+ +
    +
  • STATICS
  • +
  • UNITS
  • +
  • GROUPS
  • +
  • CLIENTS
  • +
  • AIRBASES
  • +
  • PLAYERSJOINED
  • +
  • PLAYERS
  • +
  • CARGOS
  • +
+ +

On top, for internal MOOSE administration purposes, the DATBASE administers the Unit and Group TEMPLATES as defined within the Mission Editor.

+ +

Moose will automatically create one instance of the DATABASE class into the global object _DATABASE. +Moose refers to _DATABASE within the framework extensively, but you can also refer to the _DATABASE object within your missions if required.

+ +

1.1) DATABASE iterators

+

You can iterate the database with the available iterator methods. +The iterator methods will walk the DATABASE set, and call for each element within the set a function that you provide. +The following iterator methods are currently available within the DATABASE:

+ + + +
+ + +

Global(s)

+ + + + + +
DATABASE + +
+

Type DATABASE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DATABASE.AIRBASES + +
DATABASE:AddAirbase(AirbaseName) +

Adds a Airbase based on the Airbase Name in the DATABASE.

+
DATABASE:AddCargo(CargoName, Cargo) +

Adds a Cargo based on the Cargo Name in the DATABASE.

+
DATABASE:AddClient(ClientName) +

Adds a CLIENT based on the ClientName in the DATABASE.

+
DATABASE:AddGroup(GroupName) +

Adds a GROUP based on the GroupName in the DATABASE.

+
DATABASE:AddPlayer(UnitName, PlayerName) +

Adds a player based on the Player Name in the DATABASE.

+
DATABASE:AddStatic(DCSStaticName) +

Adds a Static based on the Static Name in the DATABASE.

+
DATABASE:AddUnit(DCSUnitName) +

Adds a Unit based on the Unit Name in the DATABASE.

+
DATABASE.CARGOS + +
DATABASE.CLIENTS + +
DATABASE.COUNTRY_ID + +
DATABASE.COUNTRY_NAME + +
DATABASE.ClassName + +
DATABASE:DeleteAirbase(AirbaseName) +

Deletes a Airbase from the DATABASE based on the Airbase Name.

+
DATABASE:DeleteCargo(CargoName) +

Deletes a Cargo from the DATABASE based on the Cargo Name.

+
DATABASE:DeletePlayer(PlayerName) +

Deletes a player from the DATABASE based on the Player Name.

+
DATABASE:DeleteStatic(DCSStaticName) +

Deletes a Static from the DATABASE based on the Static Name.

+
DATABASE:DeleteUnit(DCSUnitName) +

Deletes a Unit from the DATABASE based on the Unit Name.

+
DATABASE:FindAirbase(AirbaseName) +

Finds an AIRBASE based on the AirbaseName.

+
DATABASE:FindCargo(CargoName) +

Finds an CARGO based on the CargoName.

+
DATABASE:FindClient(ClientName) +

Finds a CLIENT based on the ClientName.

+
DATABASE:FindGroup(GroupName) +

Finds a GROUP based on the GroupName.

+
DATABASE:FindStatic(StaticName) +

Finds a STATIC based on the StaticName.

+
DATABASE:FindUnit(UnitName) +

Finds a Unit based on the Unit Name.

+
DATABASE:ForEach(IteratorFunction, FinalizeFunction, arg, Set) +

Iterate the DATABASE and call an iterator function for the given set, providing the Object for each element within the set and optional parameters.

+
DATABASE:ForEachCargo(IteratorFunction, ...) +

Iterate the DATABASE and call an iterator function for each CARGO, providing the CARGO object to the function and optional parameters.

+
DATABASE:ForEachClient(IteratorFunction, ...) +

Iterate the DATABASE and call an iterator function for each CLIENT, providing the CLIENT to the function and optional parameters.

+
DATABASE:ForEachGroup(IteratorFunction, ...) +

Iterate the DATABASE and call an iterator function for each alive GROUP, providing the GROUP and optional parameters.

+
DATABASE:ForEachPlayer(IteratorFunction, ...) +

Iterate the DATABASE and call an iterator function for each ALIVE player, providing the player name and optional parameters.

+
DATABASE:ForEachPlayerJoined(IteratorFunction, ...) +

Iterate the DATABASE and call an iterator function for each player who has joined the mission, providing the Unit of the player and optional parameters.

+
DATABASE:ForEachUnit(IteratorFunction, FinalizeFunction, ...) +

Iterate the DATABASE and call an iterator function for each alive UNIT, providing the UNIT and optional parameters.

+
DATABASE.GROUPS + +
DATABASE:GetCategoryFromAirbase(AirbaseName) + +
DATABASE:GetCategoryFromClientTemplate(ClientName) + +
DATABASE:GetCoalitionFromAirbase(AirbaseName) + +
DATABASE:GetCoalitionFromClientTemplate(ClientName) + +
DATABASE:GetCountryFromClientTemplate(ClientName) + +
DATABASE:GetGroupNameFromUnitName(UnitName) + +
DATABASE:GetGroupTemplate(GroupName) + +
DATABASE:GetGroupTemplateFromUnitName(UnitName) + +
DATABASE:GetStaticUnitTemplate(StaticName) + +
DATABASE:GetStatusGroup(GroupName) +

Get a status to a Group within the Database, this to check crossing events for example.

+
DATABASE.NavPoints + +
DATABASE.Navpoints + +
DATABASE:New() +

Creates a new DATABASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

+
DATABASE:OnEventDeleteCargo(EventData) +

Handles the OnEventDeleteCargo.

+
DATABASE:OnEventNewCargo(EventData) +

Handles the OnEventNewCargo event.

+
DATABASE.PLAYERS + +
DATABASE.PLAYERSJOINED + +
DATABASE.STATICS + +
DATABASE:SetStatusGroup(GroupName, Status) +

Set a status to a Group within the Database, this to check crossing events for example.

+
DATABASE:Spawn(SpawnTemplate) +

Instantiate new Groups within the DCSRTE.

+
DATABASE.Templates + +
DATABASE.UNITS + +
DATABASE:_EventOnBirth(Event) +

Handles the OnBirth event for the alive units set.

+
DATABASE:_EventOnDeadOrCrash(Event) +

Handles the OnDead or OnCrash event for alive units set.

+
DATABASE:_EventOnPlayerEnterUnit(Event) +

Handles the OnPlayerEnterUnit event to fill the active players table (with the unit filter applied).

+
DATABASE:_EventOnPlayerLeaveUnit(Event) +

Handles the OnPlayerLeaveUnit event to clean the active players table.

+
DATABASE:_RegisterAirbases() + +
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.

+
DATABASE:_RegisterGroupsAndUnits() +

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

+
DATABASE:_RegisterPlayers() +

Private method that registers all alive players in the mission.

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

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

+
DATABASE:_RegisterStatics() + +
DATABASE:_RegisterTemplates() + +
+ +

Global(s)

+
+
+ + #DATABASE + +DATABASE + +
+
+ + + +
+
+

Type Database

+ +

Type DATABASE

+ +

DATABASE class

+ +

Field(s)

+
+
+ + + +DATABASE.AIRBASES + +
+
+ + + +
+
+
+
+ + +DATABASE:AddAirbase(AirbaseName) + +
+
+ +

Adds a Airbase based on the Airbase Name in the DATABASE.

+ +

Parameter

+
    +
  • + +

    #string AirbaseName : +The name of the airbase

    + +
  • +
+
+
+
+
+ + +DATABASE:AddCargo(CargoName, Cargo) + +
+
+ +

Adds a Cargo based on the Cargo Name in the DATABASE.

+ +

Parameters

+
    +
  • + +

    #string CargoName : +The name of the airbase

    + +
  • +
  • + +

    Cargo :

    + +
  • +
+
+
+
+
+ + +DATABASE:AddClient(ClientName) + +
+
+ +

Adds a CLIENT based on the ClientName in the DATABASE.

+ +

Parameter

+
    +
  • + +

    ClientName :

    + +
  • +
+
+
+
+
+ + +DATABASE:AddGroup(GroupName) + +
+
+ +

Adds a GROUP based on the GroupName in the DATABASE.

+ +

Parameter

+
    +
  • + +

    GroupName :

    + +
  • +
+
+
+
+
+ + +DATABASE:AddPlayer(UnitName, PlayerName) + +
+
+ +

Adds a player based on the Player Name in the DATABASE.

+ +

Parameters

+
    +
  • + +

    UnitName :

    + +
  • +
  • + +

    PlayerName :

    + +
  • +
+
+
+
+
+ + +DATABASE:AddStatic(DCSStaticName) + +
+
+ +

Adds a Static based on the Static Name in the DATABASE.

+ +

Parameter

+
    +
  • + +

    DCSStaticName :

    + +
  • +
+
+
+
+
+ + +DATABASE:AddUnit(DCSUnitName) + +
+
+ +

Adds a Unit based on the Unit Name in the DATABASE.

+ +

Parameter

+
    +
  • + +

    DCSUnitName :

    + +
  • +
+
+
+
+
+ + + +DATABASE.CARGOS + +
+
+ + + +
+
+
+
+ + + +DATABASE.CLIENTS + +
+
+ + + +
+
+
+
+ + + +DATABASE.COUNTRY_ID + +
+
+ + + +
+
+
+
+ + + +DATABASE.COUNTRY_NAME + +
+
+ + + +
+
+
+
+ + #string + +DATABASE.ClassName + +
+
+ + + +
+
+
+
+ + +DATABASE:DeleteAirbase(AirbaseName) + +
+
+ +

Deletes a Airbase from the DATABASE based on the Airbase Name.

+ +

Parameter

+
    +
  • + +

    #string AirbaseName : +The name of the airbase

    + +
  • +
+
+
+
+
+ + +DATABASE:DeleteCargo(CargoName) + +
+
+ +

Deletes a Cargo from the DATABASE based on the Cargo Name.

+ +

Parameter

+
    +
  • + +

    #string CargoName : +The name of the airbase

    + +
  • +
+
+
+
+
+ + +DATABASE:DeletePlayer(PlayerName) + +
+
+ +

Deletes a player from the DATABASE based on the Player Name.

+ +

Parameter

+
    +
  • + +

    PlayerName :

    + +
  • +
+
+
+
+
+ + +DATABASE:DeleteStatic(DCSStaticName) + +
+
+ +

Deletes a Static from the DATABASE based on the Static Name.

+ +

Parameter

+
    +
  • + +

    DCSStaticName :

    + +
  • +
+
+
+
+
+ + +DATABASE:DeleteUnit(DCSUnitName) + +
+
+ +

Deletes a Unit from the DATABASE based on the Unit Name.

+ +

Parameter

+
    +
  • + +

    DCSUnitName :

    + +
  • +
+
+
+
+
+ + +DATABASE:FindAirbase(AirbaseName) + +
+
+ +

Finds an AIRBASE based on the AirbaseName.

+ +

Parameter

+
    +
  • + +

    #string AirbaseName :

    + +
  • +
+

Return value

+ +

Wrapper.Airbase#AIRBASE: +The found AIRBASE.

+ +
+
+
+
+ + +DATABASE:FindCargo(CargoName) + +
+
+ +

Finds an CARGO based on the CargoName.

+ +

Parameter

+
    +
  • + +

    #string CargoName :

    + +
  • +
+

Return value

+ +

Wrapper.Cargo#CARGO: +The found CARGO.

+ +
+
+
+
+ + +DATABASE:FindClient(ClientName) + +
+
+ +

Finds a CLIENT based on the ClientName.

+ +

Parameter

+
    +
  • + +

    #string ClientName :

    + +
  • +
+

Return value

+ +

Wrapper.Client#CLIENT: +The found CLIENT.

+ +
+
+
+
+ + +DATABASE:FindGroup(GroupName) + +
+
+ +

Finds a GROUP based on the GroupName.

+ +

Parameter

+
    +
  • + +

    #string GroupName :

    + +
  • +
+

Return value

+ +

Wrapper.Group#GROUP: +The found GROUP.

+ +
+
+
+
+ + +DATABASE:FindStatic(StaticName) + +
+
+ +

Finds a STATIC based on the StaticName.

+ +

Parameter

+
    +
  • + +

    #string StaticName :

    + +
  • +
+

Return value

+ +

Wrapper.Static#STATIC: +The found STATIC.

+ +
+
+
+
+ + +DATABASE:FindUnit(UnitName) + +
+
+ +

Finds a Unit based on the Unit Name.

+ +

Parameter

+
    +
  • + +

    #string UnitName :

    + +
  • +
+

Return value

+ +

Wrapper.Unit#UNIT: +The found Unit.

+ +
+
+
+
+ + +DATABASE:ForEach(IteratorFunction, FinalizeFunction, arg, Set) + +
+
+ +

Iterate the DATABASE and call an iterator function for the given set, providing the Object for each element within the set and optional parameters.

+ +

Parameters

+
    +
  • + +

    #function IteratorFunction : +The function that will be called when there is an alive player in the database.

    + +
  • +
  • + +

    FinalizeFunction :

    + +
  • +
  • + +

    arg :

    + +
  • +
  • + +

    Set :

    + +
  • +
+

Return value

+ +

#DATABASE: +self

+ +
+
+
+
+ + +DATABASE:ForEachCargo(IteratorFunction, ...) + +
+
+ +

Iterate the DATABASE and call an iterator function for each CARGO, providing the CARGO object to the function and optional parameters.

+ +

Parameters

+
    +
  • + +

    #function IteratorFunction : +The function that will be called for each object in the database. The function needs to accept a CLIENT parameter.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#DATABASE: +self

+ +
+
+
+
+ + +DATABASE:ForEachClient(IteratorFunction, ...) + +
+
+ +

Iterate the DATABASE and call an iterator function for each CLIENT, providing the CLIENT to the function and optional parameters.

+ +

Parameters

+
    +
  • + +

    #function IteratorFunction : +The function that will be called object in the database. The function needs to accept a CLIENT parameter.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#DATABASE: +self

+ +
+
+
+
+ + +DATABASE:ForEachGroup(IteratorFunction, ...) + +
+
+ +

Iterate the DATABASE and call an iterator function for each alive GROUP, providing the GROUP and optional parameters.

+ +

Parameters

+
    +
  • + +

    #function IteratorFunction : +The function that will be called for each object in the database. The function needs to accept a GROUP parameter.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#DATABASE: +self

+ +
+
+
+
+ + +DATABASE:ForEachPlayer(IteratorFunction, ...) + +
+
+ +

Iterate the DATABASE and call an iterator function for each ALIVE player, providing the player name and optional parameters.

+ +

Parameters

+
    +
  • + +

    #function IteratorFunction : +The function that will be called for each object in the database. The function needs to accept the player name.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#DATABASE: +self

+ +
+
+
+
+ + +DATABASE:ForEachPlayerJoined(IteratorFunction, ...) + +
+
+ +

Iterate the DATABASE and call an iterator function for each player who has joined the mission, providing the Unit of the player and optional parameters.

+ +

Parameters

+
    +
  • + +

    #function IteratorFunction : +The function that will be called for each object in the database. The function needs to accept a UNIT parameter.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#DATABASE: +self

+ +
+
+
+
+ + +DATABASE:ForEachUnit(IteratorFunction, FinalizeFunction, ...) + +
+
+ +

Iterate the DATABASE and call an iterator function for each alive UNIT, providing the UNIT and optional parameters.

+ +

Parameters

+
    +
  • + +

    #function IteratorFunction : +The function that will be called for each object in the database. The function needs to accept a UNIT parameter.

    + +
  • +
  • + +

    FinalizeFunction :

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#DATABASE: +self

+ +
+
+
+
+ + + +DATABASE.GROUPS + +
+
+ + + +
+
+
+
+ + +DATABASE:GetCategoryFromAirbase(AirbaseName) + +
+
+ + + +

Parameter

+
    +
  • + +

    AirbaseName :

    + +
  • +
+
+
+
+
+ + +DATABASE:GetCategoryFromClientTemplate(ClientName) + +
+
+ + + +

Parameter

+
    +
  • + +

    ClientName :

    + +
  • +
+
+
+
+
+ + +DATABASE:GetCoalitionFromAirbase(AirbaseName) + +
+
+ + + +

Parameter

+
    +
  • + +

    AirbaseName :

    + +
  • +
+
+
+
+
+ + +DATABASE:GetCoalitionFromClientTemplate(ClientName) + +
+
+ + + +

Parameter

+
    +
  • + +

    ClientName :

    + +
  • +
+
+
+
+
+ + +DATABASE:GetCountryFromClientTemplate(ClientName) + +
+
+ + + +

Parameter

+
    +
  • + +

    ClientName :

    + +
  • +
+
+
+
+
+ + +DATABASE:GetGroupNameFromUnitName(UnitName) + +
+
+ + + +

Parameter

+
    +
  • + +

    UnitName :

    + +
  • +
+
+
+
+
+ + +DATABASE:GetGroupTemplate(GroupName) + +
+
+ + + +

Parameter

+
    +
  • + +

    GroupName :

    + +
  • +
+
+
+
+
+ + +DATABASE:GetGroupTemplateFromUnitName(UnitName) + +
+
+ + + +

Parameter

+
    +
  • + +

    UnitName :

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

Parameter

+
    +
  • + +

    StaticName :

    + +
  • +
+
+
+
+
+ + +DATABASE:GetStatusGroup(GroupName) + +
+
+ +

Get a status to a Group within the Database, this to check crossing events for example.

+ +

Parameter

+
    +
  • + +

    GroupName :

    + +
  • +
+
+
+
+
+ + + +DATABASE.NavPoints + +
+
+ + + +
+
+
+
+ + + +DATABASE.Navpoints + +
+
+ + + +
+
+
+
+ + +DATABASE:New() + +
+
+ +

Creates a new DATABASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

+ +

Return value

+ +

#DATABASE:

+ + +

Usage:

+
-- Define a new DATABASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
+DBObject = DATABASE:New()
+ +
+
+
+
+ + +DATABASE:OnEventDeleteCargo(EventData) + +
+
+ +

Handles the OnEventDeleteCargo.

+ +

Parameter

+ +
+
+
+
+ + +DATABASE:OnEventNewCargo(EventData) + +
+
+ +

Handles the OnEventNewCargo event.

+ +

Parameter

+ +
+
+
+
+ + + +DATABASE.PLAYERS + +
+
+ + + +
+
+
+
+ + + +DATABASE.PLAYERSJOINED + +
+
+ + + +
+
+
+
+ + + +DATABASE.STATICS + +
+
+ + + +
+
+
+
+ + +DATABASE:SetStatusGroup(GroupName, Status) + +
+
+ +

Set a status to a Group within the Database, this to check crossing events for example.

+ +

Parameters

+
    +
  • + +

    GroupName :

    + +
  • +
  • + +

    Status :

    + +
  • +
+
+
+
+
+ + +DATABASE:Spawn(SpawnTemplate) + +
+
+ +

Instantiate new Groups within the DCSRTE.

+ + +

This method expects EXACTLY the same structure as a structure within the ME, and needs 2 additional fields defined: +SpawnCountryID, SpawnCategoryID +This method is used by the SPAWN class.

+ +

Parameter

+
    +
  • + +

    #table SpawnTemplate :

    + +
  • +
+

Return value

+ +

#DATABASE: +self

+ +
+
+
+
+ + + +DATABASE.Templates + +
+
+ + + +
+
+
+
+ + + +DATABASE.UNITS + +
+
+ + + +
+
+
+
+ + +DATABASE:_EventOnBirth(Event) + +
+
+ +

Handles the OnBirth event for the alive units set.

+ +

Parameter

+ +
+
+
+
+ + +DATABASE:_EventOnDeadOrCrash(Event) + +
+
+ +

Handles the OnDead or OnCrash event for alive units set.

+ +

Parameter

+ +
+
+
+
+ + +DATABASE:_EventOnPlayerEnterUnit(Event) + +
+
+ +

Handles the OnPlayerEnterUnit event to fill the active players table (with the unit filter applied).

+ +

Parameter

+ +
+
+
+
+ + +DATABASE:_EventOnPlayerLeaveUnit(Event) + +
+
+ +

Handles the OnPlayerLeaveUnit event to clean the active players table.

+ +

Parameter

+ +
+
+
+
+ + +DATABASE:_RegisterAirbases() + +
+
+ + + +
+
+
+
+ + +DATABASE:_RegisterClients() + +
+
+ +

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

+ +

Return value

+ +

#DATABASE: +self

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

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

+ +

Parameters

+
    +
  • + +

    #table GroupTemplate :

    + +
  • +
  • + +

    CoalitionID :

    + +
  • +
  • + +

    CategoryID :

    + +
  • +
  • + +

    CountryID :

    + +
  • +
+

Return value

+ +

#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() + +
+
+ + + +
+
+
+
+ + +DATABASE:_RegisterTemplates() + +
+
+ + + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Detection.html b/docs/Documentation/Detection.html new file mode 100644 index 000000000..75eb0145f --- /dev/null +++ b/docs/Documentation/Detection.html @@ -0,0 +1,4556 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Detection

+ +

Functional - DETECTION_ classes model the detection of enemy units by FACs or RECCEs and group them according various methods.

+ + + +

Banner Image

+ +
+ +

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.

+ +

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:

+ +
    +
  • Mechanist : Early concept of DETECTION_AREAS.
  • +
+ +

Authors:

+ +
    +
  • FlightControl : Analysis, Design, Programming, Testing
  • +
+ + +

Global(s)

+ + + + + + + + + + + + + + + + + +
DETECTION_AREAS + +
DETECTION_BASE +

DETECTION_BASE class, extends Fsm#FSM

+ +

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

+
DETECTION_TYPES + +
DETECTION_UNITS + +
+

Type DETECTION_AREAS

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DETECTION_AREAS:BoundDetectedZones() +

Bound the detected zones

+
DETECTION_AREAS:CalculateThreatLevelA2G(DetectedItem) +

Calculate the maxium A2G threat level of the DetectedItem.

+
DETECTION_AREAS.ClassName + +
DETECTION_AREAS:CreateDetectionSets() +

Make a DetectionSet table.

+
DETECTION_AREAS:DetectedItemReportSummary(Index) +

Report summary of a detected item using a given numeric index.

+
DETECTION_AREAS.DetectedItems +

A list of areas containing the set of Units, Zones, the center Unit within the zone, and ID of each area that was detected within a DetectionZoneRange.

+
DETECTION_AREAS.DetectionZoneRange +

The range till which targets are grouped upon the first detected target.

+
DETECTION_AREAS:FlareDetectedUnits() +

Flare the detected units

+
DETECTION_AREAS:FlareDetectedZones() +

Flare the detected zones

+
DETECTION_AREAS:GetChangeText(DetectedItem) +

Make text documenting the changes of the detected zone.

+
DETECTION_AREAS:GetTreatLevelA2G(DetectedItem) +

Returns the A2G threat level of the units in the DetectedItem

+
DETECTION_AREAS:IsFriendliesNearBy(DetectedItem) +

Returns if there are friendlies nearby the FAC units ...

+
DETECTION_AREAS:NearestFAC(DetectedItem) +

Find the nearest FAC of the DetectedItem.

+
DETECTION_AREAS:New(DetectionSetGroup, DetectionZoneRange) +

DETECTION_AREAS constructor.

+
DETECTION_AREAS:SmokeDetectedUnits() +

Smoke the detected units

+
DETECTION_AREAS:SmokeDetectedZones() +

Smoke the detected zones

+
DETECTION_AREAS._BoundDetectedZones + +
DETECTION_AREAS._FlareDetectedUnits + +
DETECTION_AREAS._FlareDetectedZones + +
DETECTION_AREAS._SmokeDetectedUnits + +
DETECTION_AREAS._SmokeDetectedZones + +
+ +

Type DETECTION_BASE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DETECTION_BASE:AcceptChanges(DetectedItem) +

Accepts changes from the detected item.

+
DETECTION_BASE.AcceptRange + +
DETECTION_BASE.AcceptZones + +
DETECTION_BASE:AddChangeItem(DetectedItem, ChangeCode, ItemUnitType) +

Add a change to the detected zone.

+
DETECTION_BASE:AddChangeUnit(DetectedItem, ChangeCode, ChangeUnitType) +

Add a change to the detected zone.

+
DETECTION_BASE:AddDetectedItem(DetectedItemIndex, Set) +

Adds a new DetectedItem to the DetectedItems list.

+
DETECTION_BASE:AddDetectedItemZone(DetectedItemIndex, Set, Zone) +

Adds a new DetectedItem to the DetectedItems list.

+
DETECTION_BASE.AlphaAngleProbability + +
DETECTION_BASE.CountryID + +
DETECTION_BASE:CreateDetectionSets() +

Make a DetectionSet table.

+
DETECTION_BASE:Detect() +

Synchronous Event Trigger for Event Detect.

+
DETECTION_BASE.DetectDLINK + +
DETECTION_BASE.DetectIRST + +
DETECTION_BASE.DetectOptical + +
DETECTION_BASE.DetectRWR + +
DETECTION_BASE.DetectRadar + +
DETECTION_BASE.DetectVisual + +
DETECTION_BASE:Detected() +

Synchronous Event Trigger for Event Detected.

+
DETECTION_BASE.DetectedItemCount + +
DETECTION_BASE.DetectedItemMax + +
DETECTION_BASE:DetectedItemReportSummary(Index) +

Report summary of a detected item using a given numeric index.

+
DETECTION_BASE.DetectedItems + +
DETECTION_BASE.DetectedObjects +

The list of detected objects.

+
DETECTION_BASE.DetectedObjectsIdentified +

Map of the DetectedObjects identified.

+
DETECTION_BASE:DetectedReportDetailed() +

Report detailed of a detectedion result.

+
DETECTION_BASE.DetectionCount + +
DETECTION_BASE.DetectionInterval + +
DETECTION_BASE.DetectionRange +

The range till which targets are accepted to be detected.

+
DETECTION_BASE.DetectionRun + +
DETECTION_BASE.DetectionScheduler + +
DETECTION_BASE.DetectionSetGroup +

The Set of GROUPs in the Forward Air Controller role.

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

+
DETECTION_BASE:GetDetectedItem(Index) +

Get a detected item using a given numeric index.

+
DETECTION_BASE:GetDetectedItems() +

Get the detected Set#SET_BASEs.

+
DETECTION_BASE:GetDetectedItemsCount() +

Get the amount of SETs with detected objects.

+
DETECTION_BASE:GetDetectedObject(ObjectName) +

Gets a detected object with a given name.

+
DETECTION_BASE:GetDetectedSet(Index) +

Get the Set#SET_UNIT of a detecttion area using a given numeric index.

+
DETECTION_BASE:GetDetectedZone(Index) +

Get the Zone#ZONE_UNIT of a detection area using a given numeric index.

+
DETECTION_BASE:GetDetectionSetGroup() +

Get the detection Groups.

+
DETECTION_BASE:IdentifyDetectedObject(DetectedObject) +

Identifies a detected object during detection processing.

+
DETECTION_BASE:InitDetectDLINK(DetectDLINK) +

Detect DLINK.

+
DETECTION_BASE:InitDetectIRST(DetectIRST) +

Detect IRST.

+
DETECTION_BASE:InitDetectOptical(DetectOptical) +

Detect Optical.

+
DETECTION_BASE:InitDetectRWR(DetectRWR) +

Detect RWR.

+
DETECTION_BASE:InitDetectRadar(DetectRadar) +

Detect Radar.

+
DETECTION_BASE:InitDetectVisual(DetectVisual) +

Detect Visual.

+
DETECTION_BASE:IsDetectedObjectIdentified(DetectedObject) +

Determines if a detected object has already been identified during detection processing.

+
DETECTION_BASE:IsFriendliesNearBy(DetectedItem) +

Returns if there are friendlies nearby the FAC units ...

+
DETECTION_BASE:New(DetectionSetGroup) +

DETECTION constructor.

+
DETECTION_BASE:OnAfterDetect(From, Event, To) +

OnAfter Transition Handler for Event Detect.

+
DETECTION_BASE:OnAfterDetected(From, Event, To) +

OnAfter Transition Handler for Event Detected.

+
DETECTION_BASE:OnAfterStart(From, Event, To) +

OnAfter Transition Handler for Event Start.

+
DETECTION_BASE:OnAfterStop(From, Event, To) +

OnAfter Transition Handler for Event Stop.

+
DETECTION_BASE:OnBeforeDetect(From, Event, To) +

OnBefore Transition Handler for Event Detect.

+
DETECTION_BASE:OnBeforeDetected(From, Event, To) +

OnBefore Transition Handler for Event Detected.

+
DETECTION_BASE:OnBeforeStart(From, Event, To) +

OnBefore Transition Handler for Event Start.

+
DETECTION_BASE:OnBeforeStop(From, Event, To) +

OnBefore Transition Handler for Event Stop.

+
DETECTION_BASE:OnEnterDetecting(From, Event, To) +

OnEnter Transition Handler for State Detecting.

+
DETECTION_BASE:OnEnterStopped(From, Event, To) +

OnEnter Transition Handler for State Stopped.

+
DETECTION_BASE:OnLeaveDetecting(From, Event, To) +

OnLeave Transition Handler for State Detecting.

+
DETECTION_BASE:OnLeaveStopped(From, Event, To) +

OnLeave Transition Handler for State Stopped.

+
DETECTION_BASE.RejectZones + +
DETECTION_BASE:RemoveDetectedItem(DetectedItemIndex) +

Removes an existing DetectedItem from the DetectedItems list.

+
DETECTION_BASE:ReportFriendliesNearBy(ReportGroupData) +

Background worker function to determine if there are friendlies nearby ...

+
DETECTION_BASE:Schedule(DelayTime, RepeatInterval) +

Schedule the DETECTION construction.

+
DETECTION_BASE.ScheduleDelayTime + +
DETECTION_BASE.ScheduleRepeatInterval + +
DETECTION_BASE:SetAcceptRange(AcceptRange) +

Accept detections if within a range in meters.

+
DETECTION_BASE:SetAcceptZones(AcceptZones) +

Accept detections if within the specified zone(s).

+
DETECTION_BASE:SetAlphaAngleProbability(AlphaAngleProbability) +

Upon a visual detection, the higher the unit is during the detecting process, the more likely the detected unit is to be detected properly.

+
DETECTION_BASE:SetDetectionInterval(DetectionInterval) +

Set the detection interval time in seconds.

+
DETECTION_BASE:SetDistanceProbability(DistanceProbability) +

Upon a visual detection, the further away a detected object is, the less likely it is to be detected properly.

+
DETECTION_BASE:SetRejectZones(RejectZones) +

Reject detections if within the specified zone(s).

+
DETECTION_BASE:SetZoneProbability(ZoneArray) +

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.

+
DETECTION_BASE:Start() +

Synchronous Event Trigger for Event Start.

+
DETECTION_BASE:Stop() +

Synchronous Event Trigger for Event Stop.

+
DETECTION_BASE:UnIdentifyAllDetectedObjects() +

UnIdentify all detected objects during detection processing.

+
DETECTION_BASE:UnIdentifyDetectedObject(DetectedObject) +

UnIdentify a detected object during detection processing.

+
DETECTION_BASE.ZoneProbability + +
DETECTION_BASE:__Detect(Delay) +

Asynchronous Event Trigger for Event Detect.

+
DETECTION_BASE:__Detected(Delay) +

Asynchronous Event Trigger for Event Detected.

+
DETECTION_BASE:__Start(Delay) +

Asynchronous Event Trigger for Event Start.

+
DETECTION_BASE:__Stop(Delay) +

Asynchronous Event Trigger for Event Stop.

+
DETECTION_BASE:onafterDetect(From, Event, To) + +
DETECTION_BASE:onafterDetectionGroup(From, Event, To, DetectionGroup) + +
DETECTION_BASE:onafterStart(From, Event, To) + +
+ +

Type DETECTION_BASE.DetectedItem

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DETECTION_BASE.DetectedItem.Changed +

Documents if the detected area has changes.

+
DETECTION_BASE.DetectedItem.Changes +

A list of the changes reported on the detected area. (It is up to the user of the detected area to consume those changes).

+
DETECTION_BASE.DetectedItem.FriendliesNearBy +

Indicates if there are friendlies within the detected area.

+
DETECTION_BASE.DetectedItem.ItemID +

-- The identifier of the detected area.

+
DETECTION_BASE.DetectedItem.MaxThreatLevelA2G + +
DETECTION_BASE.DetectedItem.NearestFAC +

The nearest FAC near the Area.

+
DETECTION_BASE.DetectedItem.Set +

-- The Set of Units in the detected area.

+
DETECTION_BASE.DetectedItem.Zone +

-- The Zone of the detected area.

+
+ +

Type DETECTION_BASE.DetectedObject

+ + + + + + + + + + + + + + + + + + + + + +
DETECTION_BASE.DetectedObject.Distance + +
DETECTION_BASE.DetectedObject.Identified + +
DETECTION_BASE.DetectedObject.Name + +
DETECTION_BASE.DetectedObject.Type + +
DETECTION_BASE.DetectedObject.Visible + +
+ +

Type DETECTION_TYPES

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DETECTION_TYPES.ClassName + +
DETECTION_TYPES:CreateDetectionSets() +

Create the DetectedItems list from the DetectedObjects table.

+
DETECTION_TYPES:DetectedItemReportSummary(Index, DetectedTypeName) +

Report summary of a DetectedItem using a given numeric index.

+
DETECTION_TYPES:DetectedReportDetailed() +

Report detailed of a detection result.

+
DETECTION_TYPES.DetectionRange + +
DETECTION_TYPES:GetChangeText(DetectedItem) +

Make text documenting the changes of the detected zone.

+
DETECTION_TYPES:New(DetectionSetGroup) +

DETECTION_TYPES constructor.

+
DETECTION_TYPES._BoundDetectedZones + +
DETECTION_TYPES._FlareDetectedUnits + +
DETECTION_TYPES._FlareDetectedZones + +
DETECTION_TYPES._SmokeDetectedUnits + +
DETECTION_TYPES._SmokeDetectedZones + +
+ +

Type DETECTION_UNITS

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DETECTION_UNITS.ClassName + +
DETECTION_UNITS:CreateDetectionSets() +

Create the DetectedItems list from the DetectedObjects table.

+
DETECTION_UNITS:DetectedItemReportSummary(Index) +

Report summary of a DetectedItem using a given numeric index.

+
DETECTION_UNITS:DetectedReportDetailed() +

Report detailed of a detection result.

+
DETECTION_UNITS.DetectionRange +

The range till which targets are detected.

+
DETECTION_UNITS:GetChangeText(DetectedItem) +

Make text documenting the changes of the detected zone.

+
DETECTION_UNITS:New(DetectionSetGroup) +

DETECTION_UNITS constructor.

+
DETECTION_UNITS._BoundDetectedZones + +
DETECTION_UNITS._FlareDetectedUnits + +
DETECTION_UNITS._FlareDetectedZones + +
DETECTION_UNITS._SmokeDetectedUnits + +
DETECTION_UNITS._SmokeDetectedZones + +
+ +

Global(s)

+
+
+ + #DETECTION_AREAS + +DETECTION_AREAS + +
+
+ + + +
+
+
+
+ + #DETECTION_BASE + +DETECTION_BASE + +
+
+ +

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:

+ + + +

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

+ +

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

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. +
  • +
+ +
+
+
+
+ + #DETECTION_TYPES + +DETECTION_TYPES + +
+
+ + + +
+
+
+
+ + #DETECTION_UNITS + +DETECTION_UNITS + +
+
+ + + +
+
+

Type Detection

+ +

Type DETECTION_AREAS

+ +

# 4) DETECTION_AREAS class, extends Detection#DETECTION_BASE

+ +

The DETECTION_AREAS class will detect units within the battle zone for a list of Groups detecting targets following (a) detection method(s), + and will build a list (table) of Set#SET_UNITs containing the Unit#UNITs detected.

+ + +

The class is group the detected units within zones given a DetectedZoneRange parameter. + A set with multiple detected zones will be created as there are groups of units detected.

+ +

## 4.1) Retrieve the Detected Unit Sets and Detected Zones

+ +

The methods to manage the DetectedItems[].Set(s) are implemented in Detection#DECTECTION_BASE and + the methods to manage the DetectedItems[].Zone(s) is implemented in Detection#DETECTION_AREAS.

+ +

Retrieve the DetectedItems[].Set with the method Detection#DETECTION_BASE.GetDetectedSet(). A Set#SET_UNIT object will be returned.

+ +

Retrieve the formed Zones as a result of the grouping the detected units within the DetectionZoneRange, use the method Detection#DETECTION_BASE.GetDetectionZones(). + To understand the amount of zones created, use the method Detection#DETECTION_BASE.GetDetectionZoneCount(). + If you want to obtain a specific zone from the DetectedZones, use the method Detection#DETECTION_BASE.GetDetectionZone() with a given index.

+ +

## 4.4) Flare or Smoke detected units

+ +

Use the methods Detection#DETECTION_AREAS.FlareDetectedUnits() or Detection#DETECTION_AREAS.SmokeDetectedUnits() to flare or smoke the detected units when a new detection has taken place.

+ +

## 4.5) Flare or Smoke or Bound detected zones

+ +

Use the methods:

+ + + +

the detected zones when a new detection has taken place. +

+ +

Field(s)

+
+
+ + +DETECTION_AREAS:BoundDetectedZones() + +
+
+ +

Bound the detected zones

+ +

Return value

+ +

#DETECTION_AREAS: +self

+ +
+
+
+
+ + +DETECTION_AREAS:CalculateThreatLevelA2G(DetectedItem) + +
+
+ +

Calculate the maxium A2G threat level of the DetectedItem.

+ +

Parameter

+ +
+
+
+
+ + #string + +DETECTION_AREAS.ClassName + +
+
+ + + +
+
+
+
+ + +DETECTION_AREAS:CreateDetectionSets() + +
+
+ +

Make a DetectionSet table.

+ + +

This function will be overridden in the derived clsses.

+ +

Return value

+ +

#DETECTION_AREAS: +self

+ +
+
+
+
+ + +DETECTION_AREAS:DetectedItemReportSummary(Index) + +
+
+ +

Report summary of a detected item using a given numeric index.

+ +

Parameter

+
    +
  • + +

    Index :

    + +
  • +
+

Return value

+ +

#string:

+ + +
+
+
+
+ + #DETECTION_BASE.DetectedItems + +DETECTION_AREAS.DetectedItems + +
+
+ +

A list of areas containing the set of Units, Zones, the center Unit within the zone, and ID of each area that was detected within a DetectionZoneRange.

+ +
+
+
+
+ + Dcs.DCSTypes#Distance + +DETECTION_AREAS.DetectionZoneRange + +
+
+ +

The range till which targets are grouped upon the first detected target.

+ +
+
+
+
+ + +DETECTION_AREAS:FlareDetectedUnits() + +
+
+ +

Flare the detected units

+ +

Return value

+ +

#DETECTION_AREAS: +self

+ +
+
+
+
+ + +DETECTION_AREAS:FlareDetectedZones() + +
+
+ +

Flare the detected zones

+ +

Return value

+ +

#DETECTION_AREAS: +self

+ +
+
+
+
+ + +DETECTION_AREAS:GetChangeText(DetectedItem) + +
+
+ +

Make text documenting the changes of the detected zone.

+ +

Parameter

+ +

Return value

+ +

#string: +The Changes text

+ +
+
+
+
+ + +DETECTION_AREAS:GetTreatLevelA2G(DetectedItem) + +
+
+ +

Returns the A2G threat level of the units in the DetectedItem

+ +

Parameter

+ +

Return value

+ +

#number: +a scale from 0 to 10.

+ +
+
+
+
+ + +DETECTION_AREAS:IsFriendliesNearBy(DetectedItem) + +
+
+ +

Returns if there are friendlies nearby the FAC units ...

+ +

Parameter

+
    +
  • + +

    DetectedItem :

    + +
  • +
+

Return value

+ +

#boolean: +trhe if there are friendlies nearby

+ +
+
+
+
+ + +DETECTION_AREAS:NearestFAC(DetectedItem) + +
+
+ +

Find the nearest FAC of the DetectedItem.

+ +

Parameter

+ +

Return value

+ +

Wrapper.Unit#UNIT: +The nearest FAC unit

+ +
+
+
+
+ + +DETECTION_AREAS:New(DetectionSetGroup, DetectionZoneRange) + +
+
+ +

DETECTION_AREAS constructor.

+ +

Parameters

+
    +
  • + +

    Core.Set#SET_GROUP DetectionSetGroup : +The Set of GROUPs in the Forward Air Controller role.

    + +
  • +
  • + +

    Dcs.DCSTypes#Distance DetectionZoneRange : +The range till which targets are grouped upon the first detected target.

    + +
  • +
+

Return value

+ +

#DETECTION_AREAS:

+ + +
+
+
+
+ + +DETECTION_AREAS:SmokeDetectedUnits() + +
+
+ +

Smoke the detected units

+ +

Return value

+ +

#DETECTION_AREAS: +self

+ +
+
+
+
+ + +DETECTION_AREAS:SmokeDetectedZones() + +
+
+ +

Smoke the detected zones

+ +

Return value

+ +

#DETECTION_AREAS: +self

+ +
+
+
+
+ + #boolean + +DETECTION_AREAS._BoundDetectedZones + +
+
+ + + +
+
+
+
+ + #boolean + +DETECTION_AREAS._FlareDetectedUnits + +
+
+ + + +
+
+
+
+ + #boolean + +DETECTION_AREAS._FlareDetectedZones + +
+
+ + + +
+
+
+
+ + #boolean + +DETECTION_AREAS._SmokeDetectedUnits + +
+
+ + + +
+
+
+
+ + #boolean + +DETECTION_AREAS._SmokeDetectedZones + +
+
+ + + +
+
+ +

Type DETECTION_BASE

+

Field(s)

+
+
+ + +DETECTION_BASE:AcceptChanges(DetectedItem) + +
+
+ +

Accepts changes from the detected item.

+ +

Parameter

+ +

Return value

+ +

#DETECTION_BASE: +self

+ +
+
+
+
+ + + +DETECTION_BASE.AcceptRange + +
+
+ + + +
+
+
+
+ + + +DETECTION_BASE.AcceptZones + +
+
+ + + +
+
+
+
+ + +DETECTION_BASE:AddChangeItem(DetectedItem, ChangeCode, ItemUnitType) + +
+
+ +

Add a change to the detected zone.

+ +

Parameters

+ +

Return value

+ +

#DETECTION_BASE: +self

+ +
+
+
+
+ + +DETECTION_BASE:AddChangeUnit(DetectedItem, ChangeCode, ChangeUnitType) + +
+
+ +

Add a change to the detected zone.

+ +

Parameters

+ +

Return value

+ +

#DETECTION_BASE: +self

+ +
+
+
+
+ + +DETECTION_BASE:AddDetectedItem(DetectedItemIndex, Set) + +
+
+ +

Adds a new DetectedItem to the DetectedItems list.

+ + +

The DetectedItem is a table and contains a SET_UNIT in the field Set.

+ +

Parameters

+
    +
  • + +

    #string DetectedItemIndex : +The index of the DetectedItem.

    + +
  • +
  • + +

    Core.Set#SET_UNIT Set : +(optional) The Set of Units to be added.

    + +
  • +
+

Return value

+ +

#DETECTION_BASE.DetectedItem:

+ + +
+
+
+
+ + +DETECTION_BASE:AddDetectedItemZone(DetectedItemIndex, Set, Zone) + +
+
+ +

Adds a new DetectedItem to the DetectedItems list.

+ + +

The DetectedItem is a table and contains a SET_UNIT in the field Set.

+ +

Parameters

+
    +
  • + +

    #string DetectedItemIndex : +The index of the DetectedItem.

    + +
  • +
  • + +

    Core.Set#SET_UNIT Set : +(optional) The Set of Units to be added.

    + +
  • +
  • + +

    Core.Zone#ZONE_UNIT Zone : +(optional) The Zone to be added where the Units are located.

    + +
  • +
+

Return value

+ +

#DETECTION_BASE.DetectedItem:

+ + +
+
+
+
+ + + +DETECTION_BASE.AlphaAngleProbability + +
+
+ + + +
+
+
+
+ + + +DETECTION_BASE.CountryID + +
+
+ + + +
+
+
+
+ + +DETECTION_BASE:CreateDetectionSets() + +
+
+ +

Make a DetectionSet table.

+ + +

This function will be overridden in the derived clsses.

+ +

Return value

+ +

#DETECTION_BASE: +self

+ +
+
+
+
+ + +DETECTION_BASE:Detect() + +
+
+ +

Synchronous Event Trigger for Event Detect.

+ +
+
+
+
+ + + +DETECTION_BASE.DetectDLINK + +
+
+ + + +
+
+
+
+ + + +DETECTION_BASE.DetectIRST + +
+
+ + + +
+
+
+
+ + + +DETECTION_BASE.DetectOptical + +
+
+ + + +
+
+
+
+ + + +DETECTION_BASE.DetectRWR + +
+
+ + + +
+
+
+
+ + + +DETECTION_BASE.DetectRadar + +
+
+ + + +
+
+
+
+ + + +DETECTION_BASE.DetectVisual + +
+
+ + + +
+
+
+
+ + +DETECTION_BASE:Detected() + +
+
+ +

Synchronous Event Trigger for Event Detected.

+ +
+
+
+
+ + #number + +DETECTION_BASE.DetectedItemCount + +
+
+ + + +
+
+
+
+ + #number + +DETECTION_BASE.DetectedItemMax + +
+
+ + + +
+
+
+
+ + +DETECTION_BASE:DetectedItemReportSummary(Index) + +
+
+ +

Report summary of a detected item using a given numeric index.

+ +

Parameter

+
    +
  • + +

    Index :

    + +
  • +
+

Return value

+ +

#string:

+ + +
+
+
+
+ + + +DETECTION_BASE.DetectedItems + +
+
+ + + +
+
+
+
+ + #DETECTION_BASE.DetectedObjects + +DETECTION_BASE.DetectedObjects + +
+
+ +

The list of detected objects.

+ +
+
+
+
+ + #table + +DETECTION_BASE.DetectedObjectsIdentified + +
+
+ +

Map of the DetectedObjects identified.

+ +
+
+
+
+ + +DETECTION_BASE:DetectedReportDetailed() + +
+
+ +

Report detailed of a detectedion result.

+ +

Return value

+ +

#string:

+ + +
+
+
+
+ + #number + +DETECTION_BASE.DetectionCount + +
+
+ + + +
+
+
+
+ + #number + +DETECTION_BASE.DetectionInterval + +
+
+ + + +
+
+
+
+ + Dcs.DCSTypes#Distance + +DETECTION_BASE.DetectionRange + +
+
+ +

The range till which targets are accepted to be detected.

+ +
+
+
+
+ + #number + +DETECTION_BASE.DetectionRun + +
+
+ + + +
+
+
+
+ + + +DETECTION_BASE.DetectionScheduler + +
+
+ + + +
+
+
+
+ + Core.Set#SET_GROUP + +DETECTION_BASE.DetectionSetGroup + +
+
+ +

The Set of GROUPs in the Forward Air Controller role.

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

+ + + +

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

+ +
+
+
+
+ + +DETECTION_BASE:GetDetectedItem(Index) + +
+
+ +

Get a detected item using a given numeric index.

+ +

Parameter

+
    +
  • + +

    #number Index :

    + +
  • +
+

Return value

+ +

#DETECTION_BASE.DetectedItem:

+ + +
+
+
+
+ + +DETECTION_BASE:GetDetectedItems() + +
+
+ +

Get the detected Set#SET_BASEs.

+ +

Return value

+ +

#DETECTION_BASE.DetectedItems:

+ + +
+
+
+
+ + +DETECTION_BASE:GetDetectedItemsCount() + +
+
+ +

Get the amount of SETs with detected objects.

+ +

Return value

+ +

#number: +Count

+ +
+
+
+
+ + +DETECTION_BASE:GetDetectedObject(ObjectName) + +
+
+ +

Gets a detected object with a given name.

+ +

Parameter

+
    +
  • + +

    #string ObjectName :

    + +
  • +
+

Return value

+ +

#DETECTION_BASE.DetectedObject:

+ + +
+
+
+
+ + +DETECTION_BASE:GetDetectedSet(Index) + +
+
+ +

Get the Set#SET_UNIT of a detecttion area using a given numeric index.

+ +

Parameter

+
    +
  • + +

    #number Index :

    + +
  • +
+

Return value

+ +

Core.Set#SET_UNIT: +DetectedSet

+ +
+
+
+
+ + +DETECTION_BASE:GetDetectedZone(Index) + +
+
+ +

Get the Zone#ZONE_UNIT of a detection area using a given numeric index.

+ +

Parameter

+
    +
  • + +

    #number Index :

    + +
  • +
+

Return value

+ +

Core.Zone#ZONE_UNIT: +DetectedZone

+ +
+
+
+
+ + +DETECTION_BASE:GetDetectionSetGroup() + +
+
+ +

Get the detection Groups.

+ +

Return value

+ +

Wrapper.Group#GROUP:

+ + +
+
+
+
+ + +DETECTION_BASE:IdentifyDetectedObject(DetectedObject) + +
+
+ +

Identifies a detected object during detection processing.

+ +

Parameter

+ +
+
+
+
+ + +DETECTION_BASE:InitDetectDLINK(DetectDLINK) + +
+
+ +

Detect DLINK.

+ +

Parameter

+
    +
  • + +

    #boolean DetectDLINK :

    + +
  • +
+

Return value

+ +

#DETECTION_BASE: +self

+ +
+
+
+
+ + +DETECTION_BASE:InitDetectIRST(DetectIRST) + +
+
+ +

Detect IRST.

+ +

Parameter

+
    +
  • + +

    #boolean DetectIRST :

    + +
  • +
+

Return value

+ +

#DETECTION_BASE: +self

+ +
+
+
+
+ + +DETECTION_BASE:InitDetectOptical(DetectOptical) + +
+
+ +

Detect Optical.

+ +

Parameter

+
    +
  • + +

    #boolean DetectOptical :

    + +
  • +
+

Return value

+ +

#DETECTION_BASE: +self

+ +
+
+
+
+ + +DETECTION_BASE:InitDetectRWR(DetectRWR) + +
+
+ +

Detect RWR.

+ +

Parameter

+
    +
  • + +

    #boolean DetectRWR :

    + +
  • +
+

Return value

+ +

#DETECTION_BASE: +self

+ +
+
+
+
+ + +DETECTION_BASE:InitDetectRadar(DetectRadar) + +
+
+ +

Detect Radar.

+ +

Parameter

+
    +
  • + +

    #boolean DetectRadar :

    + +
  • +
+

Return value

+ +

#DETECTION_BASE: +self

+ +
+
+
+
+ + +DETECTION_BASE:InitDetectVisual(DetectVisual) + +
+
+ +

Detect Visual.

+ +

Parameter

+
    +
  • + +

    #boolean DetectVisual :

    + +
  • +
+

Return value

+ +

#DETECTION_BASE: +self

+ +
+
+
+
+ + +DETECTION_BASE:IsDetectedObjectIdentified(DetectedObject) + +
+
+ +

Determines if a detected object has already been identified during detection processing.

+ +

Parameter

+ +

Return value

+ +

#boolean: +true if already identified.

+ +
+
+
+
+ + +DETECTION_BASE:IsFriendliesNearBy(DetectedItem) + +
+
+ +

Returns if there are friendlies nearby the FAC units ...

+ +

Parameter

+
    +
  • + +

    DetectedItem :

    + +
  • +
+

Return value

+ +

#boolean: +trhe if there are friendlies nearby

+ +
+
+
+
+ + +DETECTION_BASE:New(DetectionSetGroup) + +
+
+ +

DETECTION constructor.

+ +

Parameter

+
    +
  • + +

    Core.Set#SET_GROUP DetectionSetGroup : +The Set of GROUPs in the Forward Air Controller role.

    + +
  • +
+

Return value

+ +

#DETECTION_BASE: +self

+ +
+
+
+
+ + +DETECTION_BASE:OnAfterDetect(From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Detect.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +DETECTION_BASE:OnAfterDetected(From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Detected.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +DETECTION_BASE:OnAfterStart(From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Start.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +DETECTION_BASE:OnAfterStop(From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Stop.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +DETECTION_BASE:OnBeforeDetect(From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Detect.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +DETECTION_BASE:OnBeforeDetected(From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Detected.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +DETECTION_BASE:OnBeforeStart(From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Start.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +DETECTION_BASE:OnBeforeStop(From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Stop.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +DETECTION_BASE:OnEnterDetecting(From, Event, To) + +
+
+ +

OnEnter Transition Handler for State Detecting.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +DETECTION_BASE:OnEnterStopped(From, Event, To) + +
+
+ +

OnEnter Transition Handler for State Stopped.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +DETECTION_BASE:OnLeaveDetecting(From, Event, To) + +
+
+ +

OnLeave Transition Handler for State Detecting.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +DETECTION_BASE:OnLeaveStopped(From, Event, To) + +
+
+ +

OnLeave Transition Handler for State Stopped.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + + +DETECTION_BASE.RejectZones + +
+
+ + + +
+
+
+
+ + +DETECTION_BASE:RemoveDetectedItem(DetectedItemIndex) + +
+
+ +

Removes an existing DetectedItem from the DetectedItems list.

+ + +

The DetectedItem is a table and contains a SET_UNIT in the field Set.

+ +

Parameter

+
    +
  • + +

    #number DetectedItemIndex : +The index or position in the DetectedItems list where the item needs to be removed.

    + +
  • +
+
+
+
+
+ + +DETECTION_BASE:ReportFriendliesNearBy(ReportGroupData) + +
+
+ +

Background worker function to determine if there are friendlies nearby ...

+ +

Parameter

+
    +
  • + +

    ReportGroupData :

    + +
  • +
+
+
+
+
+ + +DETECTION_BASE:Schedule(DelayTime, RepeatInterval) + +
+
+ +

Schedule the DETECTION construction.

+ +

Parameters

+
    +
  • + +

    #number DelayTime : +The delay in seconds to wait the reporting.

    + +
  • +
  • + +

    #number RepeatInterval : +The repeat interval in seconds for the reporting to happen repeatedly.

    + +
  • +
+

Return value

+ +

#DETECTION_BASE: +self

+ +
+
+
+
+ + + +DETECTION_BASE.ScheduleDelayTime + +
+
+ + + +
+
+
+
+ + + +DETECTION_BASE.ScheduleRepeatInterval + +
+
+ + + +
+
+
+
+ + +DETECTION_BASE:SetAcceptRange(AcceptRange) + +
+
+ +

Accept detections if within a range in meters.

+ +

Parameter

+
    +
  • + +

    #number AcceptRange : +Accept a detection if the unit is within the AcceptRange in meters.

    + +
  • +
+

Return value

+ +

#DETECTION_BASE: +self

+ +
+
+
+
+ + +DETECTION_BASE:SetAcceptZones(AcceptZones) + +
+
+ +

Accept detections if within the specified zone(s).

+ +

Parameter

+
    +
  • + +

    AcceptZones : +Can be a list or ZONEBASE objects, or a single ZONEBASE object.

    + +
  • +
+

Return value

+ +

#DETECTION_BASE: +self

+ +
+
+
+
+ + +DETECTION_BASE:SetAlphaAngleProbability(AlphaAngleProbability) + +
+
+ +

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%

+ +

Parameter

+
    +
  • + +

    AlphaAngleProbability : +The probability factor.

    + +
  • +
+

Return value

+ +

#DETECTION_BASE: +self

+ +
+
+
+
+ + +DETECTION_BASE:SetDetectionInterval(DetectionInterval) + +
+
+ +

Set the detection interval time in seconds.

+ +

Parameter

+
    +
  • + +

    #number DetectionInterval : +Interval in seconds.

    + +
  • +
+

Return value

+ +

#DETECTION_BASE: +self

+ +
+
+
+
+ + +DETECTION_BASE:SetDistanceProbability(DistanceProbability) + +
+
+ +

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

+ +

Parameter

+
    +
  • + +

    DistanceProbability : +The probability factor.

    + +
  • +
+

Return value

+ +

#DETECTION_BASE: +self

+ +
+
+
+
+ + +DETECTION_BASE:SetRejectZones(RejectZones) + +
+
+ +

Reject detections if within the specified zone(s).

+ +

Parameter

+
    +
  • + +

    RejectZones : +Can be a list or ZONEBASE objects, or a single ZONEBASE object.

    + +
  • +
+

Return value

+ +

#DETECTION_BASE: +self

+ +
+
+
+
+ + +DETECTION_BASE:SetZoneProbability(ZoneArray) + +
+
+ +

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.

+ +

Parameter

+
    +
  • + +

    ZoneArray : +Aray of a The ZONE_BASE object and a ZoneProbability pair..

    + +
  • +
+

Return value

+ +

#DETECTION_BASE: +self

+ +
+
+
+
+ + +DETECTION_BASE:Start() + +
+
+ +

Synchronous Event Trigger for Event Start.

+ +
+
+
+
+ + +DETECTION_BASE:Stop() + +
+
+ +

Synchronous Event Trigger for Event Stop.

+ +
+
+
+
+ + +DETECTION_BASE:UnIdentifyAllDetectedObjects() + +
+
+ +

UnIdentify all detected objects during detection processing.

+ +
+
+
+
+ + +DETECTION_BASE:UnIdentifyDetectedObject(DetectedObject) + +
+
+ +

UnIdentify a detected object during detection processing.

+ +

Parameter

+ +
+
+
+
+ + + +DETECTION_BASE.ZoneProbability + +
+
+ + + +
+
+
+
+ + +DETECTION_BASE:__Detect(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Detect.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +DETECTION_BASE:__Detected(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Detected.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +DETECTION_BASE:__Start(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Start.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +DETECTION_BASE:__Stop(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Stop.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +DETECTION_BASE:onafterDetect(From, Event, To) + +
+
+ + + +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +DETECTION_BASE:onafterDetectionGroup(From, Event, To, DetectionGroup) + +
+
+ + + +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
  • + +

    Wrapper.Group#GROUP DetectionGroup : +The Group detecting.

    + +
  • +
+
+
+
+
+ + +DETECTION_BASE:onafterStart(From, Event, To) + +
+
+ + + +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+ +

Type DETECTION_BASE.DetectedItem

+

Field(s)

+
+
+ + #boolean + +DETECTION_BASE.DetectedItem.Changed + +
+
+ +

Documents if the detected area has changes.

+ +
+
+
+
+ + #table + +DETECTION_BASE.DetectedItem.Changes + +
+
+ +

A list of the changes reported on the detected area. (It is up to the user of the detected area to consume those changes).

+ +
+
+
+
+ + #boolean + +DETECTION_BASE.DetectedItem.FriendliesNearBy + +
+
+ +

Indicates if there are friendlies within the detected area.

+ +
+
+
+
+ + #number + +DETECTION_BASE.DetectedItem.ItemID + +
+
+ +

-- The identifier of the detected area.

+ +
+
+
+
+ + + +DETECTION_BASE.DetectedItem.MaxThreatLevelA2G + +
+
+ + + +
+
+
+
+ + Wrapper.Unit#UNIT + +DETECTION_BASE.DetectedItem.NearestFAC + +
+
+ +

The nearest FAC near the Area.

+ +
+
+
+
+ + Core.Set#SET_UNIT + +DETECTION_BASE.DetectedItem.Set + +
+
+ +

-- The Set of Units in the detected area.

+ +
+
+
+
+ + Core.Zone#ZONE_UNIT + +DETECTION_BASE.DetectedItem.Zone + +
+
+ +

-- The Zone of the detected area.

+ +
+
+ +

Type DETECTION_BASE.DetectedItems

+ +

Type DETECTION_BASE.DetectedObject

+

Field(s)

+
+
+ + #number + +DETECTION_BASE.DetectedObject.Distance + +
+
+ + + +
+
+
+
+ + #boolean + +DETECTION_BASE.DetectedObject.Identified + +
+
+ + + +
+
+
+
+ + #string + +DETECTION_BASE.DetectedObject.Name + +
+
+ + + +
+
+
+
+ + #string + +DETECTION_BASE.DetectedObject.Type + +
+
+ + + +
+
+
+
+ + #boolean + +DETECTION_BASE.DetectedObject.Visible + +
+
+ + + +
+
+ +

Type DETECTION_BASE.DetectedObjects

+ +

Type DETECTION_TYPES

+ +

3) DETECTION_TYPES class, extends Detection#DETECTION_BASE

+ +

The DETECTION_TYPES class will detect units within the battle zone.

+ + +

It will build a DetectedItems[] list filled with DetectedItems, grouped by the type of units detected. +Each DetectedItem will contain a field Set, which contains a Set#SET_UNIT containing ONE UNIT object reference. +Beware that when the amount of different types detected is large, the DetectedItems[] list will be large also.

+ + +

Field(s)

+
+
+ + #string + +DETECTION_TYPES.ClassName + +
+
+ + + +
+
+
+
+ + +DETECTION_TYPES:CreateDetectionSets() + +
+
+ +

Create the DetectedItems list from the DetectedObjects table.

+ + +

For each DetectedItem, a one field array is created containing the Unit detected.

+ +

Return value

+ +

#DETECTION_TYPES: +self

+ +
+
+
+
+ + +DETECTION_TYPES:DetectedItemReportSummary(Index, DetectedTypeName) + +
+
+ +

Report summary of a DetectedItem using a given numeric index.

+ +

Parameters

+
    +
  • + +

    Index :

    + +
  • +
  • + +

    DetectedTypeName :

    + +
  • +
+

Return value

+ +

#string:

+ + +
+
+
+
+ + +DETECTION_TYPES:DetectedReportDetailed() + +
+
+ +

Report detailed of a detection result.

+ +

Return value

+ +

#string:

+ + +
+
+
+
+ + +DETECTION_TYPES.DetectionRange + +
+
+ + + +
+
+
+
+ + +DETECTION_TYPES:GetChangeText(DetectedItem) + +
+
+ +

Make text documenting the changes of the detected zone.

+ +

Parameter

+ +

Return value

+ +

#string: +The Changes text

+ +
+
+
+
+ + +DETECTION_TYPES:New(DetectionSetGroup) + +
+
+ +

DETECTION_TYPES constructor.

+ +

Parameter

+ +

Return value

+ +

Functional.Detection#DETECTION_TYPES: +self

+ +
+
+
+
+ + #boolean + +DETECTION_TYPES._BoundDetectedZones + +
+
+ + + +
+
+
+
+ + #boolean + +DETECTION_TYPES._FlareDetectedUnits + +
+
+ + + +
+
+
+
+ + #boolean + +DETECTION_TYPES._FlareDetectedZones + +
+
+ + + +
+
+
+
+ + #boolean + +DETECTION_TYPES._SmokeDetectedUnits + +
+
+ + + +
+
+
+
+ + #boolean + +DETECTION_TYPES._SmokeDetectedZones + +
+
+ + + +
+
+ +

Type DETECTION_TYPES.DetectedItem

+ +

Type DETECTION_UNITS

+ +

2) DETECTION_UNITS class, extends Detection#DETECTION_BASE

+ +

The DETECTION_UNITS class will detect units within the battle zone.

+ + +

It will build a DetectedItems list filled with DetectedItems. Each DetectedItem will contain a field Set, which contains a Set#SET_UNIT containing ONE UNIT object reference. +Beware that when the amount of units detected is large, the DetectedItems list will be large also.

+ + +

Field(s)

+
+
+ + #string + +DETECTION_UNITS.ClassName + +
+
+ + + +
+
+
+
+ + +DETECTION_UNITS:CreateDetectionSets() + +
+
+ +

Create the DetectedItems list from the DetectedObjects table.

+ + +

For each DetectedItem, a one field array is created containing the Unit detected.

+ +

Return value

+ +

#DETECTION_UNITS: +self

+ +
+
+
+
+ + +DETECTION_UNITS:DetectedItemReportSummary(Index) + +
+
+ +

Report summary of a DetectedItem using a given numeric index.

+ +

Parameter

+
    +
  • + +

    Index :

    + +
  • +
+

Return value

+ +

#string:

+ + +
+
+
+
+ + +DETECTION_UNITS:DetectedReportDetailed() + +
+
+ +

Report detailed of a detection result.

+ +

Return value

+ +

#string:

+ + +
+
+
+
+ + Dcs.DCSTypes#Distance + +DETECTION_UNITS.DetectionRange + +
+
+ +

The range till which targets are detected.

+ +
+
+
+
+ + +DETECTION_UNITS:GetChangeText(DetectedItem) + +
+
+ +

Make text documenting the changes of the detected zone.

+ +

Parameter

+ +

Return value

+ +

#string: +The Changes text

+ +
+
+
+
+ + +DETECTION_UNITS:New(DetectionSetGroup) + +
+
+ +

DETECTION_UNITS constructor.

+ +

Parameter

+
    +
  • + +

    Core.Set#SET_GROUP DetectionSetGroup : +The Set of GROUPs in the Forward Air Controller role.

    + +
  • +
+

Return value

+ +

Functional.Detection#DETECTION_UNITS: +self

+ +
+
+
+
+ + #boolean + +DETECTION_UNITS._BoundDetectedZones + +
+
+ + + +
+
+
+
+ + #boolean + +DETECTION_UNITS._FlareDetectedUnits + +
+
+ + + +
+
+
+
+ + #boolean + +DETECTION_UNITS._FlareDetectedZones + +
+
+ + + +
+
+
+
+ + #boolean + +DETECTION_UNITS._SmokeDetectedUnits + +
+
+ + + +
+
+
+
+ + #boolean + +DETECTION_UNITS._SmokeDetectedZones + +
+
+ + + +
+
+ +

Type DETECTION_UNITS.DetectedItem

+ +

Type list

+ +
+ +
+ + diff --git a/docs/Documentation/DetectionManager.html b/docs/Documentation/DetectionManager.html new file mode 100644 index 000000000..f44b7a2a7 --- /dev/null +++ b/docs/Documentation/DetectionManager.html @@ -0,0 +1,708 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module DetectionManager

+ +

This module contains the DETECTION_MANAGER class and derived classes.

+ + + +
+ +

1) DetectionManager#DETECTION_MANAGER class, extends Fsm#FSM

+

The DetectionManager#DETECTION_MANAGER class defines the core functions to report detected objects to groups. +Reportings can be done in several manners, and it is up to the derived classes if DETECTION_MANAGER to model the reporting behaviour.

+ +

1.1) DETECTION_MANAGER constructor:

+

* DetectionManager#DETECTION_MANAGER.New(): Create a new DETECTION_MANAGER instance.

+ +

1.2) DETECTION_MANAGER reporting:

+

Derived DETECTION_MANAGER classes will reports detected units using the method DetectionManager#DETECTION_MANAGER.ReportDetected(). This method implements polymorphic behaviour.

+ +

The time interval in seconds of the reporting can be changed using the methods DetectionManager#DETECTION_MANAGER.SetReportInterval(). +To control how long a reporting message is displayed, use DetectionManager#DETECTION_MANAGER.SetReportDisplayTime(). +Derived classes need to implement the method DetectionManager#DETECTION_MANAGER.GetReportDisplayTime() to use the correct display time for displayed messages during a report.

+ +

Reporting can be started and stopped using the methods DetectionManager#DETECTION_MANAGER.StartReporting() and DetectionManager#DETECTION_MANAGER.StopReporting() respectively. +If an ad-hoc report is requested, use the method DetectionManager#DETECTION_MANAGER().

+ +

The default reporting interval is every 60 seconds. The reporting messages are displayed 15 seconds.

+ +
+ +

2) DetectionManager#DETECTION_REPORTING class, extends DetectionManager#DETECTION_MANAGER

+

The DetectionManager#DETECTION_REPORTING class implements detected units reporting. Reporting can be controlled using the reporting methods available in the DetectionManager#DETECTION_MANAGER class.

+ +

2.1) DETECTION_REPORTING constructor:

+

The DetectionManager#DETECTION_REPORTING.New() method creates a new DETECTION_REPORTING instance.

+ + +
+ +

Contributions: Mechanist, Prof_Hilactic, FlightControl - Concept & Testing

+

Author: FlightControl - Framework Design & Programming

+ + +

Global(s)

+ + + + + + + + + +
DETECTION_MANAGER + +
DETECTION_REPORTING + +
+

Type DETECTION_MANAGER

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DETECTION_MANAGER.ClassName + +
DETECTION_MANAGER.Detection +

The DETECTION_BASE object that is used to report the detected objects.

+
DETECTION_MANAGER:GetReportDisplayTime() +

Get the reporting message display time.

+
DETECTION_MANAGER:New(SetGroup, Detection) +

FAC constructor.

+
DETECTION_MANAGER:ProcessDetected(Detection) +

Reports the detected items to the Set#SET_GROUP.

+
DETECTION_MANAGER.SetGroup +

The groups to which the FAC will report to.

+
DETECTION_MANAGER:SetReportDisplayTime(ReportDisplayTime) +

Set the reporting message display time.

+
DETECTION_MANAGER:SetReportInterval(ReportInterval) +

Set the reporting time interval.

+
DETECTION_MANAGER._ReportDisplayTime + +
DETECTION_MANAGER._ReportInterval + +
DETECTION_MANAGER:onafterReport(From, Event, To) + +
DETECTION_MANAGER:onafterStart(From, Event, To) + +
+ +

Type DETECTION_REPORTING

+ + + + + + + + + + + + + + + + + + + + + + + + + +
DETECTION_REPORTING.ClassName + +
DETECTION_REPORTING.Detection +

The DETECTION_BASE object that is used to report the detected objects.

+
DETECTION_REPORTING:GetDetectedItemsText(DetectedSet) +

Creates a string of the detected items in a Detection.

+
DETECTION_REPORTING:New(SetGroup, Detection) +

DETECTION_REPORTING constructor.

+
DETECTION_REPORTING:ProcessDetected(Group, Detection) +

Reports the detected items to the Set#SET_GROUP.

+
DETECTION_REPORTING.SetGroup +

The groups to which the FAC will report to.

+
+ +

Global(s)

+
+
+ + #DETECTION_MANAGER + +DETECTION_MANAGER + +
+
+ + + +
+
+
+
+ + #DETECTION_REPORTING + +DETECTION_REPORTING + +
+
+ + + +
+
+

Type DetectionManager

+ +

Type DETECTION_MANAGER

+ +

DETECTION_MANAGER class.

+ +

Field(s)

+
+
+ + #string + +DETECTION_MANAGER.ClassName + +
+
+ + + +
+
+
+
+ + Functional.Detection#DETECTION_BASE + +DETECTION_MANAGER.Detection + +
+
+ +

The DETECTION_BASE object that is used to report the detected objects.

+ +
+
+
+
+ + +DETECTION_MANAGER:GetReportDisplayTime() + +
+
+ +

Get the reporting message display time.

+ +

Return value

+ +

#number: +ReportDisplayTime The display time in seconds when a report needs to be done.

+ +
+
+
+
+ + +DETECTION_MANAGER:New(SetGroup, Detection) + +
+
+ +

FAC constructor.

+ +

Parameters

+ +

Return value

+ +

#DETECTION_MANAGER: +self

+ +
+
+
+
+ + +DETECTION_MANAGER:ProcessDetected(Detection) + +
+
+ +

Reports the detected items to the Set#SET_GROUP.

+ +

Parameter

+ +

Return value

+ +

#DETECTION_MANAGER: +self

+ +
+
+
+
+ + Set#SET_GROUP + +DETECTION_MANAGER.SetGroup + +
+
+ +

The groups to which the FAC will report to.

+ +
+
+
+
+ + +DETECTION_MANAGER:SetReportDisplayTime(ReportDisplayTime) + +
+
+ +

Set the reporting message display time.

+ +

Parameter

+
    +
  • + +

    #number ReportDisplayTime : +The display time in seconds when a report needs to be done.

    + +
  • +
+

Return value

+ +

#DETECTION_MANAGER: +self

+ +
+
+
+
+ + +DETECTION_MANAGER:SetReportInterval(ReportInterval) + +
+
+ +

Set the reporting time interval.

+ +

Parameter

+
    +
  • + +

    #number ReportInterval : +The interval in seconds when a report needs to be done.

    + +
  • +
+

Return value

+ +

#DETECTION_MANAGER: +self

+ +
+
+
+
+ + + +DETECTION_MANAGER._ReportDisplayTime + +
+
+ + + +
+
+
+
+ + + +DETECTION_MANAGER._ReportInterval + +
+
+ + + +
+
+
+
+ + +DETECTION_MANAGER:onafterReport(From, Event, To) + +
+
+ + + +

Parameters

+
    +
  • + +

    From :

    + +
  • +
  • + +

    Event :

    + +
  • +
  • + +

    To :

    + +
  • +
+
+
+
+
+ + +DETECTION_MANAGER:onafterStart(From, Event, To) + +
+
+ + + +

Parameters

+
    +
  • + +

    From :

    + +
  • +
  • + +

    Event :

    + +
  • +
  • + +

    To :

    + +
  • +
+
+
+ +

Type DETECTION_REPORTING

+ +

DETECTION_REPORTING class.

+ +

Field(s)

+
+
+ + #string + +DETECTION_REPORTING.ClassName + +
+
+ + + +
+
+
+
+ + Functional.Detection#DETECTION_BASE + +DETECTION_REPORTING.Detection + +
+
+ +

The DETECTION_BASE object that is used to report the detected objects.

+ +
+
+
+
+ + +DETECTION_REPORTING:GetDetectedItemsText(DetectedSet) + +
+
+ +

Creates a string of the detected items in a Detection.

+ +

Parameter

+ +

Return value

+ +

#DETECTION_MANAGER: +self

+ +
+
+
+
+ + +DETECTION_REPORTING:New(SetGroup, Detection) + +
+
+ +

DETECTION_REPORTING constructor.

+ +

Parameters

+ +

Return value

+ +

#DETECTION_REPORTING: +self

+ +
+
+
+
+ + +DETECTION_REPORTING:ProcessDetected(Group, Detection) + +
+
+ +

Reports the detected items to the Set#SET_GROUP.

+ +

Parameters

+ +

Return value

+ +

#boolean: +Return true if you want the reporting to continue... false will cancel the reporting loop.

+ +
+
+
+
+ + Set#SET_GROUP + +DETECTION_REPORTING.SetGroup + +
+
+ +

The groups to which the FAC will report to.

+ +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Escort.html b/docs/Documentation/Escort.html new file mode 100644 index 000000000..52cc36d94 --- /dev/null +++ b/docs/Documentation/Escort.html @@ -0,0 +1,2689 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Escort

+ +

Taking the lead of AI escorting your flight.

+ + + +

#ESCORT class

+

The #ESCORT class allows you to interact with escorting AI on your flight and take the lead. +Each escorting group can be commanded with a whole set of radio commands (radio menu in your flight, and then F10).

+ +

The radio commands will vary according the category of the group. The richest set of commands are with Helicopters and AirPlanes. +Ships and Ground troops will have a more limited set, but they can provide support through the bombing of targets designated by the other escorts.

+ +

RADIO MENUs that can be created:

+

Find a summary below of the current available commands:

+ +

Navigation ...:

+

Escort group navigation functions:

+ +
    +
  • "Join-Up and Follow at x meters": The escort group fill follow you at about x meters, and they will follow you.
  • +
  • "Flare": Provides menu commands to let the escort group shoot a flare in the air in a color.
  • +
  • "Smoke": Provides menu commands to let the escort group smoke the air in a color. Note that smoking is only available for ground and naval troops.
  • +
+ +

Hold position ...:

+

Escort group navigation functions:

+ +
    +
  • "At current location": Stops the escort group and they will hover 30 meters above the ground at the position they stopped.
  • +
  • "At client location": Stops the escort group and they will hover 30 meters above the ground at the position they stopped.
  • +
+ +

Report targets ...:

+

Report targets will make the escort group to report any target that it identifies within a 8km range. Any detected target can be attacked using the 4. Attack nearby targets function. (see below).

+ +
    +
  • "Report now": Will report the current detected targets.
  • +
  • "Report targets on": Will make the escort group to report detected targets and will fill the "Attack nearby targets" menu list.
  • +
  • "Report targets off": Will stop detecting targets.
  • +
+ +

Scan targets ...:

+

Menu items to pop-up the escort group for target scanning. After scanning, the escort group will resume with the mission or defined task.

+ +
    +
  • "Scan targets 30 seconds": Scan 30 seconds for targets.
  • +
  • "Scan targets 60 seconds": Scan 60 seconds for targets.
  • +
+ +

Attack targets ...:

+

This menu item will list all detected targets within a 15km range. Depending on the level of detection (known/unknown) and visuality, the targets type will also be listed.

+ +

Request assistance from ...:

+

This menu item will list all detected targets within a 15km range, as with the menu item Attack Targets. +This menu item allows to request attack support from other escorts supporting the current client group. +eg. the function allows a player to request support from the Ship escort to attack a target identified by the Plane escort with its Tomahawk missiles. +eg. the function allows a player to request support from other Planes escorting to bomb the unit with illumination missiles or bombs, so that the main plane escort can attack the area.

+ +

ROE ...:

+

Sets the Rules of Engagement (ROE) of the escort group when in flight.

+ +
    +
  • "Hold Fire": The escort group will hold fire.
  • +
  • "Return Fire": The escort group will return fire.
  • +
  • "Open Fire": The escort group will open fire on designated targets.
  • +
  • "Weapon Free": The escort group will engage with any target.
  • +
+ +

Evasion ...:

+

Will define the evasion techniques that the escort group will perform during flight or combat.

+ +
    +
  • "Fight until death": The escort group will have no reaction to threats.
  • +
  • "Use flares, chaff and jammers": The escort group will use passive defense using flares and jammers. No evasive manoeuvres are executed.
  • +
  • "Evade enemy fire": The rescort group will evade enemy fire before firing.
  • +
  • "Go below radar and evade fire": The escort group will perform evasive vertical manoeuvres.
  • +
+ +

Resume Mission ...:

+

Escort groups can have their own mission. This menu item will allow the escort group to resume their Mission from a given waypoint. +Note that this is really fantastic, as you now have the dynamic of taking control of the escort groups, and allowing them to resume their path or mission.

+ +

ESCORT construction methods.

+

Create a new SPAWN object with the ESCORT.New method:

+ + + +

ESCORT initialization methods.

+

The following menus are created within the RADIO MENU (F10) of an active unit hosted by a player:

+ + + + + +

Usage:

+
-- Declare a new EscortPlanes object as follows:
+
+-- First find the GROUP object and the CLIENT object.
+local EscortClient = CLIENT:FindByName( "Unit Name" ) -- The Unit Name is the name of the unit flagged with the skill Client in the mission editor.
+local EscortGroup = GROUP:FindByName( "Group Name" ) -- The Group Name is the name of the group that will escort the Escort Client.
+
+-- Now use these 2 objects to construct the new EscortPlanes object.
+EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the mission. You are escorted by a plane with code name 'Desert', which can be instructed through the F10 radio menu." )
+
+
+
+ +

Global(s)

+ + + + + + + + + +
ESCORT + +
_Resume(EscortGroup) + +
+

Type ESCORT

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ESCORT.CT1 + +
ESCORT.ClassName + +
ESCORT.Detection + +
ESCORT.EscortBriefing + +
ESCORT.EscortClient + +
ESCORT.EscortGroup + +
ESCORT.EscortMenu + +
ESCORT.EscortMenuAttackNearbyTargets + +
ESCORT.EscortMenuEvasion + +
ESCORT.EscortMenuEvasionEvadeFire + +
ESCORT.EscortMenuEvasionNoReaction + +
ESCORT.EscortMenuEvasionPassiveDefense + +
ESCORT.EscortMenuFlare + +
ESCORT.EscortMenuFlareGreen + +
ESCORT.EscortMenuFlareRed + +
ESCORT.EscortMenuFlareWhite + +
ESCORT.EscortMenuFlareYellow + +
ESCORT.EscortMenuHold + +
ESCORT.EscortMenuHoldAtLeaderPosition + +
ESCORT.EscortMenuHoldPosition + +
ESCORT.EscortMenuJoinUpAndFollow + +
ESCORT.EscortMenuOptionEvasionVertical + +
ESCORT.EscortMenuROE + +
ESCORT.EscortMenuROEHoldFire + +
ESCORT.EscortMenuROEOpenFire + +
ESCORT.EscortMenuROEReturnFire + +
ESCORT.EscortMenuROEWeaponFree + +
ESCORT.EscortMenuReportNavigation + +
ESCORT.EscortMenuReportNearbyTargets + +
ESCORT.EscortMenuReportNearbyTargetsNow + +
ESCORT.EscortMenuReportNearbyTargetsOff + +
ESCORT.EscortMenuReportNearbyTargetsOn + +
ESCORT.EscortMenuResumeMission + +
ESCORT.EscortMenuScan + +
ESCORT.EscortMenuScanForTargets + +
ESCORT.EscortMenuSmoke + +
ESCORT.EscortMenuSmokeBlue + +
ESCORT.EscortMenuSmokeGreen + +
ESCORT.EscortMenuSmokeOrange + +
ESCORT.EscortMenuSmokeRed + +
ESCORT.EscortMenuSmokeWhite + +
ESCORT.EscortMenuTargetAssistance + +
ESCORT.EscortMode +

The mode the escort is in.

+
ESCORT.EscortName + +
ESCORT.EscortSetGroup + +
ESCORT.FollowDistance +

The current follow distance.

+
ESCORT.FollowScheduler +

The instance of the SCHEDULER class.

+
ESCORT.GT1 + +
ESCORT:JoinUpAndFollow(EscortGroup, EscortClient, Distance) +

JoinsUp and Follows a CLIENT.

+
ESCORT.MODE + +
ESCORT:MenuAssistedAttack() +

Defines a menu slot to let the escort attack its detected targets using assisted attack from another escort joined also with the client.

+
ESCORT:MenuEvasion(MenuTextFormat) +

Defines a menu to let the escort set its evasion when under threat.

+
ESCORT:MenuFlare(MenuTextFormat) +

Defines a menu slot to let the escort disperse a flare in a certain color.

+
ESCORT:MenuFollowAt(Distance) +

Defines a menu slot to let the escort Join and Follow you at a certain distance.

+
ESCORT:MenuHoldAtEscortPosition(Height, Seconds, MenuTextFormat) +

Defines a menu slot to let the escort hold at their current position and stay low with a specified height during a specified time in seconds.

+
ESCORT:MenuHoldAtLeaderPosition(Height, Seconds, MenuTextFormat) +

Defines a menu slot to let the escort hold at the client position and stay low with a specified height during a specified time in seconds.

+
ESCORT:MenuROE(MenuTextFormat) +

Defines a menu to let the escort set its rules of engagement.

+
ESCORT:MenuReportTargets(Seconds) +

Defines a menu slot to let the escort report their current detected targets with a specified time interval in seconds.

+
ESCORT:MenuResumeMission() +

Defines a menu to let the escort resume its mission from a waypoint on its route.

+
ESCORT:MenuScanForTargets(Height, Seconds, MenuTextFormat) +

Defines a menu slot to let the escort scan for targets at a certain height for a certain time in seconds.

+
ESCORT:MenuSmoke(MenuTextFormat) +

Defines a menu slot to let the escort disperse a smoke in a certain color.

+
ESCORT:Menus() +

Defines the default menus

+
ESCORT:New(EscortClient, EscortGroup, EscortName, EscortBriefing) +

ESCORT class constructor for an AI group

+
ESCORT.OptionROE + +
ESCORT.OptionReactionOnThreat +

Which REACTIONONTHREAT is set to the EscortGroup.

+
ESCORT:RegisterRoute() +

Registers the waypoints

+
ESCORT.ReportTargets +

If true, nearby targets are reported.

+
ESCORT.ReportTargetsScheduler + +
ESCORT:SetDetection(Detection) +

Set a Detection method for the EscortClient to be reported upon.

+
ESCORT.SmokeDirectionVector + +
ESCORT.Targets + +
ESCORT.TaskPoints + +
ESCORT:TestSmokeDirectionVector(SmokeDirection) +

This function is for test, it will put on the frequency of the FollowScheduler a red smoke at the direction vector calculated for the escort to fly to.

+
ESCORT._AssistTarget(DetectedItemID, self, EscortGroupAttack) + +
ESCORT:_AttackTarget(DetectedItemID) + +
ESCORT._Flare(MenuParam, self, Color, Message) + +
ESCORT:_FollowScheduler() + +
ESCORT._HoldPosition(MenuParam, self, OrbitGroup, OrbitHeight, OrbitSeconds) + +
ESCORT._JoinUpAndFollow(MenuParam, self, Distance) + +
ESCORT._ROE(MenuParam, self, EscortROEFunction, EscortROEMessage) + +
ESCORT._ROT(MenuParam, self, EscortROTFunction, EscortROTMessage) + +
ESCORT._ReportNearbyTargetsNow(MenuParam, self) + +
ESCORT:_ReportTargetsScheduler() +

Report Targets Scheduler.

+
ESCORT._ResumeMission(MenuParam, self, WayPoint) + +
ESCORT._ScanTargets(MenuParam, self, ScanDuration) + +
ESCORT._Smoke(MenuParam, self, Color, Message) + +
ESCORT:_SwitchReportNearbyTargets(ReportTargets) + +
+ +

Type ESCORT.MODE

+ + + + + + + + + +
ESCORT.MODE.FOLLOW + +
ESCORT.MODE.MISSION + +
+ +

Type MENUPARAM

+ + + + + + + + + + + + + + + + + + + + + +
MENUPARAM.Distance + +
MENUPARAM.ParamDistance + +
MENUPARAM.ParamFunction + +
MENUPARAM.ParamMessage + +
MENUPARAM.ParamSelf + +
+ +

Global(s)

+
+
+ + #ESCORT + +ESCORT + +
+
+ + + +
+
+
+
+ + +_Resume(EscortGroup) + +
+
+ + + +

Parameter

+ +
+
+

Type Escort

+ +

Type Distance

+ +

Type ESCORT

+ +

ESCORT class

+ +

Field(s)

+
+
+ + #number + +ESCORT.CT1 + +
+
+ + + +
+
+
+
+ + #string + +ESCORT.ClassName + +
+
+ + + +
+
+
+
+ + Functional.Detection#DETECTION_BASE + +ESCORT.Detection + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortBriefing + +
+
+ + + +
+
+
+
+ + Wrapper.Client#CLIENT + +ESCORT.EscortClient + +
+
+ + + +
+
+
+
+ + Wrapper.Group#GROUP + +ESCORT.EscortGroup + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenu + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuAttackNearbyTargets + +
+
+ + + + +

Attack Targets

+ +
+
+
+
+ + + +ESCORT.EscortMenuEvasion + +
+
+ + + + +

Reaction to Threats

+ +
+
+
+
+ + + +ESCORT.EscortMenuEvasionEvadeFire + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuEvasionNoReaction + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuEvasionPassiveDefense + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuFlare + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuFlareGreen + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuFlareRed + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuFlareWhite + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuFlareYellow + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuHold + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuHoldAtLeaderPosition + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuHoldPosition + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuJoinUpAndFollow + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuOptionEvasionVertical + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuROE + +
+
+ + + + +

Rules of Engagement

+ +
+
+
+
+ + + +ESCORT.EscortMenuROEHoldFire + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuROEOpenFire + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuROEReturnFire + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuROEWeaponFree + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuReportNavigation + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuReportNearbyTargets + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuReportNearbyTargetsNow + +
+
+ + + + +

Report Targets

+ +
+
+
+
+ + + +ESCORT.EscortMenuReportNearbyTargetsOff + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuReportNearbyTargetsOn + +
+
+ + + +
+
+
+
+ + Core.Menu#MENU_CLIENT + +ESCORT.EscortMenuResumeMission + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuScan + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuScanForTargets + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuSmoke + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuSmokeBlue + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuSmokeGreen + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuSmokeOrange + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuSmokeRed + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuSmokeWhite + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortMenuTargetAssistance + +
+
+ + + + +

Request assistance from other escorts. + This is very useful to let f.e. an escorting ship attack a target detected by an escorting plane...

+ +
+
+
+
+ + #ESCORT.MODE + +ESCORT.EscortMode + +
+
+ +

The mode the escort is in.

+ +
+
+
+
+ + #string + +ESCORT.EscortName + +
+
+ + + +
+
+
+
+ + + +ESCORT.EscortSetGroup + +
+
+ + + +
+
+
+
+ + #number + +ESCORT.FollowDistance + +
+
+ +

The current follow distance.

+ +
+
+
+
+ + Core.Scheduler#SCHEDULER + +ESCORT.FollowScheduler + +
+
+ +

The instance of the SCHEDULER class.

+ +
+
+
+
+ + #number + +ESCORT.GT1 + +
+
+ + + +
+
+
+
+ + +ESCORT:JoinUpAndFollow(EscortGroup, EscortClient, Distance) + +
+
+ +

JoinsUp and Follows a CLIENT.

+ +

Parameters

+ +
+
+
+
+ + + +ESCORT.MODE + +
+
+ + + +
+
+
+
+ + +ESCORT:MenuAssistedAttack() + +
+
+ +

Defines a menu slot to let the escort attack its detected targets using assisted attack from another escort joined also with the client.

+ + +

This menu will appear under Request assistance from. +Note that this method needs to be preceded with the method MenuReportTargets.

+ +

Return value

+ +

#ESCORT:

+ + +
+
+
+
+ + +ESCORT:MenuEvasion(MenuTextFormat) + +
+
+ +

Defines a menu to let the escort set its evasion when under threat.

+ + +

All rules of engagement will appear under the menu Evasion.

+ +

Parameter

+
    +
  • + +

    MenuTextFormat :

    + +
  • +
+

Return value

+ +

#ESCORT:

+ + +
+
+
+
+ + +ESCORT:MenuFlare(MenuTextFormat) + +
+
+ +

Defines a menu slot to let the escort disperse a flare in a certain color.

+ + +

This menu will appear under Navigation. +The flare will be fired from the first unit in the group.

+ +

Parameter

+
    +
  • + +

    #string MenuTextFormat : +Optional parameter that shows the menu option text. If no text is given, the default text will be displayed.

    + +
  • +
+

Return value

+ +

#ESCORT:

+ + +
+
+
+
+ + +ESCORT:MenuFollowAt(Distance) + +
+
+ +

Defines a menu slot to let the escort Join and Follow you at a certain distance.

+ + +

This menu will appear under Navigation.

+ +

Parameter

+
    +
  • + +

    Dcs.DCSTypes#Distance Distance : +The distance in meters that the escort needs to follow the client.

    + +
  • +
+

Return value

+ +

#ESCORT:

+ + +
+
+
+
+ + +ESCORT:MenuHoldAtEscortPosition(Height, Seconds, MenuTextFormat) + +
+
+ +

Defines a menu slot to let the escort hold at their current position and stay low with a specified height during a specified time in seconds.

+ + +

This menu will appear under Hold position.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Distance Height : +Optional parameter that sets the height in meters to let the escort orbit at the current location. The default value is 30 meters.

    + +
  • +
  • + +

    Dcs.DCSTypes#Time Seconds : +Optional parameter that lets the escort orbit at the current position for a specified time. (not implemented yet). The default value is 0 seconds, meaning, that the escort will orbit forever until a sequent command is given.

    + +
  • +
  • + +

    #string MenuTextFormat : +Optional parameter that shows the menu option text. The text string is formatted, and should contain two %d tokens in the string. The first for the Height, the second for the Time (if given). If no text is given, the default text will be displayed.

    + +
  • +
+

Return value

+ +

#ESCORT: +TODO: Implement Seconds parameter. Challenge is to first develop the "continue from last activity" function.

+ +
+
+
+
+ + +ESCORT:MenuHoldAtLeaderPosition(Height, Seconds, MenuTextFormat) + +
+
+ +

Defines a menu slot to let the escort hold at the client position and stay low with a specified height during a specified time in seconds.

+ + +

This menu will appear under Navigation.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Distance Height : +Optional parameter that sets the height in meters to let the escort orbit at the current location. The default value is 30 meters.

    + +
  • +
  • + +

    Dcs.DCSTypes#Time Seconds : +Optional parameter that lets the escort orbit at the current position for a specified time. (not implemented yet). The default value is 0 seconds, meaning, that the escort will orbit forever until a sequent command is given.

    + +
  • +
  • + +

    #string MenuTextFormat : +Optional parameter that shows the menu option text. The text string is formatted, and should contain one or two %d tokens in the string. The first for the Height, the second for the Time (if given). If no text is given, the default text will be displayed.

    + +
  • +
+

Return value

+ +

#ESCORT: +TODO: Implement Seconds parameter. Challenge is to first develop the "continue from last activity" function.

+ +
+
+
+
+ + +ESCORT:MenuROE(MenuTextFormat) + +
+
+ +

Defines a menu to let the escort set its rules of engagement.

+ + +

All rules of engagement will appear under the menu ROE.

+ +

Parameter

+
    +
  • + +

    MenuTextFormat :

    + +
  • +
+

Return value

+ +

#ESCORT:

+ + +
+
+
+
+ + +ESCORT:MenuReportTargets(Seconds) + +
+
+ +

Defines a menu slot to let the escort report their current detected targets with a specified time interval in seconds.

+ + +

This menu will appear under Report targets. +Note that if a report targets menu is not specified, no targets will be detected by the escort, and the attack and assisted attack menus will not be displayed.

+ +

Parameter

+
    +
  • + +

    Dcs.DCSTypes#Time Seconds : +Optional parameter that lets the escort report their current detected targets after specified time interval in seconds. The default time is 30 seconds.

    + +
  • +
+

Return value

+ +

#ESCORT:

+ + +
+
+
+
+ + +ESCORT:MenuResumeMission() + +
+
+ +

Defines a menu to let the escort resume its mission from a waypoint on its route.

+ + +

All rules of engagement will appear under the menu Resume mission from.

+ +

Return value

+ +

#ESCORT:

+ + +
+
+
+
+ + +ESCORT:MenuScanForTargets(Height, Seconds, MenuTextFormat) + +
+
+ +

Defines a menu slot to let the escort scan for targets at a certain height for a certain time in seconds.

+ + +

This menu will appear under Scan targets.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Distance Height : +Optional parameter that sets the height in meters to let the escort orbit at the current location. The default value is 30 meters.

    + +
  • +
  • + +

    Dcs.DCSTypes#Time Seconds : +Optional parameter that lets the escort orbit at the current position for a specified time. (not implemented yet). The default value is 0 seconds, meaning, that the escort will orbit forever until a sequent command is given.

    + +
  • +
  • + +

    #string MenuTextFormat : +Optional parameter that shows the menu option text. The text string is formatted, and should contain one or two %d tokens in the string. The first for the Height, the second for the Time (if given). If no text is given, the default text will be displayed.

    + +
  • +
+

Return value

+ +

#ESCORT:

+ + +
+
+
+
+ + +ESCORT:MenuSmoke(MenuTextFormat) + +
+
+ +

Defines a menu slot to let the escort disperse a smoke in a certain color.

+ + +

This menu will appear under Navigation. +Note that smoke menu options will only be displayed for ships and ground units. Not for air units. +The smoke will be fired from the first unit in the group.

+ +

Parameter

+
    +
  • + +

    #string MenuTextFormat : +Optional parameter that shows the menu option text. If no text is given, the default text will be displayed.

    + +
  • +
+

Return value

+ +

#ESCORT:

+ + +
+
+
+
+ + +ESCORT:Menus() + +
+
+ +

Defines the default menus

+ +

Return value

+ +

#ESCORT:

+ + +
+
+
+
+ + +ESCORT:New(EscortClient, EscortGroup, EscortName, EscortBriefing) + +
+
+ +

ESCORT class constructor for an AI group

+ +

Parameters

+
    +
  • + +

    Wrapper.Client#CLIENT EscortClient : +The client escorted by the EscortGroup.

    + +
  • +
  • + +

    Wrapper.Group#GROUP EscortGroup : +The group AI escorting the EscortClient.

    + +
  • +
  • + +

    #string EscortName : +Name of the escort.

    + +
  • +
  • + +

    #string EscortBriefing : +A text showing the ESCORT briefing to the player. Note that if no EscortBriefing is provided, the default briefing will be shown.

    + +
  • +
+

Return value

+ +

#ESCORT: +self

+ +

Usage:

+
-- Declare a new EscortPlanes object as follows:
+
+-- First find the GROUP object and the CLIENT object.
+local EscortClient = CLIENT:FindByName( "Unit Name" ) -- The Unit Name is the name of the unit flagged with the skill Client in the mission editor.
+local EscortGroup = GROUP:FindByName( "Group Name" ) -- The Group Name is the name of the group that will escort the Escort Client.
+
+-- Now use these 2 objects to construct the new EscortPlanes object.
+EscortPlanes = ESCORT:New( EscortClient, EscortGroup, "Desert", "Welcome to the mission. You are escorted by a plane with code name 'Desert', which can be instructed through the F10 radio menu." )
+ +
+
+
+
+ + + +ESCORT.OptionROE + +
+
+ + + +
+
+
+
+ + Dcs.DCSTypes#AI.Option.Air.val.REACTION_ON_THREAT + +ESCORT.OptionReactionOnThreat + +
+
+ +

Which REACTIONONTHREAT is set to the EscortGroup.

+ +
+
+
+
+ + +ESCORT:RegisterRoute() + +
+
+ +

Registers the waypoints

+ +

Return value

+ +

#table:

+ + +
+
+
+
+ + #boolean + +ESCORT.ReportTargets + +
+
+ +

If true, nearby targets are reported.

+ +
+
+
+
+ + + +ESCORT.ReportTargetsScheduler + +
+
+ + + +
+
+
+
+ + +ESCORT:SetDetection(Detection) + +
+
+ +

Set a Detection method for the EscortClient to be reported upon.

+ + +

Detection methods are based on the derived classes from DETECTION_BASE.

+ +

Parameter

+ +
+
+
+
+ + +ESCORT.SmokeDirectionVector + +
+
+ + + +
+
+
+
+ + + +ESCORT.Targets + +
+
+ + + +
+
+
+
+ + + +ESCORT.TaskPoints + +
+
+ + + +
+
+
+
+ + +ESCORT:TestSmokeDirectionVector(SmokeDirection) + +
+
+ +

This function is for test, it will put on the frequency of the FollowScheduler a red smoke at the direction vector calculated for the escort to fly to.

+ + +

This allows to visualize where the escort is flying to.

+ +

Parameter

+
    +
  • + +

    #boolean SmokeDirection : +If true, then the direction vector will be smoked.

    + +
  • +
+
+
+
+
+ + +ESCORT._AssistTarget(DetectedItemID, self, EscortGroupAttack) + +
+
+ + + +

Parameters

+
    +
  • + +

    #number DetectedItemID :

    + +
  • +
  • + +

    self :

    + +
  • +
  • + +

    EscortGroupAttack :

    + +
  • +
+
+
+
+
+ + +ESCORT:_AttackTarget(DetectedItemID) + +
+
+ + + +

Parameter

+
    +
  • + +

    #number DetectedItemID :

    + +
  • +
+
+
+
+
+ + +ESCORT._Flare(MenuParam, self, Color, Message) + +
+
+ + + +

Parameters

+
    +
  • + +

    #MENUPARAM MenuParam :

    + +
  • +
  • + +

    self :

    + +
  • +
  • + +

    Color :

    + +
  • +
  • + +

    Message :

    + +
  • +
+
+
+
+
+ + +ESCORT:_FollowScheduler() + +
+
+ + + +
+
+
+
+ + +ESCORT._HoldPosition(MenuParam, self, OrbitGroup, OrbitHeight, OrbitSeconds) + +
+
+ + + +

Parameters

+
    +
  • + +

    #MENUPARAM MenuParam :

    + +
  • +
  • + +

    self :

    + +
  • +
  • + +

    OrbitGroup :

    + +
  • +
  • + +

    OrbitHeight :

    + +
  • +
  • + +

    OrbitSeconds :

    + +
  • +
+
+
+
+
+ + +ESCORT._JoinUpAndFollow(MenuParam, self, Distance) + +
+
+ + + +

Parameters

+
    +
  • + +

    #MENUPARAM MenuParam :

    + +
  • +
  • + +

    self :

    + +
  • +
  • + +

    Distance :

    + +
  • +
+
+
+
+
+ + +ESCORT._ROE(MenuParam, self, EscortROEFunction, EscortROEMessage) + +
+
+ + + +

Parameters

+
    +
  • + +

    #MENUPARAM MenuParam :

    + +
  • +
  • + +

    self :

    + +
  • +
  • + +

    EscortROEFunction :

    + +
  • +
  • + +

    EscortROEMessage :

    + +
  • +
+
+
+
+
+ + +ESCORT._ROT(MenuParam, self, EscortROTFunction, EscortROTMessage) + +
+
+ + + +

Parameters

+
    +
  • + +

    #MENUPARAM MenuParam :

    + +
  • +
  • + +

    self :

    + +
  • +
  • + +

    EscortROTFunction :

    + +
  • +
  • + +

    EscortROTMessage :

    + +
  • +
+
+
+
+
+ + +ESCORT._ReportNearbyTargetsNow(MenuParam, self) + +
+
+ + + +

Parameters

+
    +
  • + +

    #MENUPARAM MenuParam :

    + +
  • +
  • + +

    self :

    + +
  • +
+
+
+
+
+ + +ESCORT:_ReportTargetsScheduler() + +
+
+ +

Report Targets Scheduler.

+ +
+
+
+
+ + +ESCORT._ResumeMission(MenuParam, self, WayPoint) + +
+
+ + + +

Parameters

+
    +
  • + +

    #MENUPARAM MenuParam :

    + +
  • +
  • + +

    self :

    + +
  • +
  • + +

    WayPoint :

    + +
  • +
+
+
+
+
+ + +ESCORT._ScanTargets(MenuParam, self, ScanDuration) + +
+
+ + + +

Parameters

+
    +
  • + +

    #MENUPARAM MenuParam :

    + +
  • +
  • + +

    self :

    + +
  • +
  • + +

    ScanDuration :

    + +
  • +
+
+
+
+
+ + +ESCORT._Smoke(MenuParam, self, Color, Message) + +
+
+ + + +

Parameters

+
    +
  • + +

    #MENUPARAM MenuParam :

    + +
  • +
  • + +

    self :

    + +
  • +
  • + +

    Color :

    + +
  • +
  • + +

    Message :

    + +
  • +
+
+
+
+
+ + +ESCORT:_SwitchReportNearbyTargets(ReportTargets) + +
+
+ + + +

Parameter

+
    +
  • + +

    ReportTargets :

    + +
  • +
+
+
+ +

Type ESCORT.MODE

+ +

ESCORT.Mode class

+ +

Field(s)

+
+
+ + #number + +ESCORT.MODE.FOLLOW + +
+
+ + + +
+
+
+
+ + #number + +ESCORT.MODE.MISSION + +
+
+ + + +
+
+ +

Type MENUPARAM

+ +

MENUPARAM type

+ +

Field(s)

+
+
+ + + +MENUPARAM.Distance + +
+
+ + + +
+
+
+
+ + #Distance + +MENUPARAM.ParamDistance + +
+
+ + + +
+
+
+
+ + #function + +MENUPARAM.ParamFunction + +
+
+ + + +
+
+
+
+ + #string + +MENUPARAM.ParamMessage + +
+
+ + + +
+
+
+
+ + #ESCORT + +MENUPARAM.ParamSelf + +
+
+ + + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Event.html b/docs/Documentation/Event.html new file mode 100644 index 000000000..5de725053 --- /dev/null +++ b/docs/Documentation/Event.html @@ -0,0 +1,2607 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Event

+ +

Core - EVENT models DCS event dispatching using a publish-subscribe model.

+ + + +

Banner Image

+ +
+ +

1) Event Handling Overview

+ +

Objects

+ +

Within a running mission, various DCS events occur. Units are dynamically created, crash, die, shoot stuff, get hit etc. +This module provides a mechanism to dispatch those events occuring within your running mission, to the different objects orchestrating your mission.

+ +

Objects

+ +

Objects can subscribe to different events. The Event dispatcher will publish the received DCS events to the subscribed MOOSE objects, in a specified order. +In this way, the subscribed MOOSE objects are kept in sync with your evolving running mission.

+ +

1.1) Event Dispatching

+ +

Objects

+ +

The _EVENTDISPATCHER object is automatically created within MOOSE, +and handles the dispatching of DCS Events occurring +in the simulator to the subscribed objects +in the correct processing order.

+ +

Objects

+ +

There are 5 levels of kind of objects that the _EVENTDISPATCHER services:

+ +
    +
  • _DATABASE object: The core of the MOOSE objects. Any object that is created, deleted or updated, is done in this database.
  • +
  • SET_ derived classes: Subsets of the _DATABASE object. These subsets are updated by the _EVENTDISPATCHER as the second priority.
  • +
  • UNIT objects: UNIT objects can subscribe to DCS events. Each DCS event will be directly published to teh subscribed UNIT object.
  • +
  • GROUP objects: GROUP objects can subscribe to DCS events. Each DCS event will be directly published to the subscribed GROUP object.
  • +
  • Any other object: Various other objects can subscribe to DCS events. Each DCS event triggered will be published to each subscribed object.
  • +
+ +

Objects

+ +

For most DCS events, the above order of updating will be followed.

+ +

Objects

+ +

But for some DCS events, the publishing order is reversed. This is due to the fact that objects need to be erased instead of added.

+ +

1.2) Event Handling

+ +

Objects

+ +

The actual event subscribing and handling is not facilitated through the _EVENTDISPATCHER, but it is done through the BASE class, UNIT class and GROUP class. +The _EVENTDISPATCHER is a component that is quietly working in the background of MOOSE.

+ +

Objects

+ +

The BASE class provides methods to catch DCS Events. These are events that are triggered from within the DCS simulator, +and handled through lua scripting. MOOSE provides an encapsulation to handle these events more efficiently.

+ +

1.2.1 Subscribe / Unsubscribe to DCS Events

+ +

At first, the mission designer will need to Subscribe to a specific DCS event for the class. +So, when the DCS event occurs, the class will be notified of that event. +There are two functions which you use to subscribe to or unsubscribe from an event.

+ + + +

Note that for a UNIT, the event will be handled for that UNIT only! +Note that for a GROUP, the event will be handled for all the UNITs in that GROUP only!

+ +

For all objects of other classes, the subscribed events will be handled for all UNITs within the Mission! +So if a UNIT within the mission has the subscribed event for that object, +then the object event handler will receive the event for that UNIT!

+ +

1.3.2 Event Handling of DCS Events

+ +

Once the class is subscribed to the event, an Event Handling method on the object or class needs to be written that will be called +when the DCS event occurs. The Event Handling method receives an Event#EVENTDATA structure, which contains a lot of information +about the event that occurred.

+ +

Find below an example of the prototype how to write an event handling function for two units:

+ +
 local Tank1 = UNIT:FindByName( "Tank A" )
+ local Tank2 = UNIT:FindByName( "Tank B" )
+
+ -- Here we subscribe to the Dead events. So, if one of these tanks dies, the Tank1 or Tank2 objects will be notified.
+ Tank1:HandleEvent( EVENTS.Dead )
+ Tank2:HandleEvent( EVENTS.Dead )
+
+ --- This function is an Event Handling function that will be called when Tank1 is Dead.
+ -- @param Wrapper.Unit#UNIT self 
+ -- @param Core.Event#EVENTDATA EventData
+ function Tank1:OnEventDead( EventData )
+
+   self:SmokeGreen()
+ end
+
+ --- This function is an Event Handling function that will be called when Tank2 is Dead.
+ -- @param Wrapper.Unit#UNIT self 
+ -- @param Core.Event#EVENTDATA EventData
+ function Tank2:OnEventDead( EventData )
+
+   self:SmokeBlue()
+ end
+
+ +

1.3.3 Event Handling methods that are automatically called upon subscribed DCS events

+ +

Objects

+ +

The following list outlines which EVENTS item in the structure corresponds to which Event Handling method. +Always ensure that your event handling methods align with the events being subscribed to, or nothing will be executed.

+ +

2) EVENTS type

+ +

The EVENTS structure contains names for all the different DCS events that objects can subscribe to using the +Base#BASE.HandleEvent() method.

+ +

3) EVENTDATA type

+ +

The Event#EVENTDATA structure contains all the fields that are populated with event information before +an Event Handler method is being called by the event dispatcher. +The Event Handler received the EVENTDATA object as a parameter, and can be used to investigate further the different events. +There are basically 4 main categories of information stored in the EVENTDATA structure:

+ +
    +
  • Initiator Unit data: Several fields documenting the initiator unit related to the event.

  • +
  • Target Unit data: Several fields documenting the target unit related to the event.

  • +
  • Weapon data: Certain events populate weapon information.

  • +
  • Place data: Certain events populate place information.

    + +

    --- This function is an Event Handling function that will be called when Tank1 is Dead. + -- EventData is an EVENTDATA structure. + -- We use the EventData.IniUnit to smoke the tank Green. + -- @param Wrapper.Unit#UNIT self + -- @param Core.Event#EVENTDATA EventData + function Tank1:OnEventDead( EventData )

    + +

    EventData.IniUnit:SmokeGreen() + end

  • +
+ + +

Find below an overview which events populate which information categories:

+ +

Objects

+ +

IMPORTANT NOTE: Some events can involve not just UNIT objects, but also STATIC objects!!! +In that case the initiator or target unit fields will refer to a STATIC object! +In case a STATIC object is involved, the documentation indicates which fields will and won't not be populated. +The fields IniObjectCategory and TgtObjectCategory contain the indicator which kind of object is involved in the event. +You can use the enumerator Object.Category.UNIT and Object.Category.STATIC to check on IniObjectCategory and TgtObjectCategory. +Example code snippet:

+ +
 if Event.IniObjectCategory == Object.Category.UNIT then
+  ...
+ end
+ if Event.IniObjectCategory == Object.Category.STATIC then
+  ...
+ end 
+
+ +

When a static object is involved in the event, the Group and Player fields won't be populated.

+ +
+ +

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

YYYY-MM-DD: CLASS:NewFunction( Params ) replaces CLASS:OldFunction( Params ) +YYYY-MM-DD: CLASS:NewFunction( Params ) added

+ +

Hereby the change log:

+ +
    +
  • 2017-03-07: Added the correct event dispatching in case the event is subscribed by a GROUP.

  • +
  • 2017-02-07: Did a complete revision of the Event Handing API and underlying mechanisms.

  • +
+ +
+ +

AUTHORS and CONTRIBUTIONS

+ +

Contributions:

+ +

Authors:

+ + + + +

Global(s)

+ + + + + + + + + + + + + +
EVENT + +
EVENTHANDLER + +
EVENTS + +
+

Type EVENT

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EVENT.ClassID + +
EVENT.ClassName + +
EVENT:CreateEventDeleteCargo(Cargo) +

Creation of a Cargo Deletion Event.

+
EVENT:CreateEventNewCargo(Cargo) +

Creation of a New Cargo Event.

+
EVENT.Events + +
EVENT.EventsDead + +
EVENT:Init(EventID, EventClass) +

Initializes the Events structure for the event

+
EVENT:New() + +
EVENT:OnBirthForTemplate(EventGroup, EventFunction, EventClass, EventTemplate) +

Create an OnBirth event handler for a group

+
EVENT:OnCrashForTemplate(EventGroup, EventFunction, EventClass, EventTemplate) +

Create an OnCrash event handler for a group

+
EVENT:OnDeadForTemplate(EventGroup, EventFunction, EventClass, EventTemplate) +

Create an OnDead event handler for a group

+
EVENT:OnEngineShutDownForTemplate(EventTemplate, EventFunction, EventClass) +

Create an OnDead event handler for a group

+
EVENT:OnEventForGroup(GroupName, EventFunction, EventClass, EventID) +

Set a new listener for an SEVENTX event for a GROUP.

+
EVENT:OnEventForTemplate(EventTemplate, EventFunction, EventClass, OnEventFunction, EventID) +

Create an OnDead event handler for a group

+
EVENT:OnEventForUnit(UnitName, EventFunction, EventClass, EventID) +

Set a new listener for an SEVENTX event for a UNIT.

+
EVENT:OnEventGeneric(EventFunction, EventClass, EventID) +

Set a new listener for an SEVENTX event independent from a unit or a weapon.

+
EVENT:OnLandForTemplate(EventTemplate, EventFunction, EventClass) + +
EVENT:OnTakeOffForTemplate(EventTemplate, EventFunction, EventClass) + +
EVENT:Remove(EventClass, EventID) +

Removes a subscription

+
EVENT:RemoveAll(EventObject) +

Clears all event subscriptions for a Base#BASE derived object.

+
EVENT:Reset(EventClass, EventID, EventObject) +

Resets subscriptions

+
EVENT:onEvent(Event) + +
+ +

Type EVENT.Events

+ + + + + +
EVENT.Events.IniUnit + +
+ +

Type EVENTDATA

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EVENTDATA.Cargo + +
EVENTDATA.CargoName + +
EVENTDATA.IniCategory +

(UNIT) The category of the initiator.

+
EVENTDATA.IniCoalition +

(UNIT) The coalition of the initiator.

+
EVENTDATA.IniDCSGroup +

(UNIT) The initiating {DCSGroup#Group}.

+
EVENTDATA.IniDCSGroupName +

(UNIT) The initiating Group name.

+
EVENTDATA.IniDCSUnit +

(UNIT/STATIC) The initiating DCSUnit#Unit or DCSStaticObject#StaticObject.

+
EVENTDATA.IniDCSUnitName +

(UNIT/STATIC) The initiating Unit name.

+
EVENTDATA.IniGroup +

(UNIT) The initiating MOOSE wrapper Group#GROUP of the initiator Group object.

+
EVENTDATA.IniGroupName +

UNIT) The initiating GROUP name (same as IniDCSGroupName).

+
EVENTDATA.IniObjectCategory +

(UNIT/STATIC/SCENERY) The initiator object category ( Object.Category.UNIT or Object.Category.STATIC ).

+
EVENTDATA.IniPlayerName +

(UNIT) The name of the initiating player in case the Unit is a client or player slot.

+
EVENTDATA.IniTypeName +

(UNIT) The type name of the initiator.

+ +
EVENTDATA.IniUnit +

(UNIT/STATIC) The initiating MOOSE wrapper Unit#UNIT of the initiator Unit object.

+
EVENTDATA.IniUnitName +

(UNIT/STATIC) The initiating UNIT name (same as IniDCSUnitName).

+
EVENTDATA.TgtCategory +

(UNIT) The category of the target.

+
EVENTDATA.TgtCoalition +

(UNIT) The coalition of the target.

+
EVENTDATA.TgtDCSGroup +

(UNIT) The target {DCSGroup#Group}.

+
EVENTDATA.TgtDCSGroupName +

(UNIT) The target Group name.

+
EVENTDATA.TgtDCSUnit +

(UNIT/STATIC) The target DCSUnit#Unit or DCSStaticObject#StaticObject.

+
EVENTDATA.TgtDCSUnitName +

(UNIT/STATIC) The target Unit name.

+
EVENTDATA.TgtGroup +

(UNIT) The target MOOSE wrapper Group#GROUP of the target Group object.

+
EVENTDATA.TgtGroupName +

(UNIT) The target GROUP name (same as TgtDCSGroupName).

+
EVENTDATA.TgtObjectCategory +

(UNIT/STATIC) The target object category ( Object.Category.UNIT or Object.Category.STATIC ).

+
EVENTDATA.TgtPlayerName +

(UNIT) The name of the target player in case the Unit is a client or player slot.

+
EVENTDATA.TgtTypeName +

(UNIT) The type name of the target.

+ +
EVENTDATA.TgtUnit +

(UNIT/STATIC) The target MOOSE wrapper Unit#UNIT of the target Unit object.

+
EVENTDATA.TgtUnitName +

(UNIT/STATIC) The target UNIT name (same as TgtDCSUnitName).

+
EVENTDATA.Weapon + +
EVENTDATA.WeaponCategory + +
EVENTDATA.WeaponCoalition + +
EVENTDATA.WeaponName + +
EVENTDATA.WeaponPlayerName + +
EVENTDATA.WeaponTgtDCSUnit + +
EVENTDATA.WeaponTypeName + +
EVENTDATA.WeaponUNIT + +
EVENTDATA.id +

The identifier of the event.

+ +
EVENTDATA.initiator +

(UNIT/STATIC/SCENERY) The initiating Dcs.DCSUnit#Unit or Dcs.DCSStaticObject#StaticObject.

+
EVENTDATA.target +

(UNIT/STATIC) The target Dcs.DCSUnit#Unit or DCSStaticObject#StaticObject.

+
EVENTDATA.weapon +

The weapon used during the event.

+
+ +

Type EVENTHANDLER

+ + + + + + + + + + + + + +
EVENTHANDLER.ClassID + +
EVENTHANDLER.ClassName + +
EVENTHANDLER:New() +

The EVENTHANDLER constructor

+
+ +

Type EVENTS

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EVENTS.BaseCaptured + +
EVENTS.Birth + +
EVENTS.Crash + +
EVENTS.Dead + +
EVENTS.DeleteCargo + +
EVENTS.Ejection + +
EVENTS.EngineShutdown + +
EVENTS.EngineStartup + +
EVENTS.Hit + +
EVENTS.HumanFailure + +
EVENTS.Land + +
EVENTS.MissionEnd + +
EVENTS.MissionStart + +
EVENTS.NewCargo + +
EVENTS.PilotDead + +
EVENTS.PlayerComment + +
EVENTS.PlayerEnterUnit + +
EVENTS.PlayerLeaveUnit + +
EVENTS.Refueling + +
EVENTS.RefuelingStop + +
EVENTS.ShootingEnd + +
EVENTS.ShootingStart + +
EVENTS.Shot + +
EVENTS.Takeoff + +
EVENTS.TookControl + +
+ +

Global(s)

+
+
+ + #EVENT + +EVENT + +
+
+ + + +
+
+
+
+ + #EVENTHANDLER + +EVENTHANDLER + +
+
+ + + +
+
+
+
+ + #EVENTS + +EVENTS + +
+
+ + + +
+
+

Type Event

+ +

Type EVENT

+ +

The EVENT structure

+ +

Field(s)

+
+
+ + #number + +EVENT.ClassID + +
+
+ + + +
+
+
+
+ + #string + +EVENT.ClassName + +
+
+ + + +
+
+
+
+ + +EVENT:CreateEventDeleteCargo(Cargo) + +
+
+ +

Creation of a Cargo Deletion Event.

+ +

Parameter

+ +
+
+
+
+ + +EVENT:CreateEventNewCargo(Cargo) + +
+
+ +

Creation of a New Cargo Event.

+ +

Parameter

+ +
+
+
+
+ + #EVENT.Events + +EVENT.Events + +
+
+ + + +
+
+
+
+ + +EVENT.EventsDead + +
+
+ + + +
+
+
+
+ + +EVENT:Init(EventID, EventClass) + +
+
+ +

Initializes the Events structure for the event

+ +

Parameters

+ +

Return value

+ +

#EVENT.Events:

+ + +
+
+
+
+ + +EVENT:New() + +
+
+ + + +
+
+
+
+ + +EVENT:OnBirthForTemplate(EventGroup, EventFunction, EventClass, EventTemplate) + +
+
+ +

Create an OnBirth event handler for a group

+ +

Parameters

+
    +
  • + +

    Wrapper.Group#GROUP EventGroup :

    + +
  • +
  • + +

    #function EventFunction : +The function to be called when the event occurs for the unit.

    + +
  • +
  • + +

    EventClass : +The self instance of the class for which the event is.

    + +
  • +
  • + +

    EventTemplate :

    + +
  • +
+

Return value

+ +

#EVENT:

+ + +
+
+
+
+ + +EVENT:OnCrashForTemplate(EventGroup, EventFunction, EventClass, EventTemplate) + +
+
+ +

Create an OnCrash event handler for a group

+ +

Parameters

+
    +
  • + +

    Wrapper.Group#GROUP EventGroup :

    + +
  • +
  • + +

    #function EventFunction : +The function to be called when the event occurs for the unit.

    + +
  • +
  • + +

    EventClass : +The self instance of the class for which the event is.

    + +
  • +
  • + +

    EventTemplate :

    + +
  • +
+

Return value

+ +

#EVENT:

+ + +
+
+
+
+ + +EVENT:OnDeadForTemplate(EventGroup, EventFunction, EventClass, EventTemplate) + +
+
+ +

Create an OnDead event handler for a group

+ +

Parameters

+
    +
  • + +

    Wrapper.Group#GROUP EventGroup :

    + +
  • +
  • + +

    #function EventFunction : +The function to be called when the event occurs for the unit.

    + +
  • +
  • + +

    EventClass : +The self instance of the class for which the event is.

    + +
  • +
  • + +

    EventTemplate :

    + +
  • +
+

Return value

+ +

#EVENT:

+ + +
+
+
+
+ + +EVENT:OnEngineShutDownForTemplate(EventTemplate, EventFunction, EventClass) + +
+
+ +

Create an OnDead event handler for a group

+ +

Parameters

+
    +
  • + +

    #table EventTemplate :

    + +
  • +
  • + +

    #function EventFunction : +The function to be called when the event occurs for the unit.

    + +
  • +
  • + +

    EventClass : +The self instance of the class for which the event is.

    + +
  • +
+

Return value

+ +

#EVENT:

+ + +
+
+
+
+ + +EVENT:OnEventForGroup(GroupName, EventFunction, EventClass, EventID) + +
+
+ +

Set a new listener for an SEVENTX event for a GROUP.

+ +

Parameters

+
    +
  • + +

    #string GroupName : +The name of the GROUP.

    + +
  • +
  • + +

    #function EventFunction : +The function to be called when the event occurs for the GROUP.

    + +
  • +
  • + +

    Core.Base#BASE EventClass : +The self instance of the class for which the event is.

    + +
  • +
  • + +

    EventID :

    + +
  • +
+

Return value

+ +

#EVENT:

+ + +
+
+
+
+ + +EVENT:OnEventForTemplate(EventTemplate, EventFunction, EventClass, OnEventFunction, EventID) + +
+
+ +

Create an OnDead event handler for a group

+ +

Parameters

+
    +
  • + +

    #table EventTemplate :

    + +
  • +
  • + +

    #function EventFunction : +The function to be called when the event occurs for the unit.

    + +
  • +
  • + +

    EventClass : +The instance of the class for which the event is.

    + +
  • +
  • + +

    #function OnEventFunction :

    + +
  • +
  • + +

    EventID :

    + +
  • +
+

Return value

+ +

#EVENT:

+ + +
+
+
+
+ + +EVENT:OnEventForUnit(UnitName, EventFunction, EventClass, EventID) + +
+
+ +

Set a new listener for an SEVENTX event for a UNIT.

+ +

Parameters

+
    +
  • + +

    #string UnitName : +The name of the UNIT.

    + +
  • +
  • + +

    #function EventFunction : +The function to be called when the event occurs for the GROUP.

    + +
  • +
  • + +

    Core.Base#BASE EventClass : +The self instance of the class for which the event is.

    + +
  • +
  • + +

    EventID :

    + +
  • +
+

Return value

+ +

#EVENT:

+ + +
+
+
+
+ + +EVENT:OnEventGeneric(EventFunction, EventClass, EventID) + +
+
+ +

Set a new listener for an SEVENTX event independent from a unit or a weapon.

+ +

Parameters

+
    +
  • + +

    #function EventFunction : +The function to be called when the event occurs for the unit.

    + +
  • +
  • + +

    Core.Base#BASE EventClass : +The self instance of the class for which the event is captured. When the event happens, the event process will be called in this class provided.

    + +
  • +
  • + +

    EventID :

    + +
  • +
+

Return value

+ +

#EVENT:

+ + +
+
+
+
+ + +EVENT:OnLandForTemplate(EventTemplate, EventFunction, EventClass) + +
+
+ + + +

Parameters

+
    +
  • + +

    EventTemplate :

    + +
  • +
  • + +

    EventFunction :

    + +
  • +
  • + +

    EventClass :

    + +
  • +
+
+
+
+
+ + +EVENT:OnTakeOffForTemplate(EventTemplate, EventFunction, EventClass) + +
+
+ + + +

Parameters

+
    +
  • + +

    EventTemplate :

    + +
  • +
  • + +

    EventFunction :

    + +
  • +
  • + +

    EventClass :

    + +
  • +
+
+
+
+
+ + +EVENT:Remove(EventClass, EventID) + +
+
+ +

Removes a subscription

+ +

Parameters

+ +

Return value

+ +

#EVENT.Events:

+ + +
+
+
+
+ + +EVENT:RemoveAll(EventObject) + +
+
+ +

Clears all event subscriptions for a Base#BASE derived object.

+ +

Parameter

+ +
+
+
+
+ + +EVENT:Reset(EventClass, EventID, EventObject) + +
+
+ +

Resets subscriptions

+ +

Parameters

+ +

Return value

+ +

#EVENT.Events:

+ + +
+
+
+
+ + +EVENT:onEvent(Event) + +
+
+ + + +

Parameter

+ +
+
+ +

Type EVENT.Events

+ +

The Events structure

+ +

Field(s)

+
+
+ + #number + +EVENT.Events.IniUnit + +
+
+ + + +
+
+ +

Type EVENTDATA

+ +

The Event structure +Note that at the beginning of each field description, there is an indication which field will be populated depending on the object type involved in the Event:

+ +
    +
  • A (Object.Category.)UNIT : A UNIT object type is involved in the Event.
  • +
+ + +
    +
  • A (Object.Category.)STATIC : A STATIC object type is involved in the Event.µ +
  • +
+ +

Field(s)

+
+
+ + + +EVENTDATA.Cargo + +
+
+ + + +
+
+
+
+ + + +EVENTDATA.CargoName + +
+
+ + + +
+
+
+
+ + Dcs.DCSUnit#Unit.Category + +EVENTDATA.IniCategory + +
+
+ +

(UNIT) The category of the initiator.

+ +
+
+
+
+ + Dcs.DCScoalition#coalition.side + +EVENTDATA.IniCoalition + +
+
+ +

(UNIT) The coalition of the initiator.

+ +
+
+
+
+ + Dcs.DCSGroup#Group + +EVENTDATA.IniDCSGroup + +
+
+ +

(UNIT) The initiating {DCSGroup#Group}.

+ +
+
+
+
+ + #string + +EVENTDATA.IniDCSGroupName + +
+
+ +

(UNIT) The initiating Group name.

+ +
+
+
+
+ + Dcs.DCSUnit#Unit + +EVENTDATA.IniDCSUnit + +
+
+ +

(UNIT/STATIC) The initiating DCSUnit#Unit or DCSStaticObject#StaticObject.

+ +
+
+
+
+ + #string + +EVENTDATA.IniDCSUnitName + +
+
+ +

(UNIT/STATIC) The initiating Unit name.

+ +
+
+
+
+ + Wrapper.Group#GROUP + +EVENTDATA.IniGroup + +
+
+ +

(UNIT) The initiating MOOSE wrapper Group#GROUP of the initiator Group object.

+ +
+
+
+
+ + #string + +EVENTDATA.IniGroupName + +
+
+ +

UNIT) The initiating GROUP name (same as IniDCSGroupName).

+ +
+
+
+
+ + Dcs.DCSObject#Object.Category + +EVENTDATA.IniObjectCategory + +
+
+ +

(UNIT/STATIC/SCENERY) The initiator object category ( Object.Category.UNIT or Object.Category.STATIC ).

+ +
+
+
+
+ + #string + +EVENTDATA.IniPlayerName + +
+
+ +

(UNIT) The name of the initiating player in case the Unit is a client or player slot.

+ +
+
+
+
+ + #string + +EVENTDATA.IniTypeName + +
+
+ +

(UNIT) The type name of the initiator.

+ + +
+
+
+
+ + Wrapper.Unit#UNIT + +EVENTDATA.IniUnit + +
+
+ +

(UNIT/STATIC) The initiating MOOSE wrapper Unit#UNIT of the initiator Unit object.

+ +
+
+
+
+ + #string + +EVENTDATA.IniUnitName + +
+
+ +

(UNIT/STATIC) The initiating UNIT name (same as IniDCSUnitName).

+ +
+
+
+
+ + Dcs.DCSUnit#Unit.Category + +EVENTDATA.TgtCategory + +
+
+ +

(UNIT) The category of the target.

+ +
+
+
+
+ + Dcs.DCScoalition#coalition.side + +EVENTDATA.TgtCoalition + +
+
+ +

(UNIT) The coalition of the target.

+ +
+
+
+
+ + Dcs.DCSGroup#Group + +EVENTDATA.TgtDCSGroup + +
+
+ +

(UNIT) The target {DCSGroup#Group}.

+ +
+
+
+
+ + #string + +EVENTDATA.TgtDCSGroupName + +
+
+ +

(UNIT) The target Group name.

+ +
+
+
+
+ + Dcs.DCSUnit#Unit + +EVENTDATA.TgtDCSUnit + +
+
+ +

(UNIT/STATIC) The target DCSUnit#Unit or DCSStaticObject#StaticObject.

+ +
+
+
+
+ + #string + +EVENTDATA.TgtDCSUnitName + +
+
+ +

(UNIT/STATIC) The target Unit name.

+ +
+
+
+
+ + Wrapper.Group#GROUP + +EVENTDATA.TgtGroup + +
+
+ +

(UNIT) The target MOOSE wrapper Group#GROUP of the target Group object.

+ +
+
+
+
+ + #string + +EVENTDATA.TgtGroupName + +
+
+ +

(UNIT) The target GROUP name (same as TgtDCSGroupName).

+ +
+
+
+
+ + Dcs.DCSObject#Object.Category + +EVENTDATA.TgtObjectCategory + +
+
+ +

(UNIT/STATIC) The target object category ( Object.Category.UNIT or Object.Category.STATIC ).

+ +
+
+
+
+ + #string + +EVENTDATA.TgtPlayerName + +
+
+ +

(UNIT) The name of the target player in case the Unit is a client or player slot.

+ +
+
+
+
+ + #string + +EVENTDATA.TgtTypeName + +
+
+ +

(UNIT) The type name of the target.

+ + +
+
+
+
+ + Wrapper.Unit#UNIT + +EVENTDATA.TgtUnit + +
+
+ +

(UNIT/STATIC) The target MOOSE wrapper Unit#UNIT of the target Unit object.

+ +
+
+
+
+ + #string + +EVENTDATA.TgtUnitName + +
+
+ +

(UNIT/STATIC) The target UNIT name (same as TgtDCSUnitName).

+ +
+
+
+
+ + +EVENTDATA.Weapon + +
+
+ + + +
+
+
+
+ + +EVENTDATA.WeaponCategory + +
+
+ + + +
+
+
+
+ + +EVENTDATA.WeaponCoalition + +
+
+ + + +
+
+
+
+ + +EVENTDATA.WeaponName + +
+
+ + + +
+
+
+
+ + +EVENTDATA.WeaponPlayerName + +
+
+ + + +
+
+
+
+ + +EVENTDATA.WeaponTgtDCSUnit + +
+
+ + + +
+
+
+
+ + +EVENTDATA.WeaponTypeName + +
+
+ + + +
+
+
+
+ + + +EVENTDATA.WeaponUNIT + +
+
+ + + + +

Sometimes, the weapon is a player unit!

+ +
+
+
+
+ + #number + +EVENTDATA.id + +
+
+ +

The identifier of the event.

+ + +
+
+
+
+ + Dcs.DCSUnit#Unit + +EVENTDATA.initiator + +
+
+ +

(UNIT/STATIC/SCENERY) The initiating Dcs.DCSUnit#Unit or Dcs.DCSStaticObject#StaticObject.

+ +
+
+
+
+ + Dcs.DCSUnit#Unit + +EVENTDATA.target + +
+
+ +

(UNIT/STATIC) The target Dcs.DCSUnit#Unit or DCSStaticObject#StaticObject.

+ +
+
+
+
+ + +EVENTDATA.weapon + +
+
+ +

The weapon used during the event.

+ +
+
+ +

Type EVENTHANDLER

+ +

The EVENTHANDLER structure

+ +

Field(s)

+
+
+ + #number + +EVENTHANDLER.ClassID + +
+
+ + + +
+
+
+
+ + #string + +EVENTHANDLER.ClassName + +
+
+ + + +
+
+
+
+ + +EVENTHANDLER:New() + +
+
+ +

The EVENTHANDLER constructor

+ +

Return value

+ +

#EVENTHANDLER:

+ + +
+
+ +

Type EVENTS

+ +

The different types of events supported by MOOSE.

+ + +

Use this structure to subscribe to events using the Base#BASE.HandleEvent() method.

+ +

Field(s)

+
+
+ + + +EVENTS.BaseCaptured + +
+
+ + + +
+
+
+
+ + + +EVENTS.Birth + +
+
+ + + +
+
+
+
+ + + +EVENTS.Crash + +
+
+ + + +
+
+
+
+ + + +EVENTS.Dead + +
+
+ + + +
+
+
+
+ + + +EVENTS.DeleteCargo + +
+
+ + + +
+
+
+
+ + + +EVENTS.Ejection + +
+
+ + + +
+
+
+
+ + + +EVENTS.EngineShutdown + +
+
+ + + +
+
+
+
+ + + +EVENTS.EngineStartup + +
+
+ + + +
+
+
+
+ + + +EVENTS.Hit + +
+
+ + + +
+
+
+
+ + + +EVENTS.HumanFailure + +
+
+ + + +
+
+
+
+ + + +EVENTS.Land + +
+
+ + + +
+
+
+
+ + + +EVENTS.MissionEnd + +
+
+ + + +
+
+
+
+ + + +EVENTS.MissionStart + +
+
+ + + +
+
+
+
+ + + +EVENTS.NewCargo + +
+
+ + + +
+
+
+
+ + + +EVENTS.PilotDead + +
+
+ + + +
+
+
+
+ + + +EVENTS.PlayerComment + +
+
+ + + +
+
+
+
+ + + +EVENTS.PlayerEnterUnit + +
+
+ + + +
+
+
+
+ + + +EVENTS.PlayerLeaveUnit + +
+
+ + + +
+
+
+
+ + + +EVENTS.Refueling + +
+
+ + + +
+
+
+
+ + + +EVENTS.RefuelingStop + +
+
+ + + +
+
+
+
+ + + +EVENTS.ShootingEnd + +
+
+ + + +
+
+
+
+ + + +EVENTS.ShootingStart + +
+
+ + + +
+
+
+
+ + + +EVENTS.Shot + +
+
+ + + +
+
+
+
+ + + +EVENTS.Takeoff + +
+
+ + + +
+
+
+
+ + + +EVENTS.TookControl + +
+
+ + + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Fsm.html b/docs/Documentation/Fsm.html new file mode 100644 index 000000000..47a295893 --- /dev/null +++ b/docs/Documentation/Fsm.html @@ -0,0 +1,2875 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Fsm

+ +

Core - The FSM (Finite State Machine) class and derived FSM_ classes +are design patterns allowing efficient (long-lasting) processes and workflows.

+ + + +

Banner Image

+ +
+ +

A FSM can only be in one of a finite number of states. +The machine is in only one state at a time; the state it is in at any given time is called the current state. +It can change from one state to another when initiated by an internal or external triggering event, which is called a transition. +An FSM implementation is defined by a list of its states, its initial state, and the triggering events for each possible transition. +An FSM implementation is composed out of two parts, a set of state transition rules, and an implementation set of state transition handlers, implementing those transitions.

+ +

The FSM class supports a hierarchical implementation of a Finite State Machine, +that is, it allows to embed existing FSM implementations in a master FSM. +FSM hierarchies allow for efficient FSM re-use, not having to re-invent the wheel every time again when designing complex processes.

+ +

Workflow Example

+ +

The above diagram shows a graphical representation of a FSM implementation for a Task, which guides a Human towards a Zone, +orders him to destroy x targets and account the results. +Other examples of ready made FSM could be:

+ +
    +
  • route a plane to a zone flown by a human
  • +
  • detect targets by an AI and report to humans
  • +
  • account for destroyed targets by human players
  • +
  • handle AI infantry to deploy from or embark to a helicopter or airplane or vehicle
  • +
  • let an AI patrol a zone
  • +
+ +

The MOOSE framework uses extensively the FSM class and derived FSM_ classes, +because the goal of MOOSE is to simplify mission design complexity for mission building. +By efficiently utilizing the FSM class and derived classes, MOOSE allows mission designers to quickly build processes. +Ready made FSM-based implementations classes exist within the MOOSE framework that can easily be re-used, +and tailored by mission designers through the implementation of Transition Handlers. +Each of these FSM implementation classes start either with:

+ +
    +
  • an acronym AI_, which indicates an FSM implementation directing AI controlled GROUP and/or UNIT. These AI_ classes derive the #FSM_CONTROLLABLE class.
  • +
  • an acronym TASK_, which indicates an FSM implementation executing a TASK executed by Groups of players. These TASK_ classes derive the #FSM_TASK class.
  • +
  • an acronym ACT_, which indicates an Sub-FSM implementation, directing Humans actions that need to be done in a TASK, seated in a CLIENT (slot) or a UNIT (CA join). These ACT_ classes derive the #FSM_PROCESS class.
  • +
+ +

Detailed explanations and API specifics are further below clarified and FSM derived class specifics are described in those class documentation sections.

+ +

Dislaimer:

+

The FSM class development is based on a finite state machine implementation made by Conroy Kyle. +The state machine can be found on github +I've reworked this development (taken the concept), and created a hierarchical state machine out of it, embedded within the DCS simulator. +Additionally, I've added extendability and created an API that allows seamless FSM implementation.

+ +

The following derived classes are available in the MOOSE framework, that implement a specialised form of a FSM:

+ + + +
+ +

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

YYYY-MM-DD: CLASS:NewFunction( Params ) replaces CLASS:OldFunction( Params ) +YYYY-MM-DD: CLASS:NewFunction( Params ) added

+ +

Hereby the change log:

+ +
    +
  • 2016-12-18: Released.
  • +
+ +
+ +

AUTHORS and CONTRIBUTIONS

+ +

Contributions:

+ +
    +
  • Pikey: Review of documentation & advice for improvements.
  • +
+ +

Authors:

+ + + + +

Global(s)

+ + + + + + + + + + + + + + + + + + + + + +
FSM +

1) FSM class, extends Base#BASE

+ +

Transition Rules and Transition Handlers and Event Triggers

+ +

The FSM class is the base class of all FSM_ derived classes.

+
FSM_CONTROLLABLE +

FSM_CONTROLLABLE, extends #FSM

+ +

FSM_CONTROLLABLE class models Finite State Machines for Controllables, which are Groups, Units, Clients.

+
FSM_PROCESS +

FSM_PROCESS, extends #FSM

+ +

FSM_PROCESS class models Finite State Machines for Task actions, which control Clients.

+
FSM_SET +

FSM_SET, extends #FSM

+ +

FSM_SET class models Finite State Machines for Sets.

+
FSM_TASK +

FSM_TASK, extends #FSM

+ +

FSM_TASK class models Finite State Machines for Tasks.

+
+

Type FSM

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FSM:AddEndState(State) +

Adds an End state.

+
FSM:AddProcess(From, Event, Process, ReturnEvents) +

Set the default Process template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Controllable by the task.

+
FSM:AddScore(State, ScoreText, Score) +

Adds a score for the FSM to be achieved.

+
FSM:AddScoreProcess(From, Event, State, ScoreText, Score) +

Adds a score for the FSM_PROCESS to be achieved.

+
FSM:AddTransition(From, Event, To) +

Add a new transition rule to the FSM.

+
FSM.CallScheduler + +
FSM.Events + +
FSM:GetEndStates() +

Returns the End states.

+
FSM:GetProcess(From, Event) + +
FSM:GetProcesses() +

Returns a table of the SubFSM rules defined within the FSM.

+
FSM:GetScores() +

Returns a table with the scores defined.

+
FSM:GetStartState() +

Returns the start state of the FSM.

+
FSM:GetState() + +
FSM:GetSubs() +

Returns a table with the Subs defined.

+
FSM:GetTransitions() +

Returns a table of the transition rules defined within the FSM.

+
FSM:Is(State) + +
FSM:LoadCallBacks(CallBackTable) + +
FSM:New(FsmT) +

Creates a new FSM object.

+
FSM.Scores + +
FSM:SetStartState(State) +

Sets the start state of the FSM.

+
FSM._EndStates + +
FSM._EventSchedules + +
FSM._Processes + +
FSM._Scores + +
FSM._StartState + +
FSM._Transitions + +
FSM:_add_to_map(Map, Event) + +
FSM:_call_handler(handler, params, EventName) + +
FSM:_create_transition(EventName) + +
FSM:_delayed_transition(EventName) + +
FSM:_eventmap(Events, EventStructure) + +
FSM:_gosub(ParentFrom, ParentEvent) + +
FSM:_handler(EventName, ...) + +
FSM:_isendstate(Current) + +
FSM:_submap(subs, sub, name) + +
FSM:can(e) + +
FSM:cannot(e) + +
FSM.current + +
FSM.endstates + +
FSM:is(state) + +
FSM.options + +
FSM.subs + +
+ +

Type FSM_CONTROLLABLE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FSM_CONTROLLABLE.Controllable + +
FSM_CONTROLLABLE:GetControllable() +

Gets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

+
FSM_CONTROLLABLE:New(FSMT, Controllable) +

Creates a new FSM_CONTROLLABLE object.

+
FSM_CONTROLLABLE:OnAfterStop(Controllable, From, Event, To) +

OnAfter Transition Handler for Event Stop.

+
FSM_CONTROLLABLE:OnBeforeStop(Controllable, From, Event, To) +

OnBefore Transition Handler for Event Stop.

+
FSM_CONTROLLABLE:OnEnterStopped(Controllable, From, Event, To) +

OnEnter Transition Handler for State Stopped.

+
FSM_CONTROLLABLE:OnLeaveStopped(Controllable, From, Event, To) +

OnLeave Transition Handler for State Stopped.

+
FSM_CONTROLLABLE:SetControllable(FSMControllable) +

Sets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

+
FSM_CONTROLLABLE:Stop() +

Synchronous Event Trigger for Event Stop.

+
FSM_CONTROLLABLE:__Stop(Delay) +

Asynchronous Event Trigger for Event Stop.

+
FSM_CONTROLLABLE:_call_handler(handler, params, EventName) + +
+ +

Type FSM_PROCESS

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FSM_PROCESS:Assign(Task, ProcessUnit) +

Assign the process to a Unit and activate the process.

+
FSM_PROCESS:Copy(Controllable, Task) +

Creates a new FSMPROCESS object based on this FSMPROCESS.

+
FSM_PROCESS:GetCommandCenter() +

Gets the mission of the process.

+
FSM_PROCESS:GetMission() +

Gets the mission of the process.

+
FSM_PROCESS:GetTask() +

Gets the task of the process.

+
FSM_PROCESS:Init(FsmProcess) + +
FSM_PROCESS:Message(Message) +

Send a message of the Task to the Group of the Unit.

+
FSM_PROCESS:New(Controllable, Task) +

Creates a new FSM_PROCESS object.

+
FSM_PROCESS:Remove() +

Removes an FSM_PROCESS object.

+
FSM_PROCESS:SetTask(Task) +

Sets the task of the process.

+
FSM_PROCESS.Task + +
FSM_PROCESS:_call_handler(handler, params, EventName) + +
FSM_PROCESS:onenterAssigned(ProcessUnit) + +
FSM_PROCESS:onenterFailed(ProcessUnit) + +
FSM_PROCESS:onenterSuccess(ProcessUnit) + +
FSM_PROCESS:onstatechange(ProcessUnit, Event, From, To, Task, Dummy) +

StateMachine callback function for a FSM_PROCESS

+
+ +

Type FSM_SET

+ + + + + + + + + + + + + + + + + +
FSM_SET:Get() +

Gets the SETBASE object that the FSMSET governs.

+
FSM_SET:New(FSMT, Set_SET_BASE, FSMSet) +

Creates a new FSM_SET object.

+
FSM_SET.Set + +
FSM_SET:_call_handler(handler, params, EventName) + +
+ +

Type FSM_TASK

+ + + + + + + + + + + + + +
FSM_TASK:New(FSMT, Task, TaskUnit) +

Creates a new FSM_TASK object.

+
FSM_TASK.Task + +
FSM_TASK:_call_handler(handler, params, EventName) + +
+ +

Global(s)

+
+
+ + #FSM + +FSM + +
+
+ +

1) FSM class, extends Base#BASE

+ +

Transition Rules and Transition Handlers and Event Triggers

+ +

The FSM class is the base class of all FSM_ derived classes.

+ + +

It implements the main functionality to define and execute Finite State Machines. +The derived FSM_ classes extend the Finite State Machine functionality to run a workflow process for a specific purpose or component.

+ +

Finite State Machines have Transition Rules, Transition Handlers and Event Triggers.

+ +

The Transition Rules define the "Process Flow Boundaries", that is, +the path that can be followed hopping from state to state upon triggered events. +If an event is triggered, and there is no valid path found for that event, +an error will be raised and the FSM will stop functioning.

+ +

The Transition Handlers are special methods that can be defined by the mission designer, following a defined syntax. +If the FSM object finds a method of such a handler, then the method will be called by the FSM, passing specific parameters. +The method can then define its own custom logic to implement the FSM workflow, and to conduct other actions.

+ +

The Event Triggers are methods that are defined by the FSM, which the mission designer can use to implement the workflow. +Most of the time, these Event Triggers are used within the Transition Handler methods, so that a workflow is created running through the state machine.

+ +

As explained above, a FSM supports Linear State Transitions and Hierarchical State Transitions, and both can be mixed to make a comprehensive FSM implementation. +The below documentation has a seperate chapter explaining both transition modes, taking into account the Transition Rules, Transition Handlers and Event Triggers.

+ +

1.1) FSM Linear Transitions

+ +

Linear Transitions are Transition Rules allowing an FSM to transition from one or multiple possible From state(s) towards a To state upon a Triggered Event. +The Lineair transition rule evaluation will always be done from the current state of the FSM. +If no valid Transition Rule can be found in the FSM, the FSM will log an error and stop.

+ +

1.1.1) FSM Transition Rules

+ +

The FSM has transition rules that it follows and validates, as it walks the process. +These rules define when an FSM can transition from a specific state towards an other specific state upon a triggered event.

+ +

The method FSM.AddTransition() specifies a new possible Transition Rule for the FSM.

+ +

The initial state can be defined using the method FSM.SetStartState(). The default start state of an FSM is "None".

+ +

Find below an example of a Linear Transition Rule definition for an FSM.

+ +
 local Fsm3Switch = FSM:New() -- #FsmDemo
+ FsmSwitch:SetStartState( "Off" )
+ FsmSwitch:AddTransition( "Off", "SwitchOn", "On" )
+ FsmSwitch:AddTransition( "Off", "SwitchMiddle", "Middle" )
+ FsmSwitch:AddTransition( "On", "SwitchOff", "Off" )
+ FsmSwitch:AddTransition( "Middle", "SwitchOff", "Off" )
+
+ +

The above code snippet models a 3-way switch Linear Transition:

+ +
    +
  • It can be switched On by triggering event SwitchOn.
  • +
  • It can be switched to the Middle position, by triggering event SwitchMiddle.
  • +
  • It can be switched Off by triggering event SwitchOff.
  • +
  • Note that once the Switch is On or Middle, it can only be switched Off.
  • +
+ +

Some additional comments:

+ +

Note that Linear Transition Rules can be declared in a few variations:

+ +
    +
  • The From states can be a table of strings, indicating that the transition rule will be valid if the current state of the FSM will be one of the given From states.
  • +
  • The From state can be a "*", indicating that the transition rule will always be valid, regardless of the current state of the FSM.
  • +
+ +

The below code snippet shows how the two last lines can be rewritten and consensed.

+ +
 FsmSwitch:AddTransition( { "On",  "Middle" }, "SwitchOff", "Off" )
+
+ +

1.1.2) Transition Handling

+ +

Transition Handlers

+ +

An FSM transitions in 4 moments when an Event is being triggered and processed.
+The mission designer can define for each moment specific logic within methods implementations following a defined API syntax.
+These methods define the flow of the FSM process; because in those methods the FSM Internal Events will be triggered.

+ +
    +
  • To handle State transition moments, create methods starting with OnLeave or OnEnter concatenated with the State name.
  • +
  • To handle Event transition moments, create methods starting with OnBefore or OnAfter concatenated with the Event name.
  • +
+ +

The OnLeave and OnBefore transition methods may return false, which will cancel the transition!

+ +

Transition Handler methods need to follow the above specified naming convention, but are also passed parameters from the FSM. +These parameters are on the correct order: From, Event, To:

+ +
    +
  • From = A string containing the From state.
  • +
  • Event = A string containing the Event name that was triggered.
  • +
  • To = A string containing the To state.
  • +
+ +

On top, each of these methods can have a variable amount of parameters passed. See the example in section 1.1.3.

+ +

1.1.3) Event Triggers

+ +

Event Triggers

+ +

The FSM creates for each Event two Event Trigger methods.
+There are two modes how Events can be triggered, which is synchronous and asynchronous:

+ +
    +
  • The method FSM:Event() triggers an Event that will be processed synchronously or immediately.
  • +
  • The method FSM:Event( __seconds ) triggers an Event that will be processed asynchronously over time, waiting x seconds.
  • +
+ +

The destinction between these 2 Event Trigger methods are important to understand. An asynchronous call will "log" the Event Trigger to be executed at a later time. +Processing will just continue. Synchronous Event Trigger methods are useful to change states of the FSM immediately, but may have a larger processing impact.

+ +

The following example provides a little demonstration on the difference between synchronous and asynchronous Event Triggering.

+ +
  function FSM:OnAfterEvent( From, Event, To, Amount )
+    self:T( { Amount = Amount } ) 
+  end
+
+  local Amount = 1
+  FSM:__Event( 5, Amount ) 
+
+  Amount = Amount + 1
+  FSM:Event( Text, Amount )
+
+ +

In this example, the :OnAfterEvent() Transition Handler implementation will get called when Event is being triggered. +Before we go into more detail, let's look at the last 4 lines of the example. +The last line triggers synchronously the Event, and passes Amount as a parameter. +The 3rd last line of the example triggers asynchronously Event. +Event will be processed after 5 seconds, and Amount is given as a parameter.

+ +

The output of this little code fragment will be:

+ +
    +
  • Amount = 2
  • +
  • Amount = 2
  • +
+ +

Because ... When Event was asynchronously processed after 5 seconds, Amount was set to 2. So be careful when processing and passing values and objects in asynchronous processing!

+ +

1.1.4) Linear Transition Example

+ +

This example is fully implemented in the MOOSE test mission on GITHUB: FSM-100 - Transition Explanation

+ +

It models a unit standing still near Batumi, and flaring every 5 seconds while switching between a Green flare and a Red flare. +The purpose of this example is not to show how exciting flaring is, but it demonstrates how a Linear Transition FSM can be build. +Have a look at the source code. The source code is also further explained below in this section.

+ +

The example creates a new FsmDemo object from class FSM. +It will set the start state of FsmDemo to state Green. +Two Linear Transition Rules are created, where upon the event Switch, +the FsmDemo will transition from state Green to Red and from Red back to Green.

+ +

Transition Example

+ +
 local FsmDemo = FSM:New() -- #FsmDemo
+ FsmDemo:SetStartState( "Green" )
+ FsmDemo:AddTransition( "Green", "Switch", "Red" )
+ FsmDemo:AddTransition( "Red", "Switch", "Green" )
+
+ +

In the above example, the FsmDemo could flare every 5 seconds a Green or a Red flare into the air. +The next code implements this through the event handling method OnAfterSwitch.

+ +

Transition Flow

+ +
 function FsmDemo:OnAfterSwitch( From, Event, To, FsmUnit )
+   self:T( { From, Event, To, FsmUnit } )
+
+   if From == "Green" then
+     FsmUnit:Flare(FLARECOLOR.Green)
+   else
+     if From == "Red" then
+       FsmUnit:Flare(FLARECOLOR.Red)
+     end
+   end
+   self:__Switch( 5, FsmUnit ) -- Trigger the next Switch event to happen in 5 seconds.
+ end
+
+ FsmDemo:__Switch( 5, FsmUnit ) -- Trigger the first Switch event to happen in 5 seconds.
+
+ +

The OnAfterSwitch implements a loop. The last line of the code fragment triggers the Switch Event within 5 seconds. +Upon the event execution (after 5 seconds), the OnAfterSwitch method is called of FsmDemo (cfr. the double point notation!!! ":"). +The OnAfterSwitch method receives from the FSM the 3 transition parameter details ( From, Event, To ), +and one additional parameter that was given when the event was triggered, which is in this case the Unit that is used within OnSwitchAfter.

+ +
 function FsmDemo:OnAfterSwitch( From, Event, To, FsmUnit )
+
+ +

For debugging reasons the received parameters are traced within the DCS.log.

+ +
    self:T( { From, Event, To, FsmUnit } )
+
+ +

The method will check if the From state received is either "Green" or "Red" and will flare the respective color from the FsmUnit.

+ +
   if From == "Green" then
+     FsmUnit:Flare(FLARECOLOR.Green)
+   else
+     if From == "Red" then
+       FsmUnit:Flare(FLARECOLOR.Red)
+     end
+   end
+
+ +

It is important that the Switch event is again triggered, otherwise, the FsmDemo would stop working after having the first Event being handled.

+ +
   FsmDemo:__Switch( 5, FsmUnit ) -- Trigger the next Switch event to happen in 5 seconds.
+
+ +

The below code fragment extends the FsmDemo, demonstrating multiple From states declared as a table, adding a Linear Transition Rule. +The new event Stop will cancel the Switching process. +The transition for event Stop can be executed if the current state of the FSM is either "Red" or "Green".

+ +
 local FsmDemo = FSM:New() -- #FsmDemo
+ FsmDemo:SetStartState( "Green" )
+ FsmDemo:AddTransition( "Green", "Switch", "Red" )
+ FsmDemo:AddTransition( "Red", "Switch", "Green" )
+ FsmDemo:AddTransition( { "Red", "Green" }, "Stop", "Stopped" )
+
+ +

The transition for event Stop can also be simplified, as any current state of the FSM is valid.

+ +
 FsmDemo:AddTransition( "*", "Stop", "Stopped" )
+
+ +

So... When FsmDemo:Stop() is being triggered, the state of FsmDemo will transition from Red or Green to Stopped. +And there is no transition handling method defined for that transition, thus, no new event is being triggered causing the FsmDemo process flow to halt.

+ +

1.5) FSM Hierarchical Transitions

+ +

Hierarchical Transitions allow to re-use readily available and implemented FSMs. +This becomes in very useful for mission building, where mission designers build complex processes and workflows, +combining smaller FSMs to one single FSM.

+ +

The FSM can embed Sub-FSMs that will execute and return multiple possible Return (End) States.
+Depending upon which state is returned, the main FSM can continue the flow triggering specific events.

+ +

The method FSM.AddProcess() adds a new Sub-FSM to the FSM.

+ +
+ + +
+
+
+
+ + #FSM_CONTROLLABLE + +FSM_CONTROLLABLE + +
+
+ +

FSM_CONTROLLABLE, extends #FSM

+ +

FSM_CONTROLLABLE class models Finite State Machines for Controllables, which are Groups, Units, Clients.

+ + + +
+ + +
+
+
+
+ + #FSM_PROCESS + +FSM_PROCESS + +
+
+ +

FSM_PROCESS, extends #FSM

+ +

FSM_PROCESS class models Finite State Machines for Task actions, which control Clients.

+ + + +
+ + +
+
+
+
+ + #FSM_SET + +FSM_SET + +
+
+ +

FSM_SET, extends #FSM

+ +

FSM_SET class models Finite State Machines for Sets.

+ + +

Note that these FSMs control multiple objects!!! So State concerns here +for multiple objects or the position of the state machine in the process.

+ +
+ + +
+
+
+
+ + #FSM_TASK + +FSM_TASK + +
+
+ +

FSM_TASK, extends #FSM

+ +

FSM_TASK class models Finite State Machines for Tasks.

+ + + +
+ + +
+
+

Type Fsm

+ +

Type FSM

+

Field(s)

+
+
+ + +FSM:AddEndState(State) + +
+
+ +

Adds an End state.

+ +

Parameter

+
    +
  • + +

    State :

    + +
  • +
+
+
+
+
+ + +FSM:AddProcess(From, Event, Process, ReturnEvents) + +
+
+ +

Set the default Process template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Controllable by the task.

+ +

Parameters

+
    +
  • + +

    #table From : +Can contain a string indicating the From state or a table of strings containing multiple From states.

    + +
  • +
  • + +

    #string Event : +The Event name.

    + +
  • +
  • + +

    Core.Fsm#FSM_PROCESS Process : +An sub-process FSM.

    + +
  • +
  • + +

    #table ReturnEvents : +A table indicating for which returned events of the SubFSM which Event must be triggered in the FSM.

    + +
  • +
+

Return value

+ +

Core.Fsm#FSM_PROCESS: +The SubFSM.

+ +
+
+
+
+ + +FSM:AddScore(State, ScoreText, Score) + +
+
+ +

Adds a score for the FSM to be achieved.

+ +

Parameters

+
    +
  • + +

    #string State : +is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

    + +
  • +
  • + +

    #string ScoreText : +is a text describing the score that is given according the status.

    + +
  • +
  • + +

    #number Score : +is a number providing the score of the status.

    + +
  • +
+

Return value

+ +

#FSM: +self

+ +
+
+
+
+ + +FSM:AddScoreProcess(From, Event, State, ScoreText, Score) + +
+
+ +

Adds a score for the FSM_PROCESS to be achieved.

+ +

Parameters

+
    +
  • + +

    #string From : +is the From State of the main process.

    + +
  • +
  • + +

    #string Event : +is the Event of the main process.

    + +
  • +
  • + +

    #string State : +is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

    + +
  • +
  • + +

    #string ScoreText : +is a text describing the score that is given according the status.

    + +
  • +
  • + +

    #number Score : +is a number providing the score of the status.

    + +
  • +
+

Return value

+ +

#FSM: +self

+ +
+
+
+
+ + +FSM:AddTransition(From, Event, To) + +
+
+ +

Add a new transition rule to the FSM.

+ + +

A transition rule defines when and if the FSM can transition from a state towards another state upon a triggered event.

+ +

Parameters

+
    +
  • + +

    #table From : +Can contain a string indicating the From state or a table of strings containing multiple From states.

    + +
  • +
  • + +

    #string Event : +The Event name.

    + +
  • +
  • + +

    #string To : +The To state.

    + +
  • +
+
+
+
+
+ + + +FSM.CallScheduler + +
+
+ + + +
+
+
+
+ + + +FSM.Events + +
+
+ + + +
+
+
+
+ + +FSM:GetEndStates() + +
+
+ +

Returns the End states.

+ +
+
+
+
+ + +FSM:GetProcess(From, Event) + +
+
+ + + +

Parameters

+
    +
  • + +

    From :

    + +
  • +
  • + +

    Event :

    + +
  • +
+
+
+
+
+ + +FSM:GetProcesses() + +
+
+ +

Returns a table of the SubFSM rules defined within the FSM.

+ +

Return value

+ +

#table:

+ + +
+
+
+
+ + +FSM:GetScores() + +
+
+ +

Returns a table with the scores defined.

+ +
+
+
+
+ + +FSM:GetStartState() + +
+
+ +

Returns the start state of the FSM.

+ +

Return value

+ +

#string: +A string containing the start state.

+ +
+
+
+
+ + +FSM:GetState() + +
+
+ + + +
+
+
+
+ + +FSM:GetSubs() + +
+
+ +

Returns a table with the Subs defined.

+ +
+
+
+
+ + +FSM:GetTransitions() + +
+
+ +

Returns a table of the transition rules defined within the FSM.

+ +

Return value

+ +

#table:

+ + +
+
+
+
+ + +FSM:Is(State) + +
+
+ + + +

Parameter

+
    +
  • + +

    State :

    + +
  • +
+
+
+
+
+ + +FSM:LoadCallBacks(CallBackTable) + +
+
+ + + +

Parameter

+
    +
  • + +

    CallBackTable :

    + +
  • +
+
+
+
+
+ + +FSM:New(FsmT) + +
+
+ +

Creates a new FSM object.

+ +

Parameter

+
    +
  • + +

    FsmT :

    + +
  • +
+

Return value

+ +

#FSM:

+ + +
+
+
+
+ + + +FSM.Scores + +
+
+ + + +
+
+
+
+ + +FSM:SetStartState(State) + +
+
+ +

Sets the start state of the FSM.

+ +

Parameter

+
    +
  • + +

    #string State : +A string defining the start state.

    + +
  • +
+
+
+
+
+ + + +FSM._EndStates + +
+
+ + + +
+
+
+
+ + + +FSM._EventSchedules + +
+
+ + + +
+
+
+
+ + + +FSM._Processes + +
+
+ + + +
+
+
+
+ + + +FSM._Scores + +
+
+ + + +
+
+
+
+ + #string + +FSM._StartState + +
+
+ + + +
+
+
+
+ + + +FSM._Transitions + +
+
+ + + +
+
+
+
+ + +FSM:_add_to_map(Map, Event) + +
+
+ + + +

Parameters

+
    +
  • + +

    Map :

    + +
  • +
  • + +

    Event :

    + +
  • +
+
+
+
+
+ + +FSM:_call_handler(handler, params, EventName) + +
+
+ + + +

Parameters

+
    +
  • + +

    handler :

    + +
  • +
  • + +

    params :

    + +
  • +
  • + +

    EventName :

    + +
  • +
+
+
+
+
+ + +FSM:_create_transition(EventName) + +
+
+ + + +

Parameter

+
    +
  • + +

    EventName :

    + +
  • +
+
+
+
+
+ + +FSM:_delayed_transition(EventName) + +
+
+ + + +

Parameter

+
    +
  • + +

    EventName :

    + +
  • +
+
+
+
+
+ + +FSM:_eventmap(Events, EventStructure) + +
+
+ + + +

Parameters

+
    +
  • + +

    Events :

    + +
  • +
  • + +

    EventStructure :

    + +
  • +
+
+
+
+
+ + +FSM:_gosub(ParentFrom, ParentEvent) + +
+
+ + + +

Parameters

+
    +
  • + +

    ParentFrom :

    + +
  • +
  • + +

    ParentEvent :

    + +
  • +
+
+
+
+
+ + +FSM:_handler(EventName, ...) + +
+
+ + + +

Parameters

+
    +
  • + +

    EventName :

    + +
  • +
  • + +

    ... :

    + +
  • +
+
+
+
+
+ + +FSM:_isendstate(Current) + +
+
+ + + +

Parameter

+
    +
  • + +

    Current :

    + +
  • +
+
+
+
+
+ + +FSM:_submap(subs, sub, name) + +
+
+ + + +

Parameters

+
    +
  • + +

    subs :

    + +
  • +
  • + +

    sub :

    + +
  • +
  • + +

    name :

    + +
  • +
+
+
+
+
+ + +FSM:can(e) + +
+
+ + + +

Parameter

+
    +
  • + +

    e :

    + +
  • +
+
+
+
+
+ + +FSM:cannot(e) + +
+
+ + + +

Parameter

+
    +
  • + +

    e :

    + +
  • +
+
+
+
+
+ + +FSM.current + +
+
+ + + +
+
+
+
+ + + +FSM.endstates + +
+
+ + + +
+
+
+
+ + +FSM:is(state) + +
+
+ + + +

Parameter

+
    +
  • + +

    state :

    + +
  • +
+
+
+
+
+ + +FSM.options + +
+
+ + + +
+
+
+
+ + + +FSM.subs + +
+
+ + + +
+
+ +

Type FSM_CONTROLLABLE

+

Field(s)

+
+
+ + Wrapper.Controllable#CONTROLLABLE + +FSM_CONTROLLABLE.Controllable + +
+
+ + + +
+
+
+
+ + +FSM_CONTROLLABLE:GetControllable() + +
+
+ +

Gets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

+ +

Return value

+ +

Wrapper.Controllable#CONTROLLABLE:

+ + +
+
+
+
+ + +FSM_CONTROLLABLE:New(FSMT, Controllable) + +
+
+ +

Creates a new FSM_CONTROLLABLE object.

+ +

Parameters

+
    +
  • + +

    #table FSMT : +Finite State Machine Table

    + +
  • +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +(optional) The CONTROLLABLE object that the FSM_CONTROLLABLE governs.

    + +
  • +
+

Return value

+ +

#FSM_CONTROLLABLE:

+ + +
+
+
+
+ + +FSM_CONTROLLABLE:OnAfterStop(Controllable, From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Stop.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +FSM_CONTROLLABLE:OnBeforeStop(Controllable, From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Stop.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +FSM_CONTROLLABLE:OnEnterStopped(Controllable, From, Event, To) + +
+
+ +

OnEnter Transition Handler for State Stopped.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +FSM_CONTROLLABLE:OnLeaveStopped(Controllable, From, Event, To) + +
+
+ +

OnLeave Transition Handler for State Stopped.

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE Controllable : +The Controllable Object managed by the FSM.

    + +
  • +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +FSM_CONTROLLABLE:SetControllable(FSMControllable) + +
+
+ +

Sets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

+ +

Parameter

+ +

Return value

+ +

#FSM_CONTROLLABLE:

+ + +
+
+
+
+ + +FSM_CONTROLLABLE:Stop() + +
+
+ +

Synchronous Event Trigger for Event Stop.

+ +
+
+
+
+ + +FSM_CONTROLLABLE:__Stop(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Stop.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +FSM_CONTROLLABLE:_call_handler(handler, params, EventName) + +
+
+ + + +

Parameters

+
    +
  • + +

    handler :

    + +
  • +
  • + +

    params :

    + +
  • +
  • + +

    EventName :

    + +
  • +
+
+
+ +

Type FSM_PROCESS

+

Field(s)

+
+
+ + +FSM_PROCESS:Assign(Task, ProcessUnit) + +
+
+ +

Assign the process to a Unit and activate the process.

+ +

Parameters

+ +

Return value

+ +

#FSM_PROCESS: +self

+ +
+
+
+
+ + +FSM_PROCESS:Copy(Controllable, Task) + +
+
+ +

Creates a new FSMPROCESS object based on this FSMPROCESS.

+ +

Parameters

+
    +
  • + +

    Controllable :

    + +
  • +
  • + +

    Task :

    + +
  • +
+

Return value

+ +

#FSM_PROCESS:

+ + +
+
+
+
+ + +FSM_PROCESS:GetCommandCenter() + +
+
+ +

Gets the mission of the process.

+ +

Return value

+ +

Tasking.CommandCenter#COMMANDCENTER:

+ + +
+
+
+
+ + +FSM_PROCESS:GetMission() + +
+
+ +

Gets the mission of the process.

+ +

Return value

+ +

Tasking.Mission#MISSION:

+ + +
+
+
+
+ + +FSM_PROCESS:GetTask() + +
+
+ +

Gets the task of the process.

+ +

Return value

+ +

Tasking.Task#TASK:

+ + +
+
+
+
+ + +FSM_PROCESS:Init(FsmProcess) + +
+
+ + + +

Parameter

+
    +
  • + +

    FsmProcess :

    + +
  • +
+
+
+
+
+ + +FSM_PROCESS:Message(Message) + +
+
+ +

Send a message of the Task to the Group of the Unit.

+ +

Parameter

+
    +
  • + +

    Message :

    + +
  • +
+
+
+
+
+ + +FSM_PROCESS:New(Controllable, Task) + +
+
+ +

Creates a new FSM_PROCESS object.

+ +

Parameters

+
    +
  • + +

    Controllable :

    + +
  • +
  • + +

    Task :

    + +
  • +
+

Return value

+ +

#FSM_PROCESS:

+ + +
+
+
+
+ + +FSM_PROCESS:Remove() + +
+
+ +

Removes an FSM_PROCESS object.

+ +

Return value

+ +

#FSM_PROCESS:

+ + +
+
+
+
+ + +FSM_PROCESS:SetTask(Task) + +
+
+ +

Sets the task of the process.

+ +

Parameter

+ +

Return value

+ +

#FSM_PROCESS:

+ + +
+
+
+
+ + Tasking.Task#TASK + +FSM_PROCESS.Task + +
+
+ + + +
+
+
+
+ + +FSM_PROCESS:_call_handler(handler, params, EventName) + +
+
+ + + +

Parameters

+
    +
  • + +

    handler :

    + +
  • +
  • + +

    params :

    + +
  • +
  • + +

    EventName :

    + +
  • +
+
+
+
+
+ + +FSM_PROCESS:onenterAssigned(ProcessUnit) + +
+
+ + + +

Parameter

+
    +
  • + +

    ProcessUnit :

    + +
  • +
+
+
+
+
+ + +FSM_PROCESS:onenterFailed(ProcessUnit) + +
+
+ + + +

Parameter

+
    +
  • + +

    ProcessUnit :

    + +
  • +
+
+
+
+
+ + +FSM_PROCESS:onenterSuccess(ProcessUnit) + +
+
+ + + +

Parameter

+
    +
  • + +

    ProcessUnit :

    + +
  • +
+
+
+
+
+ + +FSM_PROCESS:onstatechange(ProcessUnit, Event, From, To, Task, Dummy) + +
+
+ +

StateMachine callback function for a FSM_PROCESS

+ +

Parameters

+
    +
  • + +

    Wrapper.Controllable#CONTROLLABLE ProcessUnit :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    Task :

    + +
  • +
  • + +

    Dummy :

    + +
  • +
+
+
+ +

Type FSM_SET

+ +

FSM_SET class

+ +

Field(s)

+
+
+ + +FSM_SET:Get() + +
+
+ +

Gets the SETBASE object that the FSMSET governs.

+ +

Return value

+ +

Core.Set#SET_BASE:

+ + +
+
+
+
+ + +FSM_SET:New(FSMT, Set_SET_BASE, FSMSet) + +
+
+ +

Creates a new FSM_SET object.

+ +

Parameters

+
    +
  • + +

    #table FSMT : +Finite State Machine Table

    + +
  • +
  • + +

    SetSETBASE : +FSMSet (optional) The Set object that the FSM_SET governs.

    + +
  • +
  • + +

    FSMSet :

    + +
  • +
+

Return value

+ +

#FSM_SET:

+ + +
+
+
+
+ + Core.Set#SET_BASE + +FSM_SET.Set + +
+
+ + + +
+
+
+
+ + +FSM_SET:_call_handler(handler, params, EventName) + +
+
+ + + +

Parameters

+
    +
  • + +

    handler :

    + +
  • +
  • + +

    params :

    + +
  • +
  • + +

    EventName :

    + +
  • +
+
+
+ +

Type FSM_TASK

+ +

FSM_TASK class

+ +

Field(s)

+
+
+ + +FSM_TASK:New(FSMT, Task, TaskUnit) + +
+
+ +

Creates a new FSM_TASK object.

+ +

Parameters

+ +

Return value

+ +

#FSM_TASK:

+ + +
+
+
+
+ + Tasking.Task#TASK + +FSM_TASK.Task + +
+
+ + + +
+
+
+
+ + +FSM_TASK:_call_handler(handler, params, EventName) + +
+
+ + + +

Parameters

+
    +
  • + +

    handler :

    + +
  • +
  • + +

    params :

    + +
  • +
  • + +

    EventName :

    + +
  • +
+
+
+ +
+ +
+ + diff --git a/docs/Documentation/Group.html b/docs/Documentation/Group.html new file mode 100644 index 000000000..2a7095a6d --- /dev/null +++ b/docs/Documentation/Group.html @@ -0,0 +1,1951 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Group

+ +

Wrapper -- GROUP is a wrapper class for the DCS Class Group.

+ + + +
+ +

The #GROUP class is a wrapper class to handle the DCS Group objects:

+ +
    +
  • Support all DCS Group APIs.
  • +
  • Enhance with Group specific APIs not in the DCS Group API set.
  • +
  • Handle local Group Controller.
  • +
  • Manage the "state" of the DCS Group.
  • +
+ +

IMPORTANT: ONE SHOULD NEVER SANATIZE these GROUP OBJECT REFERENCES! (make the GROUP object references nil).

+ +

See the detailed documentation on the GROUP class.

+ +
+ +

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-03-26: GROUP:RouteRTB( RTBAirbase, Speed ) added.

+ +

2017-03-07: GROUP:HandleEvent( Event, EventFunction ) added.
+2017-03-07: GROUP:UnHandleEvent( Event ) added.

+ +

2017-01-24: GROUP:SetAIOnOff( AIOnOff ) added.

+ +

2017-01-24: GROUP:SetAIOn() added.

+ +

2017-01-24: GROUP:SetAIOff() added.

+ +
+ +

AUTHORS and CONTRIBUTIONS

+ +

Contributions:

+ +
    +
  • Entropy, Afinegan: Came up with the requirement for AIOnOff().
  • +
+ +

Authors:

+ +
    +
  • FlightControl: Design & Programming
  • +
+ + +

Global(s)

+ + + + + +
GROUP +

GROUP class, extends Controllable#CONTROLLABLE

+ +

For each DCS Group object alive within a running mission, a GROUP wrapper object (instance) will be created within the _DATABASE object.

+
+

Type GROUP

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GROUP:Activate() +

Activates a GROUP.

+
GROUP:AllOnGround() +

Returns if all units of the group are on the ground or landed.

+
GROUP:CalculateThreatLevelA2G() +

Calculate the maxium A2G threat level of the Group.

+
GROUP:CopyRoute(Begin, End, Randomize, Radius) +

Return the route of a group by using the Database#DATABASE class.

+
GROUP:Destroy() +

Destroys the DCS Group and all of its DCS Units.

+
GROUP:Find(DCSGroup) +

Find the GROUP wrapper class instance using the DCS Group.

+
GROUP:FindByName(GroupName) +

Find the created GROUP using the DCS Group Name.

+
GROUP:GetCallsign() +

Gets the CallSign of the first DCS Unit of the DCS Group.

+
GROUP:GetCategory() +

Returns category of the DCS Group.

+
GROUP:GetCategoryName() +

Returns the category name of the #GROUP.

+
GROUP:GetCoalition() +

Returns the coalition of the DCS Group.

+
GROUP:GetCountry() +

Returns the country of the DCS Group.

+
GROUP:GetDCSObject() +

Returns the DCS Group.

+
GROUP:GetDCSUnit(UnitNumber) +

Returns the DCS Unit with number UnitNumber.

+
GROUP:GetDCSUnits() +

Returns the DCS Units of the DCS Group.

+
GROUP:GetHeading() +

Returns the mean heading of every UNIT in the GROUP in degrees

+
GROUP:GetInitialSize() +
    +
  • Returns the initial size of the DCS Group.
  • +
+
GROUP:GetMaxHeight() +

Returns the current maximum height of the group.

+
GROUP:GetMaxVelocity() +

Returns the current maximum velocity of the group.

+
GROUP:GetMinHeight() +

Returns the current minimum height of the group.

+
GROUP:GetPlayerNames() +

Get player names

+
GROUP:GetPointVec2() +

Returns a POINT_VEC2 object indicating the point in 2D of the first UNIT of the GROUP within the mission.

+
GROUP:GetPositionVec3() +

Returns the DCSTypes#Position3 position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.

+
GROUP:GetRandomVec3(Radius) +

Returns a random DCSTypes#Vec3 vector (point in 3D of the UNIT within the mission) within a range around the first UNIT of the GROUP.

+
GROUP:GetSize() +

Returns current size of the DCS Group.

+
GROUP:GetTaskMission() +

Return the mission template of the group.

+
GROUP:GetTaskRoute() +

Return the mission route of the group.

+
GROUP:GetTemplate() +

Returns the group template from the DATABASE (_DATABASE object).

+
GROUP:GetTypeName() +

Gets the type name of the group.

+
GROUP:GetUnit(UnitNumber) +

Returns the UNIT wrapper class with number UnitNumber.

+
GROUP:GetVec2() +

Returns the current point (Vec2 vector) of the first DCS Unit in the DCS Group.

+
GROUP:GetVec3() +

Returns the current Vec3 vector of the first DCS Unit in the GROUP.

+
GROUP.GroupName +

The name of the group.

+
GROUP:HandleEvent(Event, EventFunction) +

Subscribe to a DCS Event.

+
GROUP:InAir() +

Returns true if the first unit of the GROUP is in the air.

+
GROUP:IsAir() +

Returns if the group is of an air category.

+
GROUP:IsAirPlane() +

Returns if the DCS Group contains AirPlanes.

+
GROUP:IsAlive() +

Returns if the Group is alive.

+
GROUP:IsCompletelyInZone(Zone) +

Returns true if all units of the group are within a Zone.

+
GROUP:IsGround() +

Returns if the DCS Group contains Ground troops.

+
GROUP:IsHelicopter() +

Returns if the DCS Group contains Helicopters.

+
GROUP:IsNotInZone(Zone) +

Returns true if none of the group units of the group are within a Zone.

+
GROUP:IsPartlyInZone(Zone) +

Returns true if some units of the group are within a Zone.

+
GROUP:IsShip() +

Returns if the DCS Group contains Ships.

+
GROUP:OnReSpawn(ReSpawnFunction) + +
GROUP:Register(GroupName) +

Create a new GROUP from a DCSGroup

+
GROUP:ResetEvents() +

Reset the subscriptions.

+
GROUP:Respawn(Template) +

Respawn the GROUP using a (tweaked) template of the Group.

+
GROUP:RouteRTB(RTBAirbase, Speed) +

(AIR) Return the Group to an Airbase#AIRBASE.

+
GROUP:SetAIOff() +

Turns the AI Off for the GROUP.

+
GROUP:SetAIOn() +

Turns the AI On for the GROUP.

+
GROUP:SetAIOnOff(AIOnOff) +

Turns the AI On or Off for the GROUP.

+
GROUP:SetTemplateCoalition(CoalitionID, Template) +

Sets the CoalitionID of the group in a Template.

+
GROUP:SetTemplateControlled(Controlled, Template) +

Sets the controlled status in a Template.

+
GROUP:SetTemplateCountry(CountryID, Template) +

Sets the CountryID of the group in a Template.

+
GROUP:UnHandleEvent(Event) +

UnSubscribe to a DCS event.

+
+ +

Global(s)

+
+
+ + #GROUP + +GROUP + +
+
+ +

GROUP class, extends Controllable#CONTROLLABLE

+ +

For each DCS Group object alive within a running mission, a GROUP wrapper object (instance) will be created within the _DATABASE object.

+ + +

This is done at the beginning of the mission (when the mission starts), and dynamically when new DCS Group objects are spawned (using the SPAWN class).

+ +

The GROUP class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference +using the DCS Group or the DCS GroupName.

+ +

Another thing to know is that GROUP objects do not "contain" the DCS Group object. +The GROUP methods will reference the DCS Group object by name when it is needed during API execution. +If the DCS Group object does not exist or is nil, the GROUP methods will return nil and log an exception in the DCS.log file.

+ +

The GROUP class provides the following functions to retrieve quickly the relevant GROUP instance:

+ +
    +
  • GROUP.Find(): Find a GROUP instance from the _DATABASE object using a DCS Group object.
  • +
  • GROUP.FindByName(): Find a GROUP instance from the _DATABASE object using a DCS Group name.
  • +
+ +

GROUP task methods

+ +

A GROUP is a Controllable. See the Controllable task methods section for a description of the task methods.

+ +

Obtain the mission from group templates

+ +

Group templates contain complete mission descriptions. Sometimes you want to copy a complete mission from a group and assign it to another:

+ + + +

GROUP Command methods

+ +

A GROUP is a Controllable. See the Controllable command methods section for a description of the command methods.

+ +

GROUP option methods

+ +

A GROUP is a Controllable. See the Controllable option methods section for a description of the option methods.

+ +

GROUP Zone validation methods

+ +

The group can be validated whether it is completely, partly or not within a Zone. +Use the following Zone validation methods on the group:

+ + + +

The zone can be of any Zone class derived from Zone#ZONE_BASE. So, these methods are polymorphic to the zones tested on.

+ +

GROUP AI methods

+ +

A GROUP has AI methods to control the AI activation.

+ + + + +
+
+

Type Group

+ +

Type GROUP

+

Field(s)

+
+
+ + +GROUP:Activate() + +
+
+ +

Activates a GROUP.

+ +
+
+
+
+ + +GROUP:AllOnGround() + +
+
+ +

Returns if all units of the group are on the ground or landed.

+ + +

If all units of this group are on the ground, this function will return true, otherwise false.

+ +

Return value

+ +

#boolean: +All units on the ground result.

+ +
+
+
+
+ + +GROUP:CalculateThreatLevelA2G() + +
+
+ +

Calculate the maxium A2G threat level of the Group.

+ +
+
+
+
+ + +GROUP:CopyRoute(Begin, End, Randomize, Radius) + +
+
+ +

Return the route of a group by using the Database#DATABASE class.

+ +

Parameters

+
    +
  • + +

    #number Begin : +The route point from where the copy will start. The base route point is 0.

    + +
  • +
  • + +

    #number End : +The route point where the copy will end. The End point is the last point - the End point. The last point has base 0.

    + +
  • +
  • + +

    #boolean Randomize : +Randomization of the route, when true.

    + +
  • +
  • + +

    #number Radius : +When randomization is on, the randomization is within the radius.

    + +
  • +
+
+
+
+
+ + +GROUP:Destroy() + +
+
+ +

Destroys the DCS Group and all of its DCS Units.

+ + +

Note that this destroy method also raises a destroy event at run-time. +So all event listeners will catch the destroy event of this DCS Group.

+ +
+
+
+
+ + +GROUP:Find(DCSGroup) + +
+
+ +

Find the GROUP wrapper class instance using the DCS Group.

+ +

Parameter

+ +

Return value

+ +

#GROUP: +The GROUP.

+ +
+
+
+
+ + +GROUP:FindByName(GroupName) + +
+
+ +

Find the created GROUP using the DCS Group Name.

+ +

Parameter

+
    +
  • + +

    #string GroupName : +The DCS Group Name.

    + +
  • +
+

Return value

+ +

#GROUP: +The GROUP.

+ +
+
+
+
+ + +GROUP:GetCallsign() + +
+
+ +

Gets the CallSign of the first DCS Unit of the DCS Group.

+ +

Return value

+ +

#string: +The CallSign of the first DCS Unit of the DCS Group.

+ +
+
+
+
+ + +GROUP:GetCategory() + +
+
+ +

Returns category of the DCS Group.

+ +

Return value

+ +

Dcs.DCSWrapper.Group#Group.Category: +The category ID

+ +
+
+
+
+ + +GROUP:GetCategoryName() + +
+
+ +

Returns the category name of the #GROUP.

+ +

Return value

+ +

#string: +Category name = Helicopter, Airplane, Ground Unit, Ship

+ +
+
+
+
+ + +GROUP:GetCoalition() + +
+
+ +

Returns the coalition of the DCS Group.

+ +

Return value

+ +

Dcs.DCSCoalitionWrapper.Object#coalition.side: +The coalition side of the DCS Group.

+ +
+
+
+
+ + +GROUP:GetCountry() + +
+
+ +

Returns the country of the DCS Group.

+ +

Return values

+
    +
  1. + +

    Dcs.DCScountry#country.id: +The country identifier.

    + +
  2. +
  3. + +

    #nil: +The DCS Group is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +GROUP:GetDCSObject() + +
+
+ +

Returns the DCS Group.

+ +

Return value

+ +

Dcs.DCSWrapper.Group#Group: +The DCS Group.

+ +
+
+
+
+ + +GROUP:GetDCSUnit(UnitNumber) + +
+
+ +

Returns the DCS Unit with number UnitNumber.

+ + +

If the underlying DCS Unit does not exist, the method will return nil. .

+ +

Parameter

+
    +
  • + +

    #number UnitNumber : +The number of the DCS Unit to be returned.

    + +
  • +
+

Return value

+ +

Dcs.DCSWrapper.Unit#Unit: +The DCS Unit.

+ +
+
+
+
+ + +GROUP:GetDCSUnits() + +
+
+ +

Returns the DCS Units of the DCS Group.

+ +

Return value

+ +

#table: +The DCS Units.

+ +
+
+
+
+ + +GROUP:GetHeading() + +
+
+ +

Returns the mean heading of every UNIT in the GROUP in degrees

+ +

Return values

+
    +
  1. + +

    #number: +mean heading of the GROUP

    + +
  2. +
  3. + +

    #nil: +The first UNIT is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +GROUP:GetInitialSize() + +
+
+ +
    +
  • Returns the initial size of the DCS Group.
  • +
+ + +

If some of the DCS Units of the DCS Group are destroyed, the initial size of the DCS Group is unchanged.

+ +

Return value

+ +

#number: +The DCS Group initial size.

+ +
+
+
+
+ + +GROUP:GetMaxHeight() + +
+
+ +

Returns the current maximum height of the group.

+ + +

Each unit within the group gets evaluated, and the maximum height (= the unit which is the highest elevated) is returned.

+ +

Return value

+ +

#number: +Maximum height found.

+ +
+
+
+
+ + +GROUP:GetMaxVelocity() + +
+
+ +

Returns the current maximum velocity of the group.

+ + +

Each unit within the group gets evaluated, and the maximum velocity (= the unit which is going the fastest) is returned.

+ +

Return value

+ +

#number: +Maximum velocity found.

+ +
+
+
+
+ + +GROUP:GetMinHeight() + +
+
+ +

Returns the current minimum height of the group.

+ + +

Each unit within the group gets evaluated, and the minimum height (= the unit which is the lowest elevated) is returned.

+ +

Return value

+ +

#number: +Minimum height found.

+ +
+
+
+
+ + +GROUP:GetPlayerNames() + +
+
+ +

Get player names

+ +

Return values

+
    +
  1. + +

    #table: +The group has players, an array of player names is returned.

    + +
  2. +
  3. + +

    #nil: +The group has no players

    + +
  4. +
+
+
+
+
+ + +GROUP:GetPointVec2() + +
+
+ +

Returns a POINT_VEC2 object indicating the point in 2D of the first UNIT of the GROUP within the mission.

+ +

Return values

+
    +
  1. + +

    Core.Point#POINT_VEC2: +The 2D point vector of the first DCS Unit of the GROUP.

    + +
  2. +
  3. + +

    #nil: +The first UNIT is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +GROUP:GetPositionVec3() + +
+
+ +

Returns the DCSTypes#Position3 position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.

+ +

Return values

+
    +
  1. + +

    Dcs.DCSTypes#Position: +The 3D position vectors of the POSITIONABLE.

    + +
  2. +
  3. + +

    #nil: +The POSITIONABLE is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +GROUP:GetRandomVec3(Radius) + +
+
+ +

Returns a random DCSTypes#Vec3 vector (point in 3D of the UNIT within the mission) within a range around the first UNIT of the GROUP.

+ +

Parameter

+
    +
  • + +

    #number Radius :

    + +
  • +
+

Return values

+
    +
  1. + +

    Dcs.DCSTypes#Vec3: +The random 3D point vector around the first UNIT of the GROUP.

    + +
  2. +
  3. + +

    #nil: +The GROUP is invalid or empty

    + +
  4. +
+

Usage:

+

+-- If Radius is ignored, returns the Dcs.DCSTypes#Vec3 of first UNIT of the GROUP
+ +
+
+
+
+ + +GROUP:GetSize() + +
+
+ +

Returns current size of the DCS Group.

+ + +

If some of the DCS Units of the DCS Group are destroyed the size of the DCS Group is changed.

+ +

Return value

+ +

#number: +The DCS Group size.

+ +
+
+
+
+ + +GROUP:GetTaskMission() + +
+
+ +

Return the mission template of the group.

+ +

Return value

+ +

#table: +The MissionTemplate

+ +
+
+
+
+ + +GROUP:GetTaskRoute() + +
+
+ +

Return the mission route of the group.

+ +

Return value

+ +

#table: +The mission route defined by points.

+ +
+
+
+
+ + +GROUP:GetTemplate() + +
+
+ +

Returns the group template from the DATABASE (_DATABASE object).

+ +

Return value

+ +

#table:

+ + +
+
+
+
+ + +GROUP:GetTypeName() + +
+
+ +

Gets the type name of the group.

+ +

Return value

+ +

#string: +The type name of the group.

+ +
+
+
+
+ + +GROUP:GetUnit(UnitNumber) + +
+
+ +

Returns the UNIT wrapper class with number UnitNumber.

+ + +

If the underlying DCS Unit does not exist, the method will return nil. .

+ +

Parameter

+
    +
  • + +

    #number UnitNumber : +The number of the UNIT wrapper class to be returned.

    + +
  • +
+

Return value

+ +

Wrapper.Unit#UNIT: +The UNIT wrapper class.

+ +
+
+
+
+ + +GROUP:GetVec2() + +
+
+ +

Returns the current point (Vec2 vector) of the first DCS Unit in the DCS Group.

+ +

Return value

+ +

Dcs.DCSTypes#Vec2: +Current Vec2 point of the first DCS Unit of the DCS Group.

+ +
+
+
+
+ + +GROUP:GetVec3() + +
+
+ +

Returns the current Vec3 vector of the first DCS Unit in the GROUP.

+ +

Return value

+ +

Dcs.DCSTypes#Vec3: +Current Vec3 of the first DCS Unit of the GROUP.

+ +
+
+
+
+ + #string + +GROUP.GroupName + +
+
+ +

The name of the group.

+ +
+
+
+
+ + +GROUP:HandleEvent(Event, EventFunction) + +
+
+ +

Subscribe to a DCS Event.

+ +

Parameters

+
    +
  • + +

    Core.Event#EVENTS Event :

    + +
  • +
  • + +

    #function EventFunction : +(optional) The function to be called when the event occurs for the GROUP.

    + +
  • +
+

Return value

+ +

#GROUP:

+ + +
+
+
+
+ + +GROUP:InAir() + +
+
+ +

Returns true if the first unit of the GROUP is in the air.

+ +

Return values

+
    +
  1. + +

    #boolean: +true if in the first unit of the group is in the air.

    + +
  2. +
  3. + +

    #nil: +The GROUP is not existing or not alive.

    + +
  4. +
+
+
+
+
+ + +GROUP:IsAir() + +
+
+ +

Returns if the group is of an air category.

+ + +

If the group is a helicopter or a plane, then this method will return true, otherwise false.

+ +

Return value

+ +

#boolean: +Air category evaluation result.

+ +
+
+
+
+ + +GROUP:IsAirPlane() + +
+
+ +

Returns if the DCS Group contains AirPlanes.

+ +

Return value

+ +

#boolean: +true if DCS Group contains AirPlanes.

+ +
+
+
+
+ + +GROUP:IsAlive() + +
+
+ +

Returns if the Group is alive.

+ + +

The Group must:

+ +
    +
  • Exist at run-time.
  • +
  • Has at least one unit.
  • +
+ +

When the first Unit of the Group is active, it will return true. +If the first Unit of the Group is inactive, it will return false.

+ + +

Return values

+
    +
  1. + +

    #boolean: +true if the Group is alive and active.

    + +
  2. +
  3. + +

    #boolean: +false if the Group is alive but inactive.

    + +
  4. +
  5. + +

    #nil: +if the group does not exist anymore.

    + +
  6. +
+
+
+
+
+ + +GROUP:IsCompletelyInZone(Zone) + +
+
+ +

Returns true if all units of the group are within a Zone.

+ +

Parameter

+ +

Return value

+ +

#boolean: +Returns true if the Group is completely within the Zone#ZONE_BASE

+ +
+
+
+
+ + +GROUP:IsGround() + +
+
+ +

Returns if the DCS Group contains Ground troops.

+ +

Return value

+ +

#boolean: +true if DCS Group contains Ground troops.

+ +
+
+
+
+ + +GROUP:IsHelicopter() + +
+
+ +

Returns if the DCS Group contains Helicopters.

+ +

Return value

+ +

#boolean: +true if DCS Group contains Helicopters.

+ +
+
+
+
+ + +GROUP:IsNotInZone(Zone) + +
+
+ +

Returns true if none of the group units of the group are within a Zone.

+ +

Parameter

+ +

Return value

+ +

#boolean: +Returns true if the Group is not within the Zone#ZONE_BASE

+ +
+
+
+
+ + +GROUP:IsPartlyInZone(Zone) + +
+
+ +

Returns true if some units of the group are within a Zone.

+ +

Parameter

+ +

Return value

+ +

#boolean: +Returns true if the Group is partially within the Zone#ZONE_BASE

+ +
+
+
+
+ + +GROUP:IsShip() + +
+
+ +

Returns if the DCS Group contains Ships.

+ +

Return value

+ +

#boolean: +true if DCS Group contains Ships.

+ +
+
+
+
+ + +GROUP:OnReSpawn(ReSpawnFunction) + +
+
+ + + +

Parameter

+
    +
  • + +

    ReSpawnFunction :

    + +
  • +
+
+
+
+
+ + +GROUP:Register(GroupName) + +
+
+ +

Create a new GROUP from a DCSGroup

+ +

Parameter

+ +

Return value

+ +

#GROUP: +self

+ +
+
+
+
+ + +GROUP:ResetEvents() + +
+
+ +

Reset the subscriptions.

+ +

Return value

+ +

#GROUP:

+ + +
+
+
+
+ + +GROUP:Respawn(Template) + +
+
+ +

Respawn the GROUP using a (tweaked) template of the Group.

+ + +

The template must be retrieved with the Group#GROUP.GetTemplate() function. +The template contains all the definitions as declared within the mission file. +To understand templates, do the following:

+ +
    +
  • unpack your .miz file into a directory using 7-zip.
  • +
  • browse in the directory created to the file mission.
  • +
  • open the file and search for the country group definitions.
  • +
+ +

Your group template will contain the fields as described within the mission file.

+ +

This function will:

+ +
    +
  • Get the current position and heading of the group.
  • +
  • When the group is alive, it will tweak the template x, y and heading coordinates of the group and the embedded units to the current units positions.
  • +
  • Then it will destroy the current alive group.
  • +
  • And it will respawn the group using your new template definition.
  • +
+ +

Parameter

+
    +
  • + +

    #table Template : +The template of the Group retrieved with GROUP:GetTemplate()

    + +
  • +
+
+
+
+
+ + +GROUP:RouteRTB(RTBAirbase, Speed) + +
+
+ +

(AIR) Return the Group to an Airbase#AIRBASE.

+ + +

The following things are to be taken into account:

+ +
    +
  • The group is respawned to achieve the RTB, there may be side artefacts as a result of this. (Like weapons suddenly come back).
  • +
  • A group consisting out of more than one unit, may rejoin formation when respawned.
  • +
  • A speed can be given in km/h. If no speed is specified, the maximum speed of the first unit will be taken to return to base.
  • +
  • When there is no Airbase object specified, the group will return to the home base if the route of the group is pinned at take-off or at landing to a base.
  • +
  • When there is no Airbase object specified and the group route is not pinned to any airbase, it will return to the nearest airbase.
  • +
+ + +

Parameters

+
    +
  • + +

    Wrapper.Airbase#AIRBASE RTBAirbase : +(optional) The Airbase to return to. If blank, the controllable will return to the nearest friendly airbase.

    + +
  • +
  • + +

    #number Speed : +(optional) The Speed, if no Speed is given, the maximum Speed of the first unit is selected.

    + +
  • +
+

Return value

+ +

#GROUP:

+ + +
+
+
+
+ + +GROUP:SetAIOff() + +
+
+ +

Turns the AI Off for the GROUP.

+ +

Return value

+ +

#GROUP: +The GROUP.

+ +
+
+
+
+ + +GROUP:SetAIOn() + +
+
+ +

Turns the AI On for the GROUP.

+ +

Return value

+ +

#GROUP: +The GROUP.

+ +
+
+
+
+ + +GROUP:SetAIOnOff(AIOnOff) + +
+
+ +

Turns the AI On or Off for the GROUP.

+ +

Parameter

+
    +
  • + +

    #boolean AIOnOff : +The value true turns the AI On, the value false turns the AI Off.

    + +
  • +
+

Return value

+ +

#GROUP: +The GROUP.

+ +
+
+
+
+ + +GROUP:SetTemplateCoalition(CoalitionID, Template) + +
+
+ +

Sets the CoalitionID of the group in a Template.

+ +

Parameters

+ +

Return value

+ +

#table:

+ + +
+
+
+
+ + +GROUP:SetTemplateControlled(Controlled, Template) + +
+
+ +

Sets the controlled status in a Template.

+ +

Parameters

+
    +
  • + +

    #boolean Controlled : +true is controlled, false is uncontrolled.

    + +
  • +
  • + +

    Template :

    + +
  • +
+

Return value

+ +

#table:

+ + +
+
+
+
+ + +GROUP:SetTemplateCountry(CountryID, Template) + +
+
+ +

Sets the CountryID of the group in a Template.

+ +

Parameters

+ +

Return value

+ +

#table:

+ + +
+
+
+
+ + +GROUP:UnHandleEvent(Event) + +
+
+ +

UnSubscribe to a DCS event.

+ +

Parameter

+ +

Return value

+ +

#GROUP:

+ + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Identifiable.html b/docs/Documentation/Identifiable.html new file mode 100644 index 000000000..3d15ed716 --- /dev/null +++ b/docs/Documentation/Identifiable.html @@ -0,0 +1,550 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Identifiable

+ +

This module contains the IDENTIFIABLE class.

+ + + +

1) #IDENTIFIABLE class, extends Object#OBJECT

+

The #IDENTIFIABLE class is a wrapper class to handle the DCS Identifiable objects:

+ +
    +
  • Support all DCS Identifiable APIs.
  • +
  • Enhance with Identifiable specific APIs not in the DCS Identifiable API set.
  • +
  • Manage the "state" of the DCS Identifiable.
  • +
+ +

1.1) IDENTIFIABLE constructor:

+

The IDENTIFIABLE class provides the following functions to construct a IDENTIFIABLE instance:

+ + + +

1.2) IDENTIFIABLE methods:

+

The following methods can be used to identify an identifiable object:

+ + + + +
+ + +

Global(s)

+ + + + + +
IDENTIFIABLE + +
+

Type IDENTIFIABLE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IDENTIFIABLE.ClassName + +
IDENTIFIABLE:GetCallsign() +

Gets the CallSign of the IDENTIFIABLE, which is a blank by default.

+
IDENTIFIABLE:GetCategory() +

Returns category of the DCS Identifiable.

+
IDENTIFIABLE:GetCategoryName() +

Returns the DCS Identifiable category name as defined within the DCS Identifiable Descriptor.

+
IDENTIFIABLE:GetCoalition() +

Returns coalition of the Identifiable.

+
IDENTIFIABLE:GetCountry() +

Returns country of the Identifiable.

+
IDENTIFIABLE:GetDesc() +

Returns Identifiable descriptor.

+
IDENTIFIABLE:GetName() +

Returns DCS Identifiable object name.

+
IDENTIFIABLE:GetThreatLevel() + +
IDENTIFIABLE:GetTypeName() +

Returns the type name of the DCS Identifiable.

+
IDENTIFIABLE.IdentifiableName +

The name of the identifiable.

+
IDENTIFIABLE:IsAlive() +

Returns if the Identifiable is alive.

+
IDENTIFIABLE:New(IdentifiableName) +

Create a new IDENTIFIABLE from a DCSIdentifiable

+
+ +

Global(s)

+
+
+ + #IDENTIFIABLE + +IDENTIFIABLE + +
+
+ + + +
+
+

Type Identifiable

+ +

Type IDENTIFIABLE

+ +

The IDENTIFIABLE class

+ +

Field(s)

+
+
+ + #string + +IDENTIFIABLE.ClassName + +
+
+ + + +
+
+
+
+ + +IDENTIFIABLE:GetCallsign() + +
+
+ +

Gets the CallSign of the IDENTIFIABLE, which is a blank by default.

+ +

Return value

+ +

#string: +The CallSign of the IDENTIFIABLE.

+ +
+
+
+
+ + +IDENTIFIABLE:GetCategory() + +
+
+ +

Returns category of the DCS Identifiable.

+ +

Return value

+ +

Dcs.DCSWrapper.Object#Object.Category: +The category ID

+ +
+
+
+
+ + +IDENTIFIABLE:GetCategoryName() + +
+
+ +

Returns the DCS Identifiable category name as defined within the DCS Identifiable Descriptor.

+ +

Return value

+ +

#string: +The DCS Identifiable Category Name

+ +
+
+
+
+ + +IDENTIFIABLE:GetCoalition() + +
+
+ +

Returns coalition of the Identifiable.

+ +

Return values

+
    +
  1. + +

    Dcs.DCSCoalitionWrapper.Object#coalition.side: +The side of the coalition.

    + +
  2. +
  3. + +

    #nil: +The DCS Identifiable is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +IDENTIFIABLE:GetCountry() + +
+
+ +

Returns country of the Identifiable.

+ +

Return values

+
    +
  1. + +

    Dcs.DCScountry#country.id: +The country identifier.

    + +
  2. +
  3. + +

    #nil: +The DCS Identifiable is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +IDENTIFIABLE:GetDesc() + +
+
+ +

Returns Identifiable descriptor.

+ + +

Descriptor type depends on Identifiable category.

+ +

Return values

+
    +
  1. + +

    Dcs.DCSWrapper.Identifiable#Identifiable.Desc: +The Identifiable descriptor.

    + +
  2. +
  3. + +

    #nil: +The DCS Identifiable is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +IDENTIFIABLE:GetName() + +
+
+ +

Returns DCS Identifiable object name.

+ + +

The function provides access to non-activated objects too.

+ +

Return values

+
    +
  1. + +

    #string: +The name of the DCS Identifiable.

    + +
  2. +
  3. + +

    #nil: +The DCS Identifiable is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +IDENTIFIABLE:GetThreatLevel() + +
+
+ + + +
+
+
+
+ + +IDENTIFIABLE:GetTypeName() + +
+
+ +

Returns the type name of the DCS Identifiable.

+ +

Return values

+
    +
  1. + +

    #string: +The type name of the DCS Identifiable.

    + +
  2. +
  3. + +

    #nil: +The DCS Identifiable is not existing or alive.

    + +
  4. +
+
+
+
+
+ + #string + +IDENTIFIABLE.IdentifiableName + +
+
+ +

The name of the identifiable.

+ +
+
+
+
+ + +IDENTIFIABLE:IsAlive() + +
+
+ +

Returns if the Identifiable is alive.

+ + +

If the Identifiable is not alive, nil is returned.
+If the Identifiable is alive, true is returned.

+ +

Return values

+
    +
  1. + +

    #boolean: +true if Identifiable is alive.

    + +
  2. +
  3. + +

    #nil: +if the Identifiable is not existing or is not alive.

    + +
  4. +
+
+
+
+
+ + +IDENTIFIABLE:New(IdentifiableName) + +
+
+ +

Create a new IDENTIFIABLE from a DCSIdentifiable

+ +

Parameter

+ +

Return value

+ +

#IDENTIFIABLE: +self

+ +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Menu.html b/docs/Documentation/Menu.html new file mode 100644 index 000000000..e6a65ed88 --- /dev/null +++ b/docs/Documentation/Menu.html @@ -0,0 +1,2212 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Menu

+ +

Core -- MENU_ classes model the definition of hierarchical menu structures and commands for players within a mission.

+ + + +
+ +

DCS Menus can be managed using the MENU classes. +The advantage of using MENU classes is that it hides the complexity of dealing with menu management in more advanced scanerios where you need to +set menus and later remove them, and later set them again. You'll find while using use normal DCS scripting functions, that setting and removing +menus is not a easy feat if you have complex menu hierarchies defined. +Using the MOOSE menu classes, the removal and refreshing of menus are nicely being handled within these classes, and becomes much more easy. +On top, MOOSE implements variable parameter passing for command menus.

+ +

There are basically two different MENU class types that you need to use:

+ +

To manage main menus, the classes begin with MENU_:

+ + + +

To manage command menus, which are menus that allow the player to issue functions, the classes begin with MENUCOMMAND:

+ + + +
+ +

The above menus classes are derived from 2 main abstract classes defined within the MOOSE framework (so don't use these):

+ +

1) MENU_ BASE abstract base classes (don't use them)

+

The underlying base menu classes are NOT to be used within your missions. +These are simply abstract base classes defining a couple of fields that are used by the +derived MENU_ classes to manage menus.

+ +

1.1) #MENU_BASE class, extends Base#BASE

+

The #MENU_BASE class defines the main MENU class where other MENU classes are derived from.

+ +

1.2) #MENUCOMMANDBASE class, extends Base#BASE

+

The #MENUCOMMANDBASE class defines the main MENU class where other MENU COMMAND_ classes are derived from, in order to set commands.

+ +
+ +

The next menus define the MENU classes that you can use within your missions.

+ +

2) MENU MISSION classes

+

The underlying classes manage the menus for a complete mission file.

+ +

2.1) #MENU_MISSION class, extends Menu#MENU_BASE

+

The Menu#MENU_MISSION class manages the main menus for a complete mission.
+You can add menus with the MENU_MISSION.New method, which constructs a MENU_MISSION object and returns you the object reference. +Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_MISSION.Remove.

+ +

2.2) #MENUMISSIONCOMMAND class, extends Menu#MENUCOMMANDBASE

+

The Menu#MENUMISSIONCOMMAND class manages the command menus for a complete mission, which allow players to execute functions during mission execution.
+You can add menus with the MENUMISSIONCOMMAND.New method, which constructs a MENUMISSIONCOMMAND object and returns you the object reference. +Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENUMISSIONCOMMAND.Remove.

+ +
+ +

3) MENU COALITION classes

+

The underlying classes manage the menus for whole coalitions.

+ +

3.1) #MENU_COALITION class, extends Menu#MENU_BASE

+

The Menu#MENU_COALITION class manages the main menus for coalitions.
+You can add menus with the MENU_COALITION.New method, which constructs a MENU_COALITION object and returns you the object reference. +Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_COALITION.Remove.

+ +

3.2) Menu#MENUCOALITIONCOMMAND class, extends Menu#MENUCOMMANDBASE

+

The Menu#MENUCOALITIONCOMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.
+You can add menus with the MENUCOALITIONCOMMAND.New method, which constructs a MENUCOALITIONCOMMAND object and returns you the object reference. +Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENUCOALITIONCOMMAND.Remove.

+ +
+ +

4) MENU GROUP classes

+

The underlying classes manage the menus for groups. Note that groups can be inactive, alive or can be destroyed.

+ +

4.1) Menu#MENU_GROUP class, extends Menu#MENU_BASE

+

The Menu#MENU_GROUP class manages the main menus for coalitions.
+You can add menus with the MENU_GROUP.New method, which constructs a MENU_GROUP object and returns you the object reference. +Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_GROUP.Remove.

+ +

4.2) Menu#MENUGROUPCOMMAND class, extends Menu#MENUCOMMANDBASE

+

The Menu#MENUGROUPCOMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.
+You can add menus with the MENUGROUPCOMMAND.New method, which constructs a MENUGROUPCOMMAND object and returns you the object reference. +Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENUGROUPCOMMAND.Remove.

+ +
+ +

5) MENU CLIENT classes

+

The underlying classes manage the menus for units with skill level client or player.

+ +

5.1) Menu#MENU_CLIENT class, extends Menu#MENU_BASE

+

The Menu#MENU_CLIENT class manages the main menus for coalitions.
+You can add menus with the MENU_CLIENT.New method, which constructs a MENU_CLIENT object and returns you the object reference. +Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_CLIENT.Remove.

+ +

5.2) Menu#MENUCLIENTCOMMAND class, extends Menu#MENUCOMMANDBASE

+

The Menu#MENUCLIENTCOMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.
+You can add menus with the MENUCLIENTCOMMAND.New method, which constructs a MENUCLIENTCOMMAND object and returns you the object reference. +Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENUCLIENTCOMMAND.Remove.

+ +
+ +

Contributions: -

+

Authors: FlightControl : Design & Programming

+ + +

Global(s)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MENU_BASE + +
MENU_CLIENT + +
MENU_CLIENT_COMMAND + +
MENU_COALITION + +
MENU_COALITION_COMMAND + +
MENU_COMMAND_BASE + +
MENU_GROUP + +
MENU_GROUP_COMMAND + +
MENU_MISSION + +
MENU_MISSION_COMMAND + +
+

Type MENU_BASE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MENU_BASE.ClassName + +
MENU_BASE:GetMenu(MenuText) +

Gets a Menu from a parent Menu

+
MENU_BASE.MenuParentPath + +
MENU_BASE.MenuPath + +
MENU_BASE.MenuRemoveParent + +
MENU_BASE.MenuText + +
MENU_BASE.MenuTime + +
MENU_BASE.New(#, self, MenuText, ParentMenu) +

Consructor

+
MENU_BASE:SetRemoveParent(RemoveParent) +

Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu.

+
MENU_BASE:SetTime(MenuTime) +

Sets a time stamp for later prevention of menu removal.

+
+ +

Type MENU_CLIENT

+ + + + + + + + + + + + + + + + + +
MENU_CLIENT.ClassName + +
MENU_CLIENT:New(Client, MenuText, ParentMenu) +

MENU_CLIENT constructor.

+
MENU_CLIENT:Remove() +

Removes the sub menus recursively of this MENU_CLIENT.

+
MENU_CLIENT:RemoveSubMenus() +

Removes the sub menus recursively of this #MENU_CLIENT.

+
+ +

Type MENU_CLIENT_COMMAND

+ + + + + + + + + + + + + +
MENU_CLIENT_COMMAND.ClassName + +
MENU_CLIENT_COMMAND:New(Client, MenuText, ParentMenu, CommandMenuFunction, ...) +

MENUCLIENTCOMMAND constructor.

+
MENU_CLIENT_COMMAND:Remove() +

Removes a menu structure for a client.

+
+ +

Type MENU_COALITION

+ + + + + + + + + + + + + + + + + +
MENU_COALITION.ClassName + +
MENU_COALITION:New(Coalition, MenuText, ParentMenu) +

MENU_COALITION constructor.

+
MENU_COALITION:Remove() +

Removes the main menu and the sub menus recursively of this MENU_COALITION.

+
MENU_COALITION:RemoveSubMenus() +

Removes the sub menus recursively of this MENU_COALITION.

+
+ +

Type MENU_COALITION_COMMAND

+ + + + + + + + + + + + + +
MENU_COALITION_COMMAND.ClassName + +
MENU_COALITION_COMMAND:New(Coalition, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) +

MENU_COALITION constructor.

+
MENU_COALITION_COMMAND:Remove() +

Removes a radio command item for a coalition

+
+ +

Type MENU_COMMAND_BASE

+ + + + + + + + + + + + + + + + + + + + + +
MENU_COMMAND_BASE.ClassName + +
MENU_COMMAND_BASE.CommandMenuArgument + +
MENU_COMMAND_BASE.CommandMenuFunction + +
MENU_COMMAND_BASE.MenuCallHandler + +
MENU_COMMAND_BASE.New(#, self, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments) +

Constructor

+
+ +

Type MENU_GROUP

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MENU_GROUP.ClassName + +
MENU_GROUP.MenuGroup + +
MENU_GROUP.MenuGroupID + +
MENU_GROUP.MenuPath + +
MENU_GROUP.MenuText + +
MENU_GROUP:New(MenuGroup, MenuText, ParentMenu) +

MENU_GROUP constructor.

+
MENU_GROUP.ParentMenu + +
MENU_GROUP.Path + +
MENU_GROUP:Remove(MenuTime) +

Removes the main menu and sub menus recursively of this MENU_GROUP.

+
MENU_GROUP:RemoveSubMenus(MenuTime) +

Removes the sub menus recursively of this MENU_GROUP.

+
+ +

Type MENU_GROUP_COMMAND

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MENU_GROUP_COMMAND.ClassName + +
MENU_GROUP_COMMAND.MenuGroup + +
MENU_GROUP_COMMAND.MenuGroupID + +
MENU_GROUP_COMMAND.MenuPath + +
MENU_GROUP_COMMAND.MenuText + +
MENU_GROUP_COMMAND:New(MenuGroup, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) +

Creates a new radio command item for a group

+
MENU_GROUP_COMMAND.ParentMenu + +
MENU_GROUP_COMMAND.Path + +
MENU_GROUP_COMMAND:Remove(MenuTime) +

Removes a menu structure for a group.

+
+ +

Type MENU_MISSION

+ + + + + + + + + + + + + + + + + +
MENU_MISSION.ClassName + +
MENU_MISSION:New(MenuText, ParentMenu) +

MENU_MISSION constructor.

+
MENU_MISSION:Remove() +

Removes the main menu and the sub menus recursively of this MENU_MISSION.

+
MENU_MISSION:RemoveSubMenus() +

Removes the sub menus recursively of this MENU_MISSION.

+
+ +

Type MENU_MISSION_COMMAND

+ + + + + + + + + + + + + +
MENU_MISSION_COMMAND.ClassName + +
MENU_MISSION_COMMAND:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) +

MENU_MISSION constructor.

+
MENU_MISSION_COMMAND:Remove() +

Removes a radio command item for a coalition

+
+ +

Global(s)

+
+
+ + #MENU_BASE + +MENU_BASE + +
+
+ + + +
+
+
+
+ + #MENU_CLIENT + +MENU_CLIENT + +
+
+ + + +
+
+
+
+ + #MENU_CLIENT_COMMAND + +MENU_CLIENT_COMMAND + +
+
+ + + +
+
+
+
+ + #MENU_COALITION + +MENU_COALITION + +
+
+ + + +
+
+
+
+ + #MENU_COALITION_COMMAND + +MENU_COALITION_COMMAND + +
+
+ + + +
+
+
+
+ + #MENU_COMMAND_BASE + +MENU_COMMAND_BASE + +
+
+ + + +
+
+
+
+ + #MENU_GROUP + +MENU_GROUP + +
+
+ + + +
+
+
+
+ + #MENU_GROUP_COMMAND + +MENU_GROUP_COMMAND + +
+
+ + + +
+
+
+
+ + #MENU_MISSION + +MENU_MISSION + +
+
+ + + +
+
+
+
+ + #MENU_MISSION_COMMAND + +MENU_MISSION_COMMAND + +
+
+ + + +
+
+

Type Menu

+ +

Type MENU_BASE

+ +

The MENU_BASE class

+ +

Field(s)

+
+
+ + #string + +MENU_BASE.ClassName + +
+
+ + + +
+
+
+
+ + +MENU_BASE:GetMenu(MenuText) + +
+
+ +

Gets a Menu from a parent Menu

+ +

Parameter

+
    +
  • + +

    #string MenuText : +The text of the child menu.

    + +
  • +
+

Return value

+ +

#MENU_BASE:

+ + +
+
+
+
+ + +MENU_BASE.MenuParentPath + +
+
+ + + +
+
+
+
+ + +MENU_BASE.MenuPath + +
+
+ + + +
+
+
+
+ + + +MENU_BASE.MenuRemoveParent + +
+
+ + + +
+
+
+
+ + #string + +MENU_BASE.MenuText + +
+
+ + + +
+
+
+
+ + + +MENU_BASE.MenuTime + +
+
+ + + +
+
+
+
+ + +MENU_BASE.New(#, self, MenuText, ParentMenu) + +
+
+ +

Consructor

+ +

Parameters

+
    +
  • + +

    # : +ENU_BASE

    + +
  • +
  • + +

    self :

    + +
  • +
  • + +

    MenuText :

    + +
  • +
  • + +

    ParentMenu :

    + +
  • +
+

Return value

+ +

#MENU_BASE:

+ + +
+
+
+
+ + +MENU_BASE:SetRemoveParent(RemoveParent) + +
+
+ +

Sets a Menu to remove automatically the parent menu when the menu removed is the last child menu of that parent Menu.

+ +

Parameter

+
    +
  • + +

    #boolean RemoveParent : +If true, the parent menu is automatically removed when this menu is the last child menu of that parent Menu.

    + +
  • +
+

Return value

+ +

#MENU_BASE:

+ + +
+
+
+
+ + +MENU_BASE:SetTime(MenuTime) + +
+
+ +

Sets a time stamp for later prevention of menu removal.

+ +

Parameter

+
    +
  • + +

    MenuTime :

    + +
  • +
+

Return value

+ +

#MENU_BASE:

+ + +
+
+ +

Type MENU_CLIENT

+ +

MENU_COALITION constructor.

+ + +

Creates a new radio command item for a coalition, which can invoke a function with parameters.

+ +

Usage:

+
 -- This demo creates a menu structure for the two clients of planes.
+ -- Each client will receive a different menu structure.
+ -- To test, join the planes, then look at the other radio menus (Option F10).
+ -- Then switch planes and check if the menu is still there.
+ -- And play with the Add and Remove menu options.
+ 
+ -- Note that in multi player, this will only work after the DCS clients bug is solved.
+
+ local function ShowStatus( PlaneClient, StatusText, Coalition )
+
+   MESSAGE:New( Coalition, 15 ):ToRed()
+   PlaneClient:Message( StatusText, 15 )
+ end
+
+ local MenuStatus = {}
+
+ local function RemoveStatusMenu( MenuClient )
+   local MenuClientName = MenuClient:GetName()
+   MenuStatus[MenuClientName]:Remove()
+ end
+
+ --- @param Wrapper.Client#CLIENT MenuClient
+ local function AddStatusMenu( MenuClient )
+   local MenuClientName = MenuClient:GetName()
+   -- This would create a menu for the red coalition under the MenuCoalitionRed menu object.
+   MenuStatus[MenuClientName] = MENU_CLIENT:New( MenuClient, "Status for Planes" )
+   MENU_CLIENT_COMMAND:New( MenuClient, "Show Status", MenuStatus[MenuClientName], ShowStatus, MenuClient, "Status of planes is ok!", "Message to Red Coalition" )
+ end
+
+ SCHEDULER:New( nil,
+   function()
+     local PlaneClient = CLIENT:FindByName( "Plane 1" )
+     if PlaneClient and PlaneClient:IsAlive() then
+       local MenuManage = MENU_CLIENT:New( PlaneClient, "Manage Menus" )
+       MENU_CLIENT_COMMAND:New( PlaneClient, "Add Status Menu Plane 1", MenuManage, AddStatusMenu, PlaneClient )
+       MENU_CLIENT_COMMAND:New( PlaneClient, "Remove Status Menu Plane 1", MenuManage, RemoveStatusMenu, PlaneClient )
+     end
+   end, {}, 10, 10 )
+
+ SCHEDULER:New( nil,
+   function()
+     local PlaneClient = CLIENT:FindByName( "Plane 2" )
+     if PlaneClient and PlaneClient:IsAlive() then
+       local MenuManage = MENU_CLIENT:New( PlaneClient, "Manage Menus" )
+       MENU_CLIENT_COMMAND:New( PlaneClient, "Add Status Menu Plane 2", MenuManage, AddStatusMenu, PlaneClient )
+       MENU_CLIENT_COMMAND:New( PlaneClient, "Remove Status Menu Plane 2", MenuManage, RemoveStatusMenu, PlaneClient )
+     end
+   end, {}, 10, 10 )
+ +

Field(s)

+
+
+ + #string + +MENU_CLIENT.ClassName + +
+
+ + + +
+
+
+
+ + +MENU_CLIENT:New(Client, MenuText, ParentMenu) + +
+
+ +

MENU_CLIENT constructor.

+ + +

Creates a new radio menu item for a client.

+ +

Parameters

+
    +
  • + +

    Wrapper.Client#CLIENT Client : +The Client owning the menu.

    + +
  • +
  • + +

    #string MenuText : +The text for the menu.

    + +
  • +
  • + +

    #table ParentMenu : +The parent menu.

    + +
  • +
+

Return value

+ +

#MENU_CLIENT: +self

+ +
+
+
+
+ + +MENU_CLIENT:Remove() + +
+
+ +

Removes the sub menus recursively of this MENU_CLIENT.

+ +

Return value

+ +

#nil:

+ + +
+
+
+
+ + +MENU_CLIENT:RemoveSubMenus() + +
+
+ +

Removes the sub menus recursively of this #MENU_CLIENT.

+ +

Return value

+ +

#MENU_CLIENT: +self

+ +
+
+ +

Type MENU_CLIENT_COMMAND

+ +

The MENUCLIENTCOMMAND class

+ +

Field(s)

+
+
+ + #string + +MENU_CLIENT_COMMAND.ClassName + +
+
+ + + +
+
+
+
+ + +MENU_CLIENT_COMMAND:New(Client, MenuText, ParentMenu, CommandMenuFunction, ...) + +
+
+ +

MENUCLIENTCOMMAND constructor.

+ + +

Creates a new radio command item for a client, which can invoke a function with parameters.

+ +

Parameters

+
    +
  • + +

    Wrapper.Client#CLIENT Client : +The Client owning the menu.

    + +
  • +
  • + +

    #string MenuText : +The text for the menu.

    + +
  • +
  • + +

    #MENU_BASE ParentMenu : +The parent menu.

    + +
  • +
  • + +

    CommandMenuFunction : +A function that is called when the menu key is pressed.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

Menu#MENUCLIENTCOMMAND: +self

+ +
+
+
+
+ + +MENU_CLIENT_COMMAND:Remove() + +
+
+ +

Removes a menu structure for a client.

+ +

Return value

+ +

#nil:

+ + +
+
+ +

Type MENU_COALITION

+ +

The MENU_COALITION class

+ +

Usage:

+
 -- This demo creates a menu structure for the planes within the red coalition.
+ -- To test, join the planes, then look at the other radio menus (Option F10).
+ -- Then switch planes and check if the menu is still there.
+
+ local Plane1 = CLIENT:FindByName( "Plane 1" )
+ local Plane2 = CLIENT:FindByName( "Plane 2" )
+
+
+ -- This would create a menu for the red coalition under the main DCS "Others" menu.
+ local MenuCoalitionRed = MENU_COALITION:New( coalition.side.RED, "Manage Menus" )
+
+
+ local function ShowStatus( StatusText, Coalition )
+
+   MESSAGE:New( Coalition, 15 ):ToRed()
+   Plane1:Message( StatusText, 15 )
+   Plane2:Message( StatusText, 15 )
+ end
+
+ local MenuStatus -- Menu#MENU_COALITION
+ local MenuStatusShow -- Menu#MENU_COALITION_COMMAND
+
+ local function RemoveStatusMenu()
+   MenuStatus:Remove()
+ end
+
+ local function AddStatusMenu()
+   
+   -- This would create a menu for the red coalition under the MenuCoalitionRed menu object.
+   MenuStatus = MENU_COALITION:New( coalition.side.RED, "Status for Planes" )
+   MenuStatusShow = MENU_COALITION_COMMAND:New( coalition.side.RED, "Show Status", MenuStatus, ShowStatus, "Status of planes is ok!", "Message to Red Coalition" )
+ end
+
+ local MenuAdd = MENU_COALITION_COMMAND:New( coalition.side.RED, "Add Status Menu", MenuCoalitionRed, AddStatusMenu )
+ local MenuRemove = MENU_COALITION_COMMAND:New( coalition.side.RED, "Remove Status Menu", MenuCoalitionRed, RemoveStatusMenu )
+ +

Field(s)

+
+
+ + #string + +MENU_COALITION.ClassName + +
+
+ + + +
+
+
+
+ + +MENU_COALITION:New(Coalition, MenuText, ParentMenu) + +
+
+ +

MENU_COALITION constructor.

+ + +

Creates a new MENU_COALITION object and creates the menu for a complete coalition.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSCoalition#coalition.side Coalition : +The coalition owning the menu.

    + +
  • +
  • + +

    #string MenuText : +The text for the menu.

    + +
  • +
  • + +

    #table ParentMenu : +The parent menu. This parameter can be ignored if you want the menu to be located at the perent menu of DCS world (under F10 other).

    + +
  • +
+

Return value

+ +

#MENU_COALITION: +self

+ +
+
+
+
+ + +MENU_COALITION:Remove() + +
+
+ +

Removes the main menu and the sub menus recursively of this MENU_COALITION.

+ +

Return value

+ +

#nil:

+ + +
+
+
+
+ + +MENU_COALITION:RemoveSubMenus() + +
+
+ +

Removes the sub menus recursively of this MENU_COALITION.

+ + +

Note that the main menu is kept!

+ +

Return value

+ +

#MENU_COALITION:

+ + +
+
+ +

Type MENU_COALITION_COMMAND

+ +

The MENUCOALITIONCOMMAND class

+ +

Field(s)

+
+
+ + #string + +MENU_COALITION_COMMAND.ClassName + +
+
+ + + +
+
+
+
+ + +MENU_COALITION_COMMAND:New(Coalition, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) + +
+
+ +

MENU_COALITION constructor.

+ + +

Creates a new radio command item for a coalition, which can invoke a function with parameters.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSCoalition#coalition.side Coalition : +The coalition owning the menu.

    + +
  • +
  • + +

    #string MenuText : +The text for the menu.

    + +
  • +
  • + +

    Menu#MENU_COALITION ParentMenu : +The parent menu.

    + +
  • +
  • + +

    CommandMenuFunction : +A function that is called when the menu key is pressed.

    + +
  • +
  • + +

    CommandMenuArgument : +An argument for the function. There can only be ONE argument given. So multiple arguments must be wrapped into a table. See the below example how to do this.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#MENUCOALITIONCOMMAND:

+ + +
+
+
+
+ + +MENU_COALITION_COMMAND:Remove() + +
+
+ +

Removes a radio command item for a coalition

+ +

Return value

+ +

#nil:

+ + +
+
+ +

Type MENU_COMMAND_BASE

+ +

The MENUCOMMANDBASE class

+ +

Field(s)

+
+
+ + #string + +MENU_COMMAND_BASE.ClassName + +
+
+ + + +
+
+
+
+ + +MENU_COMMAND_BASE.CommandMenuArgument + +
+
+ + + +
+
+
+
+ + +MENU_COMMAND_BASE.CommandMenuFunction + +
+
+ + + +
+
+
+
+ + #function + +MENU_COMMAND_BASE.MenuCallHandler + +
+
+ + + +
+
+
+
+ + +MENU_COMMAND_BASE.New(#, self, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments) + +
+
+ +

Constructor

+ +

Parameters

+
    +
  • + +

    # : +ENUCOMMANDBASE

    + +
  • +
  • + +

    self :

    + +
  • +
  • + +

    MenuText :

    + +
  • +
  • + +

    ParentMenu :

    + +
  • +
  • + +

    CommandMenuFunction :

    + +
  • +
  • + +

    CommandMenuArguments :

    + +
  • +
+

Return value

+ +

#MENUCOMMANDBASE:

+ + +
+
+ +

Type MENU_GROUP

+ +

The MENU_GROUP class

+ +

Usage:

+
 -- This demo creates a menu structure for the two groups of planes.
+ -- Each group will receive a different menu structure.
+ -- To test, join the planes, then look at the other radio menus (Option F10).
+ -- Then switch planes and check if the menu is still there.
+ -- And play with the Add and Remove menu options.
+ 
+ -- Note that in multi player, this will only work after the DCS groups bug is solved.
+
+ local function ShowStatus( PlaneGroup, StatusText, Coalition )
+
+   MESSAGE:New( Coalition, 15 ):ToRed()
+   PlaneGroup:Message( StatusText, 15 )
+ end
+
+ local MenuStatus = {}
+
+ local function RemoveStatusMenu( MenuGroup )
+   local MenuGroupName = MenuGroup:GetName()
+   MenuStatus[MenuGroupName]:Remove()
+ end
+
+ --- @param Wrapper.Group#GROUP MenuGroup
+ local function AddStatusMenu( MenuGroup )
+   local MenuGroupName = MenuGroup:GetName()
+   -- This would create a menu for the red coalition under the MenuCoalitionRed menu object.
+   MenuStatus[MenuGroupName] = MENU_GROUP:New( MenuGroup, "Status for Planes" )
+   MENU_GROUP_COMMAND:New( MenuGroup, "Show Status", MenuStatus[MenuGroupName], ShowStatus, MenuGroup, "Status of planes is ok!", "Message to Red Coalition" )
+ end
+
+ SCHEDULER:New( nil,
+   function()
+     local PlaneGroup = GROUP:FindByName( "Plane 1" )
+     if PlaneGroup and PlaneGroup:IsAlive() then
+       local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" )
+       MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 1", MenuManage, AddStatusMenu, PlaneGroup )
+       MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 1", MenuManage, RemoveStatusMenu, PlaneGroup )
+     end
+   end, {}, 10, 10 )
+
+ SCHEDULER:New( nil,
+   function()
+     local PlaneGroup = GROUP:FindByName( "Plane 2" )
+     if PlaneGroup and PlaneGroup:IsAlive() then
+       local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" )
+       MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 2", MenuManage, AddStatusMenu, PlaneGroup )
+       MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 2", MenuManage, RemoveStatusMenu, PlaneGroup )
+     end
+   end, {}, 10, 10 )
+
+ +

Field(s)

+
+
+ + #string + +MENU_GROUP.ClassName + +
+
+ + + +
+
+
+
+ + + +MENU_GROUP.MenuGroup + +
+
+ + + +
+
+
+
+ + + +MENU_GROUP.MenuGroupID + +
+
+ + + +
+
+
+
+ + + +MENU_GROUP.MenuPath + +
+
+ + + +
+
+
+
+ + + +MENU_GROUP.MenuText + +
+
+ + + +
+
+
+
+ + +MENU_GROUP:New(MenuGroup, MenuText, ParentMenu) + +
+
+ +

MENU_GROUP constructor.

+ + +

Creates a new radio menu item for a group.

+ +

Parameters

+
    +
  • + +

    Wrapper.Group#GROUP MenuGroup : +The Group owning the menu.

    + +
  • +
  • + +

    #string MenuText : +The text for the menu.

    + +
  • +
  • + +

    #table ParentMenu : +The parent menu.

    + +
  • +
+

Return value

+ +

#MENU_GROUP: +self

+ +
+
+
+
+ + + +MENU_GROUP.ParentMenu + +
+
+ + + +
+
+
+
+ + + +MENU_GROUP.Path + +
+
+ + + +
+
+
+
+ + +MENU_GROUP:Remove(MenuTime) + +
+
+ +

Removes the main menu and sub menus recursively of this MENU_GROUP.

+ +

Parameter

+
    +
  • + +

    MenuTime :

    + +
  • +
+

Return value

+ +

#nil:

+ + +
+
+
+
+ + +MENU_GROUP:RemoveSubMenus(MenuTime) + +
+
+ +

Removes the sub menus recursively of this MENU_GROUP.

+ +

Parameter

+
    +
  • + +

    MenuTime :

    + +
  • +
+

Return value

+ +

#MENU_GROUP: +self

+ +
+
+ +

Type MENU_GROUP_COMMAND

+ +

The MENUGROUPCOMMAND class

+ +

Field(s)

+
+
+ + #string + +MENU_GROUP_COMMAND.ClassName + +
+
+ + + +
+
+
+
+ + + +MENU_GROUP_COMMAND.MenuGroup + +
+
+ + + +
+
+
+
+ + + +MENU_GROUP_COMMAND.MenuGroupID + +
+
+ + + +
+
+
+
+ + + +MENU_GROUP_COMMAND.MenuPath + +
+
+ + + +
+
+
+
+ + + +MENU_GROUP_COMMAND.MenuText + +
+
+ + + +
+
+
+
+ + +MENU_GROUP_COMMAND:New(MenuGroup, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) + +
+
+ +

Creates a new radio command item for a group

+ +

Parameters

+
    +
  • + +

    Wrapper.Group#GROUP MenuGroup : +The Group owning the menu.

    + +
  • +
  • + +

    MenuText : +The text for the menu.

    + +
  • +
  • + +

    ParentMenu : +The parent menu.

    + +
  • +
  • + +

    CommandMenuFunction : +A function that is called when the menu key is pressed.

    + +
  • +
  • + +

    CommandMenuArgument : +An argument for the function.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#MENUGROUPCOMMAND:

+ + +
+
+
+
+ + + +MENU_GROUP_COMMAND.ParentMenu + +
+
+ + + +
+
+
+
+ + + +MENU_GROUP_COMMAND.Path + +
+
+ + + +
+
+
+
+ + +MENU_GROUP_COMMAND:Remove(MenuTime) + +
+
+ +

Removes a menu structure for a group.

+ +

Parameter

+
    +
  • + +

    MenuTime :

    + +
  • +
+

Return value

+ +

#nil:

+ + +
+
+ +

Type MENU_MISSION

+ +

The MENU_MISSION class

+ +

Field(s)

+
+
+ + #string + +MENU_MISSION.ClassName + +
+
+ + + +
+
+
+
+ + +MENU_MISSION:New(MenuText, ParentMenu) + +
+
+ +

MENU_MISSION constructor.

+ + +

Creates a new MENU_MISSION object and creates the menu for a complete mission file.

+ +

Parameters

+
    +
  • + +

    #string MenuText : +The text for the menu.

    + +
  • +
  • + +

    #table ParentMenu : +The parent menu. This parameter can be ignored if you want the menu to be located at the perent menu of DCS world (under F10 other).

    + +
  • +
+

Return value

+ +

#MENU_MISSION:

+ + +
+
+
+
+ + +MENU_MISSION:Remove() + +
+
+ +

Removes the main menu and the sub menus recursively of this MENU_MISSION.

+ +

Return value

+ +

#nil:

+ + +
+
+
+
+ + +MENU_MISSION:RemoveSubMenus() + +
+
+ +

Removes the sub menus recursively of this MENU_MISSION.

+ + +

Note that the main menu is kept!

+ +

Return value

+ +

#MENU_MISSION:

+ + +
+
+ +

Type MENU_MISSION_COMMAND

+ +

The MENUMISSIONCOMMAND class

+ +

Field(s)

+
+
+ + #string + +MENU_MISSION_COMMAND.ClassName + +
+
+ + + +
+
+
+
+ + +MENU_MISSION_COMMAND:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...) + +
+
+ +

MENU_MISSION constructor.

+ + +

Creates a new radio command item for a complete mission file, which can invoke a function with parameters.

+ +

Parameters

+
    +
  • + +

    #string MenuText : +The text for the menu.

    + +
  • +
  • + +

    Menu#MENU_MISSION ParentMenu : +The parent menu.

    + +
  • +
  • + +

    CommandMenuFunction : +A function that is called when the menu key is pressed.

    + +
  • +
  • + +

    CommandMenuArgument : +An argument for the function. There can only be ONE argument given. So multiple arguments must be wrapped into a table. See the below example how to do this.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#MENUMISSIONCOMMAND: +self

+ +
+
+
+
+ + +MENU_MISSION_COMMAND:Remove() + +
+
+ +

Removes a radio command item for a coalition

+ +

Return value

+ +

#nil:

+ + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Message.html b/docs/Documentation/Message.html new file mode 100644 index 000000000..355d0c6ab --- /dev/null +++ b/docs/Documentation/Message.html @@ -0,0 +1,594 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Message

+ +

Core - MESSAGE class takes are of the real-time notifications and messages to players during a simulation.

+ + + +

Banner Image

+ +
+ +

1) Message#MESSAGE class, extends Base#BASE

+ +

Message System to display Messages to Clients, Coalitions or All. +Messages are shown on the display panel for an amount of seconds, and will then disappear. +Messages can contain a category which is indicating the category of the message.

+ +

1.1) MESSAGE construction

+ +

Messages are created with Message#MESSAGE.New. Note that when the MESSAGE object is created, no message is sent yet. +To send messages, you need to use the To functions.

+ +

1.2) Send messages to an audience

+ +

Messages are sent:

+ + + +

1.3) Send conditionally to an audience

+ +

Messages can be sent conditionally to an audience (when a condition is true):

+ + + + + +

Global(s)

+ + + + + +
MESSAGE + +
+

Type MESSAGE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MESSAGE.ClassName + +
MESSAGE.MessageCategory + +
MESSAGE.MessageID + +
MESSAGE:New(MessageText, MessageDuration, MessageCategory) +

Creates a new MESSAGE object.

+
MESSAGE:ToAll() +

Sends a MESSAGE to all players.

+
MESSAGE:ToAllIf(Condition) +

Sends a MESSAGE to all players if the given Condition is true.

+
MESSAGE:ToBlue() +

Sends a MESSAGE to the Blue coalition.

+
MESSAGE:ToClient(Client) +

Sends a MESSAGE to a Client Group.

+
MESSAGE:ToCoalition(CoalitionSide) +

Sends a MESSAGE to a Coalition.

+
MESSAGE:ToCoalitionIf(CoalitionSide, Condition) +

Sends a MESSAGE to a Coalition if the given Condition is true.

+
MESSAGE:ToGroup(Group) +

Sends a MESSAGE to a Group.

+
MESSAGE:ToRed() +

Sends a MESSAGE to the Red Coalition.

+
+ +

Global(s)

+
+
+ + #MESSAGE + +MESSAGE + +
+
+ + + +
+
+

Type Message

+ +

Type MESSAGE

+ +

The MESSAGE class

+ +

Field(s)

+
+
+ + #string + +MESSAGE.ClassName + +
+
+ + + +
+
+
+
+ + #number + +MESSAGE.MessageCategory + +
+
+ + + +
+
+
+
+ + #number + +MESSAGE.MessageID + +
+
+ + + +
+
+
+
+ + +MESSAGE:New(MessageText, MessageDuration, MessageCategory) + +
+
+ +

Creates a new MESSAGE object.

+ + +

Note that these MESSAGE objects are not yet displayed on the display panel. You must use the functions ToClient or ToCoalition or ToAll to send these Messages to the respective recipients.

+ +

Parameters

+
    +
  • + +

    #string MessageText : +is the text of the Message.

    + +
  • +
  • + +

    #number MessageDuration : +is a number in seconds of how long the MESSAGE should be shown on the display panel.

    + +
  • +
  • + +

    #string MessageCategory : +(optional) is a string expressing the "category" of the Message. The category will be shown as the first text in the message followed by a ": ".

    + +
  • +
+

Return value

+ +

#MESSAGE:

+ + +

Usage:

+
-- Create a series of new Messages.
+-- MessageAll is meant to be sent to all players, for 25 seconds, and is classified as "Score".
+-- MessageRED is meant to be sent to the RED players only, for 10 seconds, and is classified as "End of Mission", with ID "Win".
+-- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
+-- MessageClient1 is meant to be sent to a Client, for 25 seconds, and is classified as "Score", with ID "Score".
+MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!",  25, "End of Mission" )
+MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", 25, "Penalty" )
+MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target",  25, "Score" )
+MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", 25, "Score")
+ +
+
+
+
+ + +MESSAGE:ToAll() + +
+
+ +

Sends a MESSAGE to all players.

+ +

Return value

+ +

#MESSAGE:

+ + +

Usage:

+
-- Send a message created to all players.
+MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" ):ToAll()
+or
+MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" ):ToAll()
+or
+MessageAll = MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25, "Win" )
+MessageAll:ToAll()
+ +
+
+
+
+ + +MESSAGE:ToAllIf(Condition) + +
+
+ +

Sends a MESSAGE to all players if the given Condition is true.

+ +

Parameter

+
    +
  • + +

    Condition :

    + +
  • +
+

Return value

+ +

#MESSAGE:

+ + +
+
+
+
+ + +MESSAGE:ToBlue() + +
+
+ +

Sends a MESSAGE to the Blue coalition.

+ +

Return value

+ +

#MESSAGE:

+ + +

Usage:

+
-- Send a message created with the @{New} method to the BLUE coalition.
+MessageBLUE = MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToBlue()
+or
+MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToBlue()
+or
+MessageBLUE = MESSAGE:New( "To the BLUE Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
+MessageBLUE:ToBlue()
+ +
+
+
+
+ + +MESSAGE:ToClient(Client) + +
+
+ +

Sends a MESSAGE to a Client Group.

+ + +

Note that the Group needs to be defined within the ME with the skillset "Client" or "Player".

+ +

Parameter

+ +

Return value

+ +

#MESSAGE:

+ + +

Usage:

+
-- Send the 2 messages created with the @{New} method to the Client Group.
+-- Note that the Message of MessageClient2 is overwriting the Message of MessageClient1.
+ClientGroup = Group.getByName( "ClientGroup" )
+
+MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" ):ToClient( ClientGroup )
+MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" ):ToClient( ClientGroup )
+or
+MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" ):ToClient( ClientGroup )
+MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" ):ToClient( ClientGroup )
+or
+MessageClient1 = MESSAGE:New( "Congratulations, you've just hit a target", "Score", 25, "Score" )
+MessageClient2 = MESSAGE:New( "Congratulations, you've just killed a target", "Score", 25, "Score" )
+MessageClient1:ToClient( ClientGroup )
+MessageClient2:ToClient( ClientGroup )
+ +
+
+
+
+ + +MESSAGE:ToCoalition(CoalitionSide) + +
+
+ +

Sends a MESSAGE to a Coalition.

+ +

Parameter

+
    +
  • + +

    CoalitionSide : +needs to be filled out by the defined structure of the standard scripting engine coalition.side.

    + +
  • +
+

Return value

+ +

#MESSAGE:

+ + +

Usage:

+
-- Send a message created with the @{New} method to the RED coalition.
+MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToCoalition( coalition.side.RED )
+or
+MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToCoalition( coalition.side.RED )
+or
+MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
+MessageRED:ToCoalition( coalition.side.RED )
+ +
+
+
+
+ + +MESSAGE:ToCoalitionIf(CoalitionSide, Condition) + +
+
+ +

Sends a MESSAGE to a Coalition if the given Condition is true.

+ +

Parameters

+
    +
  • + +

    CoalitionSide : +needs to be filled out by the defined structure of the standard scripting engine coalition.side.

    + +
  • +
  • + +

    Condition :

    + +
  • +
+

Return value

+ +

#MESSAGE:

+ + +
+
+
+
+ + +MESSAGE:ToGroup(Group) + +
+
+ +

Sends a MESSAGE to a Group.

+ +

Parameter

+ +

Return value

+ +

#MESSAGE:

+ + +
+
+
+
+ + +MESSAGE:ToRed() + +
+
+ +

Sends a MESSAGE to the Red Coalition.

+ +

Return value

+ +

#MESSAGE:

+ + +

Usage:

+
-- Send a message created with the @{New} method to the RED coalition.
+MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToRed()
+or
+MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" ):ToRed()
+or
+MessageRED = MESSAGE:New( "To the RED Players: You receive a penalty because you've killed one of your own units", "Penalty", 25, "Score" )
+MessageRED:ToRed()
+ +
+
+ +
+ +
+ + diff --git a/docs/Documentation/MissileTrainer.html b/docs/Documentation/MissileTrainer.html new file mode 100644 index 000000000..3664bf7a8 --- /dev/null +++ b/docs/Documentation/MissileTrainer.html @@ -0,0 +1,1043 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module MissileTrainer

+ +

This module contains the MISSILETRAINER class.

+ + + +
+ +

1) MissileTrainer#MISSILETRAINER class, extends Base#BASE

+

The #MISSILETRAINER class uses the DCS world messaging system to be alerted of any missiles fired, and when a missile would hit your aircraft, +the class will destroy the missile within a certain range, to avoid damage to your aircraft. +It suports the following functionality:

+ +
    +
  • Track the missiles fired at you and other players, providing bearing and range information of the missiles towards the airplanes.
  • +
  • Provide alerts of missile launches, including detailed information of the units launching, including bearing, range �
  • +
  • Provide alerts when a missile would have killed your aircraft.
  • +
  • Provide alerts when the missile self destructs.
  • +
  • Enable / Disable and Configure the Missile Trainer using the various menu options.
  • +
+ +

When running a mission where MISSILETRAINER is used, the following radio menu structure ( 'Radio Menu' -> 'Other (F10)' -> 'MissileTrainer' ) options are available for the players:

+ +
    +
  • Messages: Menu to configure all messages. +
      +
    • Messages On: Show all messages.
    • +
    • Messages Off: Disable all messages.
    • +
  • +
  • Tracking: Menu to configure missile tracking messages. +
      +
    • To All: Shows missile tracking messages to all players.
    • +
    • To Target: Shows missile tracking messages only to the player where the missile is targetted at.
    • +
    • Tracking On: Show missile tracking messages.
    • +
    • Tracking Off: Disable missile tracking messages.
    • +
    • Frequency Increase: Increases the missile tracking message frequency with one second.
    • +
    • Frequency Decrease: Decreases the missile tracking message frequency with one second.
    • +
  • +
  • Alerts: Menu to configure alert messages. +
      +
    • To All: Shows alert messages to all players.
    • +
    • To Target: Shows alert messages only to the player where the missile is (was) targetted at.
    • +
    • Hits On: Show missile hit alert messages.
    • +
    • Hits Off: Disable missile hit alert messages.
    • +
    • Launches On: Show missile launch messages.
    • +
    • Launches Off: Disable missile launch messages.
    • +
  • +
  • Details: Menu to configure message details. +
      +
    • Range On: Shows range information when a missile is fired to a target.
    • +
    • Range Off: Disable range information when a missile is fired to a target.
    • +
    • Bearing On: Shows bearing information when a missile is fired to a target.
    • +
    • Bearing Off: Disable bearing information when a missile is fired to a target.
    • +
  • +
  • Distance: Menu to configure the distance when a missile needs to be destroyed when near to a player, during tracking. This will improve/influence hit calculation accuracy, but has the risk of damaging the aircraft when the missile reaches the aircraft before the distance is measured. +
      +
    • 50 meter: Destroys the missile when the distance to the aircraft is below or equal to 50 meter.
    • +
    • 100 meter: Destroys the missile when the distance to the aircraft is below or equal to 100 meter.
    • +
    • 150 meter: Destroys the missile when the distance to the aircraft is below or equal to 150 meter.
    • +
    • 200 meter: Destroys the missile when the distance to the aircraft is below or equal to 200 meter.
    • +
  • +
+ + +

1.1) MISSILETRAINER construction methods:

+

Create a new MISSILETRAINER object with the MISSILETRAINER.New method:

+ +
    +
  • MISSILETRAINER.New: Creates a new MISSILETRAINER object taking the maximum distance to your aircraft to evaluate when a missile needs to be destroyed.
  • +
+ +

MISSILETRAINER will collect each unit declared in the mission with a skill level "Client" and "Player", and will monitor the missiles shot at those.

+ +

1.2) MISSILETRAINER initialization methods:

+

A MISSILETRAINER object will behave differently based on the usage of initialization methods:

+ + + +
+ +

CREDITS

+

Stuka (Danny) Who you can search on the Eagle Dynamics Forums. +Working together with Danny has resulted in the MISSILETRAINER class. +Danny has shared his ideas and together we made a design. +Together with the 476 virtual team, we tested the MISSILETRAINER class, and got much positive feedback!

+ + +

Global(s)

+ + + + + +
MISSILETRAINER + +
+

Type MISSILETRAINER

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MISSILETRAINER.AlertsHitsOnOff + +
MISSILETRAINER.AlertsLaunchesOnOff + +
MISSILETRAINER.AlertsToAll + +
MISSILETRAINER.ClassName + +
MISSILETRAINER.DBClients + +
MISSILETRAINER.DetailsBearingOnOff + +
MISSILETRAINER.DetailsRangeOnOff + +
MISSILETRAINER:InitAlertsHitsOnOff(AlertsHitsOnOff) +

Sets by default the display of hit alerts ON or OFF.

+
MISSILETRAINER:InitAlertsLaunchesOnOff(AlertsLaunchesOnOff) +

Sets by default the display of launch alerts ON or OFF.

+
MISSILETRAINER:InitAlertsToAll(AlertsToAll) +

Sets by default the display of alerts to be shown to all players or only to you.

+
MISSILETRAINER:InitBearingOnOff(DetailsBearingOnOff) +

Sets by default the display of bearing information of missiles ON of OFF.

+
MISSILETRAINER:InitMenusOnOff(MenusOnOff) +

Enables / Disables the menus.

+
MISSILETRAINER:InitMessagesOnOff(MessagesOnOff) +

Sets by default the display of any message to be ON or OFF.

+
MISSILETRAINER:InitRangeOnOff(DetailsRangeOnOff) +

Sets by default the display of range information of missiles ON of OFF.

+
MISSILETRAINER:InitTrackingFrequency(TrackingFrequency) +

Increases, decreases the missile tracking message display frequency with the provided time interval in seconds.

+
MISSILETRAINER:InitTrackingOnOff(TrackingOnOff) +

Sets by default the display of missile tracking report to be ON or OFF.

+
MISSILETRAINER:InitTrackingToAll(TrackingToAll) +

Sets by default the missile tracking report for all players or only for those missiles targetted to you.

+
MISSILETRAINER.MenusOnOff + +
MISSILETRAINER.MessagesOnOff + +
MISSILETRAINER:New(Distance, Briefing) +

Creates the main object which is handling missile tracking.

+
MISSILETRAINER:OnEventShot(EventData, EVentData) +

Detects if an SA site was shot with an anti radiation missile.

+
MISSILETRAINER.TrackingFrequency + +
MISSILETRAINER.TrackingMissiles + +
MISSILETRAINER.TrackingOnOff + +
MISSILETRAINER.TrackingToAll + +
MISSILETRAINER:_AddBearing(Client, TrainerWeapon) + +
MISSILETRAINER:_AddRange(Client, TrainerWeapon) + +
MISSILETRAINER._Alive(Client, self) + +
MISSILETRAINER._MenuMessages(MenuParameters) + +
MISSILETRAINER:_TrackMissiles() + +
+ +

Global(s)

+
+
+ + #MISSILETRAINER + +MISSILETRAINER + +
+
+ + + +
+
+

Type MissileTrainer

+ +

Type MISSILETRAINER

+ +

The MISSILETRAINER class

+ +

Field(s)

+
+
+ + + +MISSILETRAINER.AlertsHitsOnOff + +
+
+ + + +
+
+
+
+ + + +MISSILETRAINER.AlertsLaunchesOnOff + +
+
+ + + +
+
+
+
+ + + +MISSILETRAINER.AlertsToAll + +
+
+ + + +
+
+
+
+ + #string + +MISSILETRAINER.ClassName + +
+
+ + + +
+
+
+
+ + Core.Set#SET_CLIENT + +MISSILETRAINER.DBClients + +
+
+ + + +
+
+
+
+ + + +MISSILETRAINER.DetailsBearingOnOff + +
+
+ + + +
+
+
+
+ + + +MISSILETRAINER.DetailsRangeOnOff + +
+
+ + + +
+
+
+
+ + +MISSILETRAINER:InitAlertsHitsOnOff(AlertsHitsOnOff) + +
+
+ +

Sets by default the display of hit alerts ON or OFF.

+ +

Parameter

+
    +
  • + +

    #boolean AlertsHitsOnOff : +true or false

    + +
  • +
+

Return value

+ +

#MISSILETRAINER: +self

+ +
+
+
+
+ + +MISSILETRAINER:InitAlertsLaunchesOnOff(AlertsLaunchesOnOff) + +
+
+ +

Sets by default the display of launch alerts ON or OFF.

+ +

Parameter

+
    +
  • + +

    #boolean AlertsLaunchesOnOff : +true or false

    + +
  • +
+

Return value

+ +

#MISSILETRAINER: +self

+ +
+
+
+
+ + +MISSILETRAINER:InitAlertsToAll(AlertsToAll) + +
+
+ +

Sets by default the display of alerts to be shown to all players or only to you.

+ +

Parameter

+
    +
  • + +

    #boolean AlertsToAll : +true or false

    + +
  • +
+

Return value

+ +

#MISSILETRAINER: +self

+ +
+
+
+
+ + +MISSILETRAINER:InitBearingOnOff(DetailsBearingOnOff) + +
+
+ +

Sets by default the display of bearing information of missiles ON of OFF.

+ +

Parameter

+
    +
  • + +

    #boolean DetailsBearingOnOff : +true or false

    + +
  • +
+

Return value

+ +

#MISSILETRAINER: +self

+ +
+
+
+
+ + +MISSILETRAINER:InitMenusOnOff(MenusOnOff) + +
+
+ +

Enables / Disables the menus.

+ +

Parameter

+
    +
  • + +

    #boolean MenusOnOff : +true or false

    + +
  • +
+

Return value

+ +

#MISSILETRAINER: +self

+ +
+
+
+
+ + +MISSILETRAINER:InitMessagesOnOff(MessagesOnOff) + +
+
+ +

Sets by default the display of any message to be ON or OFF.

+ +

Parameter

+
    +
  • + +

    #boolean MessagesOnOff : +true or false

    + +
  • +
+

Return value

+ +

#MISSILETRAINER: +self

+ +
+
+
+
+ + +MISSILETRAINER:InitRangeOnOff(DetailsRangeOnOff) + +
+
+ +

Sets by default the display of range information of missiles ON of OFF.

+ +

Parameter

+
    +
  • + +

    #boolean DetailsRangeOnOff : +true or false

    + +
  • +
+

Return value

+ +

#MISSILETRAINER: +self

+ +
+
+
+
+ + +MISSILETRAINER:InitTrackingFrequency(TrackingFrequency) + +
+
+ +

Increases, decreases the missile tracking message display frequency with the provided time interval in seconds.

+ + +

The default frequency is a 3 second interval, so the Tracking Frequency parameter specifies the increase or decrease from the default 3 seconds or the last frequency update.

+ +

Parameter

+
    +
  • + +

    #number TrackingFrequency : +Provide a negative or positive value in seconds to incraese or decrease the display frequency.

    + +
  • +
+

Return value

+ +

#MISSILETRAINER: +self

+ +
+
+
+
+ + +MISSILETRAINER:InitTrackingOnOff(TrackingOnOff) + +
+
+ +

Sets by default the display of missile tracking report to be ON or OFF.

+ +

Parameter

+
    +
  • + +

    #boolean TrackingOnOff : +true or false

    + +
  • +
+

Return value

+ +

#MISSILETRAINER: +self

+ +
+
+
+
+ + +MISSILETRAINER:InitTrackingToAll(TrackingToAll) + +
+
+ +

Sets by default the missile tracking report for all players or only for those missiles targetted to you.

+ +

Parameter

+
    +
  • + +

    #boolean TrackingToAll : +true or false

    + +
  • +
+

Return value

+ +

#MISSILETRAINER: +self

+ +
+
+
+
+ + + +MISSILETRAINER.MenusOnOff + +
+
+ + + +
+
+
+
+ + + +MISSILETRAINER.MessagesOnOff + +
+
+ + + +
+
+
+
+ + +MISSILETRAINER:New(Distance, Briefing) + +
+
+ +

Creates the main object which is handling missile tracking.

+ + +

When a missile is fired a SCHEDULER is set off that follows the missile. When near a certain a client player, the missile will be destroyed.

+ +

Parameters

+
    +
  • + +

    #number Distance : +The distance in meters when a tracked missile needs to be destroyed when close to a player.

    + +
  • +
  • + +

    #string Briefing : +(Optional) Will show a text to the players when starting their mission. Can be used for briefing purposes.

    + +
  • +
+

Return value

+ +

#MISSILETRAINER:

+ + +
+
+
+
+ + +MISSILETRAINER:OnEventShot(EventData, EVentData) + +
+
+ +

Detects if an SA site was shot with an anti radiation missile.

+ + +

In this case, take evasive actions based on the skill level set within the ME.

+ +

Parameters

+ +
+
+
+
+ + +MISSILETRAINER.TrackingFrequency + +
+
+ + + +
+
+
+
+ + + +MISSILETRAINER.TrackingMissiles + +
+
+ + + +
+
+
+
+ + + +MISSILETRAINER.TrackingOnOff + +
+
+ + + +
+
+
+
+ + + +MISSILETRAINER.TrackingToAll + +
+
+ + + +
+
+
+
+ + +MISSILETRAINER:_AddBearing(Client, TrainerWeapon) + +
+
+ + + +

Parameters

+
    +
  • + +

    Client :

    + +
  • +
  • + +

    TrainerWeapon :

    + +
  • +
+
+
+
+
+ + +MISSILETRAINER:_AddRange(Client, TrainerWeapon) + +
+
+ + + +

Parameters

+
    +
  • + +

    Client :

    + +
  • +
  • + +

    TrainerWeapon :

    + +
  • +
+
+
+
+
+ + +MISSILETRAINER._Alive(Client, self) + +
+
+ + + +

Parameters

+
    +
  • + +

    Client :

    + +
  • +
  • + +

    self :

    + +
  • +
+
+
+
+
+ + +MISSILETRAINER._MenuMessages(MenuParameters) + +
+
+ + + +

Parameter

+
    +
  • + +

    MenuParameters :

    + +
  • +
+
+
+
+
+ + +MISSILETRAINER:_TrackMissiles() + +
+
+ + + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Mission.html b/docs/Documentation/Mission.html new file mode 100644 index 000000000..1dfbf5f58 --- /dev/null +++ b/docs/Documentation/Mission.html @@ -0,0 +1,2092 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Mission

+ +

A MISSION is the main owner of a Mission orchestration within MOOSE .

+ + +

The Mission framework orchestrates CLIENTs, TASKs, STAGEs etc. +A CLIENT needs to be registered within the MISSION through the function AddClient. A TASK needs to be registered within the MISSION through the function AddTask.

+ +

Global(s)

+ + + + + +
MISSION + +
+

Type MISSION

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MISSION:AbortUnit(PlayerUnit) +

Aborts a PlayerUnit from the Mission.

+
MISSION:AddScoring(Scoring) +

Add a scoring to the mission.

+
MISSION:AddTask(Task) +

Register a Task to be completed within the Mission.

+
MISSION.ClassName + +
MISSION:Complete() +

Synchronous Event Trigger for Event Complete.

+
MISSION:CrashUnit(PlayerUnit) +

Handles a crash of a PlayerUnit from the Mission.

+
MISSION:Fail() +

Synchronous Event Trigger for Event Fail.

+
MISSION:GetCommandCenter() +

Gets the COMMANDCENTER.

+
MISSION:GetGroups() +

Get the groups for which TASKS are given in the mission

+
MISSION:GetMenu(TaskGroup) +

Gets the mission menu for the coalition.

+
MISSION:GetName() +

Gets the mission name.

+
MISSION:GetNextTaskID(Task) +

Return the next Task ID to be completed within the Mission.

+
MISSION:GetScoring() +

Get the scoring object of a mission.

+
MISSION.GetTask(TaskName, self) +

Get the TASK identified by the TaskNumber from the Mission.

+
MISSION:GetTasks() +

Get all the TASKs from the Mission.

+
MISSION.HasGroup(#, self, TaskGroup) +

Validates if the Mission has a Group

+
MISSION:IsCompleted() +

Is the Mission Completed.

+
MISSION:IsFailed() +

Is the Mission Failed.

+
MISSION:IsHold() +

Is the Mission Hold.

+
MISSION:IsIdle() +

Is the Mission Idle.

+
MISSION:IsOngoing() +

Is the Mission Ongoing.

+
MISSION:JoinUnit(PlayerUnit, PlayerGroup) +

Add a Unit to join the Mission.

+
MISSION.MissionBriefing + +
MISSION.MissionMenu + +
MISSION.MissionStatus + +
MISSION.Name + +
MISSION:New(CommandCenter, MissionName, MissionPriority, MissionBriefing, MissionCoalition) +

This is the main MISSION declaration method.

+
MISSION:OnAfterComplete(From, Event, To) +

OnAfter Transition Handler for Event Complete.

+
MISSION:OnAfterFail(From, Event, To) +

OnAfter Transition Handler for Event Fail.

+
MISSION:OnAfterStart(From, Event, To) +

OnAfter Transition Handler for Event Start.

+
MISSION:OnAfterStop(From, Event, To) +

OnAfter Transition Handler for Event Stop.

+
MISSION:OnBeforeComplete(From, Event, To) +

OnBefore Transition Handler for Event Complete.

+
MISSION:OnBeforeFail(From, Event, To) +

OnBefore Transition Handler for Event Fail.

+
MISSION:OnBeforeStart(From, Event, To) +

OnBefore Transition Handler for Event Start.

+
MISSION:OnBeforeStop(From, Event, To) +

OnBefore Transition Handler for Event Stop.

+
MISSION:OnEnterCompleted(From, Event, To) +

OnEnter Transition Handler for State Completed.

+
MISSION:OnEnterFailed(From, Event, To) +

OnEnter Transition Handler for State Failed.

+
MISSION:OnEnterIdle(From, Event, To) +

OnEnter Transition Handler for State Idle.

+
MISSION:OnEnterOngoing(From, Event, To) +

OnEnter Transition Handler for State Ongoing.

+
MISSION:OnLeaveCompleted(From, Event, To) +

OnLeave Transition Handler for State Completed.

+
MISSION:OnLeaveFailed(From, Event, To) +

OnLeave Transition Handler for State Failed.

+
MISSION:OnLeaveIdle(From, Event, To) +

OnLeave Transition Handler for State Idle.

+
MISSION:OnLeaveOngoing(From, Event, To) +

OnLeave Transition Handler for State Ongoing.

+
MISSION:RemoveMenu(MenuTime) +

Removes the Planned Task menu.

+
MISSION:RemoveTask(Task) +

Removes a Task to be completed within the Mission.

+
MISSION:RemoveTaskMenu(Task) +

Removes a Task menu.

+
MISSION:ReportDetails() +

Create a detailed report of the Mission, listing all the details of the Task.

+
MISSION:ReportOverview() +

Create a overview report of the Mission (multiple lines).

+
MISSION:ReportSummary() +

Create a summary report of the Mission (one line).

+
MISSION.Scoring + +
MISSION:SetMenu(MenuTime) +

Sets the Planned Task menu.

+
MISSION:Start() +

Synchronous Event Trigger for Event Start.

+
MISSION:Stop() +

Synchronous Event Trigger for Event Stop.

+
MISSION._Clients + +
MISSION:__Complete(Delay) +

Asynchronous Event Trigger for Event Complete.

+
MISSION:__Fail(Delay) +

Asynchronous Event Trigger for Event Fail.

+
MISSION:__Start(Delay) +

Asynchronous Event Trigger for Event Start.

+
MISSION:__Stop(Delay) +

Asynchronous Event Trigger for Event Stop.

+
MISSION:onbeforeComplete(From, Event, To) + +
MISSION:onenterCompleted(From, Event, To) + +
+ +

Global(s)

+
+
+ + #MISSION + +MISSION + +
+
+ + + +
+
+

Type Mission

+ +

Type MISSION

+ +

The MISSION class

+ +

Field(s)

+
+
+ + +MISSION:AbortUnit(PlayerUnit) + +
+
+ +

Aborts a PlayerUnit from the Mission.

+ + +

For each Task within the Mission, the PlayerUnit is removed from Task where it is assigned. +If the Unit was not part of a Task in the Mission, false is returned. +If the Unit is part of a Task in the Mission, true is returned.

+ +

Parameter

+
    +
  • + +

    Wrapper.Unit#UNIT PlayerUnit : +The CLIENT or UNIT of the Player joining the Mission.

    + +
  • +
+

Return value

+ +

#boolean: +true if Unit is part of a Task in the Mission.

+ +
+
+
+
+ + +MISSION:AddScoring(Scoring) + +
+
+ +

Add a scoring to the mission.

+ +

Parameter

+
    +
  • + +

    Scoring :

    + +
  • +
+

Return value

+ +

#MISSION: +self

+ +
+
+
+
+ + +MISSION:AddTask(Task) + +
+
+ +

Register a Task to be completed within the Mission.

+ + +

Note that there can be multiple Tasks registered to be completed. +Each Task can be set a certain Goals. The Mission will not be completed until all Goals are reached.

+ +

Parameter

+ +

Return value

+ +

Tasking.Task#TASK: +The task added.

+ +
+
+
+
+ + #string + +MISSION.ClassName + +
+
+ + + +
+
+
+
+ + +MISSION:Complete() + +
+
+ +

Synchronous Event Trigger for Event Complete.

+ +
+
+
+
+ + +MISSION:CrashUnit(PlayerUnit) + +
+
+ +

Handles a crash of a PlayerUnit from the Mission.

+ + +

For each Task within the Mission, the PlayerUnit is removed from Task where it is assigned. +If the Unit was not part of a Task in the Mission, false is returned. +If the Unit is part of a Task in the Mission, true is returned.

+ +

Parameter

+
    +
  • + +

    Wrapper.Unit#UNIT PlayerUnit : +The CLIENT or UNIT of the Player crashing.

    + +
  • +
+

Return value

+ +

#boolean: +true if Unit is part of a Task in the Mission.

+ +
+
+
+
+ + +MISSION:Fail() + +
+
+ +

Synchronous Event Trigger for Event Fail.

+ +
+
+
+
+ + +MISSION:GetCommandCenter() + +
+
+ +

Gets the COMMANDCENTER.

+ +

Return value

+ +

Tasking.CommandCenter#COMMANDCENTER:

+ + +
+
+
+
+ + +MISSION:GetGroups() + +
+
+ +

Get the groups for which TASKS are given in the mission

+ +

Return value

+ +

Core.Set#SET_GROUP:

+ + +
+
+
+
+ + +MISSION:GetMenu(TaskGroup) + +
+
+ +

Gets the mission menu for the coalition.

+ +

Parameter

+ +

Return value

+ +

Core.Menu#MENU_COALITION: +self

+ +
+
+
+
+ + +MISSION:GetName() + +
+
+ +

Gets the mission name.

+ +

Return value

+ +

#MISSION: +self

+ +
+
+
+
+ + +MISSION:GetNextTaskID(Task) + +
+
+ +

Return the next Task ID to be completed within the Mission.

+ +

Parameter

+ +

Return value

+ +

Tasking.Task#TASK: +The task added.

+ +
+
+
+
+ + +MISSION:GetScoring() + +
+
+ +

Get the scoring object of a mission.

+ +

Return value

+ +

#SCORING: +Scoring

+ +
+
+
+
+ + +MISSION.GetTask(TaskName, self) + +
+
+ +

Get the TASK identified by the TaskNumber from the Mission.

+ + +

This function is useful in GoalFunctions.

+ +

Parameters

+
    +
  • + +

    #string TaskName : +The Name of the Task within the Mission.

    + +
  • +
  • + +

    self :

    + +
  • +
+

Return values

+
    +
  1. + +

    Tasking.Task#TASK: +The Task

    + +
  2. +
  3. + +

    #nil: +Returns nil if no task was found.

    + +
  4. +
+
+
+
+
+ + +MISSION:GetTasks() + +
+
+ +

Get all the TASKs from the Mission.

+ + +

This function is useful in GoalFunctions.

+ +

Return value

+ + +

{TASK,...} Structure of TASKS with the TASK number as the key.

+ +

Usage:

+
-- Get Tasks from the Mission.
+Tasks = Mission:GetTasks()
+env.info( "Task 2 Completion = " .. Tasks[2]:GetGoalPercentage() .. "%" )
+ +
+
+
+
+ + +MISSION.HasGroup(#, self, TaskGroup) + +
+
+ +

Validates if the Mission has a Group

+ +

Parameters

+
    +
  • + +

    # : +ISSION

    + +
  • +
  • + +

    self :

    + +
  • +
  • + +

    TaskGroup :

    + +
  • +
+

Return value

+ +

#boolean: +true if the Mission has a Group.

+ +
+
+
+
+ + +MISSION:IsCompleted() + +
+
+ +

Is the Mission Completed.

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +MISSION:IsFailed() + +
+
+ +

Is the Mission Failed.

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +MISSION:IsHold() + +
+
+ +

Is the Mission Hold.

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +MISSION:IsIdle() + +
+
+ +

Is the Mission Idle.

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +MISSION:IsOngoing() + +
+
+ +

Is the Mission Ongoing.

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +MISSION:JoinUnit(PlayerUnit, PlayerGroup) + +
+
+ +

Add a Unit to join the Mission.

+ + +

For each Task within the Mission, the Unit is joined with the Task. +If the Unit was not part of a Task in the Mission, false is returned. +If the Unit is part of a Task in the Mission, true is returned.

+ +

Parameters

+
    +
  • + +

    Wrapper.Unit#UNIT PlayerUnit : +The CLIENT or UNIT of the Player joining the Mission.

    + +
  • +
  • + +

    Wrapper.Group#GROUP PlayerGroup : +The GROUP of the player joining the Mission.

    + +
  • +
+

Return value

+ +

#boolean: +true if Unit is part of a Task in the Mission.

+ +
+
+
+
+ + #string + +MISSION.MissionBriefing + +
+
+ + + +
+
+
+
+ + Core.Menu#MENU_COALITION + +MISSION.MissionMenu + +
+
+ + + +
+
+
+
+ + #string + +MISSION.MissionStatus + +
+
+ + + +
+
+
+
+ + #string + +MISSION.Name + +
+
+ + + +
+
+
+
+ + +MISSION:New(CommandCenter, MissionName, MissionPriority, MissionBriefing, MissionCoalition) + +
+
+ +

This is the main MISSION declaration method.

+ + +

Each Mission is like the master or a Mission orchestration between, Clients, Tasks, Stages etc.

+ +

Parameters

+
    +
  • + +

    Tasking.CommandCenter#COMMANDCENTER CommandCenter :

    + +
  • +
  • + +

    #string MissionName : +is the name of the mission. This name will be used to reference the status of each mission by the players.

    + +
  • +
  • + +

    #string MissionPriority : +is a string indicating the "priority" of the Mission. f.e. "Primary", "Secondary" or "First", "Second". It is free format and up to the Mission designer to choose. There are no rules behind this field.

    + +
  • +
  • + +

    #string MissionBriefing : +is a string indicating the mission briefing to be shown when a player joins a CLIENT.

    + +
  • +
  • + +

    Dcs.DCSCoalitionWrapper.Object#coalition MissionCoalition : +is a string indicating the coalition or party to which this mission belongs to. It is free format and can be chosen freely by the mission designer. Note that this field is not to be confused with the coalition concept of the ME. Examples of a Mission Coalition could be "NATO", "CCCP", "Intruders", "Terrorists"...

    + +
  • +
+

Return value

+ +

#MISSION: +self

+ +
+
+
+
+ + +MISSION:OnAfterComplete(From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Complete.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +MISSION:OnAfterFail(From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Fail.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +MISSION:OnAfterStart(From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Start.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +MISSION:OnAfterStop(From, Event, To) + +
+
+ +

OnAfter Transition Handler for Event Stop.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +MISSION:OnBeforeComplete(From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Complete.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +MISSION:OnBeforeFail(From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Fail.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +MISSION:OnBeforeStart(From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Start.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +MISSION:OnBeforeStop(From, Event, To) + +
+
+ +

OnBefore Transition Handler for Event Stop.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +MISSION:OnEnterCompleted(From, Event, To) + +
+
+ +

OnEnter Transition Handler for State Completed.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +MISSION:OnEnterFailed(From, Event, To) + +
+
+ +

OnEnter Transition Handler for State Failed.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +MISSION:OnEnterIdle(From, Event, To) + +
+
+ +

OnEnter Transition Handler for State Idle.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +MISSION:OnEnterOngoing(From, Event, To) + +
+
+ +

OnEnter Transition Handler for State Ongoing.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+
+
+
+
+ + +MISSION:OnLeaveCompleted(From, Event, To) + +
+
+ +

OnLeave Transition Handler for State Completed.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +MISSION:OnLeaveFailed(From, Event, To) + +
+
+ +

OnLeave Transition Handler for State Failed.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +MISSION:OnLeaveIdle(From, Event, To) + +
+
+ +

OnLeave Transition Handler for State Idle.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +MISSION:OnLeaveOngoing(From, Event, To) + +
+
+ +

OnLeave Transition Handler for State Ongoing.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
+

Return value

+ +

#boolean: +Return false to cancel Transition.

+ +
+
+
+
+ + +MISSION:RemoveMenu(MenuTime) + +
+
+ +

Removes the Planned Task menu.

+ +

Parameter

+
    +
  • + +

    #number MenuTime :

    + +
  • +
+
+
+
+
+ + +MISSION:RemoveTask(Task) + +
+
+ +

Removes a Task to be completed within the Mission.

+ + +

Note that there can be multiple Tasks registered to be completed. +Each Task can be set a certain Goals. The Mission will not be completed until all Goals are reached.

+ +

Parameter

+ +

Return value

+ +

#nil: +The cleaned Task reference.

+ +
+
+
+
+ + +MISSION:RemoveTaskMenu(Task) + +
+
+ +

Removes a Task menu.

+ +

Parameter

+ +

Return value

+ +

#MISSION: +self

+ +
+
+
+
+ + +MISSION:ReportDetails() + +
+
+ +

Create a detailed report of the Mission, listing all the details of the Task.

+ +

Return value

+ +

#string:

+ + +
+
+
+
+ + +MISSION:ReportOverview() + +
+
+ +

Create a overview report of the Mission (multiple lines).

+ +

Return value

+ +

#string:

+ + +
+
+
+
+ + +MISSION:ReportSummary() + +
+
+ +

Create a summary report of the Mission (one line).

+ +

Return value

+ +

#string:

+ + +
+
+
+
+ + + +MISSION.Scoring + +
+
+ + + +
+
+
+
+ + +MISSION:SetMenu(MenuTime) + +
+
+ +

Sets the Planned Task menu.

+ +

Parameter

+
    +
  • + +

    #number MenuTime :

    + +
  • +
+
+
+
+
+ + +MISSION:Start() + +
+
+ +

Synchronous Event Trigger for Event Start.

+ +
+
+
+
+ + +MISSION:Stop() + +
+
+ +

Synchronous Event Trigger for Event Stop.

+ +
+
+
+
+ + #MISSION.Clients + +MISSION._Clients + +
+
+ + + +
+
+
+
+ + +MISSION:__Complete(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Complete.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +MISSION:__Fail(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Fail.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +MISSION:__Start(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Start.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +MISSION:__Stop(Delay) + +
+
+ +

Asynchronous Event Trigger for Event Stop.

+ +

Parameter

+
    +
  • + +

    #number Delay : +The delay in seconds.

    + +
  • +
+
+
+
+
+ + +MISSION:onbeforeComplete(From, Event, To) + +
+
+ + + + +

FSM function for a MISSION + @param #MISSION self + @param #string From + @param #string Event + @param #string To

+ +

Parameters

+
    +
  • + +

    From :

    + +
  • +
  • + +

    Event :

    + +
  • +
  • + +

    To :

    + +
  • +
+
+
+
+
+ + +MISSION:onenterCompleted(From, Event, To) + +
+
+ + + + +

FSM function for a MISSION + @param #MISSION self + @param #string From + @param #string Event + @param #string To

+ +

Parameters

+
    +
  • + +

    From :

    + +
  • +
  • + +

    Event :

    + +
  • +
  • + +

    To :

    + +
  • +
+
+
+ +

Type MISSION.Clients

+ +

Type SCORING

+ +
+ +
+ + diff --git a/docs/Documentation/Movement.html b/docs/Documentation/Movement.html new file mode 100644 index 000000000..d3966610d --- /dev/null +++ b/docs/Documentation/Movement.html @@ -0,0 +1,423 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Movement

+ +

Limit the simultaneous movement of Groups within a running Mission.

+ + +

This module is defined to improve the performance in missions, and to bring additional realism for GROUND vehicles. +Performance: If in a DCSRTE there are a lot of moving GROUND units, then in a multi player mission, this WILL create lag if +the main DCS execution core of your CPU is fully utilized. So, this class will limit the amount of simultaneous moving GROUND units +on defined intervals (currently every minute).

+ +

Global(s)

+ + + + + +
MOVEMENT + +
+

Type MOVEMENT

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MOVEMENT.AliveUnits + +
MOVEMENT.ClassName + +
MOVEMENT.MoveCount + +
MOVEMENT.MoveMaximum + +
MOVEMENT.MovePrefixes + +
MOVEMENT.MoveUnits + +
MOVEMENT:New(MovePrefixes, MoveMaximum) + +
MOVEMENT:OnDeadOrCrash(Event) +

Captures the Dead or Crash events when Units crash or are destroyed.

+
MOVEMENT:OnEventBirth(self, EventData) +

Captures the birth events when new Units were spawned.

+
MOVEMENT:ScheduleStart() +

Call this function to start the MOVEMENT scheduling.

+
MOVEMENT:ScheduleStop() +

Call this function to stop the MOVEMENT scheduling.

+
MOVEMENT:_Scheduler() +

This function is called automatically by the MOVEMENT scheduler.

+
+ +

Global(s)

+
+
+ + #MOVEMENT + +MOVEMENT + +
+
+ + + +
+
+

Type Movement

+ +

Type MOVEMENT

+ +

the MOVEMENT class

+ +

Field(s)

+
+
+ + +MOVEMENT.AliveUnits + +
+
+ + + +
+
+
+
+ + #string + +MOVEMENT.ClassName + +
+
+ + + +
+
+
+
+ + #number + +MOVEMENT.MoveCount + +
+
+ + + + +

The internal counter of the amount of Moveing the has happened since MoveStart.

+ +
+
+
+
+ + + +MOVEMENT.MoveMaximum + +
+
+ + + + +

Contains the Maximum amount of units that are allowed to move...

+ +
+
+
+
+ + + +MOVEMENT.MovePrefixes + +
+
+ + + +
+
+
+
+ + + +MOVEMENT.MoveUnits + +
+
+ + + + +

Reflects if the Moving for this MovePrefixes is going to be scheduled or not.

+ +
+
+
+
+ + +MOVEMENT:New(MovePrefixes, MoveMaximum) + +
+
+ + + +

Parameters

+
    +
  • + +

    MovePrefixes :

    + +
  • +
  • + +

    MoveMaximum :

    + +
  • +
+
+
+
+
+ + +MOVEMENT:OnDeadOrCrash(Event) + +
+
+ +

Captures the Dead or Crash events when Units crash or are destroyed.

+ +

Parameter

+
    +
  • + +

    Event :

    + +
  • +
+
+
+
+
+ + +MOVEMENT:OnEventBirth(self, EventData) + +
+
+ +

Captures the birth events when new Units were spawned.

+ +

Parameters

+ +
+
+
+
+ + +MOVEMENT:ScheduleStart() + +
+
+ +

Call this function to start the MOVEMENT scheduling.

+ +
+
+
+
+ + +MOVEMENT:ScheduleStop() + +
+
+ +

Call this function to stop the MOVEMENT scheduling.

+ +
+
+
+
+ + +MOVEMENT:_Scheduler() + +
+
+ +

This function is called automatically by the MOVEMENT scheduler.

+ + +

A new function is scheduled when MoveScheduled is true.

+ +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Object.html b/docs/Documentation/Object.html new file mode 100644 index 000000000..a8198242c --- /dev/null +++ b/docs/Documentation/Object.html @@ -0,0 +1,331 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Object

+ +

This module contains the OBJECT class.

+ + + +

1) Object#OBJECT class, extends Base#BASE

+

The Object#OBJECT class is a wrapper class to handle the DCS Object objects:

+ +
    +
  • Support all DCS Object APIs.
  • +
  • Enhance with Object specific APIs not in the DCS Object API set.
  • +
  • Manage the "state" of the DCS Object.
  • +
+ +

1.1) OBJECT constructor:

+

The OBJECT class provides the following functions to construct a OBJECT instance:

+ + + +

1.2) OBJECT methods:

+

The following methods can be used to identify an Object object:

+ + + +
+ + +

Global(s)

+ + + + + +
OBJECT + +
+

Type DCSObject

+ + + + + +
DCSObject.id_ +

The ID of the controllable in DCS

+
+ +

Type OBJECT

+ + + + + + + + + + + + + + + + + + + + + +
OBJECT.ClassName + +
OBJECT:Destroy() +

Destroys the OBJECT.

+
OBJECT:GetID() +

Returns the unit's unique identifier.

+
OBJECT:New(ObjectName, Test) +

Create a new OBJECT from a DCSObject

+
OBJECT.ObjectName +

The name of the Object.

+
+ +

Global(s)

+
+
+ + #OBJECT + +OBJECT + +
+
+ + + +
+
+

Type Object

+ +

Type DCSObject

+ +

A DCSObject

+ +

Field(s)

+
+
+ + +DCSObject.id_ + +
+
+ +

The ID of the controllable in DCS

+ +
+
+ +

Type OBJECT

+ +

The OBJECT class

+ +

Field(s)

+
+
+ + #string + +OBJECT.ClassName + +
+
+ + + +
+
+
+
+ + +OBJECT:Destroy() + +
+
+ +

Destroys the OBJECT.

+ +

Return value

+ +

#nil: +The DCS Unit is not existing or alive.

+ +
+
+
+
+ + +OBJECT:GetID() + +
+
+ +

Returns the unit's unique identifier.

+ +

Return values

+
    +
  1. + +

    Dcs.DCSWrapper.Object#Object.ID: +ObjectID

    + +
  2. +
  3. + +

    #nil: +The DCS Object is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +OBJECT:New(ObjectName, Test) + +
+
+ +

Create a new OBJECT from a DCSObject

+ +

Parameters

+ +

Return value

+ +

#OBJECT: +self

+ +
+
+
+
+ + #string + +OBJECT.ObjectName + +
+
+ +

The name of the Object.

+ +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Point.html b/docs/Documentation/Point.html new file mode 100644 index 000000000..b321acabb --- /dev/null +++ b/docs/Documentation/Point.html @@ -0,0 +1,2747 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Point

+ +

Core - POINT_VEC classes define an extensive API to manage 3D points in the simulation space.

+ + + +

1) Point#POINT_VEC3 class, extends Base#BASE

+

The Point#POINT_VEC3 class defines a 3D point in the simulator.

+ +

Important Note: Most of the functions in this section were taken from MIST, and reworked to OO concepts. +In order to keep the credibility of the the author, I want to emphasize that the of the MIST framework was created by Grimes, who you can find on the Eagle Dynamics Forums.

+ +

1.1) POINT_VEC3 constructor

+ +

A new POINT_VEC3 instance can be created with:

+ + + +

1.2) Manupulate the X, Y, Z coordinates of the point

+ +

A POINT_VEC3 class works in 3D space. It contains internally an X, Y, Z coordinate. +Methods exist to manupulate these coordinates.

+ +

The current X, Y, Z axis can be retrieved with the methods POINT_VEC3.GetX(), POINT_VEC3.GetY(), POINT_VEC3.GetZ() respectively. +The methods POINT_VEC3.SetX(), POINT_VEC3.SetY(), POINT_VEC3.SetZ() change the respective axis with a new value. +The current axis values can be changed by using the methods POINT_VEC3.AddX(), POINT_VEC3.AddY(), POINT_VEC3.AddZ() +to add or substract a value from the current respective axis value. +Note that the Set and Add methods return the current POINT_VEC3 object, so these manipulation methods can be chained... For example:

+ +
 local Vec3 = PointVec3:AddX( 100 ):AddZ( 150 ):GetVec3()
+
+ +

1.3) Create waypoints for routes

+ +

A POINT_VEC3 can prepare waypoints for Ground, Air and Naval groups to be embedded into a Route.

+ + +

1.5) Smoke, flare, explode, illuminate

+ +

At the point a smoke, flare, explosion and illumination bomb can be triggered. Use the following methods:

+ +

1.5.1) Smoke

+ + + +

1.5.2) Flare

+ + + +

1.5.3) Explode

+ + + +

1.5.4) Illuminate

+ + + + +

2) Point#POINT_VEC2 class, extends Point#POINT_VEC3

+

The Point#POINT_VEC2 class defines a 2D point in the simulator. The height coordinate (if needed) will be the land height + an optional added height specified.

+ +

2.1) POINT_VEC2 constructor

+

A new POINT_VEC2 instance can be created with:

+ + + +

1.2) Manupulate the X, Altitude, Y coordinates of the 2D point

+ +

A POINT_VEC2 class works in 2D space, with an altitude setting. It contains internally an X, Altitude, Y coordinate. +Methods exist to manupulate these coordinates.

+ +

The current X, Altitude, Y axis can be retrieved with the methods POINT_VEC2.GetX(), POINT_VEC2.GetAlt(), POINT_VEC2.GetY() respectively. +The methods POINT_VEC2.SetX(), POINT_VEC2.SetAlt(), POINT_VEC2.SetY() change the respective axis with a new value. +The current Lat(itude), Alt(itude), Lon(gitude) values can also be retrieved with the methods POINT_VEC2.GetLat(), POINT_VEC2.GetAlt(), POINT_VEC2.GetLon() respectively. +The current axis values can be changed by using the methods POINT_VEC2.AddX(), POINT_VEC2.AddAlt(), POINT_VEC2.AddY() +to add or substract a value from the current respective axis value. +Note that the Set and Add methods return the current POINT_VEC2 object, so these manipulation methods can be chained... For example:

+ +
 local Vec2 = PointVec2:AddX( 100 ):AddY( 2000 ):GetVec2()
+
+ +
+ +

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-03-03: POINT_VEC3:Explosion( ExplosionIntensity ) added.
+2017-03-03: POINT_VEC3:IlluminationBomb() added.

+ +

2017-02-18: POINT_VEC3:NewFromVec2( Vec2, LandHeightAdd ) added.

+ +

2016-08-12: POINT_VEC3:Translate( Distance, Angle ) added.

+ +

2016-08-06: Made PointVec3 and Vec3, PointVec2 and Vec2 terminology used in the code consistent.

+ +
    +
  • Replaced method PointVec3() to Vec3() where the code manages a Vec3. Replaced all references to the method.
  • +
  • Replaced method PointVec2() to Vec2() where the code manages a Vec2. Replaced all references to the method.
  • +
  • Replaced method RandomPointVec3() to RandomVec3() where the code manages a Vec3. Replaced all references to the method. + .
  • +
+ +

Authors:

+ +
    +
  • FlightControl : Design & Programming
  • +
+ +

Contributions:

+ + +

Global(s)

+ + + + + + + + + +
POINT_VEC2 + +
POINT_VEC3 + +
+

Type POINT_VEC2

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
POINT_VEC2:AddAlt(Altitude) +

Add to the current land height an altitude.

+
POINT_VEC2:AddX(x) +

Add to the x coordinate of the POINT_VEC2.

+
POINT_VEC2:AddY(y) +

Add to the y coordinate of the POINT_VEC2.

+
POINT_VEC2.ClassName + +
POINT_VEC2:DistanceFromPointVec2(PointVec2Reference) +

Calculate the distance from a reference #POINT_VEC2.

+
POINT_VEC2:DistanceFromVec2(Vec2Reference) +

Calculate the distance from a reference DCSTypes#Vec2.

+
POINT_VEC2:GetAlt() +

Return the altitude (height) of the land at the POINT_VEC2.

+
POINT_VEC2:GetAltitudeText() +

Return no text for the altitude of the POINT_VEC2.

+
POINT_VEC2:GetLat() +

Return Return the Lat(itude) coordinate of the POINTVEC2 (ie: (parent)POINTVEC3.x).

+
POINT_VEC2:GetLon() +

Return the Lon(gitude) coordinate of the POINTVEC2 (ie: (parent)POINTVEC3.z).

+
POINT_VEC2:GetX() +

Return the x coordinate of the POINT_VEC2.

+
POINT_VEC2:GetY() +

Return the y coordinate of the POINT_VEC2.

+
POINT_VEC2:New(x, y, LandHeightAdd) +

POINT_VEC2 constructor.

+
POINT_VEC2:NewFromVec2(Vec2, LandHeightAdd) +

Create a new POINT_VEC2 object from Vec2 coordinates.

+
POINT_VEC2:NewFromVec3(Vec3) +

Create a new POINT_VEC2 object from Vec3 coordinates.

+
POINT_VEC2:SetAlt(Altitude) +

Set the altitude of the POINT_VEC2.

+
POINT_VEC2:SetLat(x) +

Set the Lat(itude) coordinate of the POINTVEC2 (ie: POINTVEC3.x).

+
POINT_VEC2:SetLon(y, z) +

Set the Lon(gitude) coordinate of the POINTVEC2 (ie: POINTVEC3.z).

+
POINT_VEC2:SetX(x) +

Set the x coordinate of the POINT_VEC2.

+
POINT_VEC2:SetY(y) +

Set the y coordinate of the POINT_VEC2.

+
POINT_VEC2:Translate(Distance, Angle) +

Add a Distance in meters from the POINTVEC2 orthonormal plane, with the given angle, and calculate the new POINTVEC2.

+
POINT_VEC2.x +

The x coordinate in meters.

+
POINT_VEC2.y +

the y coordinate in meters.

+
POINT_VEC2.z + +
+ +

Type POINT_VEC3

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
POINT_VEC3:AddX(x) +

Add to the x coordinate of the POINT_VEC3.

+
POINT_VEC3:AddY(y) +

Add to the y coordinate of the POINT_VEC3.

+
POINT_VEC3:AddZ(z) +

Add to the z coordinate of the POINT_VEC3.

+
POINT_VEC3.ClassName + +
POINT_VEC3:Explosion(ExplosionIntensity) +

Creates an explosion at the point of a certain intensity.

+
POINT_VEC3:Flare(FlareColor, (, Azimuth) +

Flares the point in a color.

+
POINT_VEC3.FlareColor + +
POINT_VEC3:FlareGreen((, Azimuth) +

Flare the POINT_VEC3 Green.

+
POINT_VEC3:FlareRed(Azimuth) +

Flare the POINT_VEC3 Red.

+
POINT_VEC3:FlareWhite((, Azimuth) +

Flare the POINT_VEC3 White.

+
POINT_VEC3:FlareYellow((, Azimuth) +

Flare the POINT_VEC3 Yellow.

+
POINT_VEC3:Get2DDistance(TargetPointVec3) +

Return the 2D distance in meters between the target POINTVEC3 and the POINTVEC3.

+
POINT_VEC3:Get3DDistance(TargetPointVec3) +

Return the 3D distance in meters between the target POINTVEC3 and the POINTVEC3.

+
POINT_VEC3:GetAltitudeText() +

Return the altitude text of the POINT_VEC3.

+
POINT_VEC3:GetBRText(TargetPointVec3) +

Return a BR string from a POINTVEC3 to the POINTVEC3.

+
POINT_VEC3:GetDirectionRadians(DirectionVec3) +

Return a direction in radians from the POINT_VEC3 using a direction vector in Vec3 format.

+
POINT_VEC3:GetDirectionVec3(TargetPointVec3) +

Return a direction vector Vec3 from POINTVEC3 to the POINTVEC3.

+
POINT_VEC3:GetNorthCorrectionRadians() +

Get a correction in radians of the real magnetic north of the POINT_VEC3.

+
POINT_VEC3:GetRandomPointVec2InRadius(OuterRadius, InnerRadius) +

Return a random POINTVEC2 within an Outer Radius and optionally NOT within an Inner Radius of the POINTVEC3.

+
POINT_VEC3:GetRandomPointVec3InRadius(OuterRadius, InnerRadius) +

Return a random POINTVEC3 within an Outer Radius and optionally NOT within an Inner Radius of the POINTVEC3.

+
POINT_VEC3:GetRandomVec2InRadius(OuterRadius, InnerRadius) +

Return a random Vec2 within an Outer Radius and optionally NOT within an Inner Radius of the POINT_VEC3.

+
POINT_VEC3:GetRandomVec3InRadius(OuterRadius, InnerRadius) +

Return a random Vec3 within an Outer Radius and optionally NOT within an Inner Radius of the POINT_VEC3.

+
POINT_VEC3:GetVec2() +

Return the coordinates of the POINT_VEC3 in Vec2 format.

+
POINT_VEC3:GetVec3() +

Return the coordinates of the POINT_VEC3 in Vec3 format.

+
POINT_VEC3:GetX() +

Return the x coordinate of the POINT_VEC3.

+
POINT_VEC3:GetY() +

Return the y coordinate of the POINT_VEC3.

+
POINT_VEC3:GetZ() +

Return the z coordinate of the POINT_VEC3.

+
POINT_VEC3:IlluminationBomb() +

Creates an illumination bomb at the point.

+
POINT_VEC3:IsMetric() +

Gets if the POINT_VEC3 is metric or NM.

+
POINT_VEC3.Metric + +
POINT_VEC3:New(x, y, z) +

Create a new POINT_VEC3 object.

+
POINT_VEC3:NewFromVec2(Vec2, LandHeightAdd) +

Create a new POINT_VEC3 object from Vec2 coordinates.

+
POINT_VEC3:NewFromVec3(Vec3) +

Create a new POINT_VEC3 object from Vec3 coordinates.

+
POINT_VEC3.RoutePointAction + +
POINT_VEC3:RoutePointAir(AltType, Type, Action, Speed, SpeedLocked) +

Build an air type route point.

+
POINT_VEC3.RoutePointAltType + +
POINT_VEC3:RoutePointGround(Speed, Formation) +

Build an ground type route point.

+
POINT_VEC3.RoutePointType + +
POINT_VEC3:SetMetric(Metric) +

Sets the POINT_VEC3 metric or NM.

+
POINT_VEC3:SetX(x) +

Set the x coordinate of the POINT_VEC3.

+
POINT_VEC3:SetY(y) +

Set the y coordinate of the POINT_VEC3.

+
POINT_VEC3:SetZ(z) +

Set the z coordinate of the POINT_VEC3.

+
POINT_VEC3:Smoke(SmokeColor) +

Smokes the point in a color.

+
POINT_VEC3:SmokeBlue() +

Smoke the POINT_VEC3 Blue.

+
POINT_VEC3.SmokeColor + +
POINT_VEC3:SmokeGreen() +

Smoke the POINT_VEC3 Green.

+
POINT_VEC3:SmokeOrange() +

Smoke the POINT_VEC3 Orange.

+
POINT_VEC3:SmokeRed() +

Smoke the POINT_VEC3 Red.

+
POINT_VEC3:SmokeWhite() +

Smoke the POINT_VEC3 White.

+
POINT_VEC3:ToStringBR(AngleRadians, Distance) +

Provides a Bearing / Range string

+
POINT_VEC3:ToStringLL(AngleRadians, Distance, acc, DMS) +

Provides a Bearing / Range string

+
POINT_VEC3:Translate(Distance, Angle) +

Add a Distance in meters from the POINTVEC3 horizontal plane, with the given angle, and calculate the new POINTVEC3.

+
POINT_VEC3.x +

The x coordinate in 3D space.

+
POINT_VEC3.y +

The y coordinate in 3D space.

+
POINT_VEC3.z +

The z coordiante in 3D space.

+
+ +

Type POINT_VEC3.RoutePointAction

+ + + + + + + + + +
POINT_VEC3.RoutePointAction.FromParkingArea +

"From Parking Area"

+
POINT_VEC3.RoutePointAction.TurningPoint +

"Turning Point"

+
+ +

Type POINT_VEC3.RoutePointAltType

+ + + + + +
POINT_VEC3.RoutePointAltType.BARO +

"BARO"

+
+ +

Type POINT_VEC3.RoutePointType

+ + + + + + + + + +
POINT_VEC3.RoutePointType.TakeOffParking +

"TakeOffParking"

+
POINT_VEC3.RoutePointType.TurningPoint +

"Turning Point"

+
+ +

Global(s)

+
+
+ + #POINT_VEC2 + +POINT_VEC2 + +
+
+ + + +
+
+
+
+ + #POINT_VEC3 + +POINT_VEC3 + +
+
+ + + +
+
+

Type Point

+ +

Type POINT_VEC2

+ +

The POINT_VEC2 class

+ +

Field(s)

+
+
+ + +POINT_VEC2:AddAlt(Altitude) + +
+
+ +

Add to the current land height an altitude.

+ +

Parameter

+
    +
  • + +

    #number Altitude : +The Altitude to add. If nothing (nil) is given, then the current land altitude is set.

    + +
  • +
+

Return value

+ +

#POINT_VEC2:

+ + +
+
+
+
+ + +POINT_VEC2:AddX(x) + +
+
+ +

Add to the x coordinate of the POINT_VEC2.

+ +

Parameter

+
    +
  • + +

    #number x : +The x coordinate.

    + +
  • +
+

Return value

+ +

#POINT_VEC2:

+ + +
+
+
+
+ + +POINT_VEC2:AddY(y) + +
+
+ +

Add to the y coordinate of the POINT_VEC2.

+ +

Parameter

+
    +
  • + +

    #number y : +The y coordinate.

    + +
  • +
+

Return value

+ +

#POINT_VEC2:

+ + +
+
+
+
+ + #string + +POINT_VEC2.ClassName + +
+
+ + + +
+
+
+
+ + +POINT_VEC2:DistanceFromPointVec2(PointVec2Reference) + +
+
+ +

Calculate the distance from a reference #POINT_VEC2.

+ +

Parameter

+ +

Return value

+ +

Dcs.DCSTypes#Distance: +The distance from the reference #POINT_VEC2 in meters.

+ +
+
+
+
+ + +POINT_VEC2:DistanceFromVec2(Vec2Reference) + +
+
+ +

Calculate the distance from a reference DCSTypes#Vec2.

+ +

Parameter

+ +

Return value

+ +

Dcs.DCSTypes#Distance: +The distance from the reference DCSTypes#Vec2 in meters.

+ +
+
+
+
+ + +POINT_VEC2:GetAlt() + +
+
+ +

Return the altitude (height) of the land at the POINT_VEC2.

+ +

Return value

+ +

#number: +The land altitude.

+ +
+
+
+
+ + +POINT_VEC2:GetAltitudeText() + +
+
+ +

Return no text for the altitude of the POINT_VEC2.

+ +

Return value

+ +

#string: +Empty string.

+ +
+
+
+
+ + +POINT_VEC2:GetLat() + +
+
+ +

Return Return the Lat(itude) coordinate of the POINTVEC2 (ie: (parent)POINTVEC3.x).

+ +

Return value

+ +

#number: +The x coodinate.

+ +
+
+
+
+ + +POINT_VEC2:GetLon() + +
+
+ +

Return the Lon(gitude) coordinate of the POINTVEC2 (ie: (parent)POINTVEC3.z).

+ +

Return value

+ +

#number: +The y coodinate.

+ +
+
+
+
+ + +POINT_VEC2:GetX() + +
+
+ +

Return the x coordinate of the POINT_VEC2.

+ +

Return value

+ +

#number: +The x coodinate.

+ +
+
+
+
+ + +POINT_VEC2:GetY() + +
+
+ +

Return the y coordinate of the POINT_VEC2.

+ +

Return value

+ +

#number: +The y coodinate.

+ +
+
+
+
+ + +POINT_VEC2:New(x, y, LandHeightAdd) + +
+
+ +

POINT_VEC2 constructor.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Distance x : +The x coordinate of the Vec3 point, pointing to the North.

    + +
  • +
  • + +

    Dcs.DCSTypes#Distance y : +The y coordinate of the Vec3 point, pointing to the Right.

    + +
  • +
  • + +

    Dcs.DCSTypes#Distance LandHeightAdd : +(optional) The default height if required to be evaluated will be the land height of the x, y coordinate. You can specify an extra height to be added to the land height.

    + +
  • +
+

Return value

+ +

Core.Point#POINT_VEC2:

+ + +
+
+
+
+ + +POINT_VEC2:NewFromVec2(Vec2, LandHeightAdd) + +
+
+ +

Create a new POINT_VEC2 object from Vec2 coordinates.

+ +

Parameters

+ +

Return value

+ +

Core.Point#POINT_VEC2: +self

+ +
+
+
+
+ + +POINT_VEC2:NewFromVec3(Vec3) + +
+
+ +

Create a new POINT_VEC2 object from Vec3 coordinates.

+ +

Parameter

+ +

Return value

+ +

Core.Point#POINT_VEC2: +self

+ +
+
+
+
+ + +POINT_VEC2:SetAlt(Altitude) + +
+
+ +

Set the altitude of the POINT_VEC2.

+ +

Parameter

+
    +
  • + +

    #number Altitude : +The land altitude. If nothing (nil) is given, then the current land altitude is set.

    + +
  • +
+

Return value

+ +

#POINT_VEC2:

+ + +
+
+
+
+ + +POINT_VEC2:SetLat(x) + +
+
+ +

Set the Lat(itude) coordinate of the POINTVEC2 (ie: POINTVEC3.x).

+ +

Parameter

+
    +
  • + +

    #number x : +The x coordinate.

    + +
  • +
+

Return value

+ +

#POINT_VEC2:

+ + +
+
+
+
+ + +POINT_VEC2:SetLon(y, z) + +
+
+ +

Set the Lon(gitude) coordinate of the POINTVEC2 (ie: POINTVEC3.z).

+ +

Parameters

+
    +
  • + +

    #number y : +The y coordinate.

    + +
  • +
  • + +

    z :

    + +
  • +
+

Return value

+ +

#POINT_VEC2:

+ + +
+
+
+
+ + +POINT_VEC2:SetX(x) + +
+
+ +

Set the x coordinate of the POINT_VEC2.

+ +

Parameter

+
    +
  • + +

    #number x : +The x coordinate.

    + +
  • +
+

Return value

+ +

#POINT_VEC2:

+ + +
+
+
+
+ + +POINT_VEC2:SetY(y) + +
+
+ +

Set the y coordinate of the POINT_VEC2.

+ +

Parameter

+
    +
  • + +

    #number y : +The y coordinate.

    + +
  • +
+

Return value

+ +

#POINT_VEC2:

+ + +
+
+
+
+ + +POINT_VEC2:Translate(Distance, Angle) + +
+
+ +

Add a Distance in meters from the POINTVEC2 orthonormal plane, with the given angle, and calculate the new POINTVEC2.

+ +

Parameters

+ +

Return value

+ +

#POINT_VEC2: +The new calculated POINT_VEC2.

+ +
+
+
+
+ + Dcs.DCSTypes#Distance + +POINT_VEC2.x + +
+
+ +

The x coordinate in meters.

+ +
+
+
+
+ + Dcs.DCSTypes#Distance + +POINT_VEC2.y + +
+
+ +

the y coordinate in meters.

+ +
+
+
+
+ + + +POINT_VEC2.z + +
+
+ + + +
+
+ +

Type POINT_VEC3

+ +

The POINT_VEC3 class

+ +

Field(s)

+
+
+ + +POINT_VEC3:AddX(x) + +
+
+ +

Add to the x coordinate of the POINT_VEC3.

+ +

Parameter

+
    +
  • + +

    #number x : +The x coordinate value to add to the current x coodinate.

    + +
  • +
+

Return value

+ +

#POINT_VEC3:

+ + +
+
+
+
+ + +POINT_VEC3:AddY(y) + +
+
+ +

Add to the y coordinate of the POINT_VEC3.

+ +

Parameter

+
    +
  • + +

    #number y : +The y coordinate value to add to the current y coodinate.

    + +
  • +
+

Return value

+ +

#POINT_VEC3:

+ + +
+
+
+
+ + +POINT_VEC3:AddZ(z) + +
+
+ +

Add to the z coordinate of the POINT_VEC3.

+ +

Parameter

+
    +
  • + +

    #number z : +The z coordinate value to add to the current z coodinate.

    + +
  • +
+

Return value

+ +

#POINT_VEC3:

+ + +
+
+
+
+ + #string + +POINT_VEC3.ClassName + +
+
+ + + +
+
+
+
+ + +POINT_VEC3:Explosion(ExplosionIntensity) + +
+
+ +

Creates an explosion at the point of a certain intensity.

+ +

Parameter

+
    +
  • + +

    #number ExplosionIntensity :

    + +
  • +
+
+
+
+
+ + +POINT_VEC3:Flare(FlareColor, (, Azimuth) + +
+
+ +

Flares the point in a color.

+ +

Parameters

+ +
+
+
+
+ + Utilities.Utils#FLARECOLOR + +POINT_VEC3.FlareColor + +
+
+ + + +
+
+
+
+ + +POINT_VEC3:FlareGreen((, Azimuth) + +
+
+ +

Flare the POINT_VEC3 Green.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Azimuth ( : +ptional) Azimuth The azimuth of the flare direction. The default azimuth is 0.

    + +
  • +
  • + +

    Azimuth :

    + +
  • +
+
+
+
+
+ + +POINT_VEC3:FlareRed(Azimuth) + +
+
+ +

Flare the POINT_VEC3 Red.

+ +

Parameter

+
    +
  • + +

    Azimuth :

    + +
  • +
+
+
+
+
+ + +POINT_VEC3:FlareWhite((, Azimuth) + +
+
+ +

Flare the POINT_VEC3 White.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Azimuth ( : +ptional) Azimuth The azimuth of the flare direction. The default azimuth is 0.

    + +
  • +
  • + +

    Azimuth :

    + +
  • +
+
+
+
+
+ + +POINT_VEC3:FlareYellow((, Azimuth) + +
+
+ +

Flare the POINT_VEC3 Yellow.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Azimuth ( : +ptional) Azimuth The azimuth of the flare direction. The default azimuth is 0.

    + +
  • +
  • + +

    Azimuth :

    + +
  • +
+
+
+
+
+ + +POINT_VEC3:Get2DDistance(TargetPointVec3) + +
+
+ +

Return the 2D distance in meters between the target POINTVEC3 and the POINTVEC3.

+ +

Parameter

+
    +
  • + +

    #POINT_VEC3 TargetPointVec3 : +The target POINT_VEC3.

    + +
  • +
+

Return value

+ +

Dcs.DCSTypes#Distance: +Distance The distance in meters.

+ +
+
+
+
+ + +POINT_VEC3:Get3DDistance(TargetPointVec3) + +
+
+ +

Return the 3D distance in meters between the target POINTVEC3 and the POINTVEC3.

+ +

Parameter

+
    +
  • + +

    #POINT_VEC3 TargetPointVec3 : +The target POINT_VEC3.

    + +
  • +
+

Return value

+ +

Dcs.DCSTypes#Distance: +Distance The distance in meters.

+ +
+
+
+
+ + +POINT_VEC3:GetAltitudeText() + +
+
+ +

Return the altitude text of the POINT_VEC3.

+ +

Return value

+ +

#string: +Altitude text.

+ +
+
+
+
+ + +POINT_VEC3:GetBRText(TargetPointVec3) + +
+
+ +

Return a BR string from a POINTVEC3 to the POINTVEC3.

+ +

Parameter

+
    +
  • + +

    #POINT_VEC3 TargetPointVec3 : +The target POINT_VEC3.

    + +
  • +
+

Return value

+ +

#string: +The BR text.

+ +
+
+
+
+ + +POINT_VEC3:GetDirectionRadians(DirectionVec3) + +
+
+ +

Return a direction in radians from the POINT_VEC3 using a direction vector in Vec3 format.

+ +

Parameter

+ +

Return value

+ +

#number: +DirectionRadians The direction in radians.

+ +
+
+
+
+ + +POINT_VEC3:GetDirectionVec3(TargetPointVec3) + +
+
+ +

Return a direction vector Vec3 from POINTVEC3 to the POINTVEC3.

+ +

Parameter

+
    +
  • + +

    #POINT_VEC3 TargetPointVec3 : +The target POINT_VEC3.

    + +
  • +
+

Return value

+ +

Dcs.DCSTypes#Vec3: +DirectionVec3 The direction vector in Vec3 format.

+ +
+
+
+
+ + +POINT_VEC3:GetNorthCorrectionRadians() + +
+
+ +

Get a correction in radians of the real magnetic north of the POINT_VEC3.

+ +

Return value

+ +

#number: +CorrectionRadians The correction in radians.

+ +
+
+
+
+ + +POINT_VEC3:GetRandomPointVec2InRadius(OuterRadius, InnerRadius) + +
+
+ +

Return a random POINTVEC2 within an Outer Radius and optionally NOT within an Inner Radius of the POINTVEC3.

+ +

Parameters

+ +

Return value

+ +

#POINT_VEC2:

+ + +
+
+
+
+ + +POINT_VEC3:GetRandomPointVec3InRadius(OuterRadius, InnerRadius) + +
+
+ +

Return a random POINTVEC3 within an Outer Radius and optionally NOT within an Inner Radius of the POINTVEC3.

+ +

Parameters

+ +

Return value

+ +

#POINT_VEC3:

+ + +
+
+
+
+ + +POINT_VEC3:GetRandomVec2InRadius(OuterRadius, InnerRadius) + +
+
+ +

Return a random Vec2 within an Outer Radius and optionally NOT within an Inner Radius of the POINT_VEC3.

+ +

Parameters

+ +

Return value

+ +

Dcs.DCSTypes#Vec2: +Vec2

+ +
+
+
+
+ + +POINT_VEC3:GetRandomVec3InRadius(OuterRadius, InnerRadius) + +
+
+ +

Return a random Vec3 within an Outer Radius and optionally NOT within an Inner Radius of the POINT_VEC3.

+ +

Parameters

+ +

Return value

+ +

Dcs.DCSTypes#Vec3: +Vec3

+ +
+
+
+
+ + +POINT_VEC3:GetVec2() + +
+
+ +

Return the coordinates of the POINT_VEC3 in Vec2 format.

+ +

Return value

+ +

Dcs.DCSTypes#Vec2: +The Vec2 coodinate.

+ +
+
+
+
+ + +POINT_VEC3:GetVec3() + +
+
+ +

Return the coordinates of the POINT_VEC3 in Vec3 format.

+ +

Return value

+ +

Dcs.DCSTypes#Vec3: +The Vec3 coodinate.

+ +
+
+
+
+ + +POINT_VEC3:GetX() + +
+
+ +

Return the x coordinate of the POINT_VEC3.

+ +

Return value

+ +

#number: +The x coodinate.

+ +
+
+
+
+ + +POINT_VEC3:GetY() + +
+
+ +

Return the y coordinate of the POINT_VEC3.

+ +

Return value

+ +

#number: +The y coodinate.

+ +
+
+
+
+ + +POINT_VEC3:GetZ() + +
+
+ +

Return the z coordinate of the POINT_VEC3.

+ +

Return value

+ +

#number: +The z coodinate.

+ +
+
+
+
+ + +POINT_VEC3:IlluminationBomb() + +
+
+ +

Creates an illumination bomb at the point.

+ +
+
+
+
+ + +POINT_VEC3:IsMetric() + +
+
+ +

Gets if the POINT_VEC3 is metric or NM.

+ +

Return value

+ +

#boolean: +Metric true means metric, false means NM.

+ +
+
+
+
+ + + +POINT_VEC3.Metric + +
+
+ + + +
+
+
+
+ + +POINT_VEC3:New(x, y, z) + +
+
+ +

Create a new POINT_VEC3 object.

+ +

Parameters

+ +

Return value

+ +

Core.Point#POINT_VEC3: +self

+ +
+
+
+
+ + +POINT_VEC3:NewFromVec2(Vec2, LandHeightAdd) + +
+
+ +

Create a new POINT_VEC3 object from Vec2 coordinates.

+ +

Parameters

+ +

Return value

+ +

Core.Point#POINT_VEC3: +self

+ +
+
+
+
+ + +POINT_VEC3:NewFromVec3(Vec3) + +
+
+ +

Create a new POINT_VEC3 object from Vec3 coordinates.

+ +

Parameter

+ +

Return value

+ +

Core.Point#POINT_VEC3: +self

+ +
+
+
+
+ + #POINT_VEC3.RoutePointAction + +POINT_VEC3.RoutePointAction + +
+
+ + + +
+
+
+
+ + +POINT_VEC3:RoutePointAir(AltType, Type, Action, Speed, SpeedLocked) + +
+
+ +

Build an air type route point.

+ +

Parameters

+ +

Return value

+ +

#table: +The route point.

+ +
+
+
+
+ + #POINT_VEC3.RoutePointAltType + +POINT_VEC3.RoutePointAltType + +
+
+ + + +
+
+
+
+ + +POINT_VEC3:RoutePointGround(Speed, Formation) + +
+
+ +

Build an ground type route point.

+ +

Parameters

+ +

Return value

+ +

#table: +The route point.

+ +
+
+
+
+ + #POINT_VEC3.RoutePointType + +POINT_VEC3.RoutePointType + +
+
+ + + +
+
+
+
+ + +POINT_VEC3:SetMetric(Metric) + +
+
+ +

Sets the POINT_VEC3 metric or NM.

+ +

Parameter

+
    +
  • + +

    #boolean Metric : +true means metric, false means NM.

    + +
  • +
+
+
+
+
+ + +POINT_VEC3:SetX(x) + +
+
+ +

Set the x coordinate of the POINT_VEC3.

+ +

Parameter

+
    +
  • + +

    #number x : +The x coordinate.

    + +
  • +
+

Return value

+ +

#POINT_VEC3:

+ + +
+
+
+
+ + +POINT_VEC3:SetY(y) + +
+
+ +

Set the y coordinate of the POINT_VEC3.

+ +

Parameter

+
    +
  • + +

    #number y : +The y coordinate.

    + +
  • +
+

Return value

+ +

#POINT_VEC3:

+ + +
+
+
+
+ + +POINT_VEC3:SetZ(z) + +
+
+ +

Set the z coordinate of the POINT_VEC3.

+ +

Parameter

+
    +
  • + +

    #number z : +The z coordinate.

    + +
  • +
+

Return value

+ +

#POINT_VEC3:

+ + +
+
+
+
+ + +POINT_VEC3:Smoke(SmokeColor) + +
+
+ +

Smokes the point in a color.

+ +

Parameter

+ +
+
+
+
+ + +POINT_VEC3:SmokeBlue() + +
+
+ +

Smoke the POINT_VEC3 Blue.

+ +
+
+
+
+ + Utilities.Utils#SMOKECOLOR + +POINT_VEC3.SmokeColor + +
+
+ + + +
+
+
+
+ + +POINT_VEC3:SmokeGreen() + +
+
+ +

Smoke the POINT_VEC3 Green.

+ +
+
+
+
+ + +POINT_VEC3:SmokeOrange() + +
+
+ +

Smoke the POINT_VEC3 Orange.

+ +
+
+
+
+ + +POINT_VEC3:SmokeRed() + +
+
+ +

Smoke the POINT_VEC3 Red.

+ +
+
+
+
+ + +POINT_VEC3:SmokeWhite() + +
+
+ +

Smoke the POINT_VEC3 White.

+ +
+
+
+
+ + +POINT_VEC3:ToStringBR(AngleRadians, Distance) + +
+
+ +

Provides a Bearing / Range string

+ +

Parameters

+
    +
  • + +

    #number AngleRadians : +The angle in randians

    + +
  • +
  • + +

    #number Distance : +The distance

    + +
  • +
+

Return value

+ +

#string: +The BR Text

+ +
+
+
+
+ + +POINT_VEC3:ToStringLL(AngleRadians, Distance, acc, DMS) + +
+
+ +

Provides a Bearing / Range string

+ +

Parameters

+
    +
  • + +

    #number AngleRadians : +The angle in randians

    + +
  • +
  • + +

    #number Distance : +The distance

    + +
  • +
  • + +

    acc :

    + +
  • +
  • + +

    DMS :

    + +
  • +
+

Return value

+ +

#string: +The BR Text

+ +
+
+
+
+ + +POINT_VEC3:Translate(Distance, Angle) + +
+
+ +

Add a Distance in meters from the POINTVEC3 horizontal plane, with the given angle, and calculate the new POINTVEC3.

+ +

Parameters

+ +

Return value

+ +

#POINT_VEC3: +The new calculated POINT_VEC3.

+ +
+
+
+
+ + #number + +POINT_VEC3.x + +
+
+ +

The x coordinate in 3D space.

+ +
+
+
+
+ + #number + +POINT_VEC3.y + +
+
+ +

The y coordinate in 3D space.

+ +
+
+
+
+ + #number + +POINT_VEC3.z + +
+
+ +

The z coordiante in 3D space.

+ +
+
+ +

Type POINT_VEC3.RoutePointAction

+ +

RoutePoint Actions

+ +

Field(s)

+
+
+ + +POINT_VEC3.RoutePointAction.FromParkingArea + +
+
+ +

"From Parking Area"

+ +
+
+
+
+ + +POINT_VEC3.RoutePointAction.TurningPoint + +
+
+ +

"Turning Point"

+ +
+
+ +

Type POINT_VEC3.RoutePointAltType

+ +

RoutePoint AltTypes

+ +

Field(s)

+
+
+ + +POINT_VEC3.RoutePointAltType.BARO + +
+
+ +

"BARO"

+ +
+
+ +

Type POINT_VEC3.RoutePointType

+ +

RoutePoint Types

+ +

Field(s)

+
+
+ + +POINT_VEC3.RoutePointType.TakeOffParking + +
+
+ +

"TakeOffParking"

+ +
+
+
+
+ + +POINT_VEC3.RoutePointType.TurningPoint + +
+
+ +

"Turning Point"

+ +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Positionable.html b/docs/Documentation/Positionable.html new file mode 100644 index 000000000..1e498e791 --- /dev/null +++ b/docs/Documentation/Positionable.html @@ -0,0 +1,1085 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Positionable

+ +

This module contains the POSITIONABLE class.

+ + + +

1) Positionable#POSITIONABLE class, extends Identifiable#IDENTIFIABLE

+

The Positionable#POSITIONABLE class is a wrapper class to handle the POSITIONABLE objects:

+ +
    +
  • Support all DCS APIs.
  • +
  • Enhance with POSITIONABLE specific APIs not in the DCS API set.
  • +
  • Manage the "state" of the POSITIONABLE.
  • +
+ +

1.1) POSITIONABLE constructor:

+

The POSITIONABLE class provides the following functions to construct a POSITIONABLE instance:

+ + + +

1.2) POSITIONABLE methods:

+

The following methods can be used to identify an measurable object:

+ + + +
+ + +

Global(s)

+ + + + + +
POSITIONABLE + +
+

Type DCSPositionable

+ + + + + +
DCSPositionable.id_ +

The ID of the controllable in DCS

+
+ +

Type POSITIONABLE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
POSITIONABLE.ClassName + +
POSITIONABLE:GetAltitude() +

Returns the altitude of the POSITIONABLE.

+
POSITIONABLE:GetHeading() +

Returns the POSITIONABLE heading in degrees.

+
POSITIONABLE:GetMessage(Message, Duration, Name) +

Returns a message with the callsign embedded (if there is one).

+
POSITIONABLE:GetPointVec2() +

Returns a POINT_VEC2 object indicating the point in 2D of the POSITIONABLE within the mission.

+
POSITIONABLE:GetPointVec3() +

Returns a POINT_VEC3 object indicating the point in 3D of the POSITIONABLE within the mission.

+
POSITIONABLE:GetPositionVec3() +

Returns the DCSTypes#Position3 position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.

+
POSITIONABLE:GetRadio() +

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

Returns the DCSTypes#Vec2 vector indicating the point in 2D of the POSITIONABLE within the mission.

+
POSITIONABLE:GetVec3() +

Returns the DCSTypes#Vec3 vector indicating the 3D vector of the POSITIONABLE within the mission.

+
POSITIONABLE:GetVelocity() +

Returns the POSITIONABLE velocity vector.

+
POSITIONABLE:GetVelocityKMH() +

Returns the POSITIONABLE velocity in km/h.

+
POSITIONABLE:InAir() +

Returns true if the POSITIONABLE is in the air.

+
POSITIONABLE:IsAboveRunway() +

Returns if the Positionable is located above a runway.

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

Send a message to the players in the Group.

+
POSITIONABLE:MessageToAll(Message, Duration, Name) +

Send a message to all coalitions.

+
POSITIONABLE:MessageToBlue(Message, Duration, Name) +

Send a message to the blue coalition.

+
POSITIONABLE:MessageToClient(Message, Duration, Client, Name) +

Send a message to a client.

+
POSITIONABLE:MessageToCoalition(Message, Duration, MessageCoalition, Name) +

Send a message to a coalition.

+
POSITIONABLE:MessageToGroup(Message, Duration, MessageGroup, Name) +

Send a message to a Group.

+
POSITIONABLE:MessageToRed(Message, Duration, Name) +

Send a message to the red coalition.

+
POSITIONABLE:New(PositionableName) +

Create a new POSITIONABLE from a DCSPositionable

+
POSITIONABLE.PositionableName +

The name of the measurable.

+
+ +

Global(s)

+
+
+ + #POSITIONABLE + +POSITIONABLE + +
+
+ + + +
+
+

Type Positionable

+ +

Type DCSPositionable

+ +

A DCSPositionable

+ +

Field(s)

+
+
+ + +DCSPositionable.id_ + +
+
+ +

The ID of the controllable in DCS

+ +
+
+ +

Type POSITIONABLE

+ +

The POSITIONABLE class

+ +

Field(s)

+
+
+ + #string + +POSITIONABLE.ClassName + +
+
+ + + +
+
+
+
+ + +POSITIONABLE:GetAltitude() + +
+
+ +

Returns the altitude of the POSITIONABLE.

+ +

Return values

+
    +
  1. + +

    Dcs.DCSTypes#Distance: +The altitude of the POSITIONABLE.

    + +
  2. +
  3. + +

    #nil: +The POSITIONABLE is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +POSITIONABLE:GetHeading() + +
+
+ +

Returns the POSITIONABLE heading in degrees.

+ +

Return values

+
    +
  1. + +

    #number: +The POSTIONABLE heading

    + +
  2. +
  3. + +

    #nil: +The POSITIONABLE is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +POSITIONABLE:GetMessage(Message, Duration, Name) + +
+
+ +

Returns a message with the callsign embedded (if there is one).

+ +

Parameters

+
    +
  • + +

    #string Message : +The message text

    + +
  • +
  • + +

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

    + +
  • +
  • + +

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

    + +
  • +
+

Return value

+ +

Core.Message#MESSAGE:

+ + +
+
+
+
+ + +POSITIONABLE:GetPointVec2() + +
+
+ +

Returns a POINT_VEC2 object indicating the point in 2D of the POSITIONABLE within the mission.

+ +

Return values

+
    +
  1. + +

    Core.Point#POINT_VEC2: +The 2D point vector of the POSITIONABLE.

    + +
  2. +
  3. + +

    #nil: +The POSITIONABLE is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +POSITIONABLE:GetPointVec3() + +
+
+ +

Returns a POINT_VEC3 object indicating the point in 3D of the POSITIONABLE within the mission.

+ +

Return values

+
    +
  1. + +

    Core.Point#POINT_VEC3: +The 3D point vector of the POSITIONABLE.

    + +
  2. +
  3. + +

    #nil: +The POSITIONABLE is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +POSITIONABLE:GetPositionVec3() + +
+
+ +

Returns the DCSTypes#Position3 position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.

+ +

Return values

+
    +
  1. + +

    Dcs.DCSTypes#Position: +The 3D position vectors of the POSITIONABLE.

    + +
  2. +
  3. + +

    #nil: +The POSITIONABLE is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +POSITIONABLE:GetRadio() + +
+
+ +

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

+ +

Return value

+ +

#RADIO: +Radio

+ +
+
+
+
+ + +POSITIONABLE:GetRandomVec3(Radius) + +
+
+ +

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

+ +

Parameter

+
    +
  • + +

    #number Radius :

    + +
  • +
+

Return values

+
    +
  1. + +

    Dcs.DCSTypes#Vec3: +The 3D point vector of the POSITIONABLE.

    + +
  2. +
  3. + +

    #nil: +The POSITIONABLE is not existing or alive.

    + +
  4. +
+

Usage:

+

+-- If Radius is ignored, returns the Dcs.DCSTypes#Vec3 of first UNIT of the GROUP
+ +
+
+
+
+ + +POSITIONABLE:GetVec2() + +
+
+ +

Returns the DCSTypes#Vec2 vector indicating the point in 2D of the POSITIONABLE within the mission.

+ +

Return values

+
    +
  1. + +

    Dcs.DCSTypes#Vec2: +The 2D point vector of the POSITIONABLE.

    + +
  2. +
  3. + +

    #nil: +The POSITIONABLE is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +POSITIONABLE:GetVec3() + +
+
+ +

Returns the DCSTypes#Vec3 vector indicating the 3D vector of the POSITIONABLE within the mission.

+ +

Return values

+
    +
  1. + +

    Dcs.DCSTypes#Vec3: +The 3D point vector of the POSITIONABLE.

    + +
  2. +
  3. + +

    #nil: +The POSITIONABLE is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +POSITIONABLE:GetVelocity() + +
+
+ +

Returns the POSITIONABLE velocity vector.

+ +

Return values

+
    +
  1. + +

    Dcs.DCSTypes#Vec3: +The velocity vector

    + +
  2. +
  3. + +

    #nil: +The POSITIONABLE is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +POSITIONABLE:GetVelocityKMH() + +
+
+ +

Returns the POSITIONABLE velocity in km/h.

+ +

Return values

+
    +
  1. + +

    #number: +The velocity in km/h

    + +
  2. +
  3. + +

    #nil: +The POSITIONABLE is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +POSITIONABLE:InAir() + +
+
+ +

Returns true if the POSITIONABLE is in the air.

+ + +

Polymorphic, is overridden in GROUP and UNIT.

+ +

Return values

+
    +
  1. + +

    #boolean: +true if in the air.

    + +
  2. +
  3. + +

    #nil: +The POSITIONABLE is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +POSITIONABLE:IsAboveRunway() + +
+
+ +

Returns if the Positionable is located above a runway.

+ +

Return values

+
    +
  1. + +

    #boolean: +true if Positionable is above a runway.

    + +
  2. +
  3. + +

    #nil: +The POSITIONABLE is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +POSITIONABLE:Message(Message, Duration, Name) + +
+
+ +

Send a message to the players in the 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.

    + +
  • +
  • + +

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

    + +
  • +
+
+
+
+
+ + +POSITIONABLE:MessageToAll(Message, Duration, Name) + +
+
+ +

Send a message to all coalitions.

+ + +

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.

    + +
  • +
  • + +

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

    + +
  • +
+
+
+
+
+ + +POSITIONABLE:MessageToBlue(Message, Duration, Name) + +
+
+ +

Send a message to the blue coalition.

+ + +

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.

    + +
  • +
  • + +

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

    + +
  • +
+
+
+
+
+ + +POSITIONABLE:MessageToClient(Message, Duration, Client, Name) + +
+
+ +

Send a message to a client.

+ + +

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.

    + +
  • +
  • + +

    Wrapper.Client#CLIENT Client : +The client object receiving the message.

    + +
  • +
  • + +

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

    + +
  • +
+
+
+
+
+ + +POSITIONABLE:MessageToCoalition(Message, Duration, MessageCoalition, Name) + +
+
+ +

Send a message to a coalition.

+ + +

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.

    + +
  • +
  • + +

    Dcs.DCScoalition#coalition MessageCoalition : +The Coalition receiving the message.

    + +
  • +
  • + +

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

    + +
  • +
+
+
+
+
+ + +POSITIONABLE:MessageToGroup(Message, Duration, MessageGroup, Name) + +
+
+ +

Send a message to a 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.

    + +
  • +
  • + +

    Wrapper.Group#GROUP MessageGroup : +The GROUP object receiving the message.

    + +
  • +
  • + +

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

    + +
  • +
+
+
+
+
+ + +POSITIONABLE:MessageToRed(Message, Duration, Name) + +
+
+ +

Send a message to the red coalition.

+ + +

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.

    + +
  • +
  • + +

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

    + +
  • +
+
+
+
+
+ + +POSITIONABLE:New(PositionableName) + +
+
+ +

Create a new POSITIONABLE from a DCSPositionable

+ +

Parameter

+ +

Return value

+ +

#POSITIONABLE: +self

+ +
+
+
+
+ + #string + +POSITIONABLE.PositionableName + +
+
+ +

The name of the measurable.

+ +
+
+ +

Type RADIO

+ +
+ +
+ + diff --git a/docs/Documentation/Process_JTAC.html b/docs/Documentation/Process_JTAC.html new file mode 100644 index 000000000..f3e75bb9b --- /dev/null +++ b/docs/Documentation/Process_JTAC.html @@ -0,0 +1,611 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Process_JTAC

+ + + +

Global(s)

+ + + + + +
PROCESS_JTAC + +
+

Type PROCESS_JTAC

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PROCESS_JTAC.ClassName + +
PROCESS_JTAC.DisplayCategory + +
PROCESS_JTAC.DisplayCount + +
PROCESS_JTAC.DisplayInterval + +
PROCESS_JTAC.DisplayMessage + +
PROCESS_JTAC.DisplayTime + +
PROCESS_JTAC.FACUnit + +
PROCESS_JTAC.Fsm + +
PROCESS_JTAC:New(Task, ProcessUnit, TargetSetUnit, FACUnit) +

Creates a new DESTROY process.

+
PROCESS_JTAC:OnJTACMenuAwait(Fsm, Event, From, To) +

StateMachine callback function for a PROCESS

+
PROCESS_JTAC:OnJTACMenuCancel(Fsm, Event, From, To, TargetUnit) +

StateMachine callback function for a PROCESS

+
PROCESS_JTAC:OnJTACMenuSpot(Fsm, Event, From, To, TargetUnit) +

StateMachine callback function for a PROCESS

+
PROCESS_JTAC:OnJTACMenuUpdate(Fsm, Event, From, To) +

StateMachine callback function for a PROCESS

+
PROCESS_JTAC:OnStart(Fsm, Event, From, To) +

StateMachine callback function for a PROCESS

+
PROCESS_JTAC.ProcessUnit + +
PROCESS_JTAC.TargetSetUnit + +
+ +

Global(s)

+
+
+ + #PROCESS_JTAC + +PROCESS_JTAC + +
+
+ + + +
+
+

Type Process_JTAC

+ +

Type PROCESS_JTAC

+ +

PROCESS_JTAC class

+ +

Field(s)

+
+
+ + #string + +PROCESS_JTAC.ClassName + +
+
+ + + +
+
+
+
+ + #string + +PROCESS_JTAC.DisplayCategory + +
+
+ + + + +

Targets is the default display category

+ +
+
+
+
+ + #number + +PROCESS_JTAC.DisplayCount + +
+
+ + + +
+
+
+
+ + #number + +PROCESS_JTAC.DisplayInterval + +
+
+ + + +
+
+
+
+ + #boolean + +PROCESS_JTAC.DisplayMessage + +
+
+ + + +
+
+
+
+ + #number + +PROCESS_JTAC.DisplayTime + +
+
+ + + + +

10 seconds is the default

+ +
+
+
+
+ + + +PROCESS_JTAC.FACUnit + +
+
+ + + +
+
+
+
+ + + +PROCESS_JTAC.Fsm + +
+
+ + + +
+
+
+
+ + +PROCESS_JTAC:New(Task, ProcessUnit, TargetSetUnit, FACUnit) + +
+
+ +

Creates a new DESTROY process.

+ +

Parameters

+ +

Return value

+ +

#PROCESS_JTAC: +self

+ +
+
+
+
+ + +PROCESS_JTAC:OnJTACMenuAwait(Fsm, Event, From, To) + +
+
+ +

StateMachine callback function for a PROCESS

+ +

Parameters

+
    +
  • + +

    Core.Fsm#FSM_PROCESS Fsm :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
+
+
+
+
+ + +PROCESS_JTAC:OnJTACMenuCancel(Fsm, Event, From, To, TargetUnit) + +
+
+ +

StateMachine callback function for a PROCESS

+ +

Parameters

+ +
+
+
+
+ + +PROCESS_JTAC:OnJTACMenuSpot(Fsm, Event, From, To, TargetUnit) + +
+
+ +

StateMachine callback function for a PROCESS

+ +

Parameters

+ +
+
+
+
+ + +PROCESS_JTAC:OnJTACMenuUpdate(Fsm, Event, From, To) + +
+
+ +

StateMachine callback function for a PROCESS

+ +

Parameters

+
    +
  • + +

    Core.Fsm#FSM_PROCESS Fsm :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
+
+
+
+
+ + +PROCESS_JTAC:OnStart(Fsm, Event, From, To) + +
+
+ +

StateMachine callback function for a PROCESS

+ +

Parameters

+
    +
  • + +

    Core.Fsm#FSM_PROCESS Fsm :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
+
+
+
+
+ + Wrapper.Unit#UNIT + +PROCESS_JTAC.ProcessUnit + +
+
+ + + +
+
+
+
+ + Core.Set#SET_UNIT + +PROCESS_JTAC.TargetSetUnit + +
+
+ + + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Process_Pickup.html b/docs/Documentation/Process_Pickup.html new file mode 100644 index 000000000..6967c3780 --- /dev/null +++ b/docs/Documentation/Process_Pickup.html @@ -0,0 +1,702 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Process_Pickup

+ + + +

Global(s)

+ + + + + +
PROCESS_PICKUP + +
+

Type PROCESS_PICKUP

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PROCESS_PICKUP.ClassName + +
PROCESS_PICKUP.DisplayCategory + +
PROCESS_PICKUP.DisplayCount + +
PROCESS_PICKUP.DisplayInterval + +
PROCESS_PICKUP.DisplayMessage + +
PROCESS_PICKUP.DisplayTime + +
PROCESS_PICKUP:EventDead(Event) + +
PROCESS_PICKUP.Fsm + +
PROCESS_PICKUP:New(Task, ProcessUnit, TargetSetUnit, ProcessName) +

Creates a new DESTROY process.

+
PROCESS_PICKUP:OnDestroyed(Fsm, Event, From, To) +

StateMachine callback function for a PROCESS

+
PROCESS_PICKUP:OnHitTarget(Fsm, Event, From, To, Event) +

StateMachine callback function for a PROCESS

+
PROCESS_PICKUP:OnKilled(Fsm, Event, From, To, DCSEvent) +

StateMachine callback function for a PROCESS

+
PROCESS_PICKUP:OnMoreTargets(Fsm, Event, From, To) +

StateMachine callback function for a PROCESS

+
PROCESS_PICKUP:OnNavigating(Fsm, Event, From, To) +

StateMachine callback function for a PROCESS

+
PROCESS_PICKUP:OnRestart(Fsm, Event, From, To) +

StateMachine callback function for a PROCESS

+
PROCESS_PICKUP:OnStart(Fsm, Event, From, To) +

StateMachine callback function for a PROCESS

+
PROCESS_PICKUP.ProcessUnit + +
PROCESS_PICKUP.TargetSetUnit + +
+ +

Global(s)

+
+
+ + #PROCESS_PICKUP + +PROCESS_PICKUP + +
+
+ + + +
+
+

Type Process_Pickup

+ +

Type PROCESS_PICKUP

+ +

PROCESS_PICKUP class

+ +

Field(s)

+
+
+ + #string + +PROCESS_PICKUP.ClassName + +
+
+ + + +
+
+
+
+ + #string + +PROCESS_PICKUP.DisplayCategory + +
+
+ + + + +

Targets is the default display category

+ +
+
+
+
+ + #number + +PROCESS_PICKUP.DisplayCount + +
+
+ + + +
+
+
+
+ + #number + +PROCESS_PICKUP.DisplayInterval + +
+
+ + + +
+
+
+
+ + #boolean + +PROCESS_PICKUP.DisplayMessage + +
+
+ + + +
+
+
+
+ + #number + +PROCESS_PICKUP.DisplayTime + +
+
+ + + + +

10 seconds is the default

+ +
+
+
+
+ + +PROCESS_PICKUP:EventDead(Event) + +
+
+ + + +

Parameter

+ +
+
+
+
+ + + +PROCESS_PICKUP.Fsm + +
+
+ + + +
+
+
+
+ + +PROCESS_PICKUP:New(Task, ProcessUnit, TargetSetUnit, ProcessName) + +
+
+ +

Creates a new DESTROY process.

+ +

Parameters

+ +

Return value

+ +

#PROCESS_PICKUP: +self

+ +
+
+
+
+ + +PROCESS_PICKUP:OnDestroyed(Fsm, Event, From, To) + +
+
+ +

StateMachine callback function for a PROCESS

+ +

Parameters

+
    +
  • + +

    Core.Fsm#FSM_PROCESS Fsm :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
+
+
+
+
+ + +PROCESS_PICKUP:OnHitTarget(Fsm, Event, From, To, Event) + +
+
+ +

StateMachine callback function for a PROCESS

+ +

Parameters

+ +
+
+
+
+ + +PROCESS_PICKUP:OnKilled(Fsm, Event, From, To, DCSEvent) + +
+
+ +

StateMachine callback function for a PROCESS

+ +

Parameters

+ +
+
+
+
+ + +PROCESS_PICKUP:OnMoreTargets(Fsm, Event, From, To) + +
+
+ +

StateMachine callback function for a PROCESS

+ +

Parameters

+
    +
  • + +

    Core.Fsm#FSM_PROCESS Fsm :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
+
+
+
+
+ + +PROCESS_PICKUP:OnNavigating(Fsm, Event, From, To) + +
+
+ +

StateMachine callback function for a PROCESS

+ +

Parameters

+
    +
  • + +

    Core.Fsm#FSM_PROCESS Fsm :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
+
+
+
+
+ + +PROCESS_PICKUP:OnRestart(Fsm, Event, From, To) + +
+
+ +

StateMachine callback function for a PROCESS

+ +

Parameters

+
    +
  • + +

    Core.Fsm#FSM_PROCESS Fsm :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
+
+
+
+
+ + +PROCESS_PICKUP:OnStart(Fsm, Event, From, To) + +
+
+ +

StateMachine callback function for a PROCESS

+ +

Parameters

+
    +
  • + +

    Core.Fsm#FSM_PROCESS Fsm :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
+
+
+
+
+ + Wrapper.Unit#UNIT + +PROCESS_PICKUP.ProcessUnit + +
+
+ + + +
+
+
+
+ + Core.Set#SET_UNIT + +PROCESS_PICKUP.TargetSetUnit + +
+
+ + + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Radio.html b/docs/Documentation/Radio.html new file mode 100644 index 000000000..1254f064b --- /dev/null +++ b/docs/Documentation/Radio.html @@ -0,0 +1,841 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Radio

+ +

Core - The RADIO class is responsible for transmitting radio communications.

+ + + +

Banner Image

+ +
+ +

What are radio communications in DCS ?

+ +
    +
  • Radio transmissions consist of sound files that are broadcasted on a specific frequency (e.g. 115MHz) and modulation (e.g. AM),
  • +
  • They can be subtitled for a specific duration, the power in Watts of the transmiter's antenna can be set, and the transmission can be looped.
  • +
+ +

How to supply DCS my own Sound Files ?

+ +
    +
  • Your sound files need to be encoded in .ogg or .wav,
  • +
  • Your sound files should be as tiny as possible. It is suggested you encode in .ogg with low bitrate and sampling settings,
  • +
  • They need to be added in .\l10n\DEFAULT\ in you .miz file (wich can be decompressed like a .zip file),
  • +
  • For simplicty sake, you can let DCS' Mission Editor add the file itself, by creating a new Trigger with the action "Sound to Country", and choosing your sound file and a country you don't use in your mission.
  • +
+ +

Due to weird DCS quirks, radio communications behave differently if sent by a Unit#UNIT or a Group#GROUP or by any other Positionable#POSITIONABLE

+ + + +

Note that obviously, the frequency and the modulation of the transmission are important only if the players are piloting an Advanced System Modelling enabled aircraft, +like the A10C or the Mirage 2000C. They will hear the transmission if they are tuned on the right frequency and modulation (and if they are close enough - more on that below). +If a FC3 airacraft is used, it will hear every communication, whatever the frequency and the modulation is set to.

+ +
+ +

Author: Hugues "Grey_Echo" Bousquet

+ + +

Global(s)

+ + + + + +
RADIO + +
+

Type RADIO

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RADIO:Broadcast() +

Actually Broadcast the transmission

+
RADIO.ClassName + +
RADIO.FileName +

Name of the sound file

+
RADIO.Frequency +

Frequency of the transmission in Hz

+
RADIO.Loop + +
RADIO.Modulation +

Modulation of the transmission (either radio.modulation.AM or radio.modulation.FM)

+
RADIO:New(Positionable) +

Create a new RADIO Object.

+
RADIO:NewGenericTransmission(FileName, Frequency, Modulation, Power) +

Create a new transmission, that is to say, populate the RADIO with relevant data

+
RADIO:NewUnitTransmission(FileName, Subtitle, SubtitleDuration, Frequency, Modulation, Loop) +

Create a new transmission, that is to say, populate the RADIO with relevant data

+
RADIO.Positionable +

The transmiter

+
RADIO.Power +

Power of the antenna is Watts

+
RADIO:SetFileName(FileName) +

Check validity of the filename passed and sets RADIO.FileName

+
RADIO:SetFrequency(Frequency) +

Check validity of the frequency passed and sets RADIO.Frequency

+
RADIO:SetLoop(Loop) +

Check validity of the loop passed and sets RADIO.Loop

+
RADIO:SetModulation(Modulation) +

Check validity of the frequency passed and sets RADIO.Modulation

+
RADIO:SetPower(Power) +

Check validity of the power passed and sets RADIO.Power

+
RADIO:SetSubtitle(Subtitle, SubtitleDuration) +

Check validity of the subtitle and the subtitleDuration passed and sets RADIO.subtitle and RADIO.subtitleDuration

+
RADIO:StopBroadcast() +

Stops a transmission

+
RADIO.Subtitle +

Subtitle of the transmission

+
RADIO.SubtitleDuration +

Duration of the Subtitle in seconds

+
+ +

Global(s)

+
+
+ + #RADIO + +RADIO + +
+
+ + + +
+
+

Type Radio

+ +

Type RADIO

+ +

1) RADIO class, extends Base#BASE

+ +

1.1) RADIO usage

+ +

There are 3 steps to a successful radio transmission.

+ + + + + +

Methods to set relevant parameters for both a Unit#UNIT or a Group#GROUP or any other Positionable#POSITIONABLE

+ + + +

Additional Methods to set relevant parameters if the transmiter is a Unit#UNIT or a Group#GROUP

+ + + +

Additional Methods to set relevant parameters if the transmiter is any other Positionable#POSITIONABLE

+ + + +

What is this power thing ?

+ +
    +
  • If your transmission is sent by a Positionable#POSITIONABLE other than a Unit#UNIT or a Group#GROUP, you can set the power of the antenna,
  • +
  • Otherwise, DCS sets it automatically, depending on what's available on your Unit,
  • +
  • If the player gets too far from the transmiter, or if the antenna is too weak, the transmission will fade and become noisyer,
  • +
  • This an automated DCS calculation you have no say on,
  • +
  • For reference, a standard VOR station has a 100W antenna, a standard AA TACAN has a 120W antenna, and civilian ATC's antenna usually range between 300 and 500W,
  • +
  • Note that if the transmission has a subtitle, it will be readable, regardless of the quality of the transmission. +
  • +
+ +

Field(s)

+
+
+ + +RADIO:Broadcast() + +
+
+ +

Actually Broadcast the transmission

+ +

Return value

+ +

#RADIO: +self

+ +

Usage:

+
-- The Radio has to be populated with the new transmission before broadcasting.
+-- Please use RADIO setters or either @{Radio#RADIO.NewGenericTransmission} or @{Radio#RADIO.NewUnitTransmission}
+-- This class is in fact pretty smart, it determines the right DCS function to use depending on the type of POSITIONABLE
+-- If the POSITIONABLE is not a UNIT or a GROUP, we use the generic (but limited) trigger.action.radioTransmission()
+-- If the POSITIONABLE is a UNIT or a GROUP, we use the "TransmitMessage" Command
+-- If your POSITIONABLE is a UNIT or a GROUP, the Power is ignored.
+-- If your POSITIONABLE is not a UNIT or a GROUP, the Subtitle, SubtitleDuration and Loop are ignored
+ +
+
+
+
+ + #string + +RADIO.ClassName + +
+
+ + + +
+
+
+
+ + #string + +RADIO.FileName + +
+
+ +

Name of the sound file

+ +
+
+
+
+ + #number + +RADIO.Frequency + +
+
+ +

Frequency of the transmission in Hz

+ +
+
+
+
+ + #boolean + +RADIO.Loop + +
+
+ + + +
+
+
+
+ + #number + +RADIO.Modulation + +
+
+ +

Modulation of the transmission (either radio.modulation.AM or radio.modulation.FM)

+ +
+
+
+
+ + +RADIO:New(Positionable) + +
+
+ +

Create a new RADIO Object.

+ + +

This doesn't broadcast a transmission, though, use RADIO.Broadcast to actually broadcast

+ +

Parameter

+ +

Return values

+
    +
  1. + +

    #RADIO: +Radio

    + +
  2. +
  3. + +

    #nil: +If Positionable is invalid

    + +
  4. +
+

Usage:

+
-- If you want to create a RADIO, you probably should use @{Positionable#POSITIONABLE.GetRadio}() instead
+ +
+
+
+
+ + +RADIO:NewGenericTransmission(FileName, Frequency, Modulation, Power) + +
+
+ +

Create a new transmission, that is to say, populate the RADIO with relevant data

+ +

Parameters

+
    +
  • + +

    #string FileName :

    + +
  • +
  • + +

    #number Frequency : +in MHz

    + +
  • +
  • + +

    #number Modulation : +either radio.modulation.AM or radio.modulation.FM

    + +
  • +
  • + +

    #number Power : +in W

    + +
  • +
+

Return value

+ +

#RADIO: +self

+ +

Usage:

+
-- In this function the data is especially relevant if the broadcaster is anything but a UNIT or a GROUP,
+but it will work with a UNIT or a GROUP anyway
+-- Only the RADIO and the Filename are mandatory
+ +
+
+
+
+ + +RADIO:NewUnitTransmission(FileName, Subtitle, SubtitleDuration, Frequency, Modulation, Loop) + +
+
+ +

Create a new transmission, that is to say, populate the RADIO with relevant data

+ +

Parameters

+
    +
  • + +

    #string FileName :

    + +
  • +
  • + +

    #string Subtitle :

    + +
  • +
  • + +

    #number SubtitleDuration : +in s

    + +
  • +
  • + +

    #number Frequency : +in MHz

    + +
  • +
  • + +

    #number Modulation : +either radio.modulation.AM or radio.modulation.FM

    + +
  • +
  • + +

    #boolean Loop :

    + +
  • +
+

Return value

+ +

#RADIO: +self

+ +

Usage:

+
-- In this function the data is especially relevant if the broadcaster is a UNIT or a GROUP,
+but it will work for any POSITIONABLE
+-- Only the RADIO and the Filename are mandatory
+ +
+
+
+
+ + Positionable#POSITIONABLE + +RADIO.Positionable + +
+
+ +

The transmiter

+ +
+
+
+
+ + #number + +RADIO.Power + +
+
+ +

Power of the antenna is Watts

+ +
+
+
+
+ + +RADIO:SetFileName(FileName) + +
+
+ +

Check validity of the filename passed and sets RADIO.FileName

+ +

Parameter

+
    +
  • + +

    #string FileName : +File name of the sound file (i.e. "Noise.ogg")

    + +
  • +
+

Return value

+ +

#RADIO: +self

+ +
+
+
+
+ + +RADIO:SetFrequency(Frequency) + +
+
+ +

Check validity of the frequency passed and sets RADIO.Frequency

+ +

Parameter

+
    +
  • + +

    #number Frequency : +in MHz (Ranges allowed for radio transmissions in DCS : 30-88 / 108-152 / 225-400MHz)

    + +
  • +
+

Return value

+ +

#RADIO: +self

+ +
+
+
+
+ + +RADIO:SetLoop(Loop) + +
+
+ +

Check validity of the loop passed and sets RADIO.Loop

+ +

Parameter

+
    +
  • + +

    #boolean Loop :

    + +
  • +
+

Return value

+ +

#RADIO: +self

+ +

Usage:

+
+ +
+
+
+
+ + +RADIO:SetModulation(Modulation) + +
+
+ +

Check validity of the frequency passed and sets RADIO.Modulation

+ +

Parameter

+
    +
  • + +

    #number Modulation : +either radio.modulation.AM or radio.modulation.FM

    + +
  • +
+

Return value

+ +

#RADIO: +self

+ +
+
+
+
+ + +RADIO:SetPower(Power) + +
+
+ +

Check validity of the power passed and sets RADIO.Power

+ +

Parameter

+
    +
  • + +

    #number Power : +in W

    + +
  • +
+

Return value

+ +

#RADIO: +self

+ +
+
+
+
+ + +RADIO:SetSubtitle(Subtitle, SubtitleDuration) + +
+
+ +

Check validity of the subtitle and the subtitleDuration passed and sets RADIO.subtitle and RADIO.subtitleDuration

+ +

Parameters

+
    +
  • + +

    #string Subtitle :

    + +
  • +
  • + +

    #number SubtitleDuration : +in s

    + +
  • +
+

Return value

+ +

#RADIO: +self

+ +

Usage:

+
-- Both parameters are mandatory, since it wouldn't make much sense to change the Subtitle and not its duration
+ +
+
+
+
+ + +RADIO:StopBroadcast() + +
+
+ +

Stops a transmission

+ +

Return value

+ +

#RADIO: +self

+ +

Usage:

+
-- Especially usefull to stop the broadcast of looped transmissions
+-- Only works with broadcasts from UNIT or GROUP
+ +
+
+
+
+ + #string + +RADIO.Subtitle + +
+
+ +

Subtitle of the transmission

+ +
+
+
+
+ + #number + +RADIO.SubtitleDuration + +
+
+ +

Duration of the Subtitle in seconds

+ +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Route.html b/docs/Documentation/Route.html new file mode 100644 index 000000000..837c6c28f --- /dev/null +++ b/docs/Documentation/Route.html @@ -0,0 +1,1285 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Route

+ +

(SP) (MP) (FSM) Route AI or players through waypoints or to zones.

+ + + +
+ +

#ACT_ROUTE FSM class, extends Fsm#FSM_PROCESS

+ +

ACT_ROUTE state machine:

+ +

This class is a state machine: it manages a process that is triggered by events causing state transitions to occur. +All derived classes from this class will start with the class name, followed by a _. See the relevant derived class descriptions below. +Each derived class follows exactly the same process, using the same events and following the same state transitions, +but will have different implementation behaviour upon each event or state transition.

+ +

ACT_ROUTE Events:

+ +

These are the events defined in this class:

+ +
    +
  • Start: The process is started. The process will go into the Report state.
  • +
  • Report: The process is reporting to the player the route to be followed.
  • +
  • Route: The process is routing the controllable.
  • +
  • Pause: The process is pausing the route of the controllable.
  • +
  • Arrive: The controllable has arrived at a route point.
  • +
  • More: There are more route points that need to be followed. The process will go back into the Report state.
  • +
  • NoMore: There are no more route points that need to be followed. The process will go into the Success state.
  • +
+ +

ACT_ROUTE Event methods:

+ +

Event methods are available (dynamically allocated by the state machine), that accomodate for state transitions occurring in the process. +There are two types of event methods, which you can use to influence the normal mechanisms in the state machine:

+ +
    +
  • Immediate: The event method has exactly the name of the event.
  • +
  • Delayed: The event method starts with a __ + the name of the event. The first parameter of the event method is a number value, expressing the delay in seconds when the event will be executed.
  • +
+ +

ACT_ROUTE States:

+ +
    +
  • None: The controllable did not receive route commands.
  • +
  • Arrived (*): The controllable has arrived at a route point.
  • +
  • Aborted (*): The controllable has aborted the route path.
  • +
  • Routing: The controllable is understay to the route point.
  • +
  • Pausing: The process is pausing the routing. AI air will go into hover, AI ground will stop moving. Players can fly around.
  • +
  • Success (*): All route points were reached.
  • +
  • Failed (*): The process has failed.
  • +
+ +

(*) End states of the process.

+ +

ACT_ROUTE state transition methods:

+ +

State transition functions can be set by the mission designer customizing or improving the behaviour of the state. +There are 2 moments when state transition methods will be called by the state machine:

+ +
    +
  • Before the state transition. + The state transition method needs to start with the name OnBefore + the name of the state. + If the state transition method returns false, then the processing of the state transition will not be done! + If you want to change the behaviour of the AIControllable at this event, return false, + but then you'll need to specify your own logic using the AIControllable!

  • +
  • After the state transition. + The state transition method needs to start with the name OnAfter + the name of the state. + These state transition methods need to provide a return value, which is specified at the function description.

  • +
+ +
+ +

1) #ACTROUTEZONE class, extends Fsm.Route#ACT_ROUTE

+ +

The ACTROUTEZONE class implements the core functions to route an AIR Controllable player Unit to a Zone. +The player receives on perioding times messages with the coordinates of the route to follow. +Upon arrival at the zone, a confirmation of arrival is sent, and the process will be ended.

+ +

1.1) ACTROUTEZONE constructor:

+ + + +
+ + +

Global(s)

+ + + + + + + + + + + + + +
ACT_ROUTE + +
ACT_ROUTE_POINT + +
ACT_ROUTE_ZONE + +
+

Type ACT_ROUTE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ACT_ROUTE.ClassName + +
ACT_ROUTE.DisplayCount + +
ACT_ROUTE:New() +

Creates a new routing state machine.

+
ACT_ROUTE.ProcessUnit + +
ACT_ROUTE.TASK + +
ACT_ROUTE.Zone + +
ACT_ROUTE:onafterStart(ProcessUnit, Event, From, To) +

StateMachine callback function

+
ACT_ROUTE:onbeforeRoute(ProcessUnit, Event, From, To) +

StateMachine callback function

+
ACT_ROUTE:onfuncHasArrived(ProcessUnit) +

Check if the controllable has arrived.

+
+ +

Type ACT_ROUTE_POINT

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ACT_ROUTE_POINT.ClassName + +
ACT_ROUTE_POINT.DisplayCount + +
ACT_ROUTE_POINT.DisplayInterval + +
ACT_ROUTE_POINT.DisplayMessage + +
ACT_ROUTE_POINT.DisplayTime + +
ACT_ROUTE_POINT:GetPointVec2() +

Get PointVec2

+
ACT_ROUTE_POINT:GetRange() +

Get Range around PointVec2

+
ACT_ROUTE_POINT:Init(FsmRoute) + +
ACT_ROUTE_POINT:New(The, Range, Zone, PointVec2) +

Creates a new routing state machine.

+
ACT_ROUTE_POINT.PointVec2 + +
ACT_ROUTE_POINT.Range + +
ACT_ROUTE_POINT:SetPointVec2(PointVec2) +

Set PointVec2

+
ACT_ROUTE_POINT:SetRange(Range) +

Set Range around PointVec2

+
ACT_ROUTE_POINT.TASK + +
ACT_ROUTE_POINT:onenterReporting(ProcessUnit, Event, From, To) +

StateMachine callback function

+
ACT_ROUTE_POINT:onfuncHasArrived(ProcessUnit) +

Method override to check if the controllable has arrived.

+
+ +

Type ACT_ROUTE_ZONE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ACT_ROUTE_ZONE.ClassName + +
ACT_ROUTE_ZONE.DisplayCount + +
ACT_ROUTE_ZONE.DisplayInterval + +
ACT_ROUTE_ZONE.DisplayMessage + +
ACT_ROUTE_ZONE.DisplayTime + +
ACT_ROUTE_ZONE:GetZone() +

Get Zone

+
ACT_ROUTE_ZONE:Init(FsmRoute) + +
ACT_ROUTE_ZONE:New(Zone) +

Creates a new routing state machine.

+
ACT_ROUTE_ZONE.ProcessUnit + +
ACT_ROUTE_ZONE:SetZone(Zone) +

Set Zone

+
ACT_ROUTE_ZONE.TASK + +
ACT_ROUTE_ZONE.Zone + +
ACT_ROUTE_ZONE:onenterReporting(ProcessUnit, Event, From, To) +

StateMachine callback function

+
ACT_ROUTE_ZONE:onfuncHasArrived(ProcessUnit) +

Method override to check if the controllable has arrived.

+
+ +

Global(s)

+
+
+ + #ACT_ROUTE + +ACT_ROUTE + +
+
+ + + +
+
+
+
+ + #ACT_ROUTE_POINT + +ACT_ROUTE_POINT + +
+
+ + + +
+
+
+
+ + #ACT_ROUTE_ZONE + +ACT_ROUTE_ZONE + +
+
+ + + +
+
+

Type Route

+ +

Type ACT_ROUTE

+ +

ACT_ROUTE class

+ +

Field(s)

+
+
+ + #string + +ACT_ROUTE.ClassName + +
+
+ + + +
+
+
+
+ + #number + +ACT_ROUTE.DisplayCount + +
+
+ + + +
+
+
+
+ + +ACT_ROUTE:New() + +
+
+ +

Creates a new routing state machine.

+ + +

The process will route a CLIENT to a ZONE until the CLIENT is within that ZONE.

+ +

Return value

+ +

#ACT_ROUTE: +self

+ +
+
+
+
+ + Wrapper.Unit#UNIT + +ACT_ROUTE.ProcessUnit + +
+
+ + + +
+
+
+
+ + Tasking.Task#TASK + +ACT_ROUTE.TASK + +
+
+ + + +
+
+
+
+ + Core.Zone#ZONE_BASE + +ACT_ROUTE.Zone + +
+
+ + + +
+
+
+
+ + +ACT_ROUTE:onafterStart(ProcessUnit, Event, From, To) + +
+
+ +

StateMachine callback function

+ +

Parameters

+ +
+
+
+
+ + +ACT_ROUTE:onbeforeRoute(ProcessUnit, Event, From, To) + +
+
+ +

StateMachine callback function

+ +

Parameters

+ +
+
+
+
+ + +ACT_ROUTE:onfuncHasArrived(ProcessUnit) + +
+
+ +

Check if the controllable has arrived.

+ +

Parameter

+ +

Return value

+ +

#boolean:

+ + +
+
+ +

Type ACT_ROUTE_POINT

+ +

ACTROUTEPOINT class

+ +

Field(s)

+
+
+ + #string + +ACT_ROUTE_POINT.ClassName + +
+
+ + + +
+
+
+
+ + #number + +ACT_ROUTE_POINT.DisplayCount + +
+
+ + + +
+
+
+
+ + #number + +ACT_ROUTE_POINT.DisplayInterval + +
+
+ + + +
+
+
+
+ + #boolean + +ACT_ROUTE_POINT.DisplayMessage + +
+
+ + + +
+
+
+
+ + #number + +ACT_ROUTE_POINT.DisplayTime + +
+
+ + + + +

10 seconds is the default

+ +
+
+
+
+ + +ACT_ROUTE_POINT:GetPointVec2() + +
+
+ +

Get PointVec2

+ +

Return value

+ +

Core.Point#POINT_VEC2: +PointVec2 The PointVec2 to route to.

+ +
+
+
+
+ + +ACT_ROUTE_POINT:GetRange() + +
+
+ +

Get Range around PointVec2

+ +

Return value

+ +

#number: +The Range to consider the arrival. Default is 10000 meters.

+ +
+
+
+
+ + +ACT_ROUTE_POINT:Init(FsmRoute) + +
+
+ + + +

Parameter

+
    +
  • + +

    FsmRoute :

    + +
  • +
+
+
+
+
+ + +ACT_ROUTE_POINT:New(The, Range, Zone, PointVec2) + +
+
+ +

Creates a new routing state machine.

+ + +

The task will route a controllable to a PointVec2 until the controllable is within the Range.

+ +

Parameters

+ +
+
+
+
+ + + +ACT_ROUTE_POINT.PointVec2 + +
+
+ + + +
+
+
+
+ + +ACT_ROUTE_POINT.Range + +
+
+ + + +
+
+
+
+ + +ACT_ROUTE_POINT:SetPointVec2(PointVec2) + +
+
+ +

Set PointVec2

+ +

Parameter

+ +
+
+
+
+ + +ACT_ROUTE_POINT:SetRange(Range) + +
+
+ +

Set Range around PointVec2

+ +

Parameter

+
    +
  • + +

    #number Range : +The Range to consider the arrival. Default is 10000 meters.

    + +
  • +
+
+
+
+
+ + Tasking.Task#TASK + +ACT_ROUTE_POINT.TASK + +
+
+ + + +
+
+
+
+ + +ACT_ROUTE_POINT:onenterReporting(ProcessUnit, Event, From, To) + +
+
+ +

StateMachine callback function

+ +

Parameters

+ +
+
+
+
+ + +ACT_ROUTE_POINT:onfuncHasArrived(ProcessUnit) + +
+
+ +

Method override to check if the controllable has arrived.

+ +

Parameter

+ +

Return value

+ +

#boolean:

+ + +
+
+ +

Type ACT_ROUTE_ZONE

+ +

ACTROUTEZONE class

+ +

Field(s)

+
+
+ + #string + +ACT_ROUTE_ZONE.ClassName + +
+
+ + + +
+
+
+
+ + #number + +ACT_ROUTE_ZONE.DisplayCount + +
+
+ + + +
+
+
+
+ + #number + +ACT_ROUTE_ZONE.DisplayInterval + +
+
+ + + +
+
+
+
+ + #boolean + +ACT_ROUTE_ZONE.DisplayMessage + +
+
+ + + +
+
+
+
+ + #number + +ACT_ROUTE_ZONE.DisplayTime + +
+
+ + + + +

10 seconds is the default

+ +
+
+
+
+ + +ACT_ROUTE_ZONE:GetZone() + +
+
+ +

Get Zone

+ +

Return value

+ +

Core.Zone#ZONE_BASE: +Zone The Zone object where to route to.

+ +
+
+
+
+ + +ACT_ROUTE_ZONE:Init(FsmRoute) + +
+
+ + + +

Parameter

+
    +
  • + +

    FsmRoute :

    + +
  • +
+
+
+
+
+ + +ACT_ROUTE_ZONE:New(Zone) + +
+
+ +

Creates a new routing state machine.

+ + +

The task will route a controllable to a ZONE until the controllable is within that ZONE.

+ +

Parameter

+ +
+
+
+
+ + Wrapper.Unit#UNIT + +ACT_ROUTE_ZONE.ProcessUnit + +
+
+ + + +
+
+
+
+ + +ACT_ROUTE_ZONE:SetZone(Zone) + +
+
+ +

Set Zone

+ +

Parameter

+ +
+
+
+
+ + Tasking.Task#TASK + +ACT_ROUTE_ZONE.TASK + +
+
+ + + +
+
+
+
+ + Core.Zone#ZONE_BASE + +ACT_ROUTE_ZONE.Zone + +
+
+ + + +
+
+
+
+ + +ACT_ROUTE_ZONE:onenterReporting(ProcessUnit, Event, From, To) + +
+
+ +

StateMachine callback function

+ +

Parameters

+ +
+
+
+
+ + +ACT_ROUTE_ZONE:onfuncHasArrived(ProcessUnit) + +
+
+ +

Method override to check if the controllable has arrived.

+ +

Parameter

+ +

Return value

+ +

#boolean:

+ + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Scenery.html b/docs/Documentation/Scenery.html new file mode 100644 index 000000000..f0530ef7a --- /dev/null +++ b/docs/Documentation/Scenery.html @@ -0,0 +1,241 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Scenery

+ +

This module contains the SCENERY class.

+ + + +

1) Scenery#SCENERY class, extends Positionable#POSITIONABLE

+

Scenery objects are defined on the map. +The Scenery#SCENERY class is a wrapper class to handle the DCS Scenery objects:

+ +
    +
  • Wraps the DCS Scenery objects.
  • +
  • Support all DCS Scenery APIs.
  • +
  • Enhance with Scenery specific APIs not in the DCS API set.
  • +
+ + +

Global(s)

+ + + + + +
SCENERY + +
+

Type SCENERY

+ + + + + + + + + + + + + + + + + +
SCENERY.ClassName + +
SCENERY:GetDCSObject() + +
SCENERY:GetThreatLevel() + +
SCENERY:Register(SceneryName, SceneryObject) + +
+ +

Global(s)

+
+
+ + #SCENERY + +SCENERY + +
+
+ + + +
+
+

Type Scenery

+ +

Type SCENERY

+ +

The SCENERY class

+ +

Field(s)

+
+
+ + #string + +SCENERY.ClassName + +
+
+ + + +
+
+
+
+ + +SCENERY:GetDCSObject() + +
+
+ + + +
+
+
+
+ + +SCENERY:GetThreatLevel() + +
+
+ + + +
+
+
+
+ + +SCENERY:Register(SceneryName, SceneryObject) + +
+
+ + + +

Parameters

+
    +
  • + +

    SceneryName :

    + +
  • +
  • + +

    SceneryObject :

    + +
  • +
+
+
+ +
+ +
+ + diff --git a/docs/Documentation/ScheduleDispatcher.html b/docs/Documentation/ScheduleDispatcher.html new file mode 100644 index 000000000..0175998ff --- /dev/null +++ b/docs/Documentation/ScheduleDispatcher.html @@ -0,0 +1,483 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module ScheduleDispatcher

+ +

This module defines the SCHEDULEDISPATCHER class, which is used by a central object called _SCHEDULEDISPATCHER.

+ + + +
+ +

Takes care of the creation and dispatching of scheduled functions for SCHEDULER objects.

+ +

This class is tricky and needs some thorought explanation. +SCHEDULE classes are used to schedule functions for objects, or as persistent objects. +The SCHEDULEDISPATCHER class ensures that:

+ +
    +
  • Scheduled functions are planned according the SCHEDULER object parameters.
  • +
  • Scheduled functions are repeated when requested, according the SCHEDULER object parameters.
  • +
  • Scheduled functions are automatically removed when the schedule is finished, according the SCHEDULER object parameters.
  • +
+ +

The SCHEDULEDISPATCHER class will manage SCHEDULER object in memory during garbage collection: + - When a SCHEDULER object is not attached to another object (that is, it's first :Schedule() parameter is nil), then the SCHEDULER

+
object is _persistent_ within memory.
+
+

- When a SCHEDULER object is attached to another object, then the SCHEDULER object is not persistent within memory after a garbage collection! +The none persistency of SCHEDULERS attached to objects is required to allow SCHEDULER objects to be garbage collectged, when the parent object is also desroyed or nillified and garbage collected. +Even when there are pending timer scheduled functions to be executed for the SCHEDULER object,
+these will not be executed anymore when the SCHEDULER object has been destroyed.

+ +

The SCHEDULEDISPATCHER allows multiple scheduled functions to be planned and executed for one SCHEDULER object. +The SCHEDULER object therefore keeps a table of "CallID's", which are returned after each planning of a new scheduled function by the SCHEDULEDISPATCHER. +The SCHEDULER object plans new scheduled functions through the Scheduler#SCHEDULER.Schedule() method. +The Schedule() method returns the CallID that is the reference ID for each planned schedule.

+ +
+ +
+ +

Contributions: -

+

Authors: FlightControl : Design & Programming

+ + +

Global(s)

+ + + + + +
SCHEDULEDISPATCHER + +
+

Type SCHEDULEDISPATCHER

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SCHEDULEDISPATCHER:AddSchedule(Scheduler, ScheduleFunction, ScheduleArguments, Start, Repeat, Randomize, Stop) +

Add a Schedule to the ScheduleDispatcher.

+
SCHEDULEDISPATCHER.CallID + +
SCHEDULEDISPATCHER.ClassName + +
SCHEDULEDISPATCHER:Clear(Scheduler) + +
SCHEDULEDISPATCHER:New() + +
SCHEDULEDISPATCHER.ObjectSchedulers + +
SCHEDULEDISPATCHER.PersistentSchedulers + +
SCHEDULEDISPATCHER:RemoveSchedule(Scheduler, CallID) + +
SCHEDULEDISPATCHER.Schedule + +
SCHEDULEDISPATCHER:Start(Scheduler, CallID) + +
SCHEDULEDISPATCHER:Stop(Scheduler, CallID) + +
+ +

Global(s)

+
+
+ + #SCHEDULEDISPATCHER + +SCHEDULEDISPATCHER + +
+
+ + + +
+
+

Type ScheduleDispatcher

+ +

Type SCHEDULEDISPATCHER

+ +

The SCHEDULEDISPATCHER structure

+ +

Field(s)

+
+
+ + +SCHEDULEDISPATCHER:AddSchedule(Scheduler, ScheduleFunction, ScheduleArguments, Start, Repeat, Randomize, Stop) + +
+
+ +

Add a Schedule to the ScheduleDispatcher.

+ + +

The development of this method was really tidy. +It is constructed as such that a garbage collection is executed on the weak tables, when the Scheduler is nillified. +Nothing of this code should be modified without testing it thoroughly.

+ +

Parameters

+
    +
  • + +

    Core.Scheduler#SCHEDULER Scheduler :

    + +
  • +
  • + +

    ScheduleFunction :

    + +
  • +
  • + +

    ScheduleArguments :

    + +
  • +
  • + +

    Start :

    + +
  • +
  • + +

    Repeat :

    + +
  • +
  • + +

    Randomize :

    + +
  • +
  • + +

    Stop :

    + +
  • +
+
+
+
+
+ + +SCHEDULEDISPATCHER.CallID + +
+
+ + + +
+
+
+
+ + #string + +SCHEDULEDISPATCHER.ClassName + +
+
+ + + +
+
+
+
+ + +SCHEDULEDISPATCHER:Clear(Scheduler) + +
+
+ + + +

Parameter

+
    +
  • + +

    Scheduler :

    + +
  • +
+
+
+
+
+ + +SCHEDULEDISPATCHER:New() + +
+
+ + + +
+
+
+
+ + +SCHEDULEDISPATCHER.ObjectSchedulers + +
+
+ + + + +

or {}

+ +
+
+
+
+ + +SCHEDULEDISPATCHER.PersistentSchedulers + +
+
+ + + + +

Initialize the ObjectSchedulers array, which is a weakly coupled table. + If the object used as the key is nil, then the garbage collector will remove the item from the Functions array.

+ +
+
+
+
+ + +SCHEDULEDISPATCHER:RemoveSchedule(Scheduler, CallID) + +
+
+ + + +

Parameters

+
    +
  • + +

    Scheduler :

    + +
  • +
  • + +

    CallID :

    + +
  • +
+
+
+
+
+ + +SCHEDULEDISPATCHER.Schedule + +
+
+ + + +
+
+
+
+ + +SCHEDULEDISPATCHER:Start(Scheduler, CallID) + +
+
+ + + +

Parameters

+
    +
  • + +

    Scheduler :

    + +
  • +
  • + +

    CallID :

    + +
  • +
+
+
+
+
+ + +SCHEDULEDISPATCHER:Stop(Scheduler, CallID) + +
+
+ + + +

Parameters

+
    +
  • + +

    Scheduler :

    + +
  • +
  • + +

    CallID :

    + +
  • +
+
+
+ +
+ +
+ + diff --git a/docs/Documentation/Scheduler.html b/docs/Documentation/Scheduler.html new file mode 100644 index 000000000..78118365a --- /dev/null +++ b/docs/Documentation/Scheduler.html @@ -0,0 +1,529 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Scheduler

+ +

Core - SCHEDULER prepares and handles the execution of functions over scheduled time (intervals).

+ + + +

Banner Image

+ +
+ +

1) Scheduler#SCHEDULER class, extends Base#BASE

+ +

The Scheduler#SCHEDULER class creates schedule.

+ +

1.1) SCHEDULER constructor

+ +

The SCHEDULER class is quite easy to use, but note that the New constructor has variable parameters:

+ +
    +
  • Scheduler#SCHEDULER.New( nil ): Setup a new SCHEDULER object, which is persistently executed after garbage collection.
  • +
  • Scheduler#SCHEDULER.New( Object ): Setup a new SCHEDULER object, which is linked to the Object. When the Object is nillified or destroyed, the SCHEDULER object will also be destroyed and stopped after garbage collection.
  • +
  • Scheduler#SCHEDULER.New( nil, Function, FunctionArguments, Start, ... ): Setup a new persistent SCHEDULER object, and start a new schedule for the Function with the defined FunctionArguments according the Start and sequent parameters.
  • +
  • Scheduler#SCHEDULER.New( Object, Function, FunctionArguments, Start, ... ): Setup a new SCHEDULER object, linked to Object, and start a new schedule for the Function with the defined FunctionArguments according the Start and sequent parameters.
  • +
+ +

1.2) SCHEDULER timer stopping and (re-)starting.

+ +

The SCHEDULER can be stopped and restarted with the following methods:

+ +
    +
  • Scheduler#SCHEDULER.Start(): (Re-)Start the schedules within the SCHEDULER object. If a CallID is provided to :Start(), only the schedule referenced by CallID will be (re-)started.
  • +
  • Scheduler#SCHEDULER.Stop(): Stop the schedules within the SCHEDULER object. If a CallID is provided to :Stop(), then only the schedule referenced by CallID will be stopped.
  • +
+ +

1.3) Create a new schedule

+ +

With Scheduler#SCHEDULER.Schedule() a new time event can be scheduled. This function is used by the :New() constructor when a new schedule is planned.

+ +
+ +

Contributions:

+ +
    +
  • FlightControl : Concept & Testing
  • +
+ +

Authors:

+ +
    +
  • FlightControl : Design & Programming
  • +
+ +

Test Missions:

+ +
    +
  • SCH - Scheduler
  • +
+ +
+ + +

Global(s)

+ + + + + +
SCHEDULER + +
+

Type SCHEDULER

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SCHEDULER.ClassName + +
SCHEDULER:Clear() +

Clears all pending schedules.

+
SCHEDULER:New(SchedulerObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop) +

SCHEDULER constructor.

+
SCHEDULER:Remove(ScheduleID) +

Removes a specific schedule if a valid ScheduleID is provided.

+
SCHEDULER:Schedule(SchedulerObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop) +

Schedule a new time event.

+
SCHEDULER.ScheduleID +

the ID of the scheduler.

+
SCHEDULER.SchedulerObject + +
SCHEDULER.Schedules + +
SCHEDULER:Start(ScheduleID) +

(Re-)Starts the schedules or a specific schedule if a valid ScheduleID is provided.

+
SCHEDULER:Stop(ScheduleID) +

Stops the schedules or a specific schedule if a valid ScheduleID is provided.

+
+ +

Global(s)

+
+
+ + #SCHEDULER + +SCHEDULER + +
+
+ + + +
+
+

Type Scheduler

+ +

Type SCHEDULER

+ +

The SCHEDULER class

+ +

Field(s)

+
+
+ + #string + +SCHEDULER.ClassName + +
+
+ + + +
+
+
+
+ + +SCHEDULER:Clear() + +
+
+ +

Clears all pending schedules.

+ +
+
+
+
+ + +SCHEDULER:New(SchedulerObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop) + +
+
+ +

SCHEDULER constructor.

+ +

Parameters

+
    +
  • + +

    #table SchedulerObject : +Specified for which Moose object the timer is setup. If a value of nil is provided, a scheduler will be setup without an object reference.

    + +
  • +
  • + +

    #function SchedulerFunction : +The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

    + +
  • +
  • + +

    #table SchedulerArguments : +Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

    + +
  • +
  • + +

    #number Start : +Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

    + +
  • +
  • + +

    #number Repeat : +Specifies the interval in seconds when the scheduler will call the event function.

    + +
  • +
  • + +

    #number RandomizeFactor : +Specifies a randomization factor between 0 and 1 to randomize the Repeat.

    + +
  • +
  • + +

    #number Stop : +Specifies the amount of seconds when the scheduler will be stopped.

    + +
  • +
+

Return values

+
    +
  1. + +

    #SCHEDULER: +self.

    + +
  2. +
  3. + +

    #number: +The ScheduleID of the planned schedule.

    + +
  4. +
+
+
+
+
+ + +SCHEDULER:Remove(ScheduleID) + +
+
+ +

Removes a specific schedule if a valid ScheduleID is provided.

+ +

Parameter

+
    +
  • + +

    #number ScheduleID : +(optional) The ScheduleID of the planned (repeating) schedule.

    + +
  • +
+
+
+
+
+ + +SCHEDULER:Schedule(SchedulerObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop) + +
+
+ +

Schedule a new time event.

+ + +

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

+ +

Parameters

+
    +
  • + +

    #table SchedulerObject : +Specified for which Moose object the timer is setup. If a value of nil is provided, a scheduler will be setup without an object reference.

    + +
  • +
  • + +

    #function SchedulerFunction : +The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

    + +
  • +
  • + +

    #table SchedulerArguments : +Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

    + +
  • +
  • + +

    #number Start : +Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

    + +
  • +
  • + +

    #number Repeat : +Specifies the interval in seconds when the scheduler will call the event function.

    + +
  • +
  • + +

    #number RandomizeFactor : +Specifies a randomization factor between 0 and 1 to randomize the Repeat.

    + +
  • +
  • + +

    #number Stop : +Specifies the amount of seconds when the scheduler will be stopped.

    + +
  • +
+

Return value

+ +

#number: +The ScheduleID of the planned schedule.

+ +
+
+
+
+ + #number + +SCHEDULER.ScheduleID + +
+
+ +

the ID of the scheduler.

+ +
+
+
+
+ + + +SCHEDULER.SchedulerObject + +
+
+ + + +
+
+
+
+ + + +SCHEDULER.Schedules + +
+
+ + + +
+
+
+
+ + +SCHEDULER:Start(ScheduleID) + +
+
+ +

(Re-)Starts the schedules or a specific schedule if a valid ScheduleID is provided.

+ +

Parameter

+
    +
  • + +

    #number ScheduleID : +(optional) The ScheduleID of the planned (repeating) schedule.

    + +
  • +
+
+
+
+
+ + +SCHEDULER:Stop(ScheduleID) + +
+
+ +

Stops the schedules or a specific schedule if a valid ScheduleID is provided.

+ +

Parameter

+
    +
  • + +

    #number ScheduleID : +(optional) The ScheduleID of the planned (repeating) schedule.

    + +
  • +
+
+
+ +
+ +
+ + diff --git a/docs/Documentation/Scoring.html b/docs/Documentation/Scoring.html new file mode 100644 index 000000000..7868ecda1 --- /dev/null +++ b/docs/Documentation/Scoring.html @@ -0,0 +1,2226 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Scoring

+ +

Single-Player:Yes / Multi-Player:Yes / Core:Yes -- Administer the scoring of player achievements, +and create a CSV file logging the scoring events for use at team or squadron websites.

+ +

Banner Image

+ +
+ +

The #SCORING class administers the scoring of player achievements, +and creates a CSV file logging the scoring events and results for use at team or squadron websites.

+ + + +

SCORING automatically calculates the threat level of the objects hit and destroyed by players, +which can be Unit, Static objects.

+ +

Positive score points are granted when enemy or neutral targets are destroyed. +Negative score points or penalties are given when a friendly target is hit or destroyed. +This brings a lot of dynamism in the scoring, where players need to take care to inflict damage on the right target. +By default, penalties weight heavier in the scoring, to ensure that players don't commit fratricide. +The total score of the player is calculated by adding the scores minus the penalties.

+ +

Banner Image

+ +

The score value is calculated based on the threat level of the player and the threat level of the target. +A calculated score takes the threat level of the target divided by a balanced threat level of the player unit.
+As such, if the threat level of the target is high, and the player threat level is low, a higher score will be given than +if the threat level of the player would be high too.

+ +

Banner Image

+ +

When multiple players hit the same target, and finally succeed in destroying the target, then each player who contributed to the target +destruction, will receive a score. This is important for targets that require significant damage before it can be destroyed, like +ships or heavy planes.

+ +

Banner Image

+ +

Optionally, the score values can be scaled by a scale. Specific scales can be set for positive cores or negative penalties. +The default range of the scores granted is a value between 0 and 10. The default range of penalties given is a value between 0 and 30.

+ +

Banner Image

+ +

Additional scores can be granted to specific objects, when the player(s) destroy these objects.

+ +

Banner Image

+ +

Various Zones can be defined for which scores are also granted when objects in that Zone are destroyed. +This is specifically useful to designate scenery targets on the map that will generate points when destroyed.

+ +

With a small change in MissionScripting.lua, the scoring results can also be logged in a CSV file.
+These CSV files can be used to:

+ +
    +
  • Upload scoring to a database or a BI tool to publish the scoring results to the player community.
  • +
  • Upload scoring in an (online) Excel like tool, using pivot tables and pivot charts to show mission results.
  • +
  • Share scoring amoung players after the mission to discuss mission results.
  • +
+ +

Scores can be reported. Menu options are automatically added to each player group when a player joins a client slot or a CA unit. +Use the radio menu F10 to consult the scores while running the mission. +Scores can be reported for your user, or an overall score can be reported of all players currently active in the mission.

+ +

1) Scoring#SCORING class, extends Base#BASE

+ +

1.1) Set the destroy score or penalty scale

+ +

Score scales can be set for scores granted when enemies or friendlies are destroyed. +Use the method SCORING.SetScaleDestroyScore() to set the scale of enemy destroys (positive destroys). +Use the method SCORING.SetScaleDestroyPenalty() to set the scale of friendly destroys (negative destroys).

+ +
 local Scoring = SCORING:New( "Scoring File" )
+ Scoring:SetScaleDestroyScore( 10 )
+ Scoring:SetScaleDestroyPenalty( 40 )
+
+ +

The above sets the scale for valid scores to 10. So scores will be given in a scale from 0 to 10. +The penalties will be given in a scale from 0 to 40.

+ +

1.2) Define special targets that will give extra scores.

+ +

Special targets can be set that will give extra scores to the players when these are destroyed. +Use the methods SCORING.AddUnitScore() and SCORING.RemoveUnitScore() to specify a special additional score for a specific Units.
+Use the methods SCORING.AddStaticScore() and SCORING.RemoveStaticScore() to specify a special additional score for a specific Statics.
+Use the method SCORING.SetGroupGroup() to specify a special additional score for a specific Groups.

+ +
 local Scoring = SCORING:New( "Scoring File" )
+ Scoring:AddUnitScore( UNIT:FindByName( "Unit #001" ), 200 )
+ Scoring:AddStaticScore( STATIC:FindByName( "Static #1" ), 100 )
+
+ +

The above grants an additional score of 200 points for Unit #001 and an additional 100 points of Static #1 if these are destroyed. +Note that later in the mission, one can remove these scores set, for example, when the a goal achievement time limit is over. +For example, this can be done as follows:

+ +
 Scoring:RemoveUnitScore( UNIT:FindByName( "Unit #001" ) )
+
+ +

1.3) Define destruction zones that will give extra scores.

+ +

Define zones of destruction. Any object destroyed within the zone of the given category will give extra points. +Use the method SCORING.AddZoneScore() to add a Zone for additional scoring.
+Use the method SCORING.RemoveZoneScore() to remove a Zone for additional scoring.
+There are interesting variations that can be achieved with this functionality. For example, if the Zone is a Zone#ZONE_UNIT, +then the zone is a moving zone, and anything destroyed within that Zone will generate points. +The other implementation could be to designate a scenery target (a building) in the mission editor surrounded by a Zone, +just large enough around that building.

+ +

1.4) Add extra Goal scores upon an event or a condition.

+ +

A mission has goals and achievements. The scoring system provides an API to set additional scores when a goal or achievement event happens. +Use the method SCORING.AddGoalScore() to add a score for a Player at any time in your mission.

+ +

1.5) Configure fratricide level.

+ +

When a player commits too much damage to friendlies, his penalty score will reach a certain level. +Use the method SCORING.SetFratricide() to define the level when a player gets kicked.
+By default, the fratricide level is the default penalty mutiplier * 2 for the penalty score.

+ +

1.6) Penalty score when a player changes the coalition.

+ +

When a player changes the coalition, he can receive a penalty score. +Use the method SCORING.SetCoalitionChangePenalty() to define the penalty when a player changes coalition. +By default, the penalty for changing coalition is the default penalty scale.

+ +

1.8) Define output CSV files.

+ +

The CSV file is given the name of the string given in the SCORING.New{} constructor, followed by the .csv extension. +The file is incrementally saved in the **\Saved Games\DCS\Logs** folder, and has a time stamp indicating each mission run. +See the following example:

+ +
local ScoringFirstMission = SCORING:New( "FirstMission" )
+local ScoringSecondMission = SCORING:New( "SecondMission" )
+
+ +

The above documents that 2 Scoring objects are created, ScoringFirstMission and ScoringSecondMission.

+ +

1.9) Configure messages.

+ +

When players hit or destroy targets, messages are sent. +Various methods exist to configure:

+ +
    +
  • Which messages are sent upon the event.
  • +
  • Which audience receives the message.
  • +
+ +

1.9.1) Configure the messages sent upon the event.

+ +

Use the following methods to configure when to send messages. By default, all messages are sent.

+ + + +

1.9.2) Configure the audience of the messages.

+ +

Use the following methods to configure the audience of the messages. By default, the messages are sent to all players in the mission.

+ + + + +
+ +

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-02-26: Initial class and API.

+ +
+ +

AUTHORS and CONTRIBUTIONS

+ +

Contributions:

+ +
    +
  • Wingthor (TAW): Testing & Advice.
  • +
  • Dutch-Baron (TAW): Testing & Advice.
  • +
  • **Whisper: Testing and Advice.
  • +
+ +

Authors:

+ +
    +
  • FlightControl: Concept, Design & Programming.
  • +
+ + +

Global(s)

+ + + + + + + + + + + + + + + + + +
SCORING + +
nHours + +
nMins + +
nSecs + +
+

Type SCORING

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SCORING:AddGoalScore(PlayerUnit, GoalTag, Text, Score) +

Add a goal score for a player.

+
SCORING:AddScoreGroup(ScoreGroup, Score) +

Specify a special additional score for a Group.

+
SCORING:AddStaticScore(ScoreStatic, Score) +

Add a Static for additional scoring when the Static is destroyed.

+
SCORING:AddUnitScore(ScoreUnit, Score) +

Add a Unit for additional scoring when the Unit is destroyed.

+
SCORING:AddZoneScore(ScoreZone, Score) +

Add a Zone to define additional scoring when any object is destroyed in that zone.

+
SCORING.ClassID + +
SCORING.ClassName + +
SCORING:CloseCSV() + +
SCORING.CoalitionChangePenalty + +
SCORING.Fratricide + +
SCORING.GameName + +
SCORING:IfMessagesDestroy() +

If to send messages after a target has been destroyed.

+
SCORING:IfMessagesHit() +

If to send messages after a target has been hit.

+
SCORING:IfMessagesScore() +

If to send messages after a target has been destroyed and receives additional scores.

+
SCORING:IfMessagesToAll() +

If to send messages to all players.

+
SCORING:IfMessagesToCoalition() +

If to send messages to only those players within the same coalition as the player.

+
SCORING:IfMessagesZone() +

If to send messages after a target has been hit in a zone, and additional score is received.

+
SCORING.MessagesAudience + +
SCORING.MessagesDestroy + +
SCORING.MessagesHit + +
SCORING.MessagesScore + +
SCORING.MessagesZone + +
SCORING:New(GameName) +

Creates a new SCORING object to administer the scoring achieved by players.

+
SCORING:OnEventPlayerEnterUnit(Event) +

Handles the OnPlayerEnterUnit event for the scoring.

+
SCORING:OnEventPlayerLeaveUnit(Event) +

Handles the OnPlayerLeaveUnit event for the scoring.

+
SCORING:OpenCSV(ScoringCSV) +

Opens a score CSV file to log the scores.

+
SCORING.Players +

A collection of the current players that have joined the game.

+
SCORING:RemoveStaticScore(ScoreStatic) +

Removes a Static for additional scoring when the Static is destroyed.

+
SCORING:RemoveUnitScore(ScoreUnit) +

Removes a Unit for additional scoring when the Unit is destroyed.

+
SCORING:RemoveZoneScore(ScoreZone) +

Remove a Zone for additional scoring.

+
SCORING:ReportDetailedPlayerCoalitionChanges(PlayerName) +

Produce detailed report of player penalty scores because of changing the coalition.

+
SCORING:ReportDetailedPlayerDestroys(PlayerName) +

Produce detailed report of player destroy scores.

+
SCORING:ReportDetailedPlayerGoals(PlayerName) +

Produce detailed report of player goal scores.

+
SCORING:ReportDetailedPlayerHits(PlayerName) +

Produce detailed report of player hit scores.

+
SCORING:ReportDetailedPlayerMissions(PlayerName) +

Produce detailed report of player penalty scores because of changing the coalition.

+
SCORING:ReportScoreAllSummary(PlayerGroup) +

Report all players score

+
SCORING:ReportScoreGroupDetailed(PlayerGroup) +

Report Group Score Detailed

+
SCORING:ReportScoreGroupSummary(PlayerGroup) +

Report Group Score Summary

+
SCORING.RunTime + +
SCORING.ScaleDestroyPenalty + +
SCORING.ScaleDestroyScore + +
SCORING:ScoreCSV(PlayerName, TargetPlayerName, ScoreType, ScoreTimes, ScoreAmount, PlayerUnitName, PlayerUnitCoalition, PlayerUnitCategory, PlayerUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType) +

Registers a score for a player.

+
SCORING.ScoringCSV + +
SCORING.ScoringObjects + +
SCORING.ScoringZones + +
SCORING:SecondsToClock(sSeconds) + +
SCORING:SetCoalitionChangePenalty(CoalitionChangePenalty) +

When a player changes the coalition, he can receive a penalty score.

+
SCORING:SetFratricide(Fratricide) +

When a player commits too much damage to friendlies, his penalty score will reach a certain level.

+
SCORING:SetMessagesDestroy(OnOff) +

Configure to send messages after a target has been destroyed.

+
SCORING:SetMessagesHit(OnOff) +

Configure to send messages after a target has been hit.

+
SCORING:SetMessagesScore(OnOff) +

Configure to send messages after a target has been destroyed and receives additional scores.

+
SCORING:SetMessagesToAll() +

Configure to send messages to all players.

+
SCORING:SetMessagesToCoalition() +

Configure to send messages to only those players within the same coalition as the player.

+
SCORING:SetMessagesZone(OnOff) +

Configure to send messages after a target has been hit in a zone, and additional score is received.

+
SCORING:SetScaleDestroyPenalty(Scale) +

Set the scale for scoring penalty destroys (friendly destroys).

+
SCORING:SetScaleDestroyScore(Scale) +

Set the scale for scoring valid destroys (enemy destroys).

+
SCORING:_AddMissionScore(Mission, PlayerUnit, Text, Score) +

Registers Mission Scores for possible multiple players that contributed in the Mission.

+
SCORING:_AddMissionTaskScore(Mission, PlayerUnit, Text, Score) +

Registers Scores the players completing a Mission Task.

+
SCORING:_AddPlayerFromUnit(UnitData) +

Add a new player entering a Unit.

+
SCORING:_EventOnDeadOrCrash(Event) +

Track DEAD or CRASH events for the scoring.

+
SCORING:_EventOnHit(Event) +

Handles the OnHit event for the scoring.

+
+ +

Global(s)

+
+
+ + #SCORING + +SCORING + +
+
+ + + +
+
+
+
+ + + +nHours + +
+
+ + + +
+
+
+
+ + + +nMins + +
+
+ + + +
+
+
+
+ + + +nSecs + +
+
+ + + +
+
+

Type Scoring

+ +

Type SCORING

+ +

The Scoring class

+ +

Field(s)

+
+
+ + +SCORING:AddGoalScore(PlayerUnit, GoalTag, Text, Score) + +
+
+ +

Add a goal score for a player.

+ + +

The method takes the PlayerUnit for which the Goal score needs to be set. +The GoalTag is a string or identifier that is taken into the CSV file scoring log to identify the goal. +A free text can be given that is shown to the players. +The Score can be both positive and negative.

+ +

Parameters

+
    +
  • + +

    Wrapper.Unit#UNIT PlayerUnit : +The Unit of the Player. Other Properties for the scoring are taken from this PlayerUnit, like coalition, type etc.

    + +
  • +
  • + +

    #string GoalTag : +The string or identifier that is used in the CSV file to identify the goal (sort or group later in Excel).

    + +
  • +
  • + +

    #string Text : +A free text that is shown to the players.

    + +
  • +
  • + +

    #number Score : +The score can be both positive or negative ( Penalty ).

    + +
  • +
+
+
+
+
+ + +SCORING:AddScoreGroup(ScoreGroup, Score) + +
+
+ +

Specify a special additional score for a Group.

+ +

Parameters

+ +

Return value

+ +

#SCORING:

+ + +
+
+
+
+ + +SCORING:AddStaticScore(ScoreStatic, Score) + +
+
+ +

Add a Static for additional scoring when the Static is destroyed.

+ + +

Note that if there was already a Static declared within the scoring with the same name, +then the old Static will be replaced with the new Static.

+ +

Parameters

+
    +
  • + +

    Wrapper.Static#UNIT ScoreStatic : +The Static for which the Score needs to be given.

    + +
  • +
  • + +

    #number Score : +The Score value.

    + +
  • +
+

Return value

+ +

#SCORING:

+ + +
+
+
+
+ + +SCORING:AddUnitScore(ScoreUnit, Score) + +
+
+ +

Add a Unit for additional scoring when the Unit is destroyed.

+ + +

Note that if there was already a Unit declared within the scoring with the same name, +then the old Unit will be replaced with the new Unit.

+ +

Parameters

+
    +
  • + +

    Wrapper.Unit#UNIT ScoreUnit : +The Unit for which the Score needs to be given.

    + +
  • +
  • + +

    #number Score : +The Score value.

    + +
  • +
+

Return value

+ +

#SCORING:

+ + +
+
+
+
+ + +SCORING:AddZoneScore(ScoreZone, Score) + +
+
+ +

Add a Zone to define additional scoring when any object is destroyed in that zone.

+ + +

Note that if a Zone with the same name is already within the scoring added, the Zone (type) and Score will be replaced! +This allows for a dynamic destruction zone evolution within your mission.

+ +

Parameters

+
    +
  • + +

    Core.Zone#ZONE_BASE ScoreZone : +The Zone which defines the destruction score perimeters. +Note that a zone can be a polygon or a moving zone.

    + +
  • +
  • + +

    #number Score : +The Score value.

    + +
  • +
+

Return value

+ +

#SCORING:

+ + +
+
+
+
+ + #number + +SCORING.ClassID + +
+
+ + + +
+
+
+
+ + #string + +SCORING.ClassName + +
+
+ + + +
+
+
+
+ + +SCORING:CloseCSV() + +
+
+ + + +
+
+
+
+ + + +SCORING.CoalitionChangePenalty + +
+
+ + + +
+
+
+
+ + + +SCORING.Fratricide + +
+
+ + + +
+
+
+
+ + + +SCORING.GameName + +
+
+ + + +
+
+
+
+ + +SCORING:IfMessagesDestroy() + +
+
+ +

If to send messages after a target has been destroyed.

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +SCORING:IfMessagesHit() + +
+
+ +

If to send messages after a target has been hit.

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +SCORING:IfMessagesScore() + +
+
+ +

If to send messages after a target has been destroyed and receives additional scores.

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +SCORING:IfMessagesToAll() + +
+
+ +

If to send messages to all players.

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +SCORING:IfMessagesToCoalition() + +
+
+ +

If to send messages to only those players within the same coalition as the player.

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +SCORING:IfMessagesZone() + +
+
+ +

If to send messages after a target has been hit in a zone, and additional score is received.

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + #number + +SCORING.MessagesAudience + +
+
+ + + +
+
+
+
+ + + +SCORING.MessagesDestroy + +
+
+ + + +
+
+
+
+ + + +SCORING.MessagesHit + +
+
+ + + +
+
+
+
+ + + +SCORING.MessagesScore + +
+
+ + + +
+
+
+
+ + + +SCORING.MessagesZone + +
+
+ + + +
+
+
+
+ + +SCORING:New(GameName) + +
+
+ +

Creates a new SCORING object to administer the scoring achieved by players.

+ +

Parameter

+
    +
  • + +

    #string GameName : +The name of the game. This name is also logged in the CSV score file.

    + +
  • +
+

Return value

+ +

#SCORING: +self

+ +

Usage:

+
-- Define a new scoring object for the mission Gori Valley.
+ScoringObject = SCORING:New( "Gori Valley" )
+ +
+
+
+
+ + +SCORING:OnEventPlayerEnterUnit(Event) + +
+
+ +

Handles the OnPlayerEnterUnit event for the scoring.

+ +

Parameter

+ +
+
+
+
+ + +SCORING:OnEventPlayerLeaveUnit(Event) + +
+
+ +

Handles the OnPlayerLeaveUnit event for the scoring.

+ +

Parameter

+ +
+
+
+
+ + +SCORING:OpenCSV(ScoringCSV) + +
+
+ +

Opens a score CSV file to log the scores.

+ +

Parameter

+
    +
  • + +

    #string ScoringCSV :

    + +
  • +
+

Return value

+ +

#SCORING: +self

+ +

Usage:

+
-- Open a new CSV file to log the scores of the game Gori Valley. Let the name of the CSV file begin with "Player Scores".
+ScoringObject = SCORING:New( "Gori Valley" )
+ScoringObject:OpenCSV( "Player Scores" )
+ +
+
+
+
+ + +SCORING.Players + +
+
+ +

A collection of the current players that have joined the game.

+ +
+
+
+
+ + +SCORING:RemoveStaticScore(ScoreStatic) + +
+
+ +

Removes a Static for additional scoring when the Static is destroyed.

+ +

Parameter

+ +

Return value

+ +

#SCORING:

+ + +
+
+
+
+ + +SCORING:RemoveUnitScore(ScoreUnit) + +
+
+ +

Removes a Unit for additional scoring when the Unit is destroyed.

+ +

Parameter

+ +

Return value

+ +

#SCORING:

+ + +
+
+
+
+ + +SCORING:RemoveZoneScore(ScoreZone) + +
+
+ +

Remove a Zone for additional scoring.

+ + +

The scoring will search if any Zone is added with the given name, and will remove that zone from the scoring. +This allows for a dynamic destruction zone evolution within your mission.

+ +

Parameter

+
    +
  • + +

    Core.Zone#ZONE_BASE ScoreZone : +The Zone which defines the destruction score perimeters. +Note that a zone can be a polygon or a moving zone.

    + +
  • +
+

Return value

+ +

#SCORING:

+ + +
+
+
+
+ + +SCORING:ReportDetailedPlayerCoalitionChanges(PlayerName) + +
+
+ +

Produce detailed report of player penalty scores because of changing the coalition.

+ +

Parameter

+
    +
  • + +

    #string PlayerName : +The name of the player.

    + +
  • +
+

Return value

+ +

#string: +The report.

+ +
+
+
+
+ + +SCORING:ReportDetailedPlayerDestroys(PlayerName) + +
+
+ +

Produce detailed report of player destroy scores.

+ +

Parameter

+
    +
  • + +

    #string PlayerName : +The name of the player.

    + +
  • +
+

Return value

+ +

#string: +The report.

+ +
+
+
+
+ + +SCORING:ReportDetailedPlayerGoals(PlayerName) + +
+
+ +

Produce detailed report of player goal scores.

+ +

Parameter

+
    +
  • + +

    #string PlayerName : +The name of the player.

    + +
  • +
+

Return value

+ +

#string: +The report.

+ +
+
+
+
+ + +SCORING:ReportDetailedPlayerHits(PlayerName) + +
+
+ +

Produce detailed report of player hit scores.

+ +

Parameter

+
    +
  • + +

    #string PlayerName : +The name of the player.

    + +
  • +
+

Return value

+ +

#string: +The report.

+ +
+
+
+
+ + +SCORING:ReportDetailedPlayerMissions(PlayerName) + +
+
+ +

Produce detailed report of player penalty scores because of changing the coalition.

+ +

Parameter

+
    +
  • + +

    #string PlayerName : +The name of the player.

    + +
  • +
+

Return value

+ +

#string: +The report.

+ +
+
+
+
+ + +SCORING:ReportScoreAllSummary(PlayerGroup) + +
+
+ +

Report all players score

+ +

Parameter

+ +
+
+
+
+ + +SCORING:ReportScoreGroupDetailed(PlayerGroup) + +
+
+ +

Report Group Score Detailed

+ +

Parameter

+ +
+
+
+
+ + +SCORING:ReportScoreGroupSummary(PlayerGroup) + +
+
+ +

Report Group Score Summary

+ +

Parameter

+ +
+
+
+
+ + + +SCORING.RunTime + +
+
+ + + +
+
+
+
+ + + +SCORING.ScaleDestroyPenalty + +
+
+ + + +
+
+
+
+ + + +SCORING.ScaleDestroyScore + +
+
+ + + +
+
+
+
+ + +SCORING:ScoreCSV(PlayerName, TargetPlayerName, ScoreType, ScoreTimes, ScoreAmount, PlayerUnitName, PlayerUnitCoalition, PlayerUnitCategory, PlayerUnitType, TargetUnitName, TargetUnitCoalition, TargetUnitCategory, TargetUnitType) + +
+
+ +

Registers a score for a player.

+ +

Parameters

+
    +
  • + +

    #string PlayerName : +The name of the player.

    + +
  • +
  • + +

    #string TargetPlayerName : +The name of the target player.

    + +
  • +
  • + +

    #string ScoreType : +The type of the score.

    + +
  • +
  • + +

    #string ScoreTimes : +The amount of scores achieved.

    + +
  • +
  • + +

    #string ScoreAmount : +The score given.

    + +
  • +
  • + +

    #string PlayerUnitName : +The unit name of the player.

    + +
  • +
  • + +

    #string PlayerUnitCoalition : +The coalition of the player unit.

    + +
  • +
  • + +

    #string PlayerUnitCategory : +The category of the player unit.

    + +
  • +
  • + +

    #string PlayerUnitType : +The type of the player unit.

    + +
  • +
  • + +

    #string TargetUnitName : +The name of the target unit.

    + +
  • +
  • + +

    #string TargetUnitCoalition : +The coalition of the target unit.

    + +
  • +
  • + +

    #string TargetUnitCategory : +The category of the target unit.

    + +
  • +
  • + +

    #string TargetUnitType : +The type of the target unit.

    + +
  • +
+

Return value

+ +

#SCORING: +self

+ +
+
+
+
+ + + +SCORING.ScoringCSV + +
+
+ + + +
+
+
+
+ + + +SCORING.ScoringObjects + +
+
+ + + + +

Additional Object scores

+ +
+
+
+
+ + + +SCORING.ScoringZones + +
+
+ + + + +

Additional Zone scores.

+ +
+
+
+
+ + +SCORING:SecondsToClock(sSeconds) + +
+
+ + + +

Parameter

+
    +
  • + +

    sSeconds :

    + +
  • +
+
+
+
+
+ + +SCORING:SetCoalitionChangePenalty(CoalitionChangePenalty) + +
+
+ +

When a player changes the coalition, he can receive a penalty score.

+ + +

Use the method SCORING.SetCoalitionChangePenalty() to define the penalty when a player changes coalition. +By default, the penalty for changing coalition is the default penalty scale.

+ +

Parameter

+
    +
  • + +

    #number CoalitionChangePenalty : +The amount of penalty that is given.

    + +
  • +
+

Return value

+ +

#SCORING:

+ + +
+
+
+
+ + +SCORING:SetFratricide(Fratricide) + +
+
+ +

When a player commits too much damage to friendlies, his penalty score will reach a certain level.

+ + +

Use this method to define the level when a player gets kicked.
+By default, the fratricide level is the default penalty mutiplier * 2 for the penalty score.

+ +

Parameter

+
    +
  • + +

    #number Fratricide : +The amount of maximum penalty that may be inflicted by a friendly player before he gets kicked.

    + +
  • +
+

Return value

+ +

#SCORING:

+ + +
+
+
+
+ + +SCORING:SetMessagesDestroy(OnOff) + +
+
+ +

Configure to send messages after a target has been destroyed.

+ +

Parameter

+
    +
  • + +

    #boolean OnOff : +If true is given, the messages are sent.

    + +
  • +
+

Return value

+ +

#SCORING:

+ + +
+
+
+
+ + +SCORING:SetMessagesHit(OnOff) + +
+
+ +

Configure to send messages after a target has been hit.

+ +

Parameter

+
    +
  • + +

    #boolean OnOff : +If true is given, the messages are sent.

    + +
  • +
+

Return value

+ +

#SCORING:

+ + +
+
+
+
+ + +SCORING:SetMessagesScore(OnOff) + +
+
+ +

Configure to send messages after a target has been destroyed and receives additional scores.

+ +

Parameter

+
    +
  • + +

    #boolean OnOff : +If true is given, the messages are sent.

    + +
  • +
+

Return value

+ +

#SCORING:

+ + +
+
+
+
+ + +SCORING:SetMessagesToAll() + +
+
+ +

Configure to send messages to all players.

+ +

Return value

+ +

#SCORING:

+ + +
+
+
+
+ + +SCORING:SetMessagesToCoalition() + +
+
+ +

Configure to send messages to only those players within the same coalition as the player.

+ +

Return value

+ +

#SCORING:

+ + +
+
+
+
+ + +SCORING:SetMessagesZone(OnOff) + +
+
+ +

Configure to send messages after a target has been hit in a zone, and additional score is received.

+ +

Parameter

+
    +
  • + +

    #boolean OnOff : +If true is given, the messages are sent.

    + +
  • +
+

Return value

+ +

#SCORING:

+ + +
+
+
+
+ + +SCORING:SetScaleDestroyPenalty(Scale) + +
+
+ +

Set the scale for scoring penalty destroys (friendly destroys).

+ + +

A default calculated penalty is a value between 1 and 10. +The scale magnifies the scores given to the players.

+ +

Parameter

+
    +
  • + +

    #number Scale : +The scale of the score given.

    + +
  • +
+

Return value

+ +

#SCORING:

+ + +
+
+
+
+ + +SCORING:SetScaleDestroyScore(Scale) + +
+
+ +

Set the scale for scoring valid destroys (enemy destroys).

+ + +

A default calculated score is a value between 1 and 10. +The scale magnifies the scores given to the players.

+ +

Parameter

+
    +
  • + +

    #number Scale : +The scale of the score given.

    + +
  • +
+
+
+
+
+ + +SCORING:_AddMissionScore(Mission, PlayerUnit, Text, Score) + +
+
+ +

Registers Mission Scores for possible multiple players that contributed in the Mission.

+ +

Parameters

+ +
+
+
+
+ + +SCORING:_AddMissionTaskScore(Mission, PlayerUnit, Text, Score) + +
+
+ +

Registers Scores the players completing a Mission Task.

+ +

Parameters

+ +
+
+
+
+ + +SCORING:_AddPlayerFromUnit(UnitData) + +
+
+ +

Add a new player entering a Unit.

+ +

Parameter

+ +
+
+
+
+ + +SCORING:_EventOnDeadOrCrash(Event) + +
+
+ +

Track DEAD or CRASH events for the scoring.

+ +

Parameter

+ +
+
+
+
+ + +SCORING:_EventOnHit(Event) + +
+
+ +

Handles the OnHit event for the scoring.

+ +

Parameter

+ +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Sead.html b/docs/Documentation/Sead.html new file mode 100644 index 000000000..06dcb8af4 --- /dev/null +++ b/docs/Documentation/Sead.html @@ -0,0 +1,291 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Sead

+ +

Provides defensive behaviour to a set of SAM sites within a running Mission.

+ +

Global(s)

+ + + + + +
SEAD + +
+

Type SEAD

+ + + + + + + + + + + + + + + + + + + + + +
SEAD.ClassName + +
SEAD.New(table, self, SEADGroupPrefixes) +

Creates the main object which is handling defensive actions for SA sites or moving SA vehicles.

+
SEAD.OnEventShot(#, EventData, self) +

Detects if an SA site was shot with an anti radiation missile.

+
SEAD.SEADGroupPrefixes + +
SEAD.TargetSkill + +
+ +

Global(s)

+
+
+ + #SEAD + +SEAD + +
+
+ + + +
+
+

Type Sead

+ +

Type SEAD

+ +

The SEAD class

+ +

Field(s)

+
+
+ + #string + +SEAD.ClassName + +
+
+ + + +
+
+
+
+ + +SEAD.New(table, self, SEADGroupPrefixes) + +
+
+ +

Creates the main object which is handling defensive actions for SA sites or moving SA vehicles.

+ + +

When an anti radiation missile is fired (KH-58, KH-31P, KH-31A, KH-25MPU, HARM missiles), the SA will shut down their radars and will take evasive actions... +Chances are big that the missile will miss.

+ +

Parameters

+
    +
  • + +

    table : +string,...}|string SEADGroupPrefixes which is a table of Prefixes of the SA Groups in the DCSRTE on which evasive actions need to be taken.

    + +
  • +
  • + +

    self :

    + +
  • +
  • + +

    SEADGroupPrefixes :

    + +
  • +
+

Return value

+ + +

SEAD

+ +

Usage:

+
-- CCCP SEAD Defenses
+-- Defends the Russian SA installations from SEAD attacks.
+SEAD_RU_SAM_Defenses = SEAD:New( { 'RU SA-6 Kub', 'RU SA-6 Defenses', 'RU MI-26 Troops', 'RU Attack Gori' } )
+ +
+
+
+
+ + +SEAD.OnEventShot(#, EventData, self) + +
+
+ +

Detects if an SA site was shot with an anti radiation missile.

+ + +

In this case, take evasive actions based on the skill level set within the ME.

+ +

Parameters

+ +
+
+
+
+ + + +SEAD.SEADGroupPrefixes + +
+
+ + + +
+
+
+
+ + + +SEAD.TargetSkill + +
+
+ + + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Set.html b/docs/Documentation/Set.html new file mode 100644 index 000000000..dff2ef289 --- /dev/null +++ b/docs/Documentation/Set.html @@ -0,0 +1,4577 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Set

+ +

Core - SET_ classes define collections of objects to perform bulk actions and logically group objects.

+ + + +

Banner Image

+ +
+ +

SET_ classes group objects of the same type into a collection, which is either:

+ +
    +
  • Manually managed using the :Add...() or :Remove...() methods. The initial SET can be filtered with the **SET_BASE.FilterOnce()** method
  • +
  • Dynamically updated when new objects are created or objects are destroyed using the **SET_BASE.FilterStart()** method.
  • +
+ +

Various types of SET_ classes are available:

+ + + +

These classes are derived from #SET_BASE, which contains the main methods to manage SETs.

+ +

A multitude of other methods are available in SET_ classes that allow to:

+ +
    +
  • Validate the presence of objects in the SET.
  • +
  • Trigger events when objects in the SET change a zone presence.
  • +
+ +

Authors:

+ +
    +
  • FlightControl : Design & Programming
  • +
+ +

Contributions:

+ + + +

Global(s)

+ + + + + + + + + + + + + + + + + + + + + + + + + +
SET_AIRBASE +

5) SET_AIRBASE class, extends Set#SET_BASE

+ +

Mission designers can use the Set#SET_AIRBASE class to build sets of airbases optionally belonging to certain:

+ +
    +
  • Coalitions
  • +
+ +

5.1) SET_AIRBASE constructor

+ +

Create a new SET_AIRBASE object with the SET_AIRBASE.New method:

+ + +
SET_BASE +

1) SET_BASE class, extends Base#BASE

+

The Set#SET_BASE class defines the core functions that define a collection of objects.

+
SET_CARGO +

SET_CARGO class, extends Set#SET_BASE

+ +

Mission designers can use the Set#SET_CARGO class to build sets of cargos optionally belonging to certain:

+ +
    +
  • Coalitions
  • +
  • Types
  • +
  • Name or Prefix
  • +
+ +

SET_CARGO constructor

+ +

Create a new SET_CARGO object with the SET_CARGO.New method:

+ + +
SET_CLIENT +

4) SET_CLIENT class, extends Set#SET_BASE

+ +

Mission designers can use the Set#SET_CLIENT class to build sets of units belonging to certain:

+ +
    +
  • Coalitions
  • +
  • Categories
  • +
  • Countries
  • +
  • Client types
  • +
  • Starting with certain prefix strings.
  • +
+
SET_GROUP +

2) SET_GROUP class, extends Set#SET_BASE

+ +

Mission designers can use the Set#SET_GROUP class to build sets of groups belonging to certain:

+ +
    +
  • Coalitions
  • +
  • Categories
  • +
  • Countries
  • +
  • Starting with certain prefix strings.
  • +
+
SET_UNIT +

3) SET_UNIT class, extends Set#SET_BASE

+ +

Mission designers can use the SET_UNIT class to build sets of units belonging to certain:

+ +
    +
  • Coalitions
  • +
  • Categories
  • +
  • Countries
  • +
  • Unit types
  • +
  • Starting with certain prefix strings.
  • +
+
+

Type SET_AIRBASE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SET_AIRBASE:AddAirbasesByName(AddAirbaseNames) +

Add AIRBASEs to SET_AIRBASE.

+
SET_AIRBASE:AddInDatabase(Event) +

Handles the Database to check on an event (birth) that the Object was added in the Database.

+
SET_AIRBASE:FilterCategories(Categories) +

Builds a set of airbases out of categories.

+
SET_AIRBASE:FilterCoalitions(Coalitions) +

Builds a set of airbases of coalitions.

+
SET_AIRBASE:FilterStart() +

Starts the filtering.

+
SET_AIRBASE:FindAirbase(AirbaseName) +

Finds a Airbase based on the Airbase Name.

+
SET_AIRBASE:FindInDatabase(Event) +

Handles the Database to check on any event that Object exists in the Database.

+
SET_AIRBASE:FindNearestAirbaseFromPointVec2(PointVec2) +

Iterate the SET_AIRBASE while identifying the nearest Airbase#AIRBASE from a Point#POINT_VEC2.

+
SET_AIRBASE:ForEachAirbase(IteratorFunction, ...) +

Iterate the SET_AIRBASE and call an interator function for each AIRBASE, providing the AIRBASE and optional parameters.

+
SET_AIRBASE:IsIncludeObject(MAirbase) + +
SET_AIRBASE:New() +

Creates a new SET_AIRBASE object, building a set of airbases belonging to a coalitions and categories.

+
SET_AIRBASE:RemoveAirbasesByName(RemoveAirbaseNames) +

Remove AIRBASEs from SET_AIRBASE.

+
+ +

Type SET_BASE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SET_BASE:Add(ObjectName, Object) +

Adds a Base#BASE object in the Set#SET_BASE, using a given ObjectName as the index.

+
SET_BASE:AddObject(Object) +

Adds a Base#BASE object in the Set#SET_BASE, using the Object Name as the index.

+
SET_BASE.CallScheduler + +
SET_BASE:Count() +

Retrieves the amount of objects in the Set#SET_BASE and derived classes.

+
SET_BASE.Database + +
SET_BASE.Filter + +
SET_BASE:FilterOnce() +

Filters for the defined collection.

+
SET_BASE:FilterStop() +

Stops the filtering for the defined collection.

+
SET_BASE:FindNearestObjectFromPointVec2(PointVec2) +

Iterate the SET_BASE while identifying the nearest object from a Point#POINT_VEC2.

+
SET_BASE:Flush() +

Flushes the current SET_BASE contents in the log ...

+
SET_BASE:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments) +

Iterate the SETBASE and derived classes and call an iterator function for the given SETBASE, providing the Object for each element within the set and optional parameters.

+
SET_BASE:Get(ObjectName) +

Gets a Base#BASE object from the Set#SET_BASE and derived classes, based on the Object Name.

+
SET_BASE:GetFirst() +

Gets the first object from the Set#SET_BASE and derived classes.

+
SET_BASE:GetLast() +

Gets the last object from the Set#SET_BASE and derived classes.

+
SET_BASE:GetRandom() +

Gets a random object from the Set#SET_BASE and derived classes.

+
SET_BASE:GetSet() +

Gets the Set.

+
SET_BASE:IsIncludeObject(Object) +

Decides whether to include the Object

+
SET_BASE.List + +
SET_BASE:New(Database) +

Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

+
SET_BASE:Remove(ObjectName) +

Removes a Base#BASE object from the Set#SET_BASE and derived classes, based on the Object Name.

+
SET_BASE.Set + +
SET_BASE:SetDatabase(BaseSet) +

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

+
SET_BASE:SetIteratorIntervals(YieldInterval, TimeInterval) +

Define the SET iterator "yield interval" and the "time interval".

+
SET_BASE.TimeInterval + +
SET_BASE.YieldInterval + +
SET_BASE:_EventOnBirth(Event) +

Handles the OnBirth event for the Set.

+
SET_BASE:_EventOnDeadOrCrash(Event) +

Handles the OnDead or OnCrash event for alive units set.

+
SET_BASE:_EventOnPlayerEnterUnit(Event) +

Handles the OnPlayerEnterUnit event to fill the active players table (with the unit filter applied).

+
SET_BASE:_EventOnPlayerLeaveUnit(Event) +

Handles the OnPlayerLeaveUnit event to clean the active players table.

+
SET_BASE:_FilterStart() +

Starts the filtering for the defined collection.

+
SET_BASE:_Find(ObjectName) +

Finds an Base#BASE object based on the object Name.

+
+ +

Type SET_CARGO

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SET_CARGO:AddCargosByName(AddCargoNames) +

Add CARGOs to SET_CARGO.

+
SET_CARGO:AddInDatabase(Event) +

Handles the Database to check on an event (birth) that the Object was added in the Database.

+
SET_CARGO:FilterCoalitions(Coalitions) +

Builds a set of cargos of coalitions.

+
SET_CARGO:FilterCountries(Countries) +

Builds a set of cargos of defined countries.

+
SET_CARGO:FilterPrefixes(Prefixes) +

Builds a set of cargos of defined cargo prefixes.

+
SET_CARGO:FilterStart() +

Starts the filtering.

+
SET_CARGO:FilterTypes(Types) +

Builds a set of cargos of defined cargo types.

+
SET_CARGO:FindCargo(CargoName) +

Finds a Cargo based on the Cargo Name.

+
SET_CARGO:FindInDatabase(Event) +

Handles the Database to check on any event that Object exists in the Database.

+
SET_CARGO:FindNearestCargoFromPointVec2(PointVec2) +

Iterate the SET_CARGO while identifying the nearest Cargo#CARGO from a Point#POINT_VEC2.

+
SET_CARGO:ForEachCargo(IteratorFunction, ...) +

Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.

+
SET_CARGO:IsIncludeObject(MCargo) + +
SET_CARGO:New() +

Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.

+
SET_CARGO:OnEventDeleteCargo(EventData) +

Handles the OnDead or OnCrash event for alive units set.

+
SET_CARGO:OnEventNewCargo(EventData) +

Handles the OnEventNewCargo event for the Set.

+
SET_CARGO:RemoveCargosByName(RemoveCargoNames) +

Remove CARGOs from SET_CARGO.

+
+ +

Type SET_CLIENT

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SET_CLIENT:AddClientsByName(AddClientNames) +

Add CLIENT(s) to SET_CLIENT.

+
SET_CLIENT:AddInDatabase(Event) +

Handles the Database to check on an event (birth) that the Object was added in the Database.

+
SET_CLIENT:FilterCategories(Categories) +

Builds a set of clients out of categories.

+
SET_CLIENT:FilterCoalitions(Coalitions) +

Builds a set of clients of coalitions.

+
SET_CLIENT:FilterCountries(Countries) +

Builds a set of clients of defined countries.

+
SET_CLIENT:FilterPrefixes(Prefixes) +

Builds a set of clients of defined client prefixes.

+
SET_CLIENT:FilterStart() +

Starts the filtering.

+
SET_CLIENT:FilterTypes(Types) +

Builds a set of clients of defined client types.

+
SET_CLIENT:FindClient(ClientName) +

Finds a Client based on the Client Name.

+
SET_CLIENT:FindInDatabase(Event) +

Handles the Database to check on any event that Object exists in the Database.

+
SET_CLIENT:ForEachClient(IteratorFunction, ...) +

Iterate the SET_CLIENT and call an interator function for each alive CLIENT, providing the CLIENT and optional parameters.

+
SET_CLIENT:ForEachClientInZone(ZoneObject, IteratorFunction, ...) +

Iterate the SET_CLIENT and call an iterator function for each alive CLIENT presence completely in a Zone, providing the CLIENT and optional parameters to the called function.

+
SET_CLIENT:ForEachClientNotInZone(ZoneObject, IteratorFunction, ...) +

Iterate the SET_CLIENT and call an iterator function for each alive CLIENT presence not in a Zone, providing the CLIENT and optional parameters to the called function.

+
SET_CLIENT:IsIncludeObject(MClient) + +
SET_CLIENT:New() +

Creates a new SET_CLIENT object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names.

+
SET_CLIENT:RemoveClientsByName(RemoveClientNames) +

Remove CLIENT(s) from SET_CLIENT.

+
+ +

Type SET_GROUP

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SET_GROUP:AddGroupsByName(AddGroupNames) +

Add GROUP(s) to SET_GROUP.

+
SET_GROUP:AddInDatabase(Event) +

Handles the Database to check on an event (birth) that the Object was added in the Database.

+
SET_GROUP:FilterCategories(Categories) +

Builds a set of groups out of categories.

+
SET_GROUP:FilterCoalitions(Coalitions) +

Builds a set of groups of coalitions.

+
SET_GROUP:FilterCountries(Countries) +

Builds a set of groups of defined countries.

+
SET_GROUP:FilterPrefixes(Prefixes) +

Builds a set of groups of defined GROUP prefixes.

+
SET_GROUP:FilterStart() +

Starts the filtering.

+
SET_GROUP:FindGroup(GroupName) +

Finds a Group based on the Group Name.

+
SET_GROUP:FindInDatabase(Event) +

Handles the Database to check on any event that Object exists in the Database.

+
SET_GROUP:ForEachGroup(IteratorFunction, ...) +

Iterate the SET_GROUP and call an iterator function for each alive GROUP, providing the GROUP and optional parameters.

+
SET_GROUP:ForEachGroupCompletelyInZone(ZoneObject, IteratorFunction, ...) +

Iterate the SET_GROUP and call an iterator function for each alive GROUP presence completely in a Zone, providing the GROUP and optional parameters to the called function.

+
SET_GROUP:ForEachGroupNotInZone(ZoneObject, IteratorFunction, ...) +

Iterate the SET_GROUP and call an iterator function for each alive GROUP presence not in a Zone, providing the GROUP and optional parameters to the called function.

+
SET_GROUP:ForEachGroupPartlyInZone(ZoneObject, IteratorFunction, ...) +

Iterate the SET_GROUP and call an iterator function for each alive GROUP presence partly in a Zone, providing the GROUP and optional parameters to the called function.

+
SET_GROUP:IsIncludeObject(MooseGroup) + +
SET_GROUP:New() +

Creates a new SET_GROUP object, building a set of groups belonging to a coalitions, categories, countries, types or with defined prefix names.

+
SET_GROUP:RemoveGroupsByName(RemoveGroupNames) +

Remove GROUP(s) from SET_GROUP.

+
+ +

Type SET_UNIT

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SET_UNIT:AddInDatabase(Event) +

Handles the Database to check on an event (birth) that the Object was added in the Database.

+
SET_UNIT:AddUnit(AddUnit) +

Add UNIT(s) to SET_UNIT.

+
SET_UNIT:AddUnitsByName(AddUnitNames) +

Add UNIT(s) to SET_UNIT.

+
SET_UNIT:CalculateThreatLevelA2G() +

Calculate the maxium A2G threat level of the SET_UNIT.

+
SET_UNIT:FilterCategories(Categories) +

Builds a set of units out of categories.

+
SET_UNIT:FilterCoalitions(Coalitions) +

Builds a set of units of coalitions.

+
SET_UNIT:FilterCountries(Countries) +

Builds a set of units of defined countries.

+
SET_UNIT:FilterHasRadar(RadarTypes) +

Builds a set of units having a radar of give types.

+
SET_UNIT:FilterHasSEAD() +

Builds a set of SEADable units.

+
SET_UNIT:FilterPrefixes(Prefixes) +

Builds a set of units of defined unit prefixes.

+
SET_UNIT:FilterStart() +

Starts the filtering.

+
SET_UNIT:FilterTypes(Types) +

Builds a set of units of defined unit types.

+
SET_UNIT:FindInDatabase(Event) +

Handles the Database to check on any event that Object exists in the Database.

+
SET_UNIT:FindUnit(UnitName) +

Finds a Unit based on the Unit Name.

+
SET_UNIT:ForEachUnit(IteratorFunction, ...) +

Iterate the SET_UNIT and call an interator function for each alive UNIT, providing the UNIT and optional parameters.

+
SET_UNIT:ForEachUnitCompletelyInZone(ZoneObject, IteratorFunction, ...) +

Iterate the SET_UNIT and call an iterator function for each alive UNIT presence completely in a Zone, providing the UNIT and optional parameters to the called function.

+
SET_UNIT:ForEachUnitNotInZone(ZoneObject, IteratorFunction, ...) +

Iterate the SET_UNIT and call an iterator function for each alive UNIT presence not in a Zone, providing the UNIT and optional parameters to the called function.

+
SET_UNIT:GetTypeNames(Delimiter) +

Retrieve the type names of the Units in the SET, delimited by an optional delimiter.

+
SET_UNIT:GetUnitThreatLevels() +

Returns map of unit threat levels.

+
SET_UNIT:GetUnitTypes() +

Returns map of unit types.

+
SET_UNIT:GetUnitTypesText() +

Returns a comma separated string of the unit types with a count in the Set.

+
SET_UNIT:HasFriendlyUnits(FriendlyCoalition) +

Returns if the Set has friendly ground units.

+
SET_UNIT:HasGroundUnits() +

Returns if the Set has ground targets.

+
SET_UNIT:HasRadar(RadarType) +

Returns if the Set has targets having a radar (of a given type).

+
SET_UNIT:HasSEAD() +

Returns if the Set has targets that can be SEADed.

+
SET_UNIT:IsIncludeObject(MUnit) + +
SET_UNIT:New() +

Creates a new SET_UNIT object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

+
SET_UNIT:RemoveUnitsByName(RemoveUnitNames) +

Remove UNIT(s) from SET_UNIT.

+
+ +

Global(s)

+
+
+ + #SET_AIRBASE + +SET_AIRBASE + +
+
+ +

5) SET_AIRBASE class, extends Set#SET_BASE

+ +

Mission designers can use the Set#SET_AIRBASE class to build sets of airbases optionally belonging to certain:

+ +
    +
  • Coalitions
  • +
+ +

5.1) SET_AIRBASE constructor

+ +

Create a new SET_AIRBASE object with the SET_AIRBASE.New method:

+ + + + +

+

5.2) Add or Remove AIRBASEs from SET_AIRBASE

+ +

AIRBASEs can be added and removed using the Set#SET_AIRBASE.AddAirbasesByName and Set#SET_AIRBASE.RemoveAirbasesByName respectively. +These methods take a single AIRBASE name or an array of AIRBASE names to be added or removed from SET_AIRBASE.

+ +

5.3) SET_AIRBASE filter criteria

+ +

You can set filter criteria to define the set of clients within the SET_AIRBASE. +Filter criteria are defined by:

+ + + +

Once the filter criteria have been set for the SET_AIRBASE, you can start filtering using:

+ + + +

5.4) SET_AIRBASE iterators

+ +

Once the filters have been defined and the SETAIRBASE has been built, you can iterate the SETAIRBASE with the available iterator methods. +The iterator methods will walk the SETAIRBASE set, and call for each airbase within the set a function that you provide. +The following iterator methods are currently available within the SETAIRBASE:

+ + + +
+ +
+
+
+
+ + #SET_BASE + +SET_BASE + +
+
+ +

1) SET_BASE class, extends Base#BASE

+

The Set#SET_BASE class defines the core functions that define a collection of objects.

+ + +

A SET provides iterators to iterate the SET, but will temporarily yield the ForEach interator loop at defined "intervals" to the mail simulator loop. +In this way, large loops can be done while not blocking the simulator main processing loop. +The default "yield interval" is after 10 objects processed. +The default "time interval" is after 0.001 seconds.

+ +

1.1) Add or remove objects from the SET

+ +

Some key core functions are Set#SET_BASE.Add and Set#SET_BASE.Remove to add or remove objects from the SET in your logic.

+ +

1.2) Define the SET iterator "yield interval" and the "time interval"

+ +

Modify the iterator intervals with the Set#SET_BASE.SetInteratorIntervals method. +You can set the "yield interval", and the "time interval". (See above).

+ + +
+
+
+
+ + #SET_CARGO + +SET_CARGO + +
+
+ +

SET_CARGO class, extends Set#SET_BASE

+ +

Mission designers can use the Set#SET_CARGO class to build sets of cargos optionally belonging to certain:

+ +
    +
  • Coalitions
  • +
  • Types
  • +
  • Name or Prefix
  • +
+ +

SET_CARGO constructor

+ +

Create a new SET_CARGO object with the SET_CARGO.New method:

+ + + + +

+

Add or Remove CARGOs from SET_CARGO

+ +

CARGOs can be added and removed using the Set#SET_CARGO.AddCargosByName and Set#SET_CARGO.RemoveCargosByName respectively. +These methods take a single CARGO name or an array of CARGO names to be added or removed from SET_CARGO.

+ +

SET_CARGO filter criteria

+ +

You can set filter criteria to automatically maintain the SET_CARGO contents. +Filter criteria are defined by:

+ + + +

Once the filter criteria have been set for the SET_CARGO, you can start filtering using:

+ + + +

SET_CARGO iterators

+ +

Once the filters have been defined and the SETCARGO has been built, you can iterate the SETCARGO with the available iterator methods. +The iterator methods will walk the SETCARGO set, and call for each cargo within the set a function that you provide. +The following iterator methods are currently available within the SETCARGO:

+ + + + +
+
+
+
+ + #SET_CLIENT + +SET_CLIENT + +
+
+ +

4) SET_CLIENT class, extends Set#SET_BASE

+ +

Mission designers can use the Set#SET_CLIENT class to build sets of units belonging to certain:

+ +
    +
  • Coalitions
  • +
  • Categories
  • +
  • Countries
  • +
  • Client types
  • +
  • Starting with certain prefix strings.
  • +
+ + +

+

4.1) SET_CLIENT constructor

+ +

Create a new SET_CLIENT object with the SET_CLIENT.New method:

+ + + +

4.2) Add or Remove CLIENT(s) from SET_CLIENT

+ +

CLIENTs can be added and removed using the Set#SET_CLIENT.AddClientsByName and Set#SET_CLIENT.RemoveClientsByName respectively. +These methods take a single CLIENT name or an array of CLIENT names to be added or removed from SET_CLIENT.

+ +

4.3) SET_CLIENT filter criteria

+ +

You can set filter criteria to define the set of clients within the SET_CLIENT. +Filter criteria are defined by:

+ + + +

Once the filter criteria have been set for the SET_CLIENT, you can start filtering using:

+ + + +

Planned filter criteria within development are (so these are not yet available):

+ + + +

4.4) SET_CLIENT iterators

+ +

Once the filters have been defined and the SETCLIENT has been built, you can iterate the SETCLIENT with the available iterator methods. +The iterator methods will walk the SETCLIENT set, and call for each element within the set a function that you provide. +The following iterator methods are currently available within the SETCLIENT:

+ + + +
+ +
+
+
+
+ + #SET_GROUP + +SET_GROUP + +
+
+ +

2) SET_GROUP class, extends Set#SET_BASE

+ +

Mission designers can use the Set#SET_GROUP class to build sets of groups belonging to certain:

+ +
    +
  • Coalitions
  • +
  • Categories
  • +
  • Countries
  • +
  • Starting with certain prefix strings.
  • +
+ + +

+

2.1) SET_GROUP constructor

+ +

Create a new SET_GROUP object with the SET_GROUP.New method:

+ + + +

2.2) Add or Remove GROUP(s) from SET_GROUP

+ +

GROUPS can be added and removed using the Set#SET_GROUP.AddGroupsByName and Set#SET_GROUP.RemoveGroupsByName respectively. +These methods take a single GROUP name or an array of GROUP names to be added or removed from SET_GROUP.

+ +

2.3) SET_GROUP filter criteria

+ +

You can set filter criteria to define the set of groups within the SET_GROUP. +Filter criteria are defined by:

+ + + +

Once the filter criteria have been set for the SET_GROUP, you can start filtering using:

+ +
    +
  • SET_GROUP.FilterStart: Starts the filtering of the groups within the SET_GROUP and add or remove GROUP objects dynamically.
  • +
+ +

Planned filter criteria within development are (so these are not yet available):

+ + + +

2.4) SET_GROUP iterators

+ +

Once the filters have been defined and the SETGROUP has been built, you can iterate the SETGROUP with the available iterator methods. +The iterator methods will walk the SETGROUP set, and call for each element within the set a function that you provide. +The following iterator methods are currently available within the SETGROUP:

+ +
    +
  • SET_GROUP.ForEachGroup: Calls a function for each alive group it finds within the SET_GROUP.
  • +
  • SET_GROUP.ForEachGroupCompletelyInZone: Iterate the SET_GROUP and call an iterator function for each alive GROUP presence completely in a Zone, providing the GROUP and optional parameters to the called function.
  • +
  • SET_GROUP.ForEachGroupPartlyInZone: Iterate the SET_GROUP and call an iterator function for each alive GROUP presence partly in a Zone, providing the GROUP and optional parameters to the called function.
  • +
  • SET_GROUP.ForEachGroupNotInZone: Iterate the SET_GROUP and call an iterator function for each alive GROUP presence not in a Zone, providing the GROUP and optional parameters to the called function.
  • +
+ +
+ +
+
+
+
+ + #SET_UNIT + +SET_UNIT + +
+
+ +

3) SET_UNIT class, extends Set#SET_BASE

+ +

Mission designers can use the SET_UNIT class to build sets of units belonging to certain:

+ +
    +
  • Coalitions
  • +
  • Categories
  • +
  • Countries
  • +
  • Unit types
  • +
  • Starting with certain prefix strings.
  • +
+ + +

+

3.1) SET_UNIT constructor

+ +

Create a new SET_UNIT object with the SET_UNIT.New method:

+ + + +

3.2) Add or Remove UNIT(s) from SET_UNIT

+ +

UNITs can be added and removed using the Set#SET_UNIT.AddUnitsByName and Set#SET_UNIT.RemoveUnitsByName respectively. +These methods take a single UNIT name or an array of UNIT names to be added or removed from SET_UNIT.

+ +

3.3) SET_UNIT filter criteria

+ +

You can set filter criteria to define the set of units within the SET_UNIT. +Filter criteria are defined by:

+ + + +

Once the filter criteria have been set for the SET_UNIT, you can start filtering using:

+ + + +

Planned filter criteria within development are (so these are not yet available):

+ + + +

3.4) SET_UNIT iterators

+ +

Once the filters have been defined and the SETUNIT has been built, you can iterate the SETUNIT with the available iterator methods. +The iterator methods will walk the SETUNIT set, and call for each element within the set a function that you provide. +The following iterator methods are currently available within the SETUNIT:

+ +
    +
  • SET_UNIT.ForEachUnit: Calls a function for each alive unit it finds within the SET_UNIT.
  • +
  • SET_GROUP.ForEachGroupCompletelyInZone: Iterate the SET_GROUP and call an iterator function for each alive GROUP presence completely in a Zone, providing the GROUP and optional parameters to the called function.
  • +
  • SET_GROUP.ForEachGroupNotInZone: Iterate the SET_GROUP and call an iterator function for each alive GROUP presence not in a Zone, providing the GROUP and optional parameters to the called function.
  • +
+ +

Planned iterators methods in development are (so these are not yet available):

+ + + +

3.5 ) SET_UNIT atomic methods

+ +

Various methods exist for a SETUNIT to perform actions or calculations and retrieve results from the SETUNIT:

+ + + +
+ +
+
+

Type Set

+ +

Type SET_AIRBASE

+

Field(s)

+
+
+ + +SET_AIRBASE:AddAirbasesByName(AddAirbaseNames) + +
+
+ +

Add AIRBASEs to SET_AIRBASE.

+ +

Parameter

+
    +
  • + +

    #string AddAirbaseNames : +A single name or an array of AIRBASE names.

    + +
  • +
+

Return value

+ + +

self

+ +
+
+
+
+ + +SET_AIRBASE:AddInDatabase(Event) + +
+
+ +

Handles the Database to check on an event (birth) that the Object was added in the Database.

+ + +

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

+ +

Parameter

+ +

Return values

+
    +
  1. + +

    #string: +The name of the AIRBASE

    + +
  2. +
  3. + +

    #table: +The AIRBASE

    + +
  4. +
+
+
+
+
+ + +SET_AIRBASE:FilterCategories(Categories) + +
+
+ +

Builds a set of airbases out of categories.

+ + +

Possible current categories are plane, helicopter, ground, ship.

+ +

Parameter

+
    +
  • + +

    #string Categories : +Can take the following values: "airdrome", "helipad", "ship".

    + +
  • +
+

Return value

+ +

#SET_AIRBASE: +self

+ +
+
+
+
+ + +SET_AIRBASE:FilterCoalitions(Coalitions) + +
+
+ +

Builds a set of airbases of coalitions.

+ + +

Possible current coalitions are red, blue and neutral.

+ +

Parameter

+
    +
  • + +

    #string Coalitions : +Can take the following values: "red", "blue", "neutral".

    + +
  • +
+

Return value

+ +

#SET_AIRBASE: +self

+ +
+
+
+
+ + +SET_AIRBASE:FilterStart() + +
+
+ +

Starts the filtering.

+ +

Return value

+ +

#SET_AIRBASE: +self

+ +
+
+
+
+ + +SET_AIRBASE:FindAirbase(AirbaseName) + +
+
+ +

Finds a Airbase based on the Airbase Name.

+ +

Parameter

+
    +
  • + +

    #string AirbaseName :

    + +
  • +
+

Return value

+ +

Wrapper.Airbase#AIRBASE: +The found Airbase.

+ +
+
+
+
+ + +SET_AIRBASE:FindInDatabase(Event) + +
+
+ +

Handles the Database to check on any event that Object exists in the Database.

+ + +

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

+ +

Parameter

+ +

Return values

+
    +
  1. + +

    #string: +The name of the AIRBASE

    + +
  2. +
  3. + +

    #table: +The AIRBASE

    + +
  4. +
+
+
+
+
+ + +SET_AIRBASE:FindNearestAirbaseFromPointVec2(PointVec2) + +
+
+ +

Iterate the SET_AIRBASE while identifying the nearest Airbase#AIRBASE from a Point#POINT_VEC2.

+ +

Parameter

+ +

Return value

+ +

Wrapper.Airbase#AIRBASE: +The closest Airbase#AIRBASE.

+ +
+
+
+
+ + +SET_AIRBASE:ForEachAirbase(IteratorFunction, ...) + +
+
+ +

Iterate the SET_AIRBASE and call an interator function for each AIRBASE, providing the AIRBASE and optional parameters.

+ +

Parameters

+
    +
  • + +

    #function IteratorFunction : +The function that will be called when there is an alive AIRBASE in the SET_AIRBASE. The function needs to accept a AIRBASE parameter.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#SET_AIRBASE: +self

+ +
+
+
+
+ + +SET_AIRBASE:IsIncludeObject(MAirbase) + +
+
+ + + +

Parameter

+ +

Return value

+ +

#SET_AIRBASE: +self

+ +
+
+
+
+ + +SET_AIRBASE:New() + +
+
+ +

Creates a new SET_AIRBASE object, building a set of airbases belonging to a coalitions and categories.

+ +

Return value

+ +

#SET_AIRBASE: +self

+ +

Usage:

+
-- Define a new SET_AIRBASE Object. The DatabaseSet will contain a reference to all Airbases.
+DatabaseSet = SET_AIRBASE:New()
+ +
+
+
+
+ + +SET_AIRBASE:RemoveAirbasesByName(RemoveAirbaseNames) + +
+
+ +

Remove AIRBASEs from SET_AIRBASE.

+ +

Parameter

+ +

Return value

+ + +

self

+ +
+
+ +

Type SET_BASE

+

Field(s)

+
+
+ + +SET_BASE:Add(ObjectName, Object) + +
+
+ +

Adds a Base#BASE object in the Set#SET_BASE, using a given ObjectName as the index.

+ +

Parameters

+ +

Return value

+ +

Core.Base#BASE: +The added BASE Object.

+ +
+
+
+
+ + +SET_BASE:AddObject(Object) + +
+
+ +

Adds a Base#BASE object in the Set#SET_BASE, using the Object Name as the index.

+ +

Parameter

+ +

Return value

+ +

Core.Base#BASE: +The added BASE Object.

+ +
+
+
+
+ + Core.Scheduler#SCHEDULER + +SET_BASE.CallScheduler + +
+
+ + + +
+
+
+
+ + +SET_BASE:Count() + +
+
+ +

Retrieves the amount of objects in the Set#SET_BASE and derived classes.

+ +

Return value

+ +

#number: +Count

+ +
+
+
+
+ + + +SET_BASE.Database + +
+
+ + + + +

Now base the new Set on the BaseSet

+ +
+
+
+
+ + #table + +SET_BASE.Filter + +
+
+ + + +
+
+
+
+ + +SET_BASE:FilterOnce() + +
+
+ +

Filters for the defined collection.

+ +

Return value

+ +

#SET_BASE: +self

+ +
+
+
+
+ + +SET_BASE:FilterStop() + +
+
+ +

Stops the filtering for the defined collection.

+ +

Return value

+ +

#SET_BASE: +self

+ +
+
+
+
+ + +SET_BASE:FindNearestObjectFromPointVec2(PointVec2) + +
+
+ +

Iterate the SET_BASE while identifying the nearest object from a Point#POINT_VEC2.

+ +

Parameter

+ +

Return value

+ +

Core.Base#BASE: +The closest object.

+ +
+
+
+
+ + +SET_BASE:Flush() + +
+
+ +

Flushes the current SET_BASE contents in the log ...

+ + +

(for debugging reasons).

+ +

Return value

+ +

#string: +A string with the names of the objects.

+ +
+
+
+
+ + +SET_BASE:ForEach(IteratorFunction, arg, Set, Function, FunctionArguments) + +
+
+ +

Iterate the SETBASE and derived classes and call an iterator function for the given SETBASE, providing the Object for each element within the set and optional parameters.

+ +

Parameters

+
    +
  • + +

    #function IteratorFunction : +The function that will be called.

    + +
  • +
  • + +

    arg :

    + +
  • +
  • + +

    Set :

    + +
  • +
  • + +

    Function :

    + +
  • +
  • + +

    FunctionArguments :

    + +
  • +
+

Return value

+ +

#SET_BASE: +self

+ +
+
+
+
+ + +SET_BASE:Get(ObjectName) + +
+
+ +

Gets a Base#BASE object from the Set#SET_BASE and derived classes, based on the Object Name.

+ +

Parameter

+
    +
  • + +

    #string ObjectName :

    + +
  • +
+

Return value

+ +

Core.Base#BASE:

+ + +
+
+
+
+ + +SET_BASE:GetFirst() + +
+
+ +

Gets the first object from the Set#SET_BASE and derived classes.

+ +

Return value

+ +

Core.Base#BASE:

+ + +
+
+
+
+ + +SET_BASE:GetLast() + +
+
+ +

Gets the last object from the Set#SET_BASE and derived classes.

+ +

Return value

+ +

Core.Base#BASE:

+ + +
+
+
+
+ + +SET_BASE:GetRandom() + +
+
+ +

Gets a random object from the Set#SET_BASE and derived classes.

+ +

Return value

+ +

Core.Base#BASE:

+ + +
+
+
+
+ + +SET_BASE:GetSet() + +
+
+ +

Gets the Set.

+ +

Return value

+ +

#SET_BASE: +self

+ +
+
+
+
+ + +SET_BASE:IsIncludeObject(Object) + +
+
+ +

Decides whether to include the Object

+ +

Parameter

+
    +
  • + +

    #table Object :

    + +
  • +
+

Return value

+ +

#SET_BASE: +self

+ +
+
+
+
+ + #table + +SET_BASE.List + +
+
+ + + +
+
+
+
+ + +SET_BASE:New(Database) + +
+
+ +

Creates a new SET_BASE object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

+ +

Parameter

+
    +
  • + +

    Database :

    + +
  • +
+

Return value

+ +

#SET_BASE:

+ + +

Usage:

+
-- Define a new SET_BASE Object. This DBObject will contain a reference to all Group and Unit Templates defined within the ME and the DCSRTE.
+DBObject = SET_BASE:New()
+ +
+
+
+
+ + +SET_BASE:Remove(ObjectName) + +
+
+ +

Removes a Base#BASE object from the Set#SET_BASE and derived classes, based on the Object Name.

+ +

Parameter

+
    +
  • + +

    #string ObjectName :

    + +
  • +
+
+
+
+
+ + #table + +SET_BASE.Set + +
+
+ + + +
+
+
+
+ + +SET_BASE:SetDatabase(BaseSet) + +
+
+ +

Copies the Filter criteria from a given Set (for rebuilding a new Set based on an existing Set).

+ +

Parameter

+ +

Return value

+ +

#SET_BASE:

+ + +
+
+
+
+ + +SET_BASE:SetIteratorIntervals(YieldInterval, TimeInterval) + +
+
+ +

Define the SET iterator "yield interval" and the "time interval".

+ +

Parameters

+
    +
  • + +

    #number YieldInterval : +Sets the frequency when the iterator loop will yield after the number of objects processed. The default frequency is 10 objects processed.

    + +
  • +
  • + +

    #number TimeInterval : +Sets the time in seconds when the main logic will resume the iterator loop. The default time is 0.001 seconds.

    + +
  • +
+

Return value

+ +

#SET_BASE: +self

+ +
+
+
+
+ + + +SET_BASE.TimeInterval + +
+
+ + + +
+
+
+
+ + + +SET_BASE.YieldInterval + +
+
+ + + +
+
+
+
+ + +SET_BASE:_EventOnBirth(Event) + +
+
+ +

Handles the OnBirth event for the Set.

+ +

Parameter

+ +
+
+
+
+ + +SET_BASE:_EventOnDeadOrCrash(Event) + +
+
+ +

Handles the OnDead or OnCrash event for alive units set.

+ +

Parameter

+ +
+
+
+
+ + +SET_BASE:_EventOnPlayerEnterUnit(Event) + +
+
+ +

Handles the OnPlayerEnterUnit event to fill the active players table (with the unit filter applied).

+ +

Parameter

+ +
+
+
+
+ + +SET_BASE:_EventOnPlayerLeaveUnit(Event) + +
+
+ +

Handles the OnPlayerLeaveUnit event to clean the active players table.

+ +

Parameter

+ +
+
+
+
+ + +SET_BASE:_FilterStart() + +
+
+ +

Starts the filtering for the defined collection.

+ +

Return value

+ +

#SET_BASE: +self

+ +
+
+
+
+ + +SET_BASE:_Find(ObjectName) + +
+
+ +

Finds an Base#BASE object based on the object Name.

+ +

Parameter

+
    +
  • + +

    #string ObjectName :

    + +
  • +
+

Return value

+ +

Core.Base#BASE: +The Object found.

+ +
+
+ +

Type SET_CARGO

+

Field(s)

+
+
+ + +SET_CARGO:AddCargosByName(AddCargoNames) + +
+
+ +

Add CARGOs to SET_CARGO.

+ +

Parameter

+
    +
  • + +

    #string AddCargoNames : +A single name or an array of CARGO names.

    + +
  • +
+

Return value

+ + +

self

+ +
+
+
+
+ + +SET_CARGO:AddInDatabase(Event) + +
+
+ +

Handles the Database to check on an event (birth) that the Object was added in the Database.

+ + +

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

+ +

Parameter

+ +

Return values

+
    +
  1. + +

    #string: +The name of the CARGO

    + +
  2. +
  3. + +

    #table: +The CARGO

    + +
  4. +
+
+
+
+
+ + +SET_CARGO:FilterCoalitions(Coalitions) + +
+
+ +

Builds a set of cargos of coalitions.

+ + +

Possible current coalitions are red, blue and neutral.

+ +

Parameter

+
    +
  • + +

    #string Coalitions : +Can take the following values: "red", "blue", "neutral".

    + +
  • +
+

Return value

+ +

#SET_CARGO: +self

+ +
+
+
+
+ + +SET_CARGO:FilterCountries(Countries) + +
+
+ +

Builds a set of cargos of defined countries.

+ + +

Possible current countries are those known within DCS world.

+ +

Parameter

+
    +
  • + +

    #string Countries : +Can take those country strings known within DCS world.

    + +
  • +
+

Return value

+ +

#SET_CARGO: +self

+ +
+
+
+
+ + +SET_CARGO:FilterPrefixes(Prefixes) + +
+
+ +

Builds a set of cargos of defined cargo prefixes.

+ + +

All the cargos starting with the given prefixes will be included within the set.

+ +

Parameter

+
    +
  • + +

    #string Prefixes : +The prefix of which the cargo name starts with.

    + +
  • +
+

Return value

+ +

#SET_CARGO: +self

+ +
+
+
+
+ + +SET_CARGO:FilterStart() + +
+
+ +

Starts the filtering.

+ +

Return value

+ +

#SET_CARGO: +self

+ +
+
+
+
+ + +SET_CARGO:FilterTypes(Types) + +
+
+ +

Builds a set of cargos of defined cargo types.

+ + +

Possible current types are those types known within DCS world.

+ +

Parameter

+
    +
  • + +

    #string Types : +Can take those type strings known within DCS world.

    + +
  • +
+

Return value

+ +

#SET_CARGO: +self

+ +
+
+
+
+ + +SET_CARGO:FindCargo(CargoName) + +
+
+ +

Finds a Cargo based on the Cargo Name.

+ +

Parameter

+
    +
  • + +

    #string CargoName :

    + +
  • +
+

Return value

+ +

Wrapper.Cargo#CARGO: +The found Cargo.

+ +
+
+
+
+ + +SET_CARGO:FindInDatabase(Event) + +
+
+ +

Handles the Database to check on any event that Object exists in the Database.

+ + +

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

+ +

Parameter

+ +

Return values

+
    +
  1. + +

    #string: +The name of the CARGO

    + +
  2. +
  3. + +

    #table: +The CARGO

    + +
  4. +
+
+
+
+
+ + +SET_CARGO:FindNearestCargoFromPointVec2(PointVec2) + +
+
+ +

Iterate the SET_CARGO while identifying the nearest Cargo#CARGO from a Point#POINT_VEC2.

+ +

Parameter

+ +

Return value

+ +

Wrapper.Cargo#CARGO: +The closest Cargo#CARGO.

+ +
+
+
+
+ + +SET_CARGO:ForEachCargo(IteratorFunction, ...) + +
+
+ +

Iterate the SET_CARGO and call an interator function for each CARGO, providing the CARGO and optional parameters.

+ +

Parameters

+
    +
  • + +

    #function IteratorFunction : +The function that will be called when there is an alive CARGO in the SET_CARGO. The function needs to accept a CARGO parameter.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#SET_CARGO: +self

+ +
+
+
+
+ + +SET_CARGO:IsIncludeObject(MCargo) + +
+
+ + + +

Parameter

+ +

Return value

+ +

#SET_CARGO: +self

+ +
+
+
+
+ + +SET_CARGO:New() + +
+
+ +

Creates a new SET_CARGO object, building a set of cargos belonging to a coalitions and categories.

+ +

Return value

+ +

#SET_CARGO: +self

+ +

Usage:

+
-- Define a new SET_CARGO Object. The DatabaseSet will contain a reference to all Cargos.
+DatabaseSet = SET_CARGO:New()
+ +
+
+
+
+ + +SET_CARGO:OnEventDeleteCargo(EventData) + +
+
+ +

Handles the OnDead or OnCrash event for alive units set.

+ +

Parameter

+ +
+
+
+
+ + +SET_CARGO:OnEventNewCargo(EventData) + +
+
+ +

Handles the OnEventNewCargo event for the Set.

+ +

Parameter

+ +
+
+
+
+ + +SET_CARGO:RemoveCargosByName(RemoveCargoNames) + +
+
+ +

Remove CARGOs from SET_CARGO.

+ +

Parameter

+ +

Return value

+ + +

self

+ +
+
+ +

Type SET_CLIENT

+

Field(s)

+
+
+ + +SET_CLIENT:AddClientsByName(AddClientNames) + +
+
+ +

Add CLIENT(s) to SET_CLIENT.

+ +

Parameter

+
    +
  • + +

    #string AddClientNames : +A single name or an array of CLIENT names.

    + +
  • +
+

Return value

+ + +

self

+ +
+
+
+
+ + +SET_CLIENT:AddInDatabase(Event) + +
+
+ +

Handles the Database to check on an event (birth) that the Object was added in the Database.

+ + +

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

+ +

Parameter

+ +

Return values

+
    +
  1. + +

    #string: +The name of the CLIENT

    + +
  2. +
  3. + +

    #table: +The CLIENT

    + +
  4. +
+
+
+
+
+ + +SET_CLIENT:FilterCategories(Categories) + +
+
+ +

Builds a set of clients out of categories.

+ + +

Possible current categories are plane, helicopter, ground, ship.

+ +

Parameter

+
    +
  • + +

    #string Categories : +Can take the following values: "plane", "helicopter", "ground", "ship".

    + +
  • +
+

Return value

+ +

#SET_CLIENT: +self

+ +
+
+
+
+ + +SET_CLIENT:FilterCoalitions(Coalitions) + +
+
+ +

Builds a set of clients of coalitions.

+ + +

Possible current coalitions are red, blue and neutral.

+ +

Parameter

+
    +
  • + +

    #string Coalitions : +Can take the following values: "red", "blue", "neutral".

    + +
  • +
+

Return value

+ +

#SET_CLIENT: +self

+ +
+
+
+
+ + +SET_CLIENT:FilterCountries(Countries) + +
+
+ +

Builds a set of clients of defined countries.

+ + +

Possible current countries are those known within DCS world.

+ +

Parameter

+
    +
  • + +

    #string Countries : +Can take those country strings known within DCS world.

    + +
  • +
+

Return value

+ +

#SET_CLIENT: +self

+ +
+
+
+
+ + +SET_CLIENT:FilterPrefixes(Prefixes) + +
+
+ +

Builds a set of clients of defined client prefixes.

+ + +

All the clients starting with the given prefixes will be included within the set.

+ +

Parameter

+
    +
  • + +

    #string Prefixes : +The prefix of which the client name starts with.

    + +
  • +
+

Return value

+ +

#SET_CLIENT: +self

+ +
+
+
+
+ + +SET_CLIENT:FilterStart() + +
+
+ +

Starts the filtering.

+ +

Return value

+ +

#SET_CLIENT: +self

+ +
+
+
+
+ + +SET_CLIENT:FilterTypes(Types) + +
+
+ +

Builds a set of clients of defined client types.

+ + +

Possible current types are those types known within DCS world.

+ +

Parameter

+
    +
  • + +

    #string Types : +Can take those type strings known within DCS world.

    + +
  • +
+

Return value

+ +

#SET_CLIENT: +self

+ +
+
+
+
+ + +SET_CLIENT:FindClient(ClientName) + +
+
+ +

Finds a Client based on the Client Name.

+ +

Parameter

+
    +
  • + +

    #string ClientName :

    + +
  • +
+

Return value

+ +

Wrapper.Client#CLIENT: +The found Client.

+ +
+
+
+
+ + +SET_CLIENT:FindInDatabase(Event) + +
+
+ +

Handles the Database to check on any event that Object exists in the Database.

+ + +

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

+ +

Parameter

+ +

Return values

+
    +
  1. + +

    #string: +The name of the CLIENT

    + +
  2. +
  3. + +

    #table: +The CLIENT

    + +
  4. +
+
+
+
+
+ + +SET_CLIENT:ForEachClient(IteratorFunction, ...) + +
+
+ +

Iterate the SET_CLIENT and call an interator function for each alive CLIENT, providing the CLIENT and optional parameters.

+ +

Parameters

+
    +
  • + +

    #function IteratorFunction : +The function that will be called when there is an alive CLIENT in the SET_CLIENT. The function needs to accept a CLIENT parameter.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#SET_CLIENT: +self

+ +
+
+
+
+ + +SET_CLIENT:ForEachClientInZone(ZoneObject, IteratorFunction, ...) + +
+
+ +

Iterate the SET_CLIENT and call an iterator function for each alive CLIENT presence completely in a Zone, providing the CLIENT and optional parameters to the called function.

+ +

Parameters

+
    +
  • + +

    Core.Zone#ZONE ZoneObject : +The Zone to be tested for.

    + +
  • +
  • + +

    #function IteratorFunction : +The function that will be called when there is an alive CLIENT in the SET_CLIENT. The function needs to accept a CLIENT parameter.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#SET_CLIENT: +self

+ +
+
+
+
+ + +SET_CLIENT:ForEachClientNotInZone(ZoneObject, IteratorFunction, ...) + +
+
+ +

Iterate the SET_CLIENT and call an iterator function for each alive CLIENT presence not in a Zone, providing the CLIENT and optional parameters to the called function.

+ +

Parameters

+
    +
  • + +

    Core.Zone#ZONE ZoneObject : +The Zone to be tested for.

    + +
  • +
  • + +

    #function IteratorFunction : +The function that will be called when there is an alive CLIENT in the SET_CLIENT. The function needs to accept a CLIENT parameter.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#SET_CLIENT: +self

+ +
+
+
+
+ + +SET_CLIENT:IsIncludeObject(MClient) + +
+
+ + + +

Parameter

+ +

Return value

+ +

#SET_CLIENT: +self

+ +
+
+
+
+ + +SET_CLIENT:New() + +
+
+ +

Creates a new SET_CLIENT object, building a set of clients belonging to a coalitions, categories, countries, types or with defined prefix names.

+ +

Return value

+ +

#SET_CLIENT:

+ + +

Usage:

+
-- Define a new SET_CLIENT Object. This DBObject will contain a reference to all Clients.
+DBObject = SET_CLIENT:New()
+ +
+
+
+
+ + +SET_CLIENT:RemoveClientsByName(RemoveClientNames) + +
+
+ +

Remove CLIENT(s) from SET_CLIENT.

+ +

Parameter

+ +

Return value

+ + +

self

+ +
+
+ +

Type SET_GROUP

+

Field(s)

+
+
+ + +SET_GROUP:AddGroupsByName(AddGroupNames) + +
+
+ +

Add GROUP(s) to SET_GROUP.

+ +

Parameter

+
    +
  • + +

    #string AddGroupNames : +A single name or an array of GROUP names.

    + +
  • +
+

Return value

+ + +

self

+ +
+
+
+
+ + +SET_GROUP:AddInDatabase(Event) + +
+
+ +

Handles the Database to check on an event (birth) that the Object was added in the Database.

+ + +

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

+ +

Parameter

+ +

Return values

+
    +
  1. + +

    #string: +The name of the GROUP

    + +
  2. +
  3. + +

    #table: +The GROUP

    + +
  4. +
+
+
+
+
+ + +SET_GROUP:FilterCategories(Categories) + +
+
+ +

Builds a set of groups out of categories.

+ + +

Possible current categories are plane, helicopter, ground, ship.

+ +

Parameter

+
    +
  • + +

    #string Categories : +Can take the following values: "plane", "helicopter", "ground", "ship".

    + +
  • +
+

Return value

+ +

#SET_GROUP: +self

+ +
+
+
+
+ + +SET_GROUP:FilterCoalitions(Coalitions) + +
+
+ +

Builds a set of groups of coalitions.

+ + +

Possible current coalitions are red, blue and neutral.

+ +

Parameter

+
    +
  • + +

    #string Coalitions : +Can take the following values: "red", "blue", "neutral".

    + +
  • +
+

Return value

+ +

#SET_GROUP: +self

+ +
+
+
+
+ + +SET_GROUP:FilterCountries(Countries) + +
+
+ +

Builds a set of groups of defined countries.

+ + +

Possible current countries are those known within DCS world.

+ +

Parameter

+
    +
  • + +

    #string Countries : +Can take those country strings known within DCS world.

    + +
  • +
+

Return value

+ +

#SET_GROUP: +self

+ +
+
+
+
+ + +SET_GROUP:FilterPrefixes(Prefixes) + +
+
+ +

Builds a set of groups of defined GROUP prefixes.

+ + +

All the groups starting with the given prefixes will be included within the set.

+ +

Parameter

+
    +
  • + +

    #string Prefixes : +The prefix of which the group name starts with.

    + +
  • +
+

Return value

+ +

#SET_GROUP: +self

+ +
+
+
+
+ + +SET_GROUP:FilterStart() + +
+
+ +

Starts the filtering.

+ +

Return value

+ +

#SET_GROUP: +self

+ +
+
+
+
+ + +SET_GROUP:FindGroup(GroupName) + +
+
+ +

Finds a Group based on the Group Name.

+ +

Parameter

+
    +
  • + +

    #string GroupName :

    + +
  • +
+

Return value

+ +

Wrapper.Group#GROUP: +The found Group.

+ +
+
+
+
+ + +SET_GROUP:FindInDatabase(Event) + +
+
+ +

Handles the Database to check on any event that Object exists in the Database.

+ + +

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

+ +

Parameter

+ +

Return values

+
    +
  1. + +

    #string: +The name of the GROUP

    + +
  2. +
  3. + +

    #table: +The GROUP

    + +
  4. +
+
+
+
+
+ + +SET_GROUP:ForEachGroup(IteratorFunction, ...) + +
+
+ +

Iterate the SET_GROUP and call an iterator function for each alive GROUP, providing the GROUP and optional parameters.

+ +

Parameters

+
    +
  • + +

    #function IteratorFunction : +The function that will be called when there is an alive GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#SET_GROUP: +self

+ +
+
+
+
+ + +SET_GROUP:ForEachGroupCompletelyInZone(ZoneObject, IteratorFunction, ...) + +
+
+ +

Iterate the SET_GROUP and call an iterator function for each alive GROUP presence completely in a Zone, providing the GROUP and optional parameters to the called function.

+ +

Parameters

+
    +
  • + +

    Core.Zone#ZONE ZoneObject : +The Zone to be tested for.

    + +
  • +
  • + +

    #function IteratorFunction : +The function that will be called when there is an alive GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#SET_GROUP: +self

+ +
+
+
+
+ + +SET_GROUP:ForEachGroupNotInZone(ZoneObject, IteratorFunction, ...) + +
+
+ +

Iterate the SET_GROUP and call an iterator function for each alive GROUP presence not in a Zone, providing the GROUP and optional parameters to the called function.

+ +

Parameters

+
    +
  • + +

    Core.Zone#ZONE ZoneObject : +The Zone to be tested for.

    + +
  • +
  • + +

    #function IteratorFunction : +The function that will be called when there is an alive GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#SET_GROUP: +self

+ +
+
+
+
+ + +SET_GROUP:ForEachGroupPartlyInZone(ZoneObject, IteratorFunction, ...) + +
+
+ +

Iterate the SET_GROUP and call an iterator function for each alive GROUP presence partly in a Zone, providing the GROUP and optional parameters to the called function.

+ +

Parameters

+
    +
  • + +

    Core.Zone#ZONE ZoneObject : +The Zone to be tested for.

    + +
  • +
  • + +

    #function IteratorFunction : +The function that will be called when there is an alive GROUP in the SET_GROUP. The function needs to accept a GROUP parameter.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#SET_GROUP: +self

+ +
+
+
+
+ + +SET_GROUP:IsIncludeObject(MooseGroup) + +
+
+ + + +

Parameter

+ +

Return value

+ +

#SET_GROUP: +self

+ +
+
+
+
+ + +SET_GROUP:New() + +
+
+ +

Creates a new SET_GROUP object, building a set of groups belonging to a coalitions, categories, countries, types or with defined prefix names.

+ +

Return value

+ +

#SET_GROUP:

+ + +

Usage:

+
-- Define a new SET_GROUP Object. This DBObject will contain a reference to all alive GROUPS.
+DBObject = SET_GROUP:New()
+ +
+
+
+
+ + +SET_GROUP:RemoveGroupsByName(RemoveGroupNames) + +
+
+ +

Remove GROUP(s) from SET_GROUP.

+ +

Parameter

+ +

Return value

+ + +

self

+ +
+
+ +

Type SET_UNIT

+

Field(s)

+
+
+ + +SET_UNIT:AddInDatabase(Event) + +
+
+ +

Handles the Database to check on an event (birth) that the Object was added in the Database.

+ + +

This is required, because sometimes the DATABASE birth event gets called later than the SETBASE birth event!

+ +

Parameter

+ +

Return values

+
    +
  1. + +

    #string: +The name of the UNIT

    + +
  2. +
  3. + +

    #table: +The UNIT

    + +
  4. +
+
+
+
+
+ + +SET_UNIT:AddUnit(AddUnit) + +
+
+ +

Add UNIT(s) to SET_UNIT.

+ +

Parameter

+
    +
  • + +

    #string AddUnit : +A single UNIT.

    + +
  • +
+

Return value

+ +

#SET_UNIT: +self

+ +
+
+
+
+ + +SET_UNIT:AddUnitsByName(AddUnitNames) + +
+
+ +

Add UNIT(s) to SET_UNIT.

+ +

Parameter

+
    +
  • + +

    #string AddUnitNames : +A single name or an array of UNIT names.

    + +
  • +
+

Return value

+ +

#SET_UNIT: +self

+ +
+
+
+
+ + +SET_UNIT:CalculateThreatLevelA2G() + +
+
+ +

Calculate the maxium A2G threat level of the SET_UNIT.

+ +
+
+
+
+ + +SET_UNIT:FilterCategories(Categories) + +
+
+ +

Builds a set of units out of categories.

+ + +

Possible current categories are plane, helicopter, ground, ship.

+ +

Parameter

+
    +
  • + +

    #string Categories : +Can take the following values: "plane", "helicopter", "ground", "ship".

    + +
  • +
+

Return value

+ +

#SET_UNIT: +self

+ +
+
+
+
+ + +SET_UNIT:FilterCoalitions(Coalitions) + +
+
+ +

Builds a set of units of coalitions.

+ + +

Possible current coalitions are red, blue and neutral.

+ +

Parameter

+
    +
  • + +

    #string Coalitions : +Can take the following values: "red", "blue", "neutral".

    + +
  • +
+

Return value

+ +

#SET_UNIT: +self

+ +
+
+
+
+ + +SET_UNIT:FilterCountries(Countries) + +
+
+ +

Builds a set of units of defined countries.

+ + +

Possible current countries are those known within DCS world.

+ +

Parameter

+
    +
  • + +

    #string Countries : +Can take those country strings known within DCS world.

    + +
  • +
+

Return value

+ +

#SET_UNIT: +self

+ +
+
+
+
+ + +SET_UNIT:FilterHasRadar(RadarTypes) + +
+
+ +

Builds a set of units having a radar of give types.

+ + +

All the units having a radar of a given type will be included within the set.

+ +

Parameter

+
    +
  • + +

    #table RadarTypes : +The radar types.

    + +
  • +
+

Return value

+ +

#SET_UNIT: +self

+ +
+
+
+
+ + +SET_UNIT:FilterHasSEAD() + +
+
+ +

Builds a set of SEADable units.

+ +

Return value

+ +

#SET_UNIT: +self

+ +
+
+
+
+ + +SET_UNIT:FilterPrefixes(Prefixes) + +
+
+ +

Builds a set of units of defined unit prefixes.

+ + +

All the units starting with the given prefixes will be included within the set.

+ +

Parameter

+
    +
  • + +

    #string Prefixes : +The prefix of which the unit name starts with.

    + +
  • +
+

Return value

+ +

#SET_UNIT: +self

+ +
+
+
+
+ + +SET_UNIT:FilterStart() + +
+
+ +

Starts the filtering.

+ +

Return value

+ +

#SET_UNIT: +self

+ +
+
+
+
+ + +SET_UNIT:FilterTypes(Types) + +
+
+ +

Builds a set of units of defined unit types.

+ + +

Possible current types are those types known within DCS world.

+ +

Parameter

+
    +
  • + +

    #string Types : +Can take those type strings known within DCS world.

    + +
  • +
+

Return value

+ +

#SET_UNIT: +self

+ +
+
+
+
+ + +SET_UNIT:FindInDatabase(Event) + +
+
+ +

Handles the Database to check on any event that Object exists in the Database.

+ + +

This is required, because sometimes the DATABASE event gets called later than the SETBASE event or vise versa!

+ +

Parameter

+ +

Return values

+
    +
  1. + +

    #string: +The name of the UNIT

    + +
  2. +
  3. + +

    #table: +The UNIT

    + +
  4. +
+
+
+
+
+ + +SET_UNIT:FindUnit(UnitName) + +
+
+ +

Finds a Unit based on the Unit Name.

+ +

Parameter

+
    +
  • + +

    #string UnitName :

    + +
  • +
+

Return value

+ +

Wrapper.Unit#UNIT: +The found Unit.

+ +
+
+
+
+ + +SET_UNIT:ForEachUnit(IteratorFunction, ...) + +
+
+ +

Iterate the SET_UNIT and call an interator function for each alive UNIT, providing the UNIT and optional parameters.

+ +

Parameters

+
    +
  • + +

    #function IteratorFunction : +The function that will be called when there is an alive UNIT in the SET_UNIT. The function needs to accept a UNIT parameter.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#SET_UNIT: +self

+ +
+
+
+
+ + +SET_UNIT:ForEachUnitCompletelyInZone(ZoneObject, IteratorFunction, ...) + +
+
+ +

Iterate the SET_UNIT and call an iterator function for each alive UNIT presence completely in a Zone, providing the UNIT and optional parameters to the called function.

+ +

Parameters

+
    +
  • + +

    Core.Zone#ZONE ZoneObject : +The Zone to be tested for.

    + +
  • +
  • + +

    #function IteratorFunction : +The function that will be called when there is an alive UNIT in the SET_UNIT. The function needs to accept a UNIT parameter.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#SET_UNIT: +self

+ +
+
+
+
+ + +SET_UNIT:ForEachUnitNotInZone(ZoneObject, IteratorFunction, ...) + +
+
+ +

Iterate the SET_UNIT and call an iterator function for each alive UNIT presence not in a Zone, providing the UNIT and optional parameters to the called function.

+ +

Parameters

+
    +
  • + +

    Core.Zone#ZONE ZoneObject : +The Zone to be tested for.

    + +
  • +
  • + +

    #function IteratorFunction : +The function that will be called when there is an alive UNIT in the SET_UNIT. The function needs to accept a UNIT parameter.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#SET_UNIT: +self

+ +
+
+
+
+ + +SET_UNIT:GetTypeNames(Delimiter) + +
+
+ +

Retrieve the type names of the Units in the SET, delimited by an optional delimiter.

+ +

Parameter

+
    +
  • + +

    #string Delimiter : +(optional) The delimiter, which is default a comma.

    + +
  • +
+

Return value

+ +

#string: +The types of the Units delimited.

+ +
+
+
+
+ + +SET_UNIT:GetUnitThreatLevels() + +
+
+ +

Returns map of unit threat levels.

+ +

Return value

+ +

#table:

+ + +
+
+
+
+ + +SET_UNIT:GetUnitTypes() + +
+
+ +

Returns map of unit types.

+ +

Return value

+ +

#map:

+

string,#number> A map of the unit types found. The key is the UnitTypeName and the value is the amount of unit types found.

+ +
+
+
+
+ + +SET_UNIT:GetUnitTypesText() + +
+
+ +

Returns a comma separated string of the unit types with a count in the Set.

+ +

Return value

+ +

#string: +The unit types string

+ +
+
+
+
+ + +SET_UNIT:HasFriendlyUnits(FriendlyCoalition) + +
+
+ +

Returns if the Set has friendly ground units.

+ +

Parameter

+
    +
  • + +

    FriendlyCoalition :

    + +
  • +
+

Return value

+ +

#number: +The amount of ground targets in the Set.

+ +
+
+
+
+ + +SET_UNIT:HasGroundUnits() + +
+
+ +

Returns if the Set has ground targets.

+ +

Return value

+ +

#number: +The amount of ground targets in the Set.

+ +
+
+
+
+ + +SET_UNIT:HasRadar(RadarType) + +
+
+ +

Returns if the Set has targets having a radar (of a given type).

+ +

Parameter

+ +

Return value

+ +

#number: +The amount of radars in the Set with the given type

+ +
+
+
+
+ + +SET_UNIT:HasSEAD() + +
+
+ +

Returns if the Set has targets that can be SEADed.

+ +

Return value

+ +

#number: +The amount of SEADable units in the Set

+ +
+
+
+
+ + +SET_UNIT:IsIncludeObject(MUnit) + +
+
+ + + +

Parameter

+ +

Return value

+ +

#SET_UNIT: +self

+ +
+
+
+
+ + +SET_UNIT:New() + +
+
+ +

Creates a new SET_UNIT object, building a set of units belonging to a coalitions, categories, countries, types or with defined prefix names.

+ +

Return value

+ +

#SET_UNIT:

+ + +

Usage:

+
-- Define a new SET_UNIT Object. This DBObject will contain a reference to all alive Units.
+DBObject = SET_UNIT:New()
+ +
+
+
+
+ + +SET_UNIT:RemoveUnitsByName(RemoveUnitNames) + +
+
+ +

Remove UNIT(s) from SET_UNIT.

+ +

Parameter

+
    +
  • + +

    Wrapper.Unit#UNIT RemoveUnitNames : +A single name or an array of UNIT names.

    + +
  • +
+

Return value

+ + +

self

+ +
+
+ +

Type map

+ +
+ +
+ + diff --git a/docs/Documentation/Smoke.html b/docs/Documentation/Smoke.html new file mode 100644 index 000000000..c4b4c2e9a --- /dev/null +++ b/docs/Documentation/Smoke.html @@ -0,0 +1,699 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Smoke

+ +

(SP) (MP) (FSM) Route AI or players through waypoints or to zones.

+ + + +
+ +

#ACT_ASSIST FSM class, extends Fsm#FSM_PROCESS

+ +

ACT_ASSIST state machine:

+ +

This class is a state machine: it manages a process that is triggered by events causing state transitions to occur. +All derived classes from this class will start with the class name, followed by a _. See the relevant derived class descriptions below. +Each derived class follows exactly the same process, using the same events and following the same state transitions, +but will have different implementation behaviour upon each event or state transition.

+ +

ACT_ASSIST Events:

+ +

These are the events defined in this class:

+ +
    +
  • Start: The process is started.
  • +
  • Next: The process is smoking the targets in the given zone.
  • +
+ +

ACT_ASSIST Event methods:

+ +

Event methods are available (dynamically allocated by the state machine), that accomodate for state transitions occurring in the process. +There are two types of event methods, which you can use to influence the normal mechanisms in the state machine:

+ +
    +
  • Immediate: The event method has exactly the name of the event.
  • +
  • Delayed: The event method starts with a __ + the name of the event. The first parameter of the event method is a number value, expressing the delay in seconds when the event will be executed.
  • +
+ +

ACT_ASSIST States:

+ +
    +
  • None: The controllable did not receive route commands.
  • +
  • AwaitSmoke (*): The process is awaiting to smoke the targets in the zone.
  • +
  • Smoking (*): The process is smoking the targets in the zone.
  • +
  • Failed (*): The process has failed.
  • +
+ +

(*) End states of the process.

+ +

ACT_ASSIST state transition methods:

+ +

State transition functions can be set by the mission designer customizing or improving the behaviour of the state. +There are 2 moments when state transition methods will be called by the state machine:

+ +
    +
  • Before the state transition. + The state transition method needs to start with the name OnBefore + the name of the state. + If the state transition method returns false, then the processing of the state transition will not be done! + If you want to change the behaviour of the AIControllable at this event, return false, + but then you'll need to specify your own logic using the AIControllable!

  • +
  • After the state transition. + The state transition method needs to start with the name OnAfter + the name of the state. + These state transition methods need to provide a return value, which is specified at the function description.

  • +
+ +
+ +

1) #ACTASSISTSMOKETARGETSZONE class, extends Fsm.Route#ACT_ASSIST

+ +

The ACTASSISTSMOKETARGETSZONE class implements the core functions to smoke targets in a Zone. +The targets are smoked within a certain range around each target, simulating a realistic smoking behaviour. +At random intervals, a new target is smoked.

+ +

1.1) ACTASSISTSMOKETARGETSZONE constructor:

+ + + +
+ + +

Global(s)

+ + + + + + + + + +
ACT_ASSIST + +
ACT_ASSIST_SMOKE_TARGETS_ZONE + +
+

Type ACT_ASSIST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ACT_ASSIST.ClassName + +
ACT_ASSIST.Menu + +
ACT_ASSIST.MenuSmokeBlue + +
ACT_ASSIST.MenuSmokeGreen + +
ACT_ASSIST.MenuSmokeOrange + +
ACT_ASSIST.MenuSmokeRed + +
ACT_ASSIST.MenuSmokeWhite + +
ACT_ASSIST:New() +

Creates a new target smoking state machine.

+
ACT_ASSIST.TargetSetUnit + +
ACT_ASSIST.TargetZone + +
ACT_ASSIST:onafterStart(ProcessUnit, Event, From, To) +

StateMachine callback function

+
ACT_ASSIST:onafterStop(ProcessUnit, Event, From, To) +

StateMachine callback function

+
+ +

Type ACT_ASSIST_SMOKE_TARGETS_ZONE

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ACT_ASSIST_SMOKE_TARGETS_ZONE.ClassName + +
ACT_ASSIST_SMOKE_TARGETS_ZONE:Init(FsmSmoke) + +
ACT_ASSIST_SMOKE_TARGETS_ZONE:New(TargetSetUnit, TargetZone) +

Creates a new target smoking state machine.

+
ACT_ASSIST_SMOKE_TARGETS_ZONE.TargetSetUnit + +
ACT_ASSIST_SMOKE_TARGETS_ZONE.TargetZone + +
ACT_ASSIST_SMOKE_TARGETS_ZONE:onenterSmoking(ProcessUnit, Event, From, To) +

StateMachine callback function

+
+ +

Global(s)

+
+
+ + #ACT_ASSIST + +ACT_ASSIST + +
+
+ + + +
+
+
+
+ + #ACT_ASSIST_SMOKE_TARGETS_ZONE + +ACT_ASSIST_SMOKE_TARGETS_ZONE + +
+
+ + + +
+
+

Type Smoke

+ +

Type ACT_ASSIST

+ +

ACT_ASSIST class

+ +

Field(s)

+
+
+ + #string + +ACT_ASSIST.ClassName + +
+
+ + + +
+
+
+
+ + + +ACT_ASSIST.Menu + +
+
+ + + +
+
+
+
+ + + +ACT_ASSIST.MenuSmokeBlue + +
+
+ + + +
+
+
+
+ + + +ACT_ASSIST.MenuSmokeGreen + +
+
+ + + +
+
+
+
+ + + +ACT_ASSIST.MenuSmokeOrange + +
+
+ + + +
+
+
+
+ + + +ACT_ASSIST.MenuSmokeRed + +
+
+ + + +
+
+
+
+ + + +ACT_ASSIST.MenuSmokeWhite + +
+
+ + + +
+
+
+
+ + +ACT_ASSIST:New() + +
+
+ +

Creates a new target smoking state machine.

+ + +

The process will request from the menu if it accepts the task, if not, the unit is removed from the simulator.

+ +

Return value

+ +

#ACT_ASSIST:

+ + +
+
+
+
+ + + +ACT_ASSIST.TargetSetUnit + +
+
+ + + +
+
+
+
+ + + +ACT_ASSIST.TargetZone + +
+
+ + + +
+
+
+
+ + +ACT_ASSIST:onafterStart(ProcessUnit, Event, From, To) + +
+
+ +

StateMachine callback function

+ +

Parameters

+ +
+
+
+
+ + +ACT_ASSIST:onafterStop(ProcessUnit, Event, From, To) + +
+
+ +

StateMachine callback function

+ +

Parameters

+ +
+
+ +

Type ACT_ASSIST_SMOKE_TARGETS_ZONE

+ +

ACTASSISTSMOKETARGETSZONE class

+ +

Field(s)

+
+
+ + #string + +ACT_ASSIST_SMOKE_TARGETS_ZONE.ClassName + +
+
+ + + +
+
+
+
+ + +ACT_ASSIST_SMOKE_TARGETS_ZONE:Init(FsmSmoke) + +
+
+ + + +

Parameter

+
    +
  • + +

    FsmSmoke :

    + +
  • +
+
+
+
+
+ + +ACT_ASSIST_SMOKE_TARGETS_ZONE:New(TargetSetUnit, TargetZone) + +
+
+ +

Creates a new target smoking state machine.

+ + +

The process will request from the menu if it accepts the task, if not, the unit is removed from the simulator.

+ +

Parameters

+ +
+
+
+
+ + Set#SET_UNIT + +ACT_ASSIST_SMOKE_TARGETS_ZONE.TargetSetUnit + +
+
+ + + +
+
+
+
+ + Core.Zone#ZONE_BASE + +ACT_ASSIST_SMOKE_TARGETS_ZONE.TargetZone + +
+
+ + + +
+
+
+
+ + +ACT_ASSIST_SMOKE_TARGETS_ZONE:onenterSmoking(ProcessUnit, Event, From, To) + +
+
+ +

StateMachine callback function

+ +

Parameters

+ +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Spawn.html b/docs/Documentation/Spawn.html new file mode 100644 index 000000000..b82a161cb --- /dev/null +++ b/docs/Documentation/Spawn.html @@ -0,0 +1,3569 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Spawn

+ +

Functional -- Spawn dynamically new GROUPs in your missions.

+ + +

+Banner Image

+ +
+ +

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

+ +
+ +

Demo Missions

+ +

SPAWN Demo Missions source code

+ +

SPAWN Demo Missions, only for beta testers

+ +

ALL Demo Missions pack of the last release

+ +
+ +

YouTube Channel

+ +

SPAWN 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:

+ +

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:

+ +
    +
  • Aaron: Posed the idea for Group position randomization at SpawnInZone and make the Unit randomization separate from the Group randomization.
  • +
  • Entropy, Afinegan: Came up with the requirement for AIOnOff().
  • +
+ +

Authors:

+ +
    +
  • FlightControl: Design & Programming
  • +
+ + +

Global(s)

+ + + + + +
SPAWN +

SPAWN class, extends Base#BASE

+ +

The SPAWN class allows to spawn dynamically new groups.

+
+

Type SPAWN

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SPAWN.AIOnOff + +
SPAWN.AliveUnits + +
SPAWN.ClassName + +
SPAWN.CleanUpScheduler + +
SPAWN.DelayOnOff + +
SPAWN:GetFirstAliveGroup() +

Will find the first alive Group it has spawned, and return the alive Group object and the first Index where the first alive Group object has been found.

+
SPAWN:GetGroupFromIndex(SpawnIndex) +

Get the group from an index.

+
SPAWN:GetLastAliveGroup() +

Will find the last alive Group object, and will return a reference to the last live Group object and the last Index where the last alive Group object has been found.

+
SPAWN:GetNextAliveGroup(SpawnIndexStart) +

Will find the next alive Group object from a given Index, and return a reference to the alive Group object and the next Index where the alive Group has been found.

+
SPAWN:GetSpawnIndexFromGroup(SpawnGroup) +

Get the index from a given group.

+
SPAWN:InitAIOff() +

Turns the AI Off for the Group when spawning.

+
SPAWN:InitAIOn() +

Turns the AI On for the Group when spawning.

+
SPAWN:InitAIOnOff(AIOnOff) + +
SPAWN:InitArray(SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY) +

Makes the groups visible before start (like a batallion).

+
SPAWN:InitCleanUp(SpawnCleanUpInterval) +

CleanUp groups when they are still alive, but inactive.

+
SPAWN:InitDelayOff() +

Turns the Delay Off for the Group when spawning.

+
SPAWN:InitDelayOn() +

Turns the Delay On for the Group when spawning.

+
SPAWN:InitDelayOnOff(DelayOnOff) + +
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.

+
SPAWN:InitLimit(SpawnMaxUnitsAlive, SpawnMaxGroups) +

Limits the Maximum amount of Units that can be alive at the same time, and the maximum amount of groups that can be spawned.

+
SPAWN:InitRandomizePosition(RandomizePosition, OuterRadius, InnerRadius) +

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:InitRandomizeRoute(SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight) +

Randomizes the defined route of the SpawnTemplatePrefix group in the ME.

+
SPAWN:InitRandomizeTemplate(SpawnTemplatePrefixTable) +

This method is rather complicated to understand.

+
SPAWN:InitRandomizeUnits(RandomizeUnits, OuterRadius, InnerRadius) +

Randomizes the UNITs that are spawned within a radius band given an Outer and Inner radius.

+
SPAWN:InitRandomizeZones(SpawnZoneTable) + +
SPAWN:InitRepeat() +

For planes and helicopters, when these groups go home and land on their home airbases and farps, they normally would taxi to the parking spot, shut-down their engines and wait forever until the Group is removed by the runtime environment.

+
SPAWN:InitRepeatOnEngineShutDown() +

Respawn after landing when its engines have shut down.

+
SPAWN:InitRepeatOnLanding() +

Respawn group after landing.

+
SPAWN:InitUnControlled(UnControlled) +

(AIR) Will spawn a plane group in UnControlled or Controlled mode...

+
SPAWN.MaxAliveGroups + +
SPAWN.MaxAliveUnits + +
SPAWN:New(SpawnTemplatePrefix) +

Creates the main object to spawn a Group defined in the DCS ME.

+
SPAWN:NewWithAlias(SpawnTemplatePrefix, SpawnAliasPrefix) +

Creates a new SPAWN instance to create new groups based on the defined template and using a new alias for each new group.

+
SPAWN:OnSpawnGroup(SpawnCallBackFunction, SpawnFunctionArguments, ...) +

Allows to place a CallFunction hook when a new group spawns.

+
SPAWN:ReSpawn(SpawnIndex) +

Will re-spawn a group based on a given index.

+
SPAWN.Repeat + +
SPAWN.RepeatOnEngineShutDown + +
SPAWN.RepeatOnLanding + +
SPAWN:Spawn() +

Will spawn a group based on the internal index.

+
SPAWN.SpawnAliasPrefix + +
SPAWN.SpawnCleanUpInterval + +
SPAWN.SpawnCleanUpTimeStamps + +
SPAWN.SpawnCount + +
SPAWN:SpawnFromStatic(HostStatic, SpawnIndex) +

Will spawn a group from a hosting static.

+
SPAWN:SpawnFromUnit(HostUnit, SpawnIndex) +

Will spawn a group from a hosting unit.

+
SPAWN:SpawnFromVec2(Vec2, SpawnIndex) +

Will spawn a group from a Vec2 in 3D space.

+
SPAWN:SpawnFromVec3(Vec3, SpawnIndex) +

Will spawn a group from a Vec3 in 3D space.

+
SPAWN.SpawnFunctionArguments + +
SPAWN.SpawnFunctionHook + +
SPAWN:SpawnGroupName(SpawnIndex) +

Will return the SpawnGroupName either with with a specific count number or without any count.

+
SPAWN.SpawnGroups + +
SPAWN:SpawnInZone(Zone, RandomizeGroup, SpawnIndex) +

Will spawn a Group within a given Zone.

+
SPAWN.SpawnIndex + +
SPAWN.SpawnInitKeepUnitNames + +
SPAWN.SpawnInitLimit + +
SPAWN.SpawnInnerRadius + +
SPAWN.SpawnIsScheduled + +
SPAWN.SpawnMaxGroups + +
SPAWN.SpawnMaxUnitsAlive + +
SPAWN.SpawnOuterRadius + +
SPAWN.SpawnRandomize + +
SPAWN.SpawnRandomizePosition + +
SPAWN.SpawnRandomizePositionInnerRadius + +
SPAWN.SpawnRandomizePositionOuterRadius + +
SPAWN.SpawnRandomizeRoute + +
SPAWN.SpawnRandomizeRouteEndPoint + +
SPAWN.SpawnRandomizeRouteHeight + +
SPAWN.SpawnRandomizeRouteRadius + +
SPAWN.SpawnRandomizeRouteStartPoint + +
SPAWN.SpawnRandomizeTemplate + +
SPAWN.SpawnRandomizeUnits + +
SPAWN:SpawnScheduleStart() +

Will re-start the spawning scheduler.

+
SPAWN:SpawnScheduleStop() +

Will stop the scheduled spawning scheduler.

+
SPAWN:SpawnScheduled(SpawnTime, SpawnTimeVariation) +

Spawns new groups at varying time intervals.

+
SPAWN.SpawnScheduler + +
SPAWN.SpawnTemplate + +
SPAWN.SpawnTemplatePrefix + +
SPAWN.SpawnTemplatePrefixTable + +
SPAWN.SpawnUnControlled + +
SPAWN.SpawnVisible + +
SPAWN:SpawnWithIndex(SpawnIndex) +

Will spawn a group with a specified index number.

+
SPAWN.SpawnZoneTable + +
SPAWN.UnControlled + +
SPAWN:_GetGroupCategoryID(SpawnPrefix) +

Gets the CategoryID of the Group with the given SpawnPrefix

+
SPAWN:_GetGroupCoalitionID(SpawnPrefix) +

Gets the CoalitionID of the Group with the given SpawnPrefix

+
SPAWN:_GetGroupCountryID(SpawnPrefix) +

Gets the CountryID of the Group with the given SpawnPrefix

+
SPAWN:_GetLastIndex() +

Return the last maximum index that can be used.

+
SPAWN:_GetPrefixFromGroup(DCSUnit, SpawnGroup) +

Return the prefix of a SpawnUnit.

+
SPAWN:_GetSpawnIndex(SpawnIndex) +

Get the next index of the groups to be spawned.

+
SPAWN:_GetTemplate(SpawnTemplatePrefix) +

Gets the Group Template from the ME environment definition.

+
SPAWN:_InitializeSpawnGroups(SpawnIndex) +

Initalize the SpawnGroups collection.

+
SPAWN:_OnBirth(EventData) + +
SPAWN:_OnDeadOrCrash(EventData) + +
SPAWN:_OnEngineShutDown(EventData) +

Will detect AIR Units shutting down their engines ...

+
SPAWN:_OnLand(EventData) +

Will detect AIR Units landing...

+
SPAWN:_OnTakeOff(EventData) +

Will detect AIR Units taking off...

+
SPAWN:_Prepare(SpawnTemplatePrefix, SpawnIndex) +

Prepares the new Group Template.

+
SPAWN:_RandomizeRoute(SpawnIndex) +

Private method randomizing the routes.

+
SPAWN:_RandomizeTemplate(SpawnIndex) +

Private method that randomizes the template of the group.

+
SPAWN:_RandomizeZones(SpawnIndex) +

Private method that randomizes the Zones where the Group will be spawned.

+
SPAWN:_Scheduler() +

This function is called automatically by the Spawning scheduler.

+
SPAWN:_SpawnCleanUpScheduler() +

Schedules the CleanUp of Groups

+
SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle) + +
+ +

Global(s)

+
+
+ + #SPAWN + +SPAWN + +
+
+ +

SPAWN class, extends Base#BASE

+ +

The SPAWN class allows to spawn dynamically new groups.

+ + +

Each SPAWN object needs to be have a related template group setup in the Mission Editor (ME), +which is a normal group with the Late Activation flag set. +This template group will never be activated in your mission.
+SPAWN uses that template group to reference to all the characteristics +(air, ground, livery, unit composition, formation, skill level etc) of each new group to be spawned.

+ +

Therefore, when creating a SPAWN object, the SPAWN.New and SPAWN.NewWithAlias require +the name of the template group to be given as a string to those constructor methods.

+ +

Initialization settings can be applied on the SPAWN object, +which modify the behaviour or the way groups are spawned. +These initialization methods have the prefix Init. +There are also spawn methods with the prefix Spawn and will spawn new groups in various ways.

+ +

IMPORTANT! The methods with prefix Init must be used before any methods with prefix Spawn method are used, or unexpected results may appear!!!

+ +

Because SPAWN can spawn multiple groups of a template group, +SPAWN has an internal index that keeps track +which was the latest group that was spawned.

+ +

Limits can be set on how many groups can be spawn in each SPAWN object, +using the method SPAWN.InitLimit. SPAWN has 2 kind of limits:

+ +
    +
  • The maximum amount of Units that can be alive at the same time...
  • +
  • The maximum amount of Groups that can be spawned... This is more of a resource-type of limit.
  • +
+ +

When new groups get spawned using the Spawn methods, +it will be evaluated whether any limits have been reached. +When no spawn limit is reached, a new group will be created by the spawning methods, +and the internal index will be increased with 1.

+ +

These limits ensure that your mission does not accidentally get flooded with spawned groups.
+Additionally, it also guarantees that independent of the group composition, +at any time, the most optimal amount of groups are alive in your mission. +For example, if your template group has a group composition of 10 units, and you specify a limit of 100 units alive at the same time, +with unlimited resources = :InitLimit( 100, 0 ) and 10 groups are alive, but two groups have only one unit alive in the group, +then a sequent Spawn(Scheduled) will allow a new group to be spawned!!!

+ +

IMPORTANT!! If a limit has been reached, it is possible that a Spawn method returns nil, meaning, no Group had been spawned!!!

+ +

Spawned groups get the same name as the name of the template group.
+Spawned units in those groups keep by default the same name as the name of the template group.
+However, because multiple groups and units are created from the template group, +a suffix is added to each spawned group and unit.

+ +

Newly spawned groups will get the following naming structure at run-time:

+ +
    +
  1. Spawned groups will have the name _GroupName#nnn_, where GroupName is the name of the template group, + and nnn is a counter from 0 to 999.
  2. +
  3. Spawned units will have the name _GroupName#nnn-uu_, + where uu is a counter from 0 to 99 for each new spawned unit belonging to the group.
  4. +
+ +

That being said, there is a way to keep the same unit names!
+The method SPAWN.InitKeepUnitNames() will keep the same unit names as defined within the template group, thus:

+ +
    +
  1. Spawned units will have the name _UnitName#nnn-uu_, + where UnitName is the unit name as defined in the template group*, + and uu is a **counter from 0 to 99 for each new spawned unit belonging to the group.
  2. +
+ +

Some additional notes that need to be considered!!:

+ +
    +
  • templates are actually groups defined within the mission editor, with the flag "Late Activation" set. + As such, these groups are never used within the mission, but are used by the #SPAWN module.
  • +
  • It is important to defined BEFORE you spawn new groups, + a proper initialization of the SPAWN instance is done with the options you want to use.
  • +
  • When designing a mission, NEVER name groups using a "#" within the name of the group Spawn template(s), + or the SPAWN module logic won't work anymore.
  • +
+ +

SPAWN construction methods

+ +

Create a new SPAWN object with the SPAWN.New() or the SPAWN.NewWithAlias() methods:

+ +
    +
  • SPAWN.New(): Creates a new SPAWN object taking the name of the group that represents the GROUP template (definition).
  • +
  • SPAWN.NewWithAlias(): Creates a new SPAWN object taking the name of the group that represents the GROUP template (definition), and gives each spawned Group an different name.
  • +
+ +

It is important to understand how the SPAWN class works internally. The SPAWN object created will contain internally a list of groups that will be spawned and that are already spawned. +The initialization methods will modify this list of groups so that when a group gets spawned, ALL information is already prepared when spawning. This is done for performance reasons. +So in principle, the group list will contain all parameters and configurations after initialization, and when groups get actually spawned, this spawning can be done quickly and efficient.

+ +

SPAWN Initialization methods

+ +

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

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

+ +
    +
  • SPAWN.InitArray(): Make groups visible before they are actually activated, and order these groups like a batallion in an array.
  • +
+ +

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

+ + + +

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. +Every time a SPAWN object spawns a new GROUP object, a reference to the GROUP object is added to an internal table of GROUPS. +SPAWN provides methods to iterate through that internal GROUP object reference table:

+ +
    +
  • SPAWN.GetFirstAliveGroup(): Will find the first alive GROUP it has spawned, and return the alive GROUP object and the first Index where the first alive GROUP object has been found.
  • +
  • SPAWN.GetNextAliveGroup(): Will find the next alive GROUP object from a given Index, and return a reference to the alive GROUP object and the next Index where the alive GROUP has been found.
  • +
  • SPAWN.GetLastAliveGroup(): Will find the last alive GROUP object, and will return a reference to the last live GROUP object and the last Index where the last alive GROUP object has been found.
  • +
+ +

You can use the methods SPAWN.GetFirstAliveGroup() and sequently SPAWN.GetNextAliveGroup() to iterate through the alive GROUPS within the SPAWN object, and to actions... See the respective methods for an example. +The method SPAWN.GetGroupFromIndex() will return the GROUP object reference from the given Index, dead or alive...

+ +

Spawned cleaning of inactive groups

+ +

Sometimes, it will occur during a mission run-time, that ground or especially air objects get damaged, and will while being damged stop their activities, while remaining alive. +In such cases, the SPAWN object will just sit there and wait until that group gets destroyed, but most of the time it won't, +and it may occur that no new groups are or can be spawned as limits are reached. +To prevent this, a SPAWN.InitCleanUp() initialization method has been defined that will silently monitor the status of each spawned group. +Once a group has a velocity = 0, and has been waiting for a defined interval, that group will be cleaned or removed from run-time. +There is a catch however :-) If a damaged group has returned to an airbase within the coalition, that group will not be considered as "lost"... +In such a case, when the inactive group is cleaned, a new group will Re-spawned automatically. +This models AI that has succesfully returned to their airbase, to restart their combat activities. +Check the SPAWN.InitCleanUp() for further info.

+ +

Catch the Group Spawn Event in a callback function!

+ +

When using the SPAWN.SpawnScheduleds are created following the spawn time interval parameters. +When a new Group is spawned, you maybe want to execute actions with that group spawned at the spawn event. +The SPAWN class supports this functionality through the method SPAWN.OnSpawnGroup( *function( SpawnedGroup ) end * ), +which takes a function as a parameter that you can define locally. +Whenever a new Group is spawned, the given function is called, and the Group that was just spawned, is given as a parameter. +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.

+ + + +
+
+

Type Spawn

+ +

Type SPAWN

+ +

SPAWN Class

+ +

Field(s)

+
+
+ + #boolean + +SPAWN.AIOnOff + +
+
+ + + + +

The AI is on by default when spawning a group.

+ +
+
+
+
+ + #number + +SPAWN.AliveUnits + +
+
+ + + +
+
+
+
+ + +SPAWN.ClassName + +
+
+ + + +
+
+
+
+ + + +SPAWN.CleanUpScheduler + +
+
+ + + + +

self.CleanUpFunction = routines.scheduleFunction( self._SpawnCleanUpScheduler, { self }, timer.getTime() + 1, SpawnCleanUpInterval )

+ +
+
+
+
+ + #boolean + +SPAWN.DelayOnOff + +
+
+ + + + +

No intial delay when spawning the first group.

+ +
+
+
+
+ + +SPAWN:GetFirstAliveGroup() + +
+
+ +

Will find the first alive Group it has spawned, and return the alive Group object and the first Index where the first alive Group object has been found.

+ +

Return values

+
    +
  1. + +

    Wrapper.Group#GROUP, #number: +The Group object found, the new Index where the group was found.

    + +
  2. +
  3. + +

    #nil, #nil: +When no group is found, #nil is returned.

    + +
  4. +
+

Usage:

+
-- Find the first alive @{Group} object of the SpawnPlanes SPAWN object @{Group} collection that it has spawned during the mission.
+local GroupPlane, Index = SpawnPlanes:GetFirstAliveGroup()
+while GroupPlane ~= nil do
+  -- Do actions with the GroupPlane object.
+  GroupPlane, Index = SpawnPlanes:GetNextAliveGroup( Index )
+end
+ +
+
+
+
+ + +SPAWN:GetGroupFromIndex(SpawnIndex) + +
+
+ +

Get the group from an index.

+ + +

Returns the group from the SpawnGroups list. +If no index is given, it will return the first group in the list.

+ +

Parameter

+
    +
  • + +

    #number SpawnIndex : +The index of the group to return.

    + +
  • +
+

Return value

+ +

Wrapper.Group#GROUP: +self

+ +
+
+
+
+ + +SPAWN:GetLastAliveGroup() + +
+
+ +

Will find the last alive Group object, and will return a reference to the last live Group object and the last Index where the last alive Group object has been found.

+ +

Return values

+
    +
  1. + +

    Wrapper.Group#GROUP, #number: +The last alive Group object found, the last Index where the last alive Group object was found.

    + +
  2. +
  3. + +

    #nil, #nil: +When no alive Group object is found, #nil is returned.

    + +
  4. +
+

Usage:

+
-- Find the last alive @{Group} object of the SpawnPlanes SPAWN object @{Group} collection that it has spawned during the mission.
+local GroupPlane, Index = SpawnPlanes:GetLastAliveGroup()
+if GroupPlane then -- GroupPlane can be nil!!!
+  -- Do actions with the GroupPlane object.
+end
+ +
+
+
+
+ + +SPAWN:GetNextAliveGroup(SpawnIndexStart) + +
+
+ +

Will find the next alive Group object from a given Index, and return a reference to the alive Group object and the next Index where the alive Group has been found.

+ +

Parameter

+
    +
  • + +

    #number SpawnIndexStart : +A Index holding the start position to search from. This method can also be used to find the first alive Group object from the given Index.

    + +
  • +
+

Return values

+
    +
  1. + +

    Wrapper.Group#GROUP, #number: +The next alive Group object found, the next Index where the next alive Group object was found.

    + +
  2. +
  3. + +

    #nil, #nil: +When no alive Group object is found from the start Index position, #nil is returned.

    + +
  4. +
+

Usage:

+
-- Find the first alive @{Group} object of the SpawnPlanes SPAWN object @{Group} collection that it has spawned during the mission.
+local GroupPlane, Index = SpawnPlanes:GetFirstAliveGroup()
+while GroupPlane ~= nil do
+  -- Do actions with the GroupPlane object.
+  GroupPlane, Index = SpawnPlanes:GetNextAliveGroup( Index )
+end
+ +
+
+
+
+ + +SPAWN:GetSpawnIndexFromGroup(SpawnGroup) + +
+
+ +

Get the index from a given group.

+ + +

The function will search the name of the group for a #, and will return the number behind the #-mark.

+ +

Parameter

+
    +
  • + +

    SpawnGroup :

    + +
  • +
+
+
+
+
+ + +SPAWN:InitAIOff() + +
+
+ +

Turns the AI Off for the Group when spawning.

+ +

Return value

+ +

#SPAWN: +The SPAWN object

+ +
+
+
+
+ + +SPAWN:InitAIOn() + +
+
+ +

Turns the AI On for the Group when spawning.

+ +

Return value

+ +

#SPAWN: +The SPAWN object

+ +
+
+
+
+ + +SPAWN:InitAIOnOff(AIOnOff) + +
+
+ + + +

Parameter

+
    +
  • + +

    AIOnOff :

    + +
  • +
+
+
+
+
+ + +SPAWN:InitArray(SpawnAngle, SpawnWidth, SpawnDeltaX, SpawnDeltaY) + +
+
+ +

Makes the groups visible before start (like a batallion).

+ + +

The method will take the position of the group as the first position in the array.

+ +

Parameters

+
    +
  • + +

    #number SpawnAngle :

    +
        The angle in degrees how the groups and each unit of the group will be positioned.
    +
    + +
  • +
  • + +

    #number SpawnWidth :

    +
         The amount of Groups that will be positioned on the X axis.
    +
    + +
  • +
  • + +

    #number SpawnDeltaX :

    +
       The space between each Group on the X-axis.
    +
    + +
  • +
  • + +

    #number SpawnDeltaY :

    +
         The space between each Group on the Y-axis.
    +
    + +
  • +
+

Return value

+ +

#SPAWN: +self

+ +

Usage:

+
-- Define an array of Groups.
+Spawn_BE_Ground = SPAWN:New( 'BE Ground' ):InitLimit( 2, 24 ):InitArray( 90, "Diamond", 10, 100, 50 )
+ +
+
+
+
+ + +SPAWN:InitCleanUp(SpawnCleanUpInterval) + +
+
+ +

CleanUp groups when they are still alive, but inactive.

+ + +

When groups are still alive and have become inactive due to damage and are unable to contribute anything, then this group will be removed at defined intervals in seconds.

+ +

Parameter

+
    +
  • + +

    #string SpawnCleanUpInterval : +The interval to check for inactive groups within seconds.

    + +
  • +
+

Return value

+ +

#SPAWN: +self

+ +

Usage:

+
Spawn_Helicopter:CleanUp( 20 )  -- CleanUp the spawning of the helicopters every 20 seconds when they become inactive.
+ +
+
+
+
+ + +SPAWN:InitDelayOff() + +
+
+ +

Turns the Delay Off for the Group when spawning.

+ +

Return value

+ +

#SPAWN: +The SPAWN object

+ +
+
+
+
+ + +SPAWN:InitDelayOn() + +
+
+ +

Turns the Delay On for the Group when spawning.

+ +

Return value

+ +

#SPAWN: +The SPAWN object

+ +
+
+
+
+ + +SPAWN:InitDelayOnOff(DelayOnOff) + +
+
+ + + +

Parameter

+
    +
  • + +

    DelayOnOff :

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

+ +

Return value

+ +

#SPAWN: +self

+ +
+
+
+
+ + +SPAWN:InitLimit(SpawnMaxUnitsAlive, SpawnMaxGroups) + +
+
+ +

Limits the Maximum amount of Units that can be alive at the same time, and the maximum amount of groups that can be spawned.

+ + +

Note that this method is exceptionally important to balance the performance of the mission. Depending on the machine etc, a mission can only process a maximum amount of units. +If the time interval must be short, but there should not be more Units or Groups alive than a maximum amount of units, then this method should be used... +When a SPAWN.New is executed and the limit of the amount of units alive is reached, then no new spawn will happen of the group, until some of these units of the spawn object will be destroyed.

+ +

Parameters

+
    +
  • + +

    #number SpawnMaxUnitsAlive : +The maximum amount of units that can be alive at runtime.

    + +
  • +
  • + +

    #number SpawnMaxGroups : +The maximum amount of groups that can be spawned. When the limit is reached, then no more actual spawns will happen of the group. +This parameter is useful to define a maximum amount of airplanes, ground troops, helicopters, ships etc within a supply area. +This parameter accepts the value 0, which defines that there are no maximum group limits, but there are limits on the maximum of units that can be alive at the same time.

    + +
  • +
+

Return value

+ +

#SPAWN: +self

+ +

Usage:

+
-- NATO helicopters engaging in the battle field.
+-- This helicopter group consists of one Unit. So, this group will SPAWN maximum 2 groups simultaneously within the DCSRTE.
+-- There will be maximum 24 groups spawned during the whole mission lifetime. 
+Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitLimit( 2, 24 )
+ +
+
+
+
+ + +SPAWN:InitRandomizePosition(RandomizePosition, OuterRadius, InnerRadius) + +
+
+ +

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.

+ +

Parameters

+
    +
  • + +

    #boolean RandomizePosition : +If true, SPAWN will perform the randomization of the Groups position between a given outer and inner radius.

    + +
  • +
  • + +

    Dcs.DCSTypes#Distance OuterRadius : +(optional) The outer radius in meters where the new group will be spawned.

    + +
  • +
  • + +

    Dcs.DCSTypes#Distance InnerRadius : +(optional) The inner radius in meters where the new group will NOT be spawned.

    + +
  • +
+

Return value

+ +

#SPAWN:

+ + +
+
+
+
+ + +SPAWN:InitRandomizeRoute(SpawnStartPoint, SpawnEndPoint, SpawnRadius, SpawnHeight) + +
+
+ +

Randomizes the defined route of the SpawnTemplatePrefix group in the ME.

+ + +

This is very useful to define extra variation of the behaviour of groups.

+ +

Parameters

+
    +
  • + +

    #number SpawnStartPoint : +is the waypoint where the randomization begins. +Note that the StartPoint = 0 equaling the point where the group is spawned.

    + +
  • +
  • + +

    #number SpawnEndPoint : +is the waypoint where the randomization ends counting backwards. +This parameter is useful to avoid randomization to end at a waypoint earlier than the last waypoint on the route.

    + +
  • +
  • + +

    #number SpawnRadius : +is the radius in meters in which the randomization of the new waypoints, with the original waypoint of the original template located in the middle ...

    + +
  • +
  • + +

    #number SpawnHeight : +(optional) Specifies the additional height in meters that can be added to the base height specified at each waypoint in the ME.

    + +
  • +
+

Return value

+ +

#SPAWN:

+ + +

Usage:

+
-- NATO helicopters engaging in the battle field. 
+-- The KA-50 has waypoints Start point ( =0 or SP ), 1, 2, 3, 4, End point (= 5 or DP). 
+-- Waypoints 2 and 3 will only be randomized. The others will remain on their original position with each new spawn of the helicopter.
+-- The randomization of waypoint 2 and 3 will take place within a radius of 2000 meters.
+Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute( 2, 2, 2000 )
+ +
+
+
+
+ + +SPAWN:InitRandomizeTemplate(SpawnTemplatePrefixTable) + +
+
+ +

This method is rather complicated to understand.

+ + +

But I'll try to explain. +This method becomes useful when you need to spawn groups with random templates of groups defined within the mission editor, +but they will all follow the same Template route and have the same prefix name. +In other words, this method randomizes between a defined set of groups the template to be used for each new spawn of a group.

+ +

Parameter

+
    +
  • + +

    #string SpawnTemplatePrefixTable : +A table with the names of the groups defined within the mission editor, from which one will be choosen when a new group will be spawned.

    + +
  • +
+

Return value

+ +

#SPAWN:

+ + +

Usage:

+
-- NATO Tank Platoons invading Gori.
+-- Choose between 13 different 'US Tank Platoon' configurations for each new SPAWN the Group to be spawned for the 
+-- 'US Tank Platoon Left', 'US Tank Platoon Middle' and 'US Tank Platoon Right' SpawnTemplatePrefixes.
+-- Each new SPAWN will randomize the route, with a defined time interval of 200 seconds with 40% time variation (randomization) and 
+-- with a limit set of maximum 12 Units alive simulteneously  and 150 Groups to be spawned during the whole mission.
+Spawn_US_Platoon = { 'US Tank Platoon 1', 'US Tank Platoon 2', 'US Tank Platoon 3', 'US Tank Platoon 4', 'US Tank Platoon 5', 
+                     'US Tank Platoon 6', 'US Tank Platoon 7', 'US Tank Platoon 8', 'US Tank Platoon 9', 'US Tank Platoon 10', 
+                     'US Tank Platoon 11', 'US Tank Platoon 12', 'US Tank Platoon 13' }
+Spawn_US_Platoon_Left = SPAWN:New( 'US Tank Platoon Left' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
+Spawn_US_Platoon_Middle = SPAWN:New( 'US Tank Platoon Middle' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
+Spawn_US_Platoon_Right = SPAWN:New( 'US Tank Platoon Right' ):InitLimit( 12, 150 ):Schedule( 200, 0.4 ):InitRandomizeTemplate( Spawn_US_Platoon ):InitRandomizeRoute( 3, 3, 2000 )
+ +
+
+
+
+ + +SPAWN:InitRandomizeUnits(RandomizeUnits, OuterRadius, InnerRadius) + +
+
+ +

Randomizes the UNITs that are spawned within a radius band given an Outer and Inner radius.

+ +

Parameters

+
    +
  • + +

    #boolean RandomizeUnits : +If true, SPAWN will perform the randomization of the UNITs position within the group between a given outer and inner radius.

    + +
  • +
  • + +

    Dcs.DCSTypes#Distance OuterRadius : +(optional) The outer radius in meters where the new group will be spawned.

    + +
  • +
  • + +

    Dcs.DCSTypes#Distance InnerRadius : +(optional) The inner radius in meters where the new group will NOT be spawned.

    + +
  • +
+

Return value

+ +

#SPAWN:

+ + +

Usage:

+
-- NATO helicopters engaging in the battle field. 
+-- The KA-50 has waypoints Start point ( =0 or SP ), 1, 2, 3, 4, End point (= 5 or DP). 
+-- Waypoints 2 and 3 will only be randomized. The others will remain on their original position with each new spawn of the helicopter.
+-- The randomization of waypoint 2 and 3 will take place within a radius of 2000 meters.
+Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):InitRandomizeRoute( 2, 2, 2000 )
+ +
+
+
+
+ + +SPAWN:InitRandomizeZones(SpawnZoneTable) + +
+
+ + + + +

TODO: Add example. +- This method provides the functionality to randomize the spawning of the Groups at a given list of zones of different types. + @param #SPAWN self + @param #table SpawnZoneTable A table with Zone objects. If this table is given, then each spawn will be executed within the given list of Zones objects. + @return #SPAWN + @usage + -- NATO Tank Platoons invading Gori. + -- Choose between 3 different zones for each new SPAWN the Group to be executed, regardless of the zone type.

+ +

Parameter

+
    +
  • + +

    SpawnZoneTable :

    + +
  • +
+
+
+
+
+ + +SPAWN:InitRepeat() + +
+
+ +

For planes and helicopters, when these groups go home and land on their home airbases and farps, they normally would taxi to the parking spot, shut-down their engines and wait forever until the Group is removed by the runtime environment.

+ + +

This method is used to re-spawn automatically (so no extra call is needed anymore) the same group after it has landed. +This will enable a spawned group to be re-spawned after it lands, until it is destroyed... +Note: When the group is respawned, it will re-spawn from the original airbase where it took off. +So ensure that the routes for groups that respawn, always return to the original airbase, or players may get confused ...

+ +

Return value

+ +

#SPAWN: +self

+ +

Usage:

+
-- RU Su-34 - AI Ship Attack
+-- Re-SPAWN the Group(s) after each landing and Engine Shut-Down automatically. 
+SpawnRU_SU34 = SPAWN:New( 'TF1 RU Su-34 Krymsk@AI - Attack Ships' ):Schedule( 2, 3, 1800, 0.4 ):SpawnUncontrolled():InitRandomizeRoute( 1, 1, 3000 ):RepeatOnEngineShutDown()
+ +
+
+
+
+ + +SPAWN:InitRepeatOnEngineShutDown() + +
+
+ +

Respawn after landing when its engines have shut down.

+ +

Return value

+ +

#SPAWN: +self

+ +
+
+
+
+ + +SPAWN:InitRepeatOnLanding() + +
+
+ +

Respawn group after landing.

+ +

Return value

+ +

#SPAWN: +self

+ +
+
+
+
+ + +SPAWN:InitUnControlled(UnControlled) + +
+
+ +

(AIR) Will spawn a plane group in UnControlled or Controlled mode...

+ + +

This will be similar to the uncontrolled flag setting in the ME. +You can use UnControlled mode to simulate planes startup and ready for take-off but aren't moving (yet). +ReSpawn the plane in Controlled mode, and the plane will move...

+ +

Parameter

+
    +
  • + +

    #boolean UnControlled : +true if UnControlled, false if Controlled.

    + +
  • +
+

Return value

+ +

#SPAWN: +self

+ +
+
+
+
+ + #number + +SPAWN.MaxAliveGroups + +
+
+ + + +
+
+
+
+ + #number + +SPAWN.MaxAliveUnits + +
+
+ + + +
+
+
+
+ + +SPAWN:New(SpawnTemplatePrefix) + +
+
+ +

Creates the main object to spawn a Group defined in the DCS ME.

+ +

Parameter

+
    +
  • + +

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

+ +

#SPAWN:

+ + +

Usages:

+
    +
  • -- NATO helicopters engaging in the battle field.
    +Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' )
  • +
  • local Plane = SPAWN:New( "Plane" ) -- Creates a new local variable that can initiate new planes with the name "Plane#ddd" using the template "Plane" as defined within the ME.
  • +
+ +
+
+
+
+ + +SPAWN:NewWithAlias(SpawnTemplatePrefix, SpawnAliasPrefix) + +
+
+ +

Creates a new SPAWN instance to create new groups based on the defined template and using a new alias for each new group.

+ +

Parameters

+
    +
  • + +

    #string SpawnTemplatePrefix : +is the name of the Group in the ME that defines the Template.

    + +
  • +
  • + +

    #string SpawnAliasPrefix : +is the name that will be given to the Group at runtime.

    + +
  • +
+

Return value

+ +

#SPAWN:

+ + +

Usages:

+
    +
  • -- NATO helicopters engaging in the battle field.
    +Spawn_BE_KA50 = SPAWN:NewWithAlias( 'BE KA-50@RAMP-Ground Defense', 'Helicopter Attacking a City' )
  • +
  • local PlaneWithAlias = SPAWN:NewWithAlias( "Plane", "Bomber" ) -- Creates a new local variable that can instantiate new planes with the name "Bomber#ddd" using the template "Plane" as defined within the ME.
  • +
+ +
+
+
+
+ + +SPAWN:OnSpawnGroup(SpawnCallBackFunction, SpawnFunctionArguments, ...) + +
+
+ +

Allows to place a CallFunction hook when a new group spawns.

+ + +

The provided method will be called when a new group is spawned, including its given parameters. +The first parameter of the SpawnFunction is the Group#GROUP that was spawned.

+ +

Parameters

+
    +
  • + +

    #function SpawnCallBackFunction : +The function to be called when a group spawns.

    + +
  • +
  • + +

    SpawnFunctionArguments : +A random amount of arguments to be provided to the function when the group spawns.

    + +
  • +
  • + +

    ... :

    + +
  • +
+

Return value

+ +

#SPAWN:

+ + +

Usage:

+
-- Declare SpawnObject and call a function when a new Group is spawned.
+local SpawnObject = SPAWN
+  :New( "SpawnObject" )
+  :InitLimit( 2, 10 )
+  :OnSpawnGroup(
+    function( SpawnGroup )
+      SpawnGroup:E( "I am spawned" )
+    end 
+    )
+  :SpawnScheduled( 300, 0.3 )
+ +
+
+
+
+ + +SPAWN:ReSpawn(SpawnIndex) + +
+
+ +

Will re-spawn a group based on a given index.

+ + +

Note: Uses DATABASE module defined in MOOSE.

+ +

Parameter

+
    +
  • + +

    #string SpawnIndex : +The index of the group to be spawned.

    + +
  • +
+

Return value

+ +

Wrapper.Group#GROUP: +The group that was spawned. You can use this group for further actions.

+ +
+
+
+
+ + #boolean + +SPAWN.Repeat + +
+
+ + + + +

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

+ +
+
+
+
+ + #boolean + +SPAWN.RepeatOnEngineShutDown + +
+
+ + + +
+
+
+
+ + #boolean + +SPAWN.RepeatOnLanding + +
+
+ + + +
+
+
+
+ + +SPAWN:Spawn() + +
+
+ +

Will spawn a group based on the internal index.

+ + +

Note: Uses DATABASE module defined in MOOSE.

+ +

Return value

+ +

Wrapper.Group#GROUP: +The group that was spawned. You can use this group for further actions.

+ +
+
+
+
+ + #string + +SPAWN.SpawnAliasPrefix + +
+
+ + + +
+
+
+
+ + + +SPAWN.SpawnCleanUpInterval + +
+
+ + + +
+
+
+
+ + + +SPAWN.SpawnCleanUpTimeStamps + +
+
+ + + +
+
+
+
+ + #number + +SPAWN.SpawnCount + +
+
+ + + + +

The internal counter of the amount of spawning the has happened since SpawnStart.

+ +
+
+
+
+ + +SPAWN:SpawnFromStatic(HostStatic, SpawnIndex) + +
+
+ +

Will spawn a group from a hosting static.

+ + +

This method is mostly advisable to be used if you want to simulate spawning from buldings and structures (static buildings). +You can use the returned group to further define the route to be followed.

+ +

Parameters

+
    +
  • + +

    Wrapper.Static#STATIC HostStatic : +The static dropping or unloading the group.

    + +
  • +
  • + +

    #number SpawnIndex : +(optional) The index which group to spawn within the given zone.

    + +
  • +
+

Return values

+
    +
  1. + +

    Wrapper.Group#GROUP: +that was spawned.

    + +
  2. +
  3. + +

    #nil: +Nothing was spawned.

    + +
  4. +
+
+
+
+
+ + +SPAWN:SpawnFromUnit(HostUnit, SpawnIndex) + +
+
+ +

Will spawn a group from a hosting unit.

+ + +

This method is mostly advisable to be used if you want to simulate spawning from air units, like helicopters, which are dropping infantry into a defined Landing Zone. +Note that each point in the route assigned to the spawning group is reset to the point of the spawn. +You can use the returned group to further define the route to be followed.

+ +

Parameters

+
    +
  • + +

    Wrapper.Unit#UNIT HostUnit : +The air or ground unit dropping or unloading the group.

    + +
  • +
  • + +

    #number SpawnIndex : +(optional) The index which group to spawn within the given zone.

    + +
  • +
+

Return values

+
    +
  1. + +

    Wrapper.Group#GROUP: +that was spawned.

    + +
  2. +
  3. + +

    #nil: +Nothing was spawned.

    + +
  4. +
+
+
+
+
+ + +SPAWN:SpawnFromVec2(Vec2, SpawnIndex) + +
+
+ +

Will spawn a group from a Vec2 in 3D space.

+ + +

This method is mostly advisable to be used if you want to simulate spawning groups on the ground from air units, like vehicles. +Note that each point in the route assigned to the spawning group is reset to the point of the spawn. +You can use the returned group to further define the route to be followed.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Vec2 Vec2 : +The Vec2 coordinates where to spawn the group.

    + +
  • +
  • + +

    #number SpawnIndex : +(optional) The index which group to spawn within the given zone.

    + +
  • +
+

Return values

+
    +
  1. + +

    Wrapper.Group#GROUP: +that was spawned.

    + +
  2. +
  3. + +

    #nil: +Nothing was spawned.

    + +
  4. +
+
+
+
+
+ + +SPAWN:SpawnFromVec3(Vec3, SpawnIndex) + +
+
+ +

Will spawn a group from a Vec3 in 3D space.

+ + +

This method is mostly advisable to be used if you want to simulate spawning units in the air, like helicopters or airplanes. +Note that each point in the route assigned to the spawning group is reset to the point of the spawn. +You can use the returned group to further define the route to be followed.

+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Vec3 Vec3 : +The Vec3 coordinates where to spawn the group.

    + +
  • +
  • + +

    #number SpawnIndex : +(optional) The index which group to spawn within the given zone.

    + +
  • +
+

Return values

+
    +
  1. + +

    Wrapper.Group#GROUP: +that was spawned.

    + +
  2. +
  3. + +

    #nil: +Nothing was spawned.

    + +
  4. +
+
+
+
+
+ + + +SPAWN.SpawnFunctionArguments + +
+
+ + + +
+
+
+
+ + + +SPAWN.SpawnFunctionHook + +
+
+ + + +
+
+
+
+ + +SPAWN:SpawnGroupName(SpawnIndex) + +
+
+ +

Will return the SpawnGroupName either with with a specific count number or without any count.

+ +

Parameter

+
    +
  • + +

    #number SpawnIndex : +Is the number of the Group that is to be spawned.

    + +
  • +
+

Return value

+ +

#string: +SpawnGroupName

+ +
+
+
+
+ + + +SPAWN.SpawnGroups + +
+
+ + + + +

Array containing the descriptions of each Group to be Spawned.

+ +
+
+
+
+ + +SPAWN:SpawnInZone(Zone, RandomizeGroup, SpawnIndex) + +
+
+ +

Will spawn a Group within a given Zone.

+ + +

The Zone can be of any type derived from Zone#ZONE_BASE. +Once the Group is spawned within the zone, the Group will continue on its route. +The first waypoint (where the group is spawned) is replaced with the zone location coordinates.

+ +

Parameters

+
    +
  • + +

    Core.Zone#ZONE Zone : +The zone where the group is to be spawned.

    + +
  • +
  • + +

    #boolean RandomizeGroup : +(optional) Randomization of the Group position in the zone.

    + +
  • +
  • + +

    #number SpawnIndex : +(optional) The index which group to spawn within the given zone.

    + +
  • +
+

Return values

+
    +
  1. + +

    Wrapper.Group#GROUP: +that was spawned.

    + +
  2. +
  3. + +

    #nil: +when nothing was spawned.

    + +
  4. +
+
+
+
+
+ + #number + +SPAWN.SpawnIndex + +
+
+ + + +
+
+
+
+ + #boolean + +SPAWN.SpawnInitKeepUnitNames + +
+
+ + + + +

Overwrite unit names by default with group name.

+ +
+
+
+
+ + #boolean + +SPAWN.SpawnInitLimit + +
+
+ + + + +

By default, no InitLimit

+ +
+
+
+
+ + +SPAWN.SpawnInnerRadius + +
+
+ + + +
+
+
+
+ + #boolean + +SPAWN.SpawnIsScheduled + +
+
+ + + + +

Reflects if the spawning for this SpawnTemplatePrefix is going to be scheduled or not.

+ +
+
+
+
+ + #number + +SPAWN.SpawnMaxGroups + +
+
+ + + + +

The maximum amount of groups that can be spawned.

+ +
+
+
+
+ + #number + +SPAWN.SpawnMaxUnitsAlive + +
+
+ + + + +

The maximum amount of groups that can be alive of SpawnTemplatePrefix at the same time.

+ +
+
+
+
+ + +SPAWN.SpawnOuterRadius + +
+
+ + + +
+
+
+
+ + #boolean + +SPAWN.SpawnRandomize + +
+
+ + + + +

Sets the randomization flag of new Spawned units to false.

+ +
+
+
+
+ + +SPAWN.SpawnRandomizePosition + +
+
+ + + +
+
+
+
+ + +SPAWN.SpawnRandomizePositionInnerRadius + +
+
+ + + +
+
+
+
+ + +SPAWN.SpawnRandomizePositionOuterRadius + +
+
+ + + +
+
+
+
+ + #boolean + +SPAWN.SpawnRandomizeRoute + +
+
+ + + +
+
+
+
+ + + +SPAWN.SpawnRandomizeRouteEndPoint + +
+
+ + + +
+
+
+
+ + + +SPAWN.SpawnRandomizeRouteHeight + +
+
+ + + +
+
+
+
+ + + +SPAWN.SpawnRandomizeRouteRadius + +
+
+ + + +
+
+
+
+ + + +SPAWN.SpawnRandomizeRouteStartPoint + +
+
+ + + +
+
+
+
+ + #boolean + +SPAWN.SpawnRandomizeTemplate + +
+
+ + + +
+
+
+
+ + +SPAWN.SpawnRandomizeUnits + +
+
+ + + +
+
+
+
+ + +SPAWN:SpawnScheduleStart() + +
+
+ +

Will re-start the spawning scheduler.

+ + +

Note: This method is only required to be called when the schedule was stopped.

+ +

Return value

+ +

#SPAWN:

+ + +
+
+
+
+ + +SPAWN:SpawnScheduleStop() + +
+
+ +

Will stop the scheduled spawning scheduler.

+ +

Return value

+ +

#SPAWN:

+ + +
+
+
+
+ + +SPAWN:SpawnScheduled(SpawnTime, SpawnTimeVariation) + +
+
+ +

Spawns new groups at varying time intervals.

+ + +

This is useful if you want to have continuity within your missions of certain (AI) groups to be present (alive) within your missions.

+ +

Parameters

+
    +
  • + +

    #number SpawnTime : +The time interval defined in seconds between each new spawn of new groups.

    + +
  • +
  • + +

    #number SpawnTimeVariation : +The variation to be applied on the defined time interval between each new spawn. +The variation is a number between 0 and 1, representing the %-tage of variation to be applied on the time interval.

    + +
  • +
+

Return value

+ +

#SPAWN: +self

+ +

Usage:

+
-- NATO helicopters engaging in the battle field.
+-- The time interval is set to SPAWN new helicopters between each 600 seconds, with a time variation of 50%.
+-- The time variation in this case will be between 450 seconds and 750 seconds. 
+-- This is calculated as follows: 
+--      Low limit:   600 * ( 1 - 0.5 / 2 ) = 450 
+--      High limit:  600 * ( 1 + 0.5 / 2 ) = 750
+-- Between these two values, a random amount of seconds will be choosen for each new spawn of the helicopters.
+Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
+ +
+
+
+
+ + + +SPAWN.SpawnScheduler + +
+
+ + + +
+
+
+
+ + + +SPAWN.SpawnTemplate + +
+
+ + + + +

Contains the template structure for a Group Spawn from the Mission Editor. Note that this group must have lateActivation always on!!!

+ +
+
+
+
+ + #string + +SPAWN.SpawnTemplatePrefix + +
+
+ + + +
+
+
+
+ + + +SPAWN.SpawnTemplatePrefixTable + +
+
+ + + +
+
+
+
+ + #boolean + +SPAWN.SpawnUnControlled + +
+
+ + + +
+
+
+
+ + #boolean + +SPAWN.SpawnVisible + +
+
+ + + + +

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

+ +
+
+
+
+ + +SPAWN:SpawnWithIndex(SpawnIndex) + +
+
+ +

Will spawn a group with a specified index number.

+ + +

Uses DATABASE global object defined in MOOSE.

+ +

Parameter

+
    +
  • + +

    #string SpawnIndex : +The index of the group to be spawned.

    + +
  • +
+

Return value

+ +

Wrapper.Group#GROUP: +The group that was spawned. You can use this group for further actions.

+ +
+
+
+
+ + #SPAWN.SpawnZoneTable + +SPAWN.SpawnZoneTable + +
+
+ + + +
+
+
+
+ + #boolean + +SPAWN.UnControlled + +
+
+ + + + +

When working in UnControlled mode, all planes are Spawned in UnControlled mode before the scheduler starts.

+ +
+
+
+
+ + +SPAWN:_GetGroupCategoryID(SpawnPrefix) + +
+
+ +

Gets the CategoryID of the Group with the given SpawnPrefix

+ +

Parameter

+
    +
  • + +

    SpawnPrefix :

    + +
  • +
+
+
+
+
+ + +SPAWN:_GetGroupCoalitionID(SpawnPrefix) + +
+
+ +

Gets the CoalitionID of the Group with the given SpawnPrefix

+ +

Parameter

+
    +
  • + +

    SpawnPrefix :

    + +
  • +
+
+
+
+
+ + +SPAWN:_GetGroupCountryID(SpawnPrefix) + +
+
+ +

Gets the CountryID of the Group with the given SpawnPrefix

+ +

Parameter

+
    +
  • + +

    SpawnPrefix :

    + +
  • +
+
+
+
+
+ + +SPAWN:_GetLastIndex() + +
+
+ +

Return the last maximum index that can be used.

+ +
+
+
+
+ + +SPAWN:_GetPrefixFromGroup(DCSUnit, SpawnGroup) + +
+
+ +

Return the prefix of a SpawnUnit.

+ + +

The method will search for a #-mark, and will return the text before the #-mark. +It will return nil of no prefix was found.

+ +

Parameters

+ +

Return values

+
    +
  1. + +

    #string: +The prefix

    + +
  2. +
  3. + +

    #nil: +Nothing found

    + +
  4. +
+
+
+
+
+ + +SPAWN:_GetSpawnIndex(SpawnIndex) + +
+
+ +

Get the next index of the groups to be spawned.

+ + +

This method is complicated, as it is used at several spaces.

+ +

Parameter

+
    +
  • + +

    SpawnIndex :

    + +
  • +
+
+
+
+
+ + +SPAWN:_GetTemplate(SpawnTemplatePrefix) + +
+
+ +

Gets the Group Template from the ME environment definition.

+ + +

This method used the DATABASE object, which contains ALL initial and new spawned object in MOOSE.

+ +

Parameter

+
    +
  • + +

    #string SpawnTemplatePrefix :

    + +
  • +
+

Return value

+ + +

@SPAWN self

+ +
+
+
+
+ + +SPAWN:_InitializeSpawnGroups(SpawnIndex) + +
+
+ +

Initalize the SpawnGroups collection.

+ +

Parameter

+
    +
  • + +

    SpawnIndex :

    + +
  • +
+
+
+
+
+ + +SPAWN:_OnBirth(EventData) + +
+
+ + + +

Parameter

+ +
+
+
+
+ + +SPAWN:_OnDeadOrCrash(EventData) + +
+
+ + + +

Parameter

+ +
+
+
+
+ + +SPAWN:_OnEngineShutDown(EventData) + +
+
+ +

Will detect AIR Units shutting down their engines ...

+ + +

When the event takes place, and the method RepeatOnEngineShutDown was called, the spawned Group will Re-SPAWN. +But only when the Unit was registered to have landed.

+ +

Parameter

+ +
+
+
+
+ + +SPAWN:_OnLand(EventData) + +
+
+ +

Will detect AIR Units landing...

+ + +

When the event takes place, the spawned Group is registered as landed. +This is needed to ensure that Re-SPAWNing is only done for landed AIR Groups.

+ +

Parameter

+ +
+
+
+
+ + +SPAWN:_OnTakeOff(EventData) + +
+
+ +

Will detect AIR Units taking off...

+ + +

When the event takes place, the spawned Group is registered as airborne... +This is needed to ensure that Re-SPAWNing only is done for landed AIR Groups.

+ +

Parameter

+ +
+
+
+
+ + +SPAWN:_Prepare(SpawnTemplatePrefix, SpawnIndex) + +
+
+ +

Prepares the new Group Template.

+ +

Parameters

+
    +
  • + +

    #string SpawnTemplatePrefix :

    + +
  • +
  • + +

    #number SpawnIndex :

    + +
  • +
+

Return value

+ +

#SPAWN: +self

+ +
+
+
+
+ + +SPAWN:_RandomizeRoute(SpawnIndex) + +
+
+ +

Private method randomizing the routes.

+ +

Parameter

+
    +
  • + +

    #number SpawnIndex : +The index of the group to be spawned.

    + +
  • +
+

Return value

+ +

#SPAWN:

+ + +
+
+
+
+ + +SPAWN:_RandomizeTemplate(SpawnIndex) + +
+
+ +

Private method that randomizes the template of the group.

+ +

Parameter

+
    +
  • + +

    #number SpawnIndex :

    + +
  • +
+

Return value

+ +

#SPAWN: +self

+ +
+
+
+
+ + +SPAWN:_RandomizeZones(SpawnIndex) + +
+
+ +

Private method that randomizes the Zones where the Group will be spawned.

+ +

Parameter

+
    +
  • + +

    #number SpawnIndex :

    + +
  • +
+

Return value

+ +

#SPAWN: +self

+ +
+
+
+
+ + +SPAWN:_Scheduler() + +
+
+ +

This function is called automatically by the Spawning scheduler.

+ + +

It is the internal worker method SPAWNing new Groups on the defined time intervals.

+ +
+
+
+
+ + +SPAWN:_SpawnCleanUpScheduler() + +
+
+ +

Schedules the CleanUp of Groups

+ +

Return value

+ +

#boolean: +True = Continue Scheduler

+ +
+
+
+
+ + +SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle) + +
+
+ + + +

Parameters

+
    +
  • + +

    SpawnIndex :

    + +
  • +
  • + +

    SpawnRootX :

    + +
  • +
  • + +

    SpawnRootY :

    + +
  • +
  • + +

    SpawnX :

    + +
  • +
  • + +

    SpawnY :

    + +
  • +
  • + +

    SpawnAngle :

    + +
  • +
+
+
+ +

Type SPAWN.SpawnZoneTable

+ +
+ +
+ + diff --git a/docs/Documentation/SpawnStatic.html b/docs/Documentation/SpawnStatic.html new file mode 100644 index 000000000..99a7e20af --- /dev/null +++ b/docs/Documentation/SpawnStatic.html @@ -0,0 +1,491 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module SpawnStatic

+ +

Core -- Spawn dynamically new STATICs in your missions.

+ + +

+Banner Image

+ +
+ +

SPAWNSTATIC spawns static structures in your missions dynamically. See below the SPAWNSTATIC class documentation.

+ +
+ +

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.

+ + +

Through creating a copy of an existing static object template as defined in the Mission Editor (ME), +SPAWNSTATIC can retireve the properties of the defined static object template (like type, category etc), and "copy" +these properties to create a new static object and place it at the desired coordinate.

+ +

New spawned Statics get the same name as the name of the template Static, +or gets the given name when a new name is provided at the Spawn method.
+By default, spawned Statics will follow a naming convention 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():

+ +
    +
  • SPAWNSTATIC.NewFromStatic(): Creates a new SPAWNSTATIC object given a name that is used as the base of the naming of each spawned Static.
  • +
+ +

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 new file mode 100644 index 000000000..82fa993f2 --- /dev/null +++ b/docs/Documentation/Static.html @@ -0,0 +1,318 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Static

+ +

This module contains the STATIC class.

+ + + +

1) Static#STATIC class, extends Positionable#POSITIONABLE

+

Statics are Static Units defined within the Mission Editor. +Note that Statics are almost the same as Units, but they don't have a controller. +The Static#STATIC class is a wrapper class to handle the DCS Static objects:

+ +
    +
  • Wraps the DCS Static objects.
  • +
  • Support all DCS Static APIs.
  • +
  • Enhance with Static specific APIs not in the DCS API set.
  • +
+ +

1.1) STATIC reference methods

+

For each DCS Static will have a STATIC wrapper object (instance) within the _DATABASE object. +This is done at the beginning of the mission (when the mission starts).

+ +

The STATIC class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference +using the Static Name.

+ +

Another thing to know is that STATIC objects do not "contain" the DCS Static object. +The STATIc methods will reference the DCS Static object by name when it is needed during API execution. +If the DCS Static object does not exist or is nil, the STATIC methods will return nil and log an exception in the DCS.log file.

+ +

The STATIc class provides the following functions to retrieve quickly the relevant STATIC instance:

+ +
    +
  • STATIC.FindByName(): Find a STATIC instance from the _DATABASE object using a DCS Static name.
  • +
+ +

IMPORTANT: ONE SHOULD NEVER SANATIZE these STATIC OBJECT REFERENCES! (make the STATIC object references nil).

+ + +

Global(s)

+ + + + + +
STATIC + +
+

Type STATIC

+ + + + + + + + + + + + + + + + + + + + + + + + + +
STATIC.ClassName + +
STATIC:FindByName(StaticName, RaiseError) +

Finds a STATIC from the _DATABASE using the relevant Static Name.

+
STATIC:GetDCSObject() + +
STATIC:GetThreatLevel() + +
STATIC:Register(StaticName) + +
STATIC.StaticName + +
+ +

Global(s)

+
+
+ + #STATIC + +STATIC + +
+
+ + + +
+
+

Type Static

+ +

Type STATIC

+ +

The STATIC class

+ +

Field(s)

+
+
+ + #string + +STATIC.ClassName + +
+
+ + + +
+
+
+
+ + +STATIC:FindByName(StaticName, RaiseError) + +
+
+ +

Finds a STATIC from the _DATABASE using the relevant Static Name.

+ + +

As an optional parameter, a briefing text can be given also.

+ +

Parameters

+
    +
  • + +

    #string StaticName : +Name of the DCS Static as defined within the Mission Editor.

    + +
  • +
  • + +

    #boolean RaiseError : +Raise an error if not found.

    + +
  • +
+

Return value

+ +

#STATIC:

+ + +
+
+
+
+ + +STATIC:GetDCSObject() + +
+
+ + + +
+
+
+
+ + +STATIC:GetThreatLevel() + +
+
+ + + +
+
+
+
+ + +STATIC:Register(StaticName) + +
+
+ + + +

Parameter

+
    +
  • + +

    StaticName :

    + +
  • +
+
+
+
+
+ + + +STATIC.StaticName + +
+
+ + + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/StaticObject.html b/docs/Documentation/StaticObject.html new file mode 100644 index 000000000..1a46c6616 --- /dev/null +++ b/docs/Documentation/StaticObject.html @@ -0,0 +1,272 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module StaticObject

+ + + +

Global(s)

+ + + + + +
StaticObject + +
+

Type StaticObject

+ + + + + + + + + + + + + + + + + + + + + +
StaticObject.Desc +

Descriptor of StaticObject and Unit are equal. StaticObject is just a passive variant of Unit.

+
StaticObject.ID +

Identifier of a StaticObject. It assigned to an StaticObject by the Mission Editor automatically.

+
StaticObject.getByName(name) +

Returns static object by its name.

+
StaticObject:getDesc() +

Returns descriptor of the StaticObject.

+
StaticObject:getID() +

returns identifier of the static object.

+
+ +

Global(s)

+
+
+ + #StaticObject + +StaticObject + +
+
+ + + +
+
+

Type DCSStaticObject

+ +

Type StaticObject

+ +

Represents static object added in the Mission Editor.

+ +

Field(s)

+
+
+ + #StaticObject.Desc + +StaticObject.Desc + +
+
+ +

Descriptor of StaticObject and Unit are equal. StaticObject is just a passive variant of Unit.

+ +
+
+
+
+ + #StaticObject.ID + +StaticObject.ID + +
+
+ +

Identifier of a StaticObject. It assigned to an StaticObject by the Mission Editor automatically.

+ +
+
+
+
+ + +StaticObject.getByName(name) + +
+
+ +

Returns static object by its name.

+ + +

If no static object found nil will be returned.

+ +

Parameter

+
    +
  • + +

    #string name : +Name of static object to find.

    + +
  • +
+

Return value

+ +

#StaticObject:

+ + +
+
+
+
+ + +StaticObject:getDesc() + +
+
+ +

Returns descriptor of the StaticObject.

+ +

Return value

+ +

#StaticObject.Desc:

+ + +
+
+
+
+ + +StaticObject:getID() + +
+
+ +

returns identifier of the static object.

+ +

Return value

+ +

#StaticObject.ID:

+ + +
+
+ +

Type StaticObject.Desc

+ +

StaticObject descriptor.

+ + +

Airdromes are unique and their types are unique, but helipads and ships are not always unique and may have the same type.

+ + +

Type StaticObject.ID

+ +
+ +
+ + diff --git a/docs/Documentation/Task.html b/docs/Documentation/Task.html new file mode 100644 index 000000000..edde8df5d --- /dev/null +++ b/docs/Documentation/Task.html @@ -0,0 +1,2847 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Task

+ +

Tasking -- This module contains the TASK class.

+ + + +
+ + +
+ +

Authors: FlightControl - Design and Programming

+ + +

Global(s)

+ + + + + +
TASK +

TASK class, extends Base#BASE

+ +

The TASK class implements the methods for task orchestration within MOOSE.

+
+

Type TASK

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TASK:Abort() +

FSM Abort synchronous event function for TASK.

+
TASK:AbortUnit(PlayerUnit) +

Abort a PlayerUnit from a Task.

+
TASK:AssignToGroup(TaskGroup) +

Assign the Task to a Group.

+
TASK:AssignToUnit(TaskUnit) +

Assign the Task to an alive Unit.

+
TASK:Cancel() +

FSM Cancel synchronous event function for TASK.

+
TASK.CommandCenter + +
TASK:CrashUnit(PlayerUnit) +

A PlayerUnit crashed in a Task.

+
TASK.Dispatcher + +
TASK:Fail() +

FSM Fail synchronous event function for TASK.

+
TASK:FailProcesses(TaskUnitName) + +
TASK.FsmTemplate + +
TASK:GetGroups() +

Gets the SET_GROUP assigned to the TASK.

+
TASK:GetID() +

Gets the ID of the Task

+
TASK:GetMission() +

Gets the Mission to where the TASK belongs.

+
TASK:GetName() +

Gets the Name of the Task

+
TASK:GetProcessTemplate(ProcessName) +

Get the default or currently assigned Process template with key ProcessName.

+
TASK:GetScoring() +

Gets the Scoring of the task

+
TASK:GetStateMachine(TaskUnit) +

Gets the FiniteStateMachine of Task with key TaskUnit

+
TASK:GetStateString() +

Gets the Task status.

+
TASK:GetTaskIndex() +

Gets the Task Index, which is a combination of the Task type, the Task name.

+
TASK:GetTaskName() +

Returns the Task name.

+
TASK:GetType() +

Gets the Type of the Task

+
TASK:GetUnitProcess(TaskUnit) +

Get the Task FSM Process Template

+
TASK:HasAliveUnits() +

Returns if the Task has still alive and assigned Units.

+
TASK:HasGroup(FindGroup) + +
TASK:HasStateMachine(TaskUnit) +

Checks if there is a FiniteStateMachine assigned to TaskUnit for Task

+
TASK:IsAssignedToGroup(TaskGroup) +

Returns if the Task is assigned to the Group.

+
TASK:IsStateAborted() +

Is the Task status Aborted.

+
TASK:IsStateAssigned() +

Is the Task status Assigned.

+
TASK:IsStateCancelled() +

Is the Task status Cancelled.

+
TASK:IsStateFailed() +

Is the Task status Failed.

+
TASK:IsStateHold() +

Is the Task status Hold.

+
TASK:IsStatePlanned() +

Is the Task status Planned.

+
TASK:IsStateReplanned() +

Is the Task status Replanned.

+
TASK:IsStateSuccess() +

Is the Task status Success.

+
TASK:JoinUnit(PlayerUnit, PlayerGroup) +

Add a PlayerUnit to join the Task.

+
TASK.MenuAssignToGroup(MenuParam) + +
TASK:MenuTaskAbort(TaskGroup) +

Report the task status.

+
TASK:MenuTaskStatus(TaskGroup) +

Report the task status.

+
TASK:MessageToGroups(Message) +

Send a message of the Task to the assigned Groups.

+
TASK.Mission + +
TASK:New(Mission, SetGroupAssign, TaskName, TaskType) +

Instantiates a new TASK.

+
TASK:OnAfterPlayerAborted(PlayerUnit, PlayerName) +

FSM PlayerAborted event handler prototype for TASK.

+
TASK:OnAfterPlayerCrashed(PlayerUnit, PlayerName) +

FSM PlayerCrashed event handler prototype for TASK.

+
TASK:OnAfterPlayerDead(PlayerUnit, PlayerName) +

FSM PlayerDead event handler prototype for TASK.

+
TASK:RemoveAssignedMenuForGroup(TaskGroup, MenuTime) +

Remove the assigned menu option of the Task for a Group.

+
TASK:RemoveMenu(MenuTime) +

Remove the menu options of the Task to all the groups in the SetGroup.

+
TASK:RemovePlannedMenuForGroup(TaskGroup, MenuTime) +

Remove the menu option of the Task for a Group.

+
TASK:RemoveStateMachine(TaskUnit) +

Remove FiniteStateMachines from Task with key TaskUnit

+
TASK:Replan() +

FSM Replan synchronous event function for TASK.

+
TASK:ReportDetails() +

Create a detailed report of the Task.

+
TASK:ReportSummary() +

Create a summary report of the Task.

+
TASK:SendBriefingToAssignedGroups() +

Send the briefng message of the Task to the assigned Groups.

+
TASK:SetAssignedMenuForGroup(TaskGroup, MenuTime) +

Set the assigned menu options of the Task.

+
TASK:SetBriefing(TaskBriefing) +

Sets a Task briefing.

+
TASK:SetDispatcher(Dispatcher) +

Set dispatcher of a task

+
TASK.SetGroup +

The Set of Groups assigned to the Task

+
TASK:SetID(TaskID) +

Sets the ID of the Task

+
TASK:SetMenu(MenuTime) +

Set the menu options of the Task to all the groups in the SetGroup.

+
TASK:SetMenuForGroup(MenuTime, TaskGroup) +

Set the Menu for a Group

+
TASK:SetName(TaskName) +

Sets the Name of the Task

+
TASK:SetPlannedMenuForGroup(TaskGroup, MenuText, MenuTime) +

Set the planned menu option of the Task.

+
TASK:SetStateMachine(TaskUnit, Fsm) +

Add a FiniteStateMachine to Task with key TaskUnit

+
TASK:SetTimeOut(Timer) +

Sets the TimeOut for the Task.

+
TASK:SetType(TaskType) +

Sets the Type of the Task

+
TASK:SetUnitProcess(Core, FsmTemplate) +

Sets the Task FSM Process Template

+
TASK:StateAborted() +

Sets a Task to status Aborted.

+
TASK:StateAssigned() +

Sets a Task to status Assigned.

+
TASK:StateCancelled() +

Sets a Task to status Cancelled.

+
TASK:StateFailed() +

Sets a Task to status Failed.

+
TASK:StateHold() +

Sets a Task to status Hold.

+
TASK:StatePlanned() +

Sets a Task to status Planned.

+
TASK:StateReplanned() +

Sets a Task to status Replanned.

+
TASK:StateSuccess() +

Sets a Task to status Success.

+
TASK:Success() +

FSM Success synchronous event function for TASK.

+
TASK.TaskBriefing + +
TASK.TaskID + +
TASK.TaskName + +
TASK.TaskScheduler + +
TASK.TaskType + +
TASK.TimeOut + +
TASK:UnAssignFromGroup(TaskGroup) +

UnAssign the Task from a Group.

+
TASK:UnAssignFromGroups() +

UnAssign the Task from the Groups.

+
TASK:UnAssignFromUnit(TaskUnit) +

UnAssign the Task from an alive Unit.

+
TASK:__Abort() +

FSM Abort asynchronous event function for TASK.

+
TASK:__Cancel() +

FSM Cancel asynchronous event function for TASK.

+
TASK:__Fail() +

FSM Fail asynchronous event function for TASK.

+
TASK:__Replan() +

FSM Replan asynchronous event function for TASK.

+
TASK:__Success() +

FSM Success asynchronous event function for TASK.

+
TASK:onafterReplan(From, Event, To) +

FSM function for a TASK

+
TASK:onbeforeTimeOut(Event, From, To) +

FSM function for a TASK

+
TASK:onenterAborted(From, Event, To) +

FSM function for a TASK

+
TASK:onenterAssigned(Event, From, To, PlayerUnit, PlayerName) +

FSM function for a TASK

+
TASK:onenterFailed(From, Event, To) +

FSM function for a TASK

+
TASK:onenterPlanned(Event, From, To) +

FSM function for a TASK

+
TASK:onenterSuccess(Event, From, To) +

FSM function for a TASK

+
TASK:onstatechange(Event, From, To) +

FSM function for a TASK

+
+ +

Global(s)

+
+
+ + #TASK + +TASK + +
+
+ +

TASK class, extends Base#BASE

+ +

The TASK class implements the methods for task orchestration within MOOSE.

+ + + +

The class provides a couple of methods to:

+ + + +

1.2) Set and enquire task status (beyond the task state machine processing).

+ +

A task needs to implement as a minimum the following task states:

+ +
    +
  • Success: Expresses the successful execution and finalization of the task.
  • +
  • Failed: Expresses the failure of a task.
  • +
  • Planned: Expresses that the task is created, but not yet in execution and is not assigned yet.
  • +
  • Assigned: Expresses that the task is assigned to a Group of players, and that the task is in execution mode.
  • +
+ +

A task may also implement the following task states:

+ +
    +
  • Rejected: Expresses that the task is rejected by a player, who was requested to accept the task.
  • +
  • Cancelled: Expresses that the task is cancelled by HQ or through a logical situation where a cancellation of the task is required.
  • +
+ +

A task can implement more statusses than the ones outlined above. Please consult the documentation of the specific tasks to understand the different status modelled.

+ +

The status of tasks can be set by the methods State followed by the task status. An example is StateAssigned(). +The status of tasks can be enquired by the methods IsState followed by the task status name. An example is if IsStateAssigned() then.

+ +

1.3) Add scoring when reaching a certain task status:

+ +

Upon reaching a certain task status in a task, additional scoring can be given. If the Mission has a scoring system attached, the scores will be added to the mission scoring. +Use the method TASK.AddScore() to add scores when a status is reached.

+ +

1.4) Task briefing:

+ +

A task briefing can be given that is shown to the player when he is assigned to the task.

+ + +
+
+

Type Task

+ +

Type TASK

+

Field(s)

+
+
+ + +TASK:Abort() + +
+
+ +

FSM Abort synchronous event function for TASK.

+ + +

Use this event to Abort the Task.

+ +
+
+
+
+ + +TASK:AbortUnit(PlayerUnit) + +
+
+ +

Abort a PlayerUnit from a Task.

+ + +

If the Unit was not part of the Task, false is returned. +If the Unit is part of the Task, true is returned.

+ +

Parameter

+
    +
  • + +

    Wrapper.Unit#UNIT PlayerUnit : +The CLIENT or UNIT of the Player aborting the Task.

    + +
  • +
+

Return value

+ +

#boolean: +true if Unit is part of the Task.

+ +
+
+
+
+ + +TASK:AssignToGroup(TaskGroup) + +
+
+ +

Assign the Task to a Group.

+ +

Parameter

+ +

Return value

+ +

#TASK:

+ + +
+
+
+
+ + +TASK:AssignToUnit(TaskUnit) + +
+
+ +

Assign the Task to an alive Unit.

+ +

Parameter

+ +

Return value

+ +

#TASK: +self

+ +
+
+
+
+ + +TASK:Cancel() + +
+
+ +

FSM Cancel synchronous event function for TASK.

+ + +

Use this event to Cancel the Task.

+ +
+
+
+
+ + Tasking.CommandCenter#COMMANDCENTER + +TASK.CommandCenter + +
+
+ + + +
+
+
+
+ + +TASK:CrashUnit(PlayerUnit) + +
+
+ +

A PlayerUnit crashed in a Task.

+ + +

Abort the Player. +If the Unit was not part of the Task, false is returned. +If the Unit is part of the Task, true is returned.

+ +

Parameter

+
    +
  • + +

    Wrapper.Unit#UNIT PlayerUnit : +The CLIENT or UNIT of the Player aborting the Task.

    + +
  • +
+

Return value

+ +

#boolean: +true if Unit is part of the Task.

+ +
+
+
+
+ + + +TASK.Dispatcher + +
+
+ + + +
+
+
+
+ + +TASK:Fail() + +
+
+ +

FSM Fail synchronous event function for TASK.

+ + +

Use this event to Fail the Task.

+ +
+
+
+
+ + +TASK:FailProcesses(TaskUnitName) + +
+
+ + + + +

TODO: Obscolete? +- Fail processes from Task with key Unit + @param #TASK self + @param #string TaskUnitName + @return #TASK self

+ +

Parameter

+
    +
  • + +

    TaskUnitName :

    + +
  • +
+
+
+
+
+ + Core.Fsm#FSM_PROCESS + +TASK.FsmTemplate + +
+
+ + + +
+
+
+
+ + +TASK:GetGroups() + +
+
+ +

Gets the SET_GROUP assigned to the TASK.

+ +

Return value

+ +

Core.Set#SET_GROUP:

+ + +
+
+
+
+ + +TASK:GetID() + +
+
+ +

Gets the ID of the Task

+ +

Return value

+ +

#string: +TaskID

+ +
+
+
+
+ + +TASK:GetMission() + +
+
+ +

Gets the Mission to where the TASK belongs.

+ +

Return value

+ +

Tasking.Mission#MISSION:

+ + +
+
+
+
+ + +TASK:GetName() + +
+
+ +

Gets the Name of the Task

+ +

Return value

+ +

#string: +The Task Name

+ +
+
+
+
+ + +TASK:GetProcessTemplate(ProcessName) + +
+
+ +

Get the default or currently assigned Process template with key ProcessName.

+ +

Parameter

+
    +
  • + +

    #string ProcessName :

    + +
  • +
+

Return value

+ +

Core.Fsm#FSM_PROCESS:

+ + +
+
+
+
+ + +TASK:GetScoring() + +
+
+ +

Gets the Scoring of the task

+ +

Return value

+ +

Functional.Scoring#SCORING: +Scoring

+ +
+
+
+
+ + +TASK:GetStateMachine(TaskUnit) + +
+
+ +

Gets the FiniteStateMachine of Task with key TaskUnit

+ +

Parameter

+ +

Return value

+ +

Core.Fsm#FSM_PROCESS:

+ + +
+
+
+
+ + +TASK:GetStateString() + +
+
+ +

Gets the Task status.

+ +
+
+
+
+ + +TASK:GetTaskIndex() + +
+
+ +

Gets the Task Index, which is a combination of the Task type, the Task name.

+ +

Return value

+ +

#string: +The Task ID

+ +
+
+
+
+ + +TASK:GetTaskName() + +
+
+ +

Returns the Task name.

+ +

Return value

+ +

#string: +TaskName

+ +
+
+
+
+ + +TASK:GetType() + +
+
+ +

Gets the Type of the Task

+ +

Return value

+ +

#string: +TaskType

+ +
+
+
+
+ + +TASK:GetUnitProcess(TaskUnit) + +
+
+ +

Get the Task FSM Process Template

+ +

Parameter

+
    +
  • + +

    TaskUnit :

    + +
  • +
+

Return value

+ +

Core.Fsm#FSM_PROCESS:

+ + +
+
+
+
+ + +TASK:HasAliveUnits() + +
+
+ +

Returns if the Task has still alive and assigned Units.

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +TASK:HasGroup(FindGroup) + +
+
+ + + +

Parameter

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +TASK:HasStateMachine(TaskUnit) + +
+
+ +

Checks if there is a FiniteStateMachine assigned to TaskUnit for Task

+ +

Parameter

+ +

Return value

+ +

#TASK: +self

+ +
+
+
+
+ + +TASK:IsAssignedToGroup(TaskGroup) + +
+
+ +

Returns if the Task is assigned to the Group.

+ +

Parameter

+ +

Return value

+ +

#boolean:

+ + +
+
+
+
+ + +TASK:IsStateAborted() + +
+
+ +

Is the Task status Aborted.

+ +
+
+
+
+ + +TASK:IsStateAssigned() + +
+
+ +

Is the Task status Assigned.

+ +
+
+
+
+ + +TASK:IsStateCancelled() + +
+
+ +

Is the Task status Cancelled.

+ +
+
+
+
+ + +TASK:IsStateFailed() + +
+
+ +

Is the Task status Failed.

+ +
+
+
+
+ + +TASK:IsStateHold() + +
+
+ +

Is the Task status Hold.

+ +
+
+
+
+ + +TASK:IsStatePlanned() + +
+
+ +

Is the Task status Planned.

+ +
+
+
+
+ + +TASK:IsStateReplanned() + +
+
+ +

Is the Task status Replanned.

+ +
+
+
+
+ + +TASK:IsStateSuccess() + +
+
+ +

Is the Task status Success.

+ +
+
+
+
+ + +TASK:JoinUnit(PlayerUnit, PlayerGroup) + +
+
+ +

Add a PlayerUnit to join the Task.

+ + +

For each Group within the Task, the Unit is check if it can join the Task. +If the Unit was not part of the Task, false is returned. +If the Unit is part of the Task, true is returned.

+ +

Parameters

+
    +
  • + +

    Wrapper.Unit#UNIT PlayerUnit : +The CLIENT or UNIT of the Player joining the Mission.

    + +
  • +
  • + +

    Wrapper.Group#GROUP PlayerGroup : +The GROUP of the player joining the Mission.

    + +
  • +
+

Return value

+ +

#boolean: +true if Unit is part of the Task.

+ +
+
+
+
+ + +TASK.MenuAssignToGroup(MenuParam) + +
+
+ + + +

Parameter

+
    +
  • + +

    MenuParam :

    + +
  • +
+
+
+
+
+ + +TASK:MenuTaskAbort(TaskGroup) + +
+
+ +

Report the task status.

+ +

Parameter

+
    +
  • + +

    TaskGroup :

    + +
  • +
+
+
+
+
+ + +TASK:MenuTaskStatus(TaskGroup) + +
+
+ +

Report the task status.

+ +

Parameter

+
    +
  • + +

    TaskGroup :

    + +
  • +
+
+
+
+
+ + +TASK:MessageToGroups(Message) + +
+
+ +

Send a message of the Task to the assigned Groups.

+ +

Parameter

+
    +
  • + +

    Message :

    + +
  • +
+
+
+
+
+ + Tasking.Mission#MISSION + +TASK.Mission + +
+
+ + + +
+
+
+
+ + +TASK:New(Mission, SetGroupAssign, TaskName, TaskType) + +
+
+ +

Instantiates a new TASK.

+ + +

Should never be used. Interface Class.

+ +

Parameters

+
    +
  • + +

    Tasking.Mission#MISSION Mission : +The mission wherein the Task is registered.

    + +
  • +
  • + +

    Core.Set#SET_GROUP SetGroupAssign : +The set of groups for which the Task can be assigned.

    + +
  • +
  • + +

    #string TaskName : +The name of the Task

    + +
  • +
  • + +

    #string TaskType : +The type of the Task

    + +
  • +
+

Return value

+ +

#TASK: +self

+ +
+
+
+
+ + +TASK:OnAfterPlayerAborted(PlayerUnit, PlayerName) + +
+
+ +

FSM PlayerAborted event handler prototype for TASK.

+ +

Parameters

+
    +
  • + +

    Wrapper.Unit#UNIT PlayerUnit : +The Unit of the Player when he went back to spectators or left the mission.

    + +
  • +
  • + +

    #string PlayerName : +The name of the Player.

    + +
  • +
+
+
+
+
+ + +TASK:OnAfterPlayerCrashed(PlayerUnit, PlayerName) + +
+
+ +

FSM PlayerCrashed event handler prototype for TASK.

+ +

Parameters

+
    +
  • + +

    Wrapper.Unit#UNIT PlayerUnit : +The Unit of the Player when he crashed in the mission.

    + +
  • +
  • + +

    #string PlayerName : +The name of the Player.

    + +
  • +
+
+
+
+
+ + +TASK:OnAfterPlayerDead(PlayerUnit, PlayerName) + +
+
+ +

FSM PlayerDead event handler prototype for TASK.

+ +

Parameters

+
    +
  • + +

    Wrapper.Unit#UNIT PlayerUnit : +The Unit of the Player when he died in the mission.

    + +
  • +
  • + +

    #string PlayerName : +The name of the Player.

    + +
  • +
+
+
+
+
+ + +TASK:RemoveAssignedMenuForGroup(TaskGroup, MenuTime) + +
+
+ +

Remove the assigned menu option of the Task for a Group.

+ +

Parameters

+ +

Return value

+ +

#TASK: +self

+ +
+
+
+
+ + +TASK:RemoveMenu(MenuTime) + +
+
+ +

Remove the menu options of the Task to all the groups in the SetGroup.

+ +

Parameter

+
    +
  • + +

    #number MenuTime :

    + +
  • +
+

Return value

+ +

#TASK:

+ + +
+
+
+
+ + +TASK:RemovePlannedMenuForGroup(TaskGroup, MenuTime) + +
+
+ +

Remove the menu option of the Task for a Group.

+ +

Parameters

+ +

Return value

+ +

#TASK: +self

+ +
+
+
+
+ + +TASK:RemoveStateMachine(TaskUnit) + +
+
+ +

Remove FiniteStateMachines from Task with key TaskUnit

+ +

Parameter

+ +

Return value

+ +

#TASK: +self

+ +
+
+
+
+ + +TASK:Replan() + +
+
+ +

FSM Replan synchronous event function for TASK.

+ + +

Use this event to Replan the Task.

+ +
+
+
+
+ + +TASK:ReportDetails() + +
+
+ +

Create a detailed report of the Task.

+ + +

List the Task Status, and the Players assigned to the Task.

+ +

Return value

+ +

#string:

+ + +
+
+
+
+ + +TASK:ReportSummary() + +
+
+ +

Create a summary report of the Task.

+ + +

List the Task Name and Status

+ +

Return value

+ +

#string:

+ + +
+
+
+
+ + +TASK:SendBriefingToAssignedGroups() + +
+
+ +

Send the briefng message of the Task to the assigned Groups.

+ +
+
+
+
+ + +TASK:SetAssignedMenuForGroup(TaskGroup, MenuTime) + +
+
+ +

Set the assigned menu options of the Task.

+ +

Parameters

+ +

Return value

+ +

#TASK: +self

+ +
+
+
+
+ + +TASK:SetBriefing(TaskBriefing) + +
+
+ +

Sets a Task briefing.

+ +

Parameter

+
    +
  • + +

    #string TaskBriefing :

    + +
  • +
+

Return value

+ +

#TASK: +self

+ +
+
+
+
+ + +TASK:SetDispatcher(Dispatcher) + +
+
+ +

Set dispatcher of a task

+ +

Parameter

+ +

Return value

+ +

#TASK:

+ + +
+
+
+
+ + Core.Set#SET_GROUP + +TASK.SetGroup + +
+
+ +

The Set of Groups assigned to the Task

+ +
+
+
+
+ + +TASK:SetID(TaskID) + +
+
+ +

Sets the ID of the Task

+ +

Parameter

+
    +
  • + +

    #string TaskID :

    + +
  • +
+
+
+
+
+ + +TASK:SetMenu(MenuTime) + +
+
+ +

Set the menu options of the Task to all the groups in the SetGroup.

+ +

Parameter

+
    +
  • + +

    #number MenuTime :

    + +
  • +
+

Return value

+ +

#TASK:

+ + +
+
+
+
+ + +TASK:SetMenuForGroup(MenuTime, TaskGroup) + +
+
+ +

Set the Menu for a Group

+ +

Parameters

+
    +
  • + +

    #number MenuTime :

    + +
  • +
  • + +

    TaskGroup :

    + +
  • +
+

Return value

+ +

#TASK:

+ + +
+
+
+
+ + +TASK:SetName(TaskName) + +
+
+ +

Sets the Name of the Task

+ +

Parameter

+
    +
  • + +

    #string TaskName :

    + +
  • +
+
+
+
+
+ + +TASK:SetPlannedMenuForGroup(TaskGroup, MenuText, MenuTime) + +
+
+ +

Set the planned menu option of the Task.

+ +

Parameters

+
    +
  • + +

    Wrapper.Group#GROUP TaskGroup :

    + +
  • +
  • + +

    #string MenuText : +The menu text.

    + +
  • +
  • + +

    #number MenuTime :

    + +
  • +
+

Return value

+ +

#TASK: +self

+ +
+
+
+
+ + +TASK:SetStateMachine(TaskUnit, Fsm) + +
+
+ +

Add a FiniteStateMachine to Task with key TaskUnit

+ +

Parameters

+ +

Return value

+ +

#TASK: +self

+ +
+
+
+
+ + +TASK:SetTimeOut(Timer) + +
+
+ +

Sets the TimeOut for the Task.

+ + +

If Task stayed planned for longer than TimeOut, it gets into Cancelled status.

+ +

Parameter

+
    +
  • + +

    #integer Timer : +in seconds

    + +
  • +
+

Return value

+ +

#TASK: +self

+ +
+
+
+
+ + +TASK:SetType(TaskType) + +
+
+ +

Sets the Type of the Task

+ +

Parameter

+
    +
  • + +

    #string TaskType :

    + +
  • +
+
+
+
+
+ + +TASK:SetUnitProcess(Core, FsmTemplate) + +
+
+ +

Sets the Task FSM Process Template

+ +

Parameters

+
    +
  • + +

    Core : +Fsm#FSM_PROCESS

    + +
  • +
  • + +

    FsmTemplate :

    + +
  • +
+
+
+
+
+ + +TASK:StateAborted() + +
+
+ +

Sets a Task to status Aborted.

+ +
+
+
+
+ + +TASK:StateAssigned() + +
+
+ +

Sets a Task to status Assigned.

+ +
+
+
+
+ + +TASK:StateCancelled() + +
+
+ +

Sets a Task to status Cancelled.

+ +
+
+
+
+ + +TASK:StateFailed() + +
+
+ +

Sets a Task to status Failed.

+ +
+
+
+
+ + +TASK:StateHold() + +
+
+ +

Sets a Task to status Hold.

+ +
+
+
+
+ + +TASK:StatePlanned() + +
+
+ +

Sets a Task to status Planned.

+ +
+
+
+
+ + +TASK:StateReplanned() + +
+
+ +

Sets a Task to status Replanned.

+ +
+
+
+
+ + +TASK:StateSuccess() + +
+
+ +

Sets a Task to status Success.

+ +
+
+
+
+ + +TASK:Success() + +
+
+ +

FSM Success synchronous event function for TASK.

+ + +

Use this event to make the Task a Success.

+ +
+
+
+
+ + + +TASK.TaskBriefing + +
+
+ + + +
+
+
+
+ + + +TASK.TaskID + +
+
+ + + +
+
+
+
+ + + +TASK.TaskName + +
+
+ + + +
+
+
+
+ + Core.Scheduler#SCHEDULER + +TASK.TaskScheduler + +
+
+ + + +
+
+
+
+ + + +TASK.TaskType + +
+
+ + + +
+
+
+
+ + + +TASK.TimeOut + +
+
+ + + +
+
+
+
+ + +TASK:UnAssignFromGroup(TaskGroup) + +
+
+ +

UnAssign the Task from a Group.

+ +

Parameter

+
    +
  • + +

    TaskGroup :

    + +
  • +
+
+
+
+
+ + +TASK:UnAssignFromGroups() + +
+
+ +

UnAssign the Task from the Groups.

+ +
+
+
+
+ + +TASK:UnAssignFromUnit(TaskUnit) + +
+
+ +

UnAssign the Task from an alive Unit.

+ +

Parameter

+ +

Return value

+ +

#TASK: +self

+ +
+
+
+
+ + +TASK:__Abort() + +
+
+ +

FSM Abort asynchronous event function for TASK.

+ + +

Use this event to Abort the Task.

+ +
+
+
+
+ + +TASK:__Cancel() + +
+
+ +

FSM Cancel asynchronous event function for TASK.

+ + +

Use this event to Cancel the Task.

+ +
+
+
+
+ + +TASK:__Fail() + +
+
+ +

FSM Fail asynchronous event function for TASK.

+ + +

Use this event to Fail the Task.

+ +
+
+
+
+ + +TASK:__Replan() + +
+
+ +

FSM Replan asynchronous event function for TASK.

+ + +

Use this event to Replan the Task.

+ +
+
+
+
+ + +TASK:__Success() + +
+
+ +

FSM Success asynchronous event function for TASK.

+ + +

Use this event to make the Task a Success.

+ +
+
+
+
+ + +TASK:onafterReplan(From, Event, To) + +
+
+ +

FSM function for a TASK

+ +

Parameters

+
    +
  • + +

    #string From :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string To :

    + +
  • +
+
+
+
+
+ + +TASK:onbeforeTimeOut(Event, From, To) + +
+
+ +

FSM function for a TASK

+ +

Parameters

+
    +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
+
+
+
+
+ + +TASK:onenterAborted(From, Event, To) + +
+
+ +

FSM function for a TASK

+ +

Parameters

+
    +
  • + +

    #string From :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string To :

    + +
  • +
+
+
+
+
+ + +TASK:onenterAssigned(Event, From, To, PlayerUnit, PlayerName) + +
+
+ +

FSM function for a TASK

+ +

Parameters

+
    +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
  • + +

    PlayerUnit :

    + +
  • +
  • + +

    PlayerName :

    + +
  • +
+
+
+
+
+ + +TASK:onenterFailed(From, Event, To) + +
+
+ +

FSM function for a TASK

+ +

Parameters

+
    +
  • + +

    #string From :

    + +
  • +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string To :

    + +
  • +
+
+
+
+
+ + +TASK:onenterPlanned(Event, From, To) + +
+
+ +

FSM function for a TASK

+ +

Parameters

+
    +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
+
+
+
+
+ + +TASK:onenterSuccess(Event, From, To) + +
+
+ +

FSM function for a TASK

+ +

Parameters

+
    +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
+
+
+
+
+ + +TASK:onstatechange(Event, From, To) + +
+
+ +

FSM function for a TASK

+ +

Parameters

+
    +
  • + +

    #string Event :

    + +
  • +
  • + +

    #string From :

    + +
  • +
  • + +

    #string To :

    + +
  • +
+
+
+ +

Type integer

+ +
+ +
+ + diff --git a/docs/Documentation/Task_A2G.html b/docs/Documentation/Task_A2G.html new file mode 100644 index 000000000..e497997f4 --- /dev/null +++ b/docs/Documentation/Task_A2G.html @@ -0,0 +1,1149 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Task_A2G

+ +

Tasking - The TASK_A2G models tasks for players in Air to Ground engagements.

+ + + +

Banner Image

+ + +

1) TaskA2G#TASKA2G class, extends Task#TASK

+ +

The #TASK_A2G class defines Air To Ground tasks for a Set of Target Units, +based on the tasking capabilities defined in Task#TASK. +The TASK_A2G is implemented using a Statemachine#FSM_TASK, and has the following statuses:

+ +
    +
  • None: Start of the process
  • +
  • Planned: The A2G task is planned.
  • +
  • Assigned: The A2G task is assigned to a Group#GROUP.
  • +
  • Success: The A2G task is successfully completed.
  • +
  • Failed: The A2G task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
  • +
+ +

1.1) Set the scoring of achievements in an A2G attack.

+ +

Scoring or penalties can be given in the following circumstances:

+ + + +

2) TaskA2G#TASKSEAD class, extends TaskA2G#TASKA2G

+ +

The #TASK_SEAD class defines a SEAD task for a Set of Target Units.

+ +
+ +

3) TaskA2G#TASKCAS class, extends TaskA2G#TASKA2G

+ +

The #TASK_CAS class defines a CAS task for a Set of Target Units.

+ +
+ +

4) TaskA2G#TASKBAI class, extends TaskA2G#TASKA2G

+ +

The #TASK_BAI class defines a BAI task for a Set of Target Units.

+ +
+ +

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-03-09: Revised version.

+ +
+ +

AUTHORS and CONTRIBUTIONS

+ +

Contributions:

+ +
    +
  • [WingThor]: Concept, Advice & Testing.
  • +
+ +

Authors:

+ +
    +
  • FlightControl: Concept, Design & Programming. +
  • +
+ +

Global(s)

+ + + + + + + + + + + + + + + + + +
TASK_A2G + +
TASK_BAI + +
TASK_CAS + +
TASK_SEAD + +
+

Type TASK_A2G

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TASK_A2G.ClassName + +
TASK_A2G:GetPlannedMenuText() + +
TASK_A2G:GetRendezVousPointVec2(TaskUnit) + +
TASK_A2G:GetRendezVousZone(TaskUnit) + +
TASK_A2G:GetTargetPointVec2(TaskUnit) + +
TASK_A2G:GetTargetZone(TaskUnit) + +
TASK_A2G:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit, TaskType) +

Instantiates a new TASK_A2G.

+
TASK_A2G:SetPenaltyOnFailed(Text, Penalty, TaskUnit) +

Set a penalty when the A2G attack has failed.

+
TASK_A2G:SetRendezVousPointVec2(RendezVousPointVec2, RendezVousRange, TaskUnit) + +
TASK_A2G:SetRendezVousZone(RendezVousZone, TaskUnit) + +
TASK_A2G:SetScoreOnDestroy(Text, Score, TaskUnit) +

Set a score when a target in scope of the A2G attack, has been destroyed .

+
TASK_A2G:SetScoreOnSuccess(Text, Score, TaskUnit) +

Set a score when all the targets in scope of the A2G attack, have been destroyed.

+
TASK_A2G:SetTargetPointVec2(TargetPointVec2, TaskUnit) + +
TASK_A2G:SetTargetZone(TargetZone, TaskUnit) + +
TASK_A2G.TargetSetUnit + +
+ +

Type TASK_BAI

+ + + + + + + + + + + + + +
TASK_BAI.ClassName + +
TASK_BAI:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit) +

Instantiates a new TASK_BAI.

+
TASK_BAI.TargetSetUnit + +
+ +

Type TASK_CAS

+ + + + + + + + + + + + + +
TASK_CAS.ClassName + +
TASK_CAS:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit) +

Instantiates a new TASK_CAS.

+
TASK_CAS.TargetSetUnit + +
+ +

Type TASK_SEAD

+ + + + + + + + + + + + + +
TASK_SEAD.ClassName + +
TASK_SEAD:New(Mission, SetGroup, TaskName, TargetSetUnit) +

Instantiates a new TASK_SEAD.

+
TASK_SEAD.TargetSetUnit + +
+ +

Global(s)

+
+
+ + #TASK_A2G + +TASK_A2G + +
+
+ + + +
+
+
+
+ + #TASK_BAI + +TASK_BAI + +
+
+ + + +
+
+
+
+ + #TASK_CAS + +TASK_CAS + +
+
+ + + +
+
+
+
+ + #TASK_SEAD + +TASK_SEAD + +
+
+ + + +
+
+

Type Task_A2G

+ +

Type FSM_PROCESS

+ +

Type TASK_A2G

+ +

The TASK_A2G class

+ +

Field(s)

+
+
+ + #string + +TASK_A2G.ClassName + +
+
+ + + +
+
+
+
+ + +TASK_A2G:GetPlannedMenuText() + +
+
+ + + +
+
+
+
+ + +TASK_A2G:GetRendezVousPointVec2(TaskUnit) + +
+
+ + + +

Parameter

+ +

Return values

+
    +
  1. + +

    Core.Point#POINT_VEC2: +The PointVec2 object referencing to the 2D point where the RendezVous point is located on the map.

    + +
  2. +
  3. + +

    #number: +The RendezVousRange that defines when the player is considered to have arrived at the RendezVous point.

    + +
  4. +
+
+
+
+
+ + +TASK_A2G:GetRendezVousZone(TaskUnit) + +
+
+ + + +

Parameter

+ +

Return value

+ +

Core.Zone#ZONE_BASE: +The Zone object where the RendezVous is located on the map.

+ +
+
+
+
+ + +TASK_A2G:GetTargetPointVec2(TaskUnit) + +
+
+ + + +

Parameter

+ +

Return value

+ +

Core.Point#POINT_VEC2: +The PointVec2 object where the Target is located on the map.

+ +
+
+
+
+ + +TASK_A2G:GetTargetZone(TaskUnit) + +
+
+ + + +

Parameter

+ +

Return value

+ +

Core.Zone#ZONE_BASE: +The Zone object where the Target is located on the map.

+ +
+
+
+
+ + +TASK_A2G:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit, TaskType) + +
+
+ +

Instantiates a new TASK_A2G.

+ +

Parameters

+
    +
  • + +

    Tasking.Mission#MISSION Mission :

    + +
  • +
  • + +

    Set#SET_GROUP SetGroup : +The set of groups for which the Task can be assigned.

    + +
  • +
  • + +

    #string TaskName : +The name of the Task.

    + +
  • +
  • + +

    Set#SET_UNIT UnitSetTargets :

    + +
  • +
  • + +

    #number TargetDistance : +The distance to Target when the Player is considered to have "arrived" at the engagement range.

    + +
  • +
  • + +

    Core.Zone#ZONE_BASE TargetZone : +The target zone, if known. +If the TargetZone parameter is specified, the player will be routed to the center of the zone where all the targets are assumed to be.

    + +
  • +
  • + +

    TargetSetUnit :

    + +
  • +
  • + +

    TaskType :

    + +
  • +
+

Return value

+ +

#TASK_A2G: +self

+ +
+
+
+
+ + +TASK_A2G:SetPenaltyOnFailed(Text, Penalty, TaskUnit) + +
+
+ +

Set a penalty when the A2G attack has failed.

+ +

Parameters

+
    +
  • + +

    #string Text : +The text to display to the player, when the A2G attack has failed.

    + +
  • +
  • + +

    #number Penalty : +The penalty in points.

    + +
  • +
  • + +

    Wrapper.Unit#UNIT TaskUnit :

    + +
  • +
+

Return value

+ +

#TASK_A2G:

+ + +
+
+
+
+ + +TASK_A2G:SetRendezVousPointVec2(RendezVousPointVec2, RendezVousRange, TaskUnit) + +
+
+ + + +

Parameters

+
    +
  • + +

    Core.Point#POINT_VEC2 RendezVousPointVec2 : +The PointVec2 object referencing to the 2D point where the RendezVous point is located on the map.

    + +
  • +
  • + +

    #number RendezVousRange : +The RendezVousRange that defines when the player is considered to have arrived at the RendezVous point.

    + +
  • +
  • + +

    Wrapper.Unit#UNIT TaskUnit :

    + +
  • +
+
+
+
+
+ + +TASK_A2G:SetRendezVousZone(RendezVousZone, TaskUnit) + +
+
+ + + +

Parameters

+ +
+
+
+
+ + +TASK_A2G:SetScoreOnDestroy(Text, Score, TaskUnit) + +
+
+ +

Set a score when a target in scope of the A2G attack, has been destroyed .

+ +

Parameters

+
    +
  • + +

    #string Text : +The text to display to the player, when the target has been destroyed.

    + +
  • +
  • + +

    #number Score : +The score in points.

    + +
  • +
  • + +

    Wrapper.Unit#UNIT TaskUnit :

    + +
  • +
+

Return value

+ +

#TASK_A2G:

+ + +
+
+
+
+ + +TASK_A2G:SetScoreOnSuccess(Text, Score, TaskUnit) + +
+
+ +

Set a score when all the targets in scope of the A2G attack, have been destroyed.

+ +

Parameters

+
    +
  • + +

    #string Text : +The text to display to the player, when all targets hav been destroyed.

    + +
  • +
  • + +

    #number Score : +The score in points.

    + +
  • +
  • + +

    Wrapper.Unit#UNIT TaskUnit :

    + +
  • +
+

Return value

+ +

#TASK_A2G:

+ + +
+
+
+
+ + +TASK_A2G:SetTargetPointVec2(TargetPointVec2, TaskUnit) + +
+
+ + + +

Parameters

+ +
+
+
+
+ + +TASK_A2G:SetTargetZone(TargetZone, TaskUnit) + +
+
+ + + +

Parameters

+ +
+
+
+
+ + Set#SET_UNIT + +TASK_A2G.TargetSetUnit + +
+
+ + + +
+
+ +

Type TASK_BAI

+ +

The TASK_BAI class

+ +

Field(s)

+
+
+ + #string + +TASK_BAI.ClassName + +
+
+ + + +
+
+
+
+ + +TASK_BAI:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit) + +
+
+ +

Instantiates a new TASK_BAI.

+ +

Parameters

+
    +
  • + +

    Tasking.Mission#MISSION Mission :

    + +
  • +
  • + +

    Set#SET_GROUP SetGroup : +The set of groups for which the Task can be assigned.

    + +
  • +
  • + +

    #string TaskName : +The name of the Task.

    + +
  • +
  • + +

    Set#SET_UNIT UnitSetTargets :

    + +
  • +
  • + +

    #number TargetDistance : +The distance to Target when the Player is considered to have "arrived" at the engagement range.

    + +
  • +
  • + +

    Core.Zone#ZONE_BASE TargetZone : +The target zone, if known. +If the TargetZone parameter is specified, the player will be routed to the center of the zone where all the targets are assumed to be.

    + +
  • +
  • + +

    TargetSetUnit :

    + +
  • +
+

Return value

+ +

#TASK_BAI: +self

+ +
+
+
+
+ + Set#SET_UNIT + +TASK_BAI.TargetSetUnit + +
+
+ + + +
+
+ +

Type TASK_CAS

+ +

The TASK_CAS class

+ +

Field(s)

+
+
+ + #string + +TASK_CAS.ClassName + +
+
+ + + +
+
+
+
+ + +TASK_CAS:New(Mission, SetGroup, TaskName, UnitSetTargets, TargetDistance, TargetZone, TargetSetUnit) + +
+
+ +

Instantiates a new TASK_CAS.

+ +

Parameters

+
    +
  • + +

    Tasking.Mission#MISSION Mission :

    + +
  • +
  • + +

    Set#SET_GROUP SetGroup : +The set of groups for which the Task can be assigned.

    + +
  • +
  • + +

    #string TaskName : +The name of the Task.

    + +
  • +
  • + +

    Set#SET_UNIT UnitSetTargets :

    + +
  • +
  • + +

    #number TargetDistance : +The distance to Target when the Player is considered to have "arrived" at the engagement range.

    + +
  • +
  • + +

    Core.Zone#ZONE_BASE TargetZone : +The target zone, if known. +If the TargetZone parameter is specified, the player will be routed to the center of the zone where all the targets are assumed to be.

    + +
  • +
  • + +

    TargetSetUnit :

    + +
  • +
+

Return value

+ +

#TASK_CAS: +self

+ +
+
+
+
+ + Set#SET_UNIT + +TASK_CAS.TargetSetUnit + +
+
+ + + +
+
+ +

Type TASK_SEAD

+ +

The TASK_SEAD class

+ +

Field(s)

+
+
+ + #string + +TASK_SEAD.ClassName + +
+
+ + + +
+
+
+
+ + +TASK_SEAD:New(Mission, SetGroup, TaskName, TargetSetUnit) + +
+
+ +

Instantiates a new TASK_SEAD.

+ +

Parameters

+ +

Return value

+ +

#TASK_SEAD: +self

+ +
+
+
+
+ + Set#SET_UNIT + +TASK_SEAD.TargetSetUnit + +
+
+ + + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Task_A2G_Dispatcher.html b/docs/Documentation/Task_A2G_Dispatcher.html new file mode 100644 index 000000000..553474a4c --- /dev/null +++ b/docs/Documentation/Task_A2G_Dispatcher.html @@ -0,0 +1,556 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Task_A2G_Dispatcher

+ +

Tasking - The TASKA2GDISPATCHER creates and manages player TASK_A2G tasks based on detected targets.

+ + + +
+ +

1) #TASKA2GDISPATCHER class, extends #DETECTION_MANAGER

+ +

The #TASKA2GDISPATCHER class implements the dynamic dispatching of tasks upon groups of detected units determined a Set of FAC (groups). +The FAC will detect units, will group them, and will dispatch Tasks to groups. Depending on the type of target detected, different tasks will be dispatched. +Find a summary below describing for which situation a task type is created:

+ +
    +
  • CAS Task: Is created when there are enemy ground units within range of the FAC, while there are friendly units in the FAC perimeter.
  • +
  • BAI Task: Is created when there are enemy ground units within range of the FAC, while there are NO other friendly units within the FAC perimeter.
  • +
  • SEAD Task: Is created when there are enemy ground units wihtin range of the FAC, with air search radars.
  • +
+ +

Other task types will follow...

+ +

3.1) TASKA2GDISPATCHER constructor:

+

The TASKA2GDISPATCHER.New() method creates a new TASKA2GDISPATCHER instance.

+ +
+ +

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-03-09: Initial class and API.

+ +
+ +

AUTHORS and CONTRIBUTIONS

+ +

Contributions:

+ +

Authors:

+ +
    +
  • FlightControl: Concept, Design & Programming.
  • +
+ + +

Global(s)

+ + + + + +
TASK_A2G_DISPATCHER + +
+

Type TASK_A2G_DISPATCHER

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TASK_A2G_DISPATCHER.ClassName + +
TASK_A2G_DISPATCHER.Detection +

The DETECTION_BASE object that is used to report the detected objects.

+
TASK_A2G_DISPATCHER:EvaluateBAI(DetectedItem, FriendlyCoalition) +

Creates a BAI task when there are targets for it.

+
TASK_A2G_DISPATCHER:EvaluateCAS(DetectedItem) +

Creates a CAS task when there are targets for it.

+
TASK_A2G_DISPATCHER:EvaluateRemoveTask(Mission, Task, DetectedItem) +

Evaluates the removal of the Task from the Mission.

+
TASK_A2G_DISPATCHER:EvaluateSEAD(DetectedItem) +

Creates a SEAD task when there are targets for it.

+
TASK_A2G_DISPATCHER.Mission + +
TASK_A2G_DISPATCHER:New(Mission, SetGroup, Detection) +

TASKA2GDISPATCHER constructor.

+
TASK_A2G_DISPATCHER:OnAfterAssign(From, Event, To, Task, TaskUnit, PlayerName) +

OnAfter Transition Handler for Event Assign.

+
TASK_A2G_DISPATCHER:ProcessDetected(Detection) +

Assigns tasks in relation to the detected items to the Set#SET_GROUP.

+
TASK_A2G_DISPATCHER.SetGroup +

The groups to which the FAC will report to.

+
+ +

Global(s)

+
+
+ + #TASK_A2G_DISPATCHER + +TASK_A2G_DISPATCHER + +
+
+ + + +
+
+

Type Task_A2G_Dispatcher

+ +

Type TASK_A2G_DISPATCHER

+ +

TASKA2GDISPATCHER class.

+ +

Field(s)

+
+
+ + #string + +TASK_A2G_DISPATCHER.ClassName + +
+
+ + + +
+
+
+
+ + Functional.Detection#DETECTION_BASE + +TASK_A2G_DISPATCHER.Detection + +
+
+ +

The DETECTION_BASE object that is used to report the detected objects.

+ +
+
+
+
+ + +TASK_A2G_DISPATCHER:EvaluateBAI(DetectedItem, FriendlyCoalition) + +
+
+ +

Creates a BAI task when there are targets for it.

+ +

Parameters

+ +

Return value

+ +

Tasking.Task#TASK:

+ + +
+
+
+
+ + +TASK_A2G_DISPATCHER:EvaluateCAS(DetectedItem) + +
+
+ +

Creates a CAS task when there are targets for it.

+ +

Parameter

+ +

Return value

+ +

Tasking.Task#TASK:

+ + +
+
+
+
+ + +TASK_A2G_DISPATCHER:EvaluateRemoveTask(Mission, Task, DetectedItem) + +
+
+ +

Evaluates the removal of the Task from the Mission.

+ + +

Can only occur when the DetectedItem is Changed AND the state of the Task is "Planned".

+ +

Parameters

+ +

Return value

+ +

Tasking.Task#TASK:

+ + +
+
+
+
+ + +TASK_A2G_DISPATCHER:EvaluateSEAD(DetectedItem) + +
+
+ +

Creates a SEAD task when there are targets for it.

+ +

Parameter

+ +

Return values

+
    +
  1. + +

    Set#SET_UNIT: +TargetSetUnit: The target set of units.

    + +
  2. +
  3. + +

    #nil: +If there are no targets to be set.

    + +
  4. +
+
+
+
+
+ + Tasking.Mission#MISSION + +TASK_A2G_DISPATCHER.Mission + +
+
+ + + +
+
+
+
+ + +TASK_A2G_DISPATCHER:New(Mission, SetGroup, Detection) + +
+
+ +

TASKA2GDISPATCHER constructor.

+ +

Parameters

+ +

Return value

+ +

#TASKA2GDISPATCHER: +self

+ +
+
+
+
+ + +TASK_A2G_DISPATCHER:OnAfterAssign(From, Event, To, Task, TaskUnit, PlayerName) + +
+
+ +

OnAfter Transition Handler for Event Assign.

+ +

Parameters

+
    +
  • + +

    #string From : +The From State string.

    + +
  • +
  • + +

    #string Event : +The Event string.

    + +
  • +
  • + +

    #string To : +The To State string.

    + +
  • +
  • + +

    Tasking.TaskA2G#TASKA2G Task :

    + +
  • +
  • + +

    Wrapper.Unit#UNIT TaskUnit :

    + +
  • +
  • + +

    #string PlayerName :

    + +
  • +
+
+
+
+
+ + +TASK_A2G_DISPATCHER:ProcessDetected(Detection) + +
+
+ +

Assigns tasks in relation to the detected items to the Set#SET_GROUP.

+ +

Parameter

+ +

Return value

+ +

#boolean: +Return true if you want the task assigning to continue... false will cancel the loop.

+ +
+
+
+
+ + Set#SET_GROUP + +TASK_A2G_DISPATCHER.SetGroup + +
+
+ +

The groups to which the FAC will report to.

+ +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Task_Cargo.html b/docs/Documentation/Task_Cargo.html new file mode 100644 index 000000000..d6a95cfc8 --- /dev/null +++ b/docs/Documentation/Task_Cargo.html @@ -0,0 +1,943 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Task_Cargo

+ +

Tasking (Release 2.1) -- The TASK_CARGO models tasks for players to transport Cargo.

+ + + +

Banner Image

+ +
+ +

The Moose framework provides various CARGO classes that allow DCS phisical or logical objects to be transported or sling loaded by Carriers. +The CARGO_ classes, as part of the moose core, are able to Board, Load, UnBoard and UnLoad cargo between Carrier units.

+ +

This collection of classes in this module define tasks for human players to handle these cargo objects. +Cargo can be transported, picked-up, deployed and sling-loaded from and to other places.

+ +

The following classes are important to consider:

+ +
    +
  • #TASKCARGOTRANSPORT: Defines a task for a human player to transport a set of cargo between various zones.
  • +
+ +

==

+ +

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-03-09: Revised version.

+ +
+ +

AUTHORS and CONTRIBUTIONS

+ +

Contributions:

+ +

Authors:

+ +
    +
  • FlightControl: Concept, Design & Programming. +
  • +
+ +

Global(s)

+ + + + + + + + + +
TASK_CARGO +

TASK_CARGO class, extends Task#TASK

+ +

A flexible tasking system

+ +

The TASK_CARGO classes provide you with a flexible tasking sytem, +that allows you to transport cargo of various types between various locations +and various dedicated deployment zones.

+
TASK_CARGO_TRANSPORT + +
+

Type FSM_PROCESS

+ + + + + + + + + +
FSM_PROCESS.Cargo + +
FSM_PROCESS.DeployZone + +
+ +

Type TASK_CARGO

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TASK_CARGO:AddDeployZone(DeployZone, TaskUnit) + +
TASK_CARGO.DeployZones + +
TASK_CARGO:GetPlannedMenuText() + +
TASK_CARGO:GetTargetZone(TaskUnit) + +
TASK_CARGO:New(Mission, SetGroup, TaskName, SetCargo, TaskType) +

Instantiates a new TASK_CARGO.

+
TASK_CARGO:RemoveDeployZone(DeployZone, TaskUnit) + +
TASK_CARGO.SetCargo + +
TASK_CARGO:SetCargoPickup(Cargo, TaskUnit) + +
TASK_CARGO:SetDeployZone(DeployZone, TaskUnit) + +
TASK_CARGO:SetDeployZones(@, TaskUnit, DeployZones) + +
TASK_CARGO:SetPenaltyOnFailed(Text, Penalty, TaskUnit) +

Set a penalty when the A2G attack has failed.

+
TASK_CARGO:SetScoreOnDestroy(Text, Score, TaskUnit) +

Set a score when a target in scope of the A2G attack, has been destroyed .

+
TASK_CARGO:SetScoreOnSuccess(Text, Score, TaskUnit) +

Set a score when all the targets in scope of the A2G attack, have been destroyed.

+
TASK_CARGO.TaskType + +
+ +

Type TASK_CARGO_TRANSPORT

+ + + + + + + + + +
TASK_CARGO_TRANSPORT.ClassName + +
TASK_CARGO_TRANSPORT:New(Mission, SetGroup, TaskName, SetCargo) +

Instantiates a new TASKCARGOTRANSPORT.

+
+ +

Global(s)

+
+
+ + #TASK_CARGO + +TASK_CARGO + +
+
+ +

TASK_CARGO class, extends Task#TASK

+ +

A flexible tasking system

+ +

The TASK_CARGO classes provide you with a flexible tasking sytem, +that allows you to transport cargo of various types between various locations +and various dedicated deployment zones.

+ + + +

The cargo in scope of the TASKCARGO classes must be explicitly given, and is of type SETCARGO. +The SET_CARGO contains a collection of CARGO objects that must be handled by the players in the mission.

+ + +

Task execution experience from the player perspective

+ +

A human player can join the battle field in a client airborne slot or a ground vehicle within the CA module (ALT-J). +The player needs to accept the task from the task overview list within the mission, using the radio menus.

+ +

Once the TASK_CARGO is assigned to the player and accepted by the player, the player will obtain +an extra Cargo Handling Radio Menu that contains the CARGO objects that need to be transported.

+ +

Each CARGO object has a certain state:

+ +
    +
  • UnLoaded: The CARGO is located within the battlefield. It may still need to be transported.
  • +
  • Loaded: The CARGO is loaded within a Carrier. This can be your air unit, or another air unit, or even a vehicle.
  • +
  • Boarding: The CARGO is running or moving towards your Carrier for loading.
  • +
  • UnBoarding: The CARGO is driving or jumping out of your Carrier and moves to a location in the Deployment Zone.
  • +
+ +

Cargo must be transported towards different **Deployment Zones**.

+ +

The Cargo Handling Radio Menu system allows to execute various actions to handle the cargo. +In the menu, you'll find for each CARGO, that is part of the scope of the task, various actions that can be completed. +Depending on the location of your Carrier unit, the menu options will vary.

+ + +

Cargo Pickup and Boarding

+ +

For cargo boarding, a cargo can only execute the boarding actions if it is within the foreseen Reporting Range. +Therefore, it is important that you steer your Carrier within the Reporting Range, +so that boarding actions can be executed on the cargo. +To Pickup and Board cargo, the following menu items will be shown in your carrier radio menu:

+ +

Board Cargo

+ +

If your Carrier is within the Reporting Range of the cargo, it will allow to pickup the cargo by selecting this menu option. +Depending on the Cargo type, the cargo will either move to your Carrier or you will receive instructions how to handle the cargo +pickup. If the cargo moves to your carrier, it will indicate the boarding status. +Note that multiple units need to board your Carrier, so it is required to await the full boarding process. +Once the cargo is fully boarded within your Carrier, you will be notified of this.

+ +

Note that for airborne Carriers, it is required to land first before the Boarding process can be initiated. +If during boarding the Carrier gets airborne, the boarding process will be cancelled.

+ +

Pickup Cargo

+ +

If your Carrier is not within the Reporting Range of the cargo, the HQ will guide you to its location. +Routing information is shown in flight that directs you to the cargo within Reporting Range. +Upon arrival, the Cargo will contact you and further instructions will be given. +When your Carrier is airborne, you will receive instructions to land your Carrier. +The action will not be completed until you've landed your Carrier.

+ + +

Cargo Deploy and UnBoarding

+ +

Various Deployment Zones can be foreseen in the scope of the Cargo transportation. Each deployment zone can be of varying Zone type. +The Cargo Handling Radio Menu provides with menu options to execute an action to steer your Carrier to a specific Zone.

+ +

UnBoard Cargo

+ +

If your Carrier is already within a Deployment Zone, +then the Cargo Handling Radio Menu allows to UnBoard a specific cargo that is +loaded within your Carrier group into the Deployment Zone. +Note that the Unboarding process takes a while, as the cargo units (infantry or vehicles) must unload from your Carrier. +Ensure that you stay at the position or stay on the ground while Unboarding. +If any unforeseen manoeuvre is done by the Carrier, then the Unboarding will be cancelled.

+ +

Deploy Cargo

+ +

If your Carrier is not within a Deployment Zone, you'll need to fly towards one. +Fortunately, the Cargo Handling Radio Menu provides you with menu options to select a specific Deployment Zone to fly towards. +Once a Deployment Zone has been selected, your Carrier will receive routing information from HQ towards the Deployment Zone center. +Upon arrival, the HQ will provide you with further instructions. +When your Carrier is airborne, you will receive instructions to land your Carrier. +The action will not be completed until you've landed your Carrier!

+ +

Handle TASK_CARGO Events ...

+ +

The TASK_CARGO classes define Cargo transport tasks, +based on the tasking capabilities defined in Task#TASK.

+ +

Specific TASK_CARGO Events

+ +

Specific Cargo Handling event can be captured, that allow to trigger specific actions!

+ +
    +
  • Boarded: Triggered when the Cargo has been Boarded into your Carrier.
  • +
  • UnBoarded: Triggered when the cargo has been Unboarded from your Carrier and has arrived at the Deployment Zone.
  • +
+ +

Standard TASK_CARGO Events

+ +

The TASK_CARGO is implemented using a Statemachine#FSM_TASK, and has the following standard statuses:

+ +
    +
  • None: Start of the process.
  • +
  • Planned: The cargo task is planned.
  • +
  • Assigned: The cargo task is assigned to a Group#GROUP.
  • +
  • Success: The cargo task is successfully completed.
  • +
  • Failed: The cargo task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
  • +
+ +
+ + +
+
+
+
+ + #TASK_CARGO_TRANSPORT + +TASK_CARGO_TRANSPORT + +
+
+ + + +
+
+

Type Task_Cargo

+ +

Type FSM_PROCESS

+

Field(s)

+
+
+ + + +FSM_PROCESS.Cargo + +
+
+ + + +
+
+
+
+ + + +FSM_PROCESS.DeployZone + +
+
+ + + +
+
+ +

Type TASK_CARGO

+

Field(s)

+
+
+ + +TASK_CARGO:AddDeployZone(DeployZone, TaskUnit) + +
+
+ + + +

Parameters

+ +

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + + +TASK_CARGO.DeployZones + +
+
+ + + + +

setmetatable( {}, { __mode = "v" } ) -- weak table on value

+ +
+
+
+
+ + +TASK_CARGO:GetPlannedMenuText() + +
+
+ + + +
+
+
+
+ + +TASK_CARGO:GetTargetZone(TaskUnit) + +
+
+ + + +

Parameter

+ +

Return value

+ +

Core.Zone#ZONE_BASE: +The Zone object where the Target is located on the map.

+ +
+
+
+
+ + +TASK_CARGO:New(Mission, SetGroup, TaskName, SetCargo, TaskType) + +
+
+ +

Instantiates a new TASK_CARGO.

+ +

Parameters

+
    +
  • + +

    Tasking.Mission#MISSION Mission :

    + +
  • +
  • + +

    Set#SET_GROUP SetGroup : +The set of groups for which the Task can be assigned.

    + +
  • +
  • + +

    #string TaskName : +The name of the Task.

    + +
  • +
  • + +

    Core.Set#SET_CARGO SetCargo : +The scope of the cargo to be transported.

    + +
  • +
  • + +

    #string TaskType : +The type of Cargo task.

    + +
  • +
+

Return value

+ +

#TASK_CARGO: +self

+ +
+
+
+
+ + +TASK_CARGO:RemoveDeployZone(DeployZone, TaskUnit) + +
+
+ + + +

Parameters

+ +

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + + +TASK_CARGO.SetCargo + +
+
+ + + +
+
+
+
+ + +TASK_CARGO:SetCargoPickup(Cargo, TaskUnit) + +
+
+ + + +

Parameters

+ +

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + +TASK_CARGO:SetDeployZone(DeployZone, TaskUnit) + +
+
+ + + +

Parameters

+ +

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + +TASK_CARGO:SetDeployZones(@, TaskUnit, DeployZones) + +
+
+ + + +

Parameters

+
    +
  • + +

    @ : +ist DeployZones

    + +
  • +
  • + +

    Wrapper.Unit#UNIT TaskUnit :

    + +
  • +
  • + +

    DeployZones :

    + +
  • +
+

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + +TASK_CARGO:SetPenaltyOnFailed(Text, Penalty, TaskUnit) + +
+
+ +

Set a penalty when the A2G attack has failed.

+ +

Parameters

+
    +
  • + +

    #string Text : +The text to display to the player, when the A2G attack has failed.

    + +
  • +
  • + +

    #number Penalty : +The penalty in points.

    + +
  • +
  • + +

    Wrapper.Unit#UNIT TaskUnit :

    + +
  • +
+

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + +TASK_CARGO:SetScoreOnDestroy(Text, Score, TaskUnit) + +
+
+ +

Set a score when a target in scope of the A2G attack, has been destroyed .

+ +

Parameters

+
    +
  • + +

    #string Text : +The text to display to the player, when the target has been destroyed.

    + +
  • +
  • + +

    #number Score : +The score in points.

    + +
  • +
  • + +

    Wrapper.Unit#UNIT TaskUnit :

    + +
  • +
+

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + +TASK_CARGO:SetScoreOnSuccess(Text, Score, TaskUnit) + +
+
+ +

Set a score when all the targets in scope of the A2G attack, have been destroyed.

+ +

Parameters

+
    +
  • + +

    #string Text : +The text to display to the player, when all targets hav been destroyed.

    + +
  • +
  • + +

    #number Score : +The score in points.

    + +
  • +
  • + +

    Wrapper.Unit#UNIT TaskUnit :

    + +
  • +
+

Return value

+ +

#TASK_CARGO:

+ + +
+
+
+
+ + + +TASK_CARGO.TaskType + +
+
+ + + +
+
+ +

Type TASK_CARGO_TRANSPORT

+ +

The TASKCARGOTRANSPORT class

+ +

Field(s)

+
+
+ + #string + +TASK_CARGO_TRANSPORT.ClassName + +
+
+ + + +
+
+
+
+ + +TASK_CARGO_TRANSPORT:New(Mission, SetGroup, TaskName, SetCargo) + +
+
+ +

Instantiates a new TASKCARGOTRANSPORT.

+ +

Parameters

+ +

Return value

+ +

#TASKCARGOTRANSPORT: +self

+ +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Task_PICKUP.html b/docs/Documentation/Task_PICKUP.html new file mode 100644 index 000000000..a26b39707 --- /dev/null +++ b/docs/Documentation/Task_PICKUP.html @@ -0,0 +1,418 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Task_PICKUP

+ +

This module contains the TASK_PICKUP classes.

+ + + +

1) #TASK_PICKUP class, extends Task#TASK

+

The #TASK_PICKUP class defines a pickup task of a Set of CARGO objects defined within the mission. +based on the tasking capabilities defined in Task#TASK. +The TASK_PICKUP is implemented using a Statemachine#FSM_TASK, and has the following statuses:

+ +
    +
  • None: Start of the process
  • +
  • Planned: The SEAD task is planned. Upon Planned, the sub-process ProcessFsm.Assign#ACTASSIGN_ACCEPT is started to accept the task.
  • +
  • Assigned: The SEAD task is assigned to a Group#GROUP. Upon Assigned, the sub-process ProcessFsm.Route#ACTROUTE is started to route the active Units in the Group to the attack zone.
  • +
  • Success: The SEAD task is successfully completed. Upon Success, the sub-process ProcessSEAD#PROCESSSEAD is started to follow-up successful SEADing of the targets assigned in the task.
  • +
  • Failed: The SEAD task has failed. This will happen if the player exists the task early, without communicating a possible cancellation to HQ.
  • +
+ +
+ +

Authors: FlightControl - Design and Programming

+ + +

Global(s)

+ + + + + +
TASK_PICKUP + +
+

Type TASK_PICKUP

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TASK_PICKUP:AssignToUnit(TaskUnit) +

Assign the Task to a Unit.

+
TASK_PICKUP.ClassName + +
TASK_PICKUP:CleanUp() +

Removes a TASK_PICKUP.

+
TASK_PICKUP:GetPlannedMenuText() + +
TASK_PICKUP:New(Mission, AssignedSetGroup, TaskName, TaskType, UnitSetTargets, TargetZone) +

Instantiates a new TASK_PICKUP.

+
TASK_PICKUP:OnNext(Fsm, Event, From, To, Event) +

StateMachine callback function for a TASK

+
TASK_PICKUP.TaskScheduler + +
TASK_PICKUP:_Schedule() + +
TASK_PICKUP:_Scheduler() + +
+ +

Global(s)

+
+
+ + #TASK_PICKUP + +TASK_PICKUP + +
+
+ + + +
+
+

Type Task_PICKUP

+ +

Type TASK_PICKUP

+ +

The TASK_PICKUP class

+ +

Field(s)

+
+
+ + +TASK_PICKUP:AssignToUnit(TaskUnit) + +
+
+ +

Assign the Task to a Unit.

+ +

Parameter

+ +

Return value

+ +

#TASK_PICKUP: +self

+ +
+
+
+
+ + #string + +TASK_PICKUP.ClassName + +
+
+ + + +
+
+
+
+ + +TASK_PICKUP:CleanUp() + +
+
+ +

Removes a TASK_PICKUP.

+ +

Return value

+ +

#nil:

+ + +
+
+
+
+ + +TASK_PICKUP:GetPlannedMenuText() + +
+
+ + + +
+
+
+
+ + +TASK_PICKUP:New(Mission, AssignedSetGroup, TaskName, TaskType, UnitSetTargets, TargetZone) + +
+
+ +

Instantiates a new TASK_PICKUP.

+ +

Parameters

+ +

Return value

+ +

#TASK_PICKUP: +self

+ +
+
+
+
+ + +TASK_PICKUP:OnNext(Fsm, Event, From, To, Event) + +
+
+ +

StateMachine callback function for a TASK

+ +

Parameters

+ +
+
+
+
+ + + +TASK_PICKUP.TaskScheduler + +
+
+ + + +
+
+
+
+ + +TASK_PICKUP:_Schedule() + +
+
+ + + +
+
+
+
+ + +TASK_PICKUP:_Scheduler() + +
+
+ + + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/Unit.html b/docs/Documentation/Unit.html new file mode 100644 index 000000000..d9cc8dfda --- /dev/null +++ b/docs/Documentation/Unit.html @@ -0,0 +1,1725 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Unit

+ +

Wrapper - UNIT is a wrapper class for the DCS Class Unit.

+ + + +
+ +

The #UNIT class is a wrapper class to handle the DCS Unit objects:

+ +
    +
  • Support all DCS Unit APIs.
  • +
  • Enhance with Unit specific APIs not in the DCS Unit API set.
  • +
  • Handle local Unit Controller.
  • +
  • Manage the "state" of the DCS Unit. +
  • +
+ +

Global(s)

+ + + + + +
UNIT +

UNIT class, extends Controllable#CONTROLLABLE

+ +

For each DCS Unit object alive within a running mission, a UNIT wrapper object (instance) will be created within the _DATABASE object.

+
+

Type UNIT

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
UNIT:Find(DCSUnit) +

Finds a UNIT from the _DATABASE using a DCSUnit object.

+
UNIT:FindByName(UnitName) +

Find a UNIT in the _DATABASE using the name of an existing DCS Unit.

+
UNIT:Flare(FlareColor) +

Signal a flare at the position of the UNIT.

+
UNIT:FlareGreen() +

Signal a green flare at the position of the UNIT.

+
UNIT:FlareRed() +

Signal a red flare at the position of the UNIT.

+
UNIT:FlareWhite() +

Signal a white flare at the position of the UNIT.

+
UNIT:FlareYellow() +

Signal a yellow flare at the position of the UNIT.

+
UNIT:GetAmmo() +

Returns the Unit's ammunition.

+
UNIT:GetCallsign() +

Returns the Unit's callsign - the localized string.

+
UNIT:GetCategoryName() +

Returns the category name of the #UNIT.

+
UNIT:GetDCSObject() + +
UNIT:GetFuel() +

Returns relative amount of fuel (from 0.0 to 1.0) the unit has in its internal tanks.

+
UNIT:GetGroup() +

Returns the unit's group if it exist and nil otherwise.

+
UNIT:GetLife() +

Returns the unit's health.

+
UNIT:GetLife0() +

Returns the Unit's initial health.

+
UNIT:GetNumber() +

Returns the unit's number in the group.

+
UNIT:GetPlayerName() +

Returns name of the player that control the unit or nil if the unit is controlled by A.I.

+
UNIT:GetPrefix() +

Returns the prefix name of the DCS Unit.

+
UNIT:GetRadar() +

Returns two values:

+ +
    +
  • First value indicates if at least one of the unit's radar(s) is on.
  • +
+
UNIT:GetSensors() +

Returns the unit sensors.

+
UNIT:GetThreatLevel() +

Returns the Unit's A2G threat level on a scale from 1 to 10 ...

+
UNIT:GetUnits() +

Returns the UNIT in a UNIT list of one element.

+
UNIT:HandleEvent(Event, EventFunction) +

Subscribe to a DCS Event.

+
UNIT:HasSEAD() +

Returns if the unit is SEADable.

+
UNIT:HasSensors(...) +

Returns if the unit has sensors of a certain type.

+
UNIT:InAir() +

Returns true if the UNIT is in the air.

+
UNIT:IsActive() +

Returns if the unit is activated.

+
UNIT:IsAir() +

Returns if the unit is of an air category.

+
UNIT:IsAlive() +

Returns if the Unit is alive.

+
UNIT:IsFriendly(FriendlyCoalition) +

Returns if the unit is a friendly unit.

+
UNIT:IsGround() +

Returns if the unit is of an ground category.

+
UNIT:IsInZone(Zone) +

Returns true if the unit is within a Zone.

+
UNIT:IsNotInZone(Zone) +

Returns true if the unit is not within a Zone.

+
UNIT:IsShip() +

Returns if the unit is of a ship category.

+
UNIT:Name() +

Return the name of the UNIT.

+
UNIT:OtherUnitInRadius(AwaitUnit, Radius) +

Returns true if there is an other DCS Unit within a radius of the current 2D point of the DCS Unit.

+
UNIT:ReSpawn(SpawnVec3, Heading) +

Respawn the Unit using a (tweaked) template of the parent Group.

+
UNIT:Register(UnitName) +

Create a new UNIT from DCSUnit.

+
UNIT:ResetEvents() +

Reset the subscriptions.

+
UNIT:Smoke(SmokeColor, Range) +

Smoke the UNIT.

+
UNIT:SmokeBlue() +

Smoke the UNIT Blue.

+
UNIT:SmokeGreen() +

Smoke the UNIT Green.

+
UNIT:SmokeOrange() +

Smoke the UNIT Orange.

+
UNIT:SmokeRed() +

Smoke the UNIT Red.

+
UNIT:SmokeWhite() +

Smoke the UNIT White.

+
UNIT:UnHandleEvent(Event) +

UnSubscribe to a DCS event.

+
+ +

Type Unit.SensorType

+ + + + + + + + + + + + + + + + + +
Unit.SensorType.IRST + +
Unit.SensorType.OPTIC + +
Unit.SensorType.RADAR + +
Unit.SensorType.RWR + +
+ +

Global(s)

+
+
+ + #UNIT + +UNIT + +
+
+ +

UNIT class, extends Controllable#CONTROLLABLE

+ +

For each DCS Unit object alive within a running mission, a UNIT wrapper object (instance) will be created within the _DATABASE object.

+ + +

This is done at the beginning of the mission (when the mission starts), and dynamically when new DCS Unit objects are spawned (using the SPAWN class).

+ +

The UNIT class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference +using the DCS Unit or the DCS UnitName.

+ +

Another thing to know is that UNIT objects do not "contain" the DCS Unit object. +The UNIT methods will reference the DCS Unit object by name when it is needed during API execution. +If the DCS Unit object does not exist or is nil, the UNIT methods will return nil and log an exception in the DCS.log file.

+ +

The UNIT class provides the following functions to retrieve quickly the relevant UNIT instance:

+ +
    +
  • UNIT.Find(): Find a UNIT instance from the _DATABASE object using a DCS Unit object.
  • +
  • UNIT.FindByName(): Find a UNIT instance from the _DATABASE object using a DCS Unit name.
  • +
+ +

IMPORTANT: ONE SHOULD NEVER SANATIZE these UNIT OBJECT REFERENCES! (make the UNIT object references nil).

+ +

DCS UNIT APIs

+ +

The DCS Unit APIs are used extensively within MOOSE. The UNIT class has for each DCS Unit API a corresponding method. +To be able to distinguish easily in your code the difference between a UNIT API call and a DCS Unit API call, +the first letter of the method is also capitalized. So, by example, the DCS Unit method DCSWrapper.Unit#Unit.getName() +is implemented in the UNIT class as UNIT.GetName().

+ +

Smoke, Flare Units

+ +

The UNIT class provides methods to smoke or flare units easily. +The UNIT.SmokeBlue(), UNIT.SmokeGreen(),UNIT.SmokeOrange(), UNIT.SmokeRed(), UNIT.SmokeRed() methods +will smoke the unit in the corresponding color. Note that smoking a unit is done at the current position of the DCS Unit. +When the DCS Unit moves for whatever reason, the smoking will still continue! +The UNIT.FlareGreen(), UNIT.FlareRed(), UNIT.FlareWhite(), UNIT.FlareYellow() +methods will fire off a flare in the air with the corresponding color. Note that a flare is a one-off shot and its effect is of very short duration.

+ +

Location Position, Point

+ +

The UNIT class provides methods to obtain the current point or position of the DCS Unit. +The UNIT.GetPointVec2(), UNIT.GetVec3() will obtain the current location of the DCS Unit in a Vec2 (2D) or a point in a Vec3 (3D) vector respectively. +If you want to obtain the complete 3D position including ori�ntation and direction vectors, consult the UNIT.GetPositionVec3() method respectively.

+ +

Test if alive

+ +

The UNIT.IsAlive(), UNIT.IsActive() methods determines if the DCS Unit is alive, meaning, it is existing and active.

+ +

Test for proximity

+ +

The UNIT class contains methods to test the location or proximity against zones or other objects.

+ +

Zones

+ +

To test whether the Unit is within a zone, use the UNIT.IsInZone() or the UNIT.IsNotInZone() methods. Any zone can be tested on, but the zone must be derived from Zone#ZONE_BASE.

+ +

Units

+ +

Test if another DCS Unit is within a given radius of the current DCS Unit, use the UNIT.OtherUnitInRadius() method.

+ + +
+
+

Type Unit

+ +

Type UNIT

+

Field(s)

+
+
+ + +UNIT:Find(DCSUnit) + +
+
+ +

Finds a UNIT from the _DATABASE using a DCSUnit object.

+ +

Parameter

+ +

Return value

+ +

#UNIT: +self

+ +
+
+
+
+ + +UNIT:FindByName(UnitName) + +
+
+ +

Find a UNIT in the _DATABASE using the name of an existing DCS Unit.

+ +

Parameter

+
    +
  • + +

    #string UnitName : +The Unit Name.

    + +
  • +
+

Return value

+ +

#UNIT: +self

+ +
+
+
+
+ + +UNIT:Flare(FlareColor) + +
+
+ +

Signal a flare at the position of the UNIT.

+ +

Parameter

+ +
+
+
+
+ + +UNIT:FlareGreen() + +
+
+ +

Signal a green flare at the position of the UNIT.

+ +
+
+
+
+ + +UNIT:FlareRed() + +
+
+ +

Signal a red flare at the position of the UNIT.

+ +
+
+
+
+ + +UNIT:FlareWhite() + +
+
+ +

Signal a white flare at the position of the UNIT.

+ +
+
+
+
+ + +UNIT:FlareYellow() + +
+
+ +

Signal a yellow flare at the position of the UNIT.

+ +
+
+
+
+ + +UNIT:GetAmmo() + +
+
+ +

Returns the Unit's ammunition.

+ +

Return values

+
    +
  1. + +

    Dcs.DCSWrapper.Unit#Unit.Ammo:

    + + +
  2. +
  3. + +

    #nil: +The DCS Unit is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +UNIT:GetCallsign() + +
+
+ +

Returns the Unit's callsign - the localized string.

+ +

Return values

+
    +
  1. + +

    #string: +The Callsign of the Unit.

    + +
  2. +
  3. + +

    #nil: +The DCS Unit is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +UNIT:GetCategoryName() + +
+
+ +

Returns the category name of the #UNIT.

+ +

Return value

+ +

#string: +Category name = Helicopter, Airplane, Ground Unit, Ship

+ +
+
+
+
+ + +UNIT:GetDCSObject() + +
+
+ + + +

Return value

+ +

Dcs.DCSWrapper.Unit#Unit:

+ + +
+
+
+
+ + +UNIT:GetFuel() + +
+
+ +

Returns relative amount of fuel (from 0.0 to 1.0) the unit has in its internal tanks.

+ + +

If there are additional fuel tanks the value may be greater than 1.0.

+ +

Return values

+
    +
  1. + +

    #number: +The relative amount of fuel (from 0.0 to 1.0).

    + +
  2. +
  3. + +

    #nil: +The DCS Unit is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +UNIT:GetGroup() + +
+
+ +

Returns the unit's group if it exist and nil otherwise.

+ +

Return values

+
    +
  1. + +

    Wrapper.Group#GROUP: +The Group of the Unit.

    + +
  2. +
  3. + +

    #nil: +The DCS Unit is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +UNIT:GetLife() + +
+
+ +

Returns the unit's health.

+ + +

Dead units has health <= 1.0.

+ +

Return values

+
    +
  1. + +

    #number: +The Unit's health value.

    + +
  2. +
  3. + +

    #nil: +The DCS Unit is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +UNIT:GetLife0() + +
+
+ +

Returns the Unit's initial health.

+ +

Return values

+
    +
  1. + +

    #number: +The Unit's initial health value.

    + +
  2. +
  3. + +

    #nil: +The DCS Unit is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +UNIT:GetNumber() + +
+
+ +

Returns the unit's number in the group.

+ + +

The number is the same number the unit has in ME. +It may not be changed during the mission. +If any unit in the group is destroyed, the numbers of another units will not be changed.

+ +

Return values

+
    +
  1. + +

    #number: +The Unit number.

    + +
  2. +
  3. + +

    #nil: +The DCS Unit is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +UNIT:GetPlayerName() + +
+
+ +

Returns name of the player that control the unit or nil if the unit is controlled by A.I.

+ +

Return values

+
    +
  1. + +

    #string: +Player Name

    + +
  2. +
  3. + +

    #nil: +The DCS Unit is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +UNIT:GetPrefix() + +
+
+ +

Returns the prefix name of the DCS Unit.

+ + +

A prefix name is a part of the name before a '#'-sign. +DCS Units spawned with the SPAWN class contain a '#'-sign to indicate the end of the (base) DCS Unit name. +The spawn sequence number and unit number are contained within the name after the '#' sign.

+ +

Return values

+
    +
  1. + +

    #string: +The name of the DCS Unit.

    + +
  2. +
  3. + +

    #nil: +The DCS Unit is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +UNIT:GetRadar() + +
+
+ +

Returns two values:

+ +
    +
  • First value indicates if at least one of the unit's radar(s) is on.
  • +
+ + +
    +
  • Second value is the object of the radar's interest. Not nil only if at least one radar of the unit is tracking a target.
  • +
+ +

Return values

+
    +
  1. + +

    #boolean: + Indicates if at least one of the unit's radar(s) is on.

    + +
  2. +
  3. + +

    Dcs.DCSWrapper.Object#Object: +The object of the radar's interest. Not nil only if at least one radar of the unit is tracking a target.

    + +
  4. +
  5. + +

    #nil: +The DCS Unit is not existing or alive.

    + +
  6. +
+
+
+
+
+ + +UNIT:GetSensors() + +
+
+ +

Returns the unit sensors.

+ +

Return values

+
    +
  1. + +

    Dcs.DCSWrapper.Unit#Unit.Sensors:

    + + +
  2. +
  3. + +

    #nil: +The DCS Unit is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +UNIT:GetThreatLevel() + +
+
+ +

Returns the Unit's A2G threat level on a scale from 1 to 10 ...

+ + +

The following threat levels are foreseen:

+ +
    +
  • Threat level 0: Unit is unarmed.
  • +
  • Threat level 1: Unit is infantry.
  • +
  • Threat level 2: Unit is an infantry vehicle.
  • +
  • Threat level 3: Unit is ground artillery.
  • +
  • Threat level 4: Unit is a tank.
  • +
  • Threat level 5: Unit is a modern tank or ifv with ATGM.
  • +
  • Threat level 6: Unit is a AAA.
  • +
  • Threat level 7: Unit is a SAM or manpad, IR guided.
  • +
  • Threat level 8: Unit is a Short Range SAM, radar guided.
  • +
  • Threat level 9: Unit is a Medium Range SAM, radar guided.
  • +
  • Threat level 10: Unit is a Long Range SAM, radar guided.
  • +
+ +
+
+
+
+ + +UNIT:GetUnits() + +
+
+ +

Returns the UNIT in a UNIT list of one element.

+ +

Return value

+ +

#list: +Wrapper.Unit#UNIT> The UNITs wrappers.

+ +
+
+
+
+ + +UNIT:HandleEvent(Event, EventFunction) + +
+
+ +

Subscribe to a DCS Event.

+ +

Parameters

+
    +
  • + +

    Core.Event#EVENTS Event :

    + +
  • +
  • + +

    #function EventFunction : +(optional) The function to be called when the event occurs for the unit.

    + +
  • +
+

Return value

+ +

#UNIT:

+ + +
+
+
+
+ + +UNIT:HasSEAD() + +
+
+ +

Returns if the unit is SEADable.

+ +

Return values

+
    +
  1. + +

    #boolean: +returns true if the unit is SEADable.

    + +
  2. +
  3. + +

    #nil: +The DCS Unit is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +UNIT:HasSensors(...) + +
+
+ +

Returns if the unit has sensors of a certain type.

+ +

Parameter

+
    +
  • + +

    ... :

    + +
  • +
+

Return values

+
    +
  1. + +

    #boolean: +returns true if the unit has specified types of sensors. This function is more preferable than Unit.getSensors() if you don't want to get information about all the unit's sensors, and just want to check if the unit has specified types of sensors.

    + +
  2. +
  3. + +

    #nil: +The DCS Unit is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +UNIT:InAir() + +
+
+ +

Returns true if the UNIT is in the air.

+ +

Return values

+
    +
  1. + +

    #boolean: +true if in the air.

    + +
  2. +
  3. + +

    #nil: +The UNIT is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +UNIT:IsActive() + +
+
+ +

Returns if the unit is activated.

+ +

Return values

+
    +
  1. + +

    #boolean: +true if Unit is activated.

    + +
  2. +
  3. + +

    #nil: +The DCS Unit is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +UNIT:IsAir() + +
+
+ +

Returns if the unit is of an air category.

+ + +

If the unit is a helicopter or a plane, then this method will return true, otherwise false.

+ +

Return value

+ +

#boolean: +Air category evaluation result.

+ +
+
+
+
+ + +UNIT:IsAlive() + +
+
+ +

Returns if the Unit is alive.

+ + +

If the Unit is not alive, nil is returned.
+If the Unit is alive and active, true is returned.
+If the Unit is alive but not active, false is returned.

+ +

Return values

+
    +
  1. + +

    #boolean: +true if Unit is alive and active.

    + +
  2. +
  3. + +

    #boolean: +false if Unit is alive but not active.

    + +
  4. +
  5. + +

    #nil: +if the Unit is not existing or is not alive.

    + +
  6. +
+
+
+
+
+ + +UNIT:IsFriendly(FriendlyCoalition) + +
+
+ +

Returns if the unit is a friendly unit.

+ +

Parameter

+
    +
  • + +

    FriendlyCoalition :

    + +
  • +
+

Return value

+ +

#boolean: +IsFriendly evaluation result.

+ +
+
+
+
+ + +UNIT:IsGround() + +
+
+ +

Returns if the unit is of an ground category.

+ + +

If the unit is a ground vehicle or infantry, this method will return true, otherwise false.

+ +

Return value

+ +

#boolean: +Ground category evaluation result.

+ +
+
+
+
+ + +UNIT:IsInZone(Zone) + +
+
+ +

Returns true if the unit is within a Zone.

+ +

Parameter

+ +

Return value

+ +

#boolean: +Returns true if the unit is within the Zone#ZONE_BASE

+ +
+
+
+
+ + +UNIT:IsNotInZone(Zone) + +
+
+ +

Returns true if the unit is not within a Zone.

+ +

Parameter

+ +

Return value

+ +

#boolean: +Returns true if the unit is not within the Zone#ZONE_BASE

+ +
+
+
+
+ + +UNIT:IsShip() + +
+
+ +

Returns if the unit is of a ship category.

+ + +

If the unit is a ship, this method will return true, otherwise false.

+ +

Return value

+ +

#boolean: +Ship category evaluation result.

+ +
+
+
+
+ + +UNIT:Name() + +
+
+ +

Return the name of the UNIT.

+ +

Return value

+ +

#string: +The UNIT name.

+ +
+
+
+
+ + +UNIT:OtherUnitInRadius(AwaitUnit, Radius) + +
+
+ +

Returns true if there is an other DCS Unit within a radius of the current 2D point of the DCS Unit.

+ +

Parameters

+
    +
  • + +

    #UNIT AwaitUnit : +The other UNIT wrapper object.

    + +
  • +
  • + +

    Radius : +The radius in meters with the DCS Unit in the centre.

    + +
  • +
+

Return values

+
    +
  1. + + +

    true If the other DCS Unit is within the radius of the 2D point of the DCS Unit.

    + +
  2. +
  3. + +

    #nil: +The DCS Unit is not existing or alive.

    + +
  4. +
+
+
+
+
+ + +UNIT:ReSpawn(SpawnVec3, Heading) + +
+
+ +

Respawn the Unit using a (tweaked) template of the parent Group.

+ + + +

This function will:

+ +
    +
  • Get the current position and heading of the group.
  • +
  • When the unit is alive, it will tweak the template x, y and heading coordinates of the group and the embedded units to the current units positions.
  • +
  • Then it will respawn the re-modelled group. +
  • +
+ +

Parameters

+
    +
  • + +

    Dcs.DCSTypes#Vec3 SpawnVec3 : +The position where to Spawn the new Unit at.

    + +
  • +
  • + +

    #number Heading : +The heading of the unit respawn.

    + +
  • +
+
+
+
+
+ + +UNIT:Register(UnitName) + +
+
+ +

Create a new UNIT from DCSUnit.

+ +

Parameter

+
    +
  • + +

    #string UnitName : +The name of the DCS unit.

    + +
  • +
+

Return value

+ +

#UNIT:

+ + +
+
+
+
+ + +UNIT:ResetEvents() + +
+
+ +

Reset the subscriptions.

+ +

Return value

+ +

#UNIT:

+ + +
+
+
+
+ + +UNIT:Smoke(SmokeColor, Range) + +
+
+ +

Smoke the UNIT.

+ +

Parameters

+
    +
  • + +

    SmokeColor :

    + +
  • +
  • + +

    Range :

    + +
  • +
+
+
+
+
+ + +UNIT:SmokeBlue() + +
+
+ +

Smoke the UNIT Blue.

+ +
+
+
+
+ + +UNIT:SmokeGreen() + +
+
+ +

Smoke the UNIT Green.

+ +
+
+
+
+ + +UNIT:SmokeOrange() + +
+
+ +

Smoke the UNIT Orange.

+ +
+
+
+
+ + +UNIT:SmokeRed() + +
+
+ +

Smoke the UNIT Red.

+ +
+
+
+
+ + +UNIT:SmokeWhite() + +
+
+ +

Smoke the UNIT White.

+ +
+
+
+
+ + +UNIT:UnHandleEvent(Event) + +
+
+ +

UnSubscribe to a DCS event.

+ +

Parameter

+ +

Return value

+ +

#UNIT:

+ + +
+
+ +

Type Unit.SensorType

+ +

Unit.SensorType

+ +

Field(s)

+
+
+ + +Unit.SensorType.IRST + +
+
+ + + +
+
+
+
+ + +Unit.SensorType.OPTIC + +
+
+ + + +
+
+
+
+ + +Unit.SensorType.RADAR + +
+
+ + + +
+
+
+
+ + +Unit.SensorType.RWR + +
+
+ + + +
+
+ +

Type list

+ +
+ +
+ + diff --git a/docs/Documentation/Utils.html b/docs/Documentation/Utils.html new file mode 100644 index 000000000..553a2be0e --- /dev/null +++ b/docs/Documentation/Utils.html @@ -0,0 +1,874 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Utils

+ +

This module contains derived utilities taken from the MIST framework, +which are excellent tools to be reused in an OO environment!.

+ + + +

Authors:

+ +
    +
  • Grimes : Design & Programming of the MIST framework.
  • +
+ +

Contributions:

+ +
    +
  • FlightControl : Rework to OO framework
  • +
+ + +

Global(s)

+ + + + + + + + + + + + + + + + + +
FLARECOLOR + +
SMOKECOLOR + +
UTILS + +
lookup_table + +
+

Type FLARECOLOR

+ + + + + + + + + + + + + + + + + +
FLARECOLOR.Green + +
FLARECOLOR.Red + +
FLARECOLOR.White + +
FLARECOLOR.Yellow + +
+ +

Type SMOKECOLOR

+ + + + + + + + + + + + + + + + + + + + + +
SMOKECOLOR.Blue + +
SMOKECOLOR.Green + +
SMOKECOLOR.Orange + +
SMOKECOLOR.Red + +
SMOKECOLOR.White + +
+ +

Type UTILS

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
UTILS.BasicSerialize(s) + +
UTILS.DeepCopy(object) + +
UTILS.DoString(s) + +
UTILS.FeetToMeters(feet) + +
UTILS.KmphToMps(kmph) + +
UTILS.KnotsToMps(knots) + +
UTILS.MetersToFeet(meters) + +
UTILS.MetersToNM(meters) + +
UTILS.MpsToKmph(mps) + +
UTILS.MpsToKnots(mps) + +
UTILS.NMToMeters(NM) + +
UTILS.OneLineSerialize(tbl) + +
UTILS.Round(num, idp) +

From http://lua-users.org/wiki/SimpleRound +use negative idp for rounding ahead of decimal place, positive for rounding after decimal place

+
UTILS.ToDegree(angle) + +
UTILS.ToRadian(angle) + +
UTILS.tostringLL(lat, lon, acc, DMS) + +
+ +

Global(s)

+
+
+ + #FLARECOLOR + +FLARECOLOR + +
+
+ + + +
+
+
+
+ + #SMOKECOLOR + +SMOKECOLOR + +
+
+ + + +
+
+
+
+ + #UTILS + +UTILS + +
+
+ + + +
+
+
+
+ + + +lookup_table + +
+
+ + + +
+
+

Type Utils

+ +

Type FLARECOLOR

+

Field(s)

+
+
+ + +FLARECOLOR.Green + +
+
+ + + +
+
+
+
+ + +FLARECOLOR.Red + +
+
+ + + +
+
+
+
+ + +FLARECOLOR.White + +
+
+ + + +
+
+
+
+ + +FLARECOLOR.Yellow + +
+
+ + + +
+
+ +

Type SMOKECOLOR

+

Field(s)

+
+
+ + +SMOKECOLOR.Blue + +
+
+ + + +
+
+
+
+ + +SMOKECOLOR.Green + +
+
+ + + +
+
+
+
+ + +SMOKECOLOR.Orange + +
+
+ + + +
+
+
+
+ + +SMOKECOLOR.Red + +
+
+ + + +
+
+
+
+ + +SMOKECOLOR.White + +
+
+ + + +
+
+ +

Type UTILS

+ +

Utilities static class.

+ +

Field(s)

+
+
+ + +UTILS.BasicSerialize(s) + +
+
+ + + + +

porting in Slmod's "safestring" basic serialize

+ +

Parameter

+
    +
  • + +

    s :

    + +
  • +
+
+
+
+
+ + +UTILS.DeepCopy(object) + +
+
+ + + + +

from http://lua-users.org/wiki/CopyTable

+ +

Parameter

+
    +
  • + +

    object :

    + +
  • +
+
+
+
+
+ + +UTILS.DoString(s) + +
+
+ + + + +

porting in Slmod's dostring

+ +

Parameter

+
    +
  • + +

    s :

    + +
  • +
+
+
+
+
+ + +UTILS.FeetToMeters(feet) + +
+
+ + + +

Parameter

+
    +
  • + +

    feet :

    + +
  • +
+
+
+
+
+ + +UTILS.KmphToMps(kmph) + +
+
+ + + +

Parameter

+
    +
  • + +

    kmph :

    + +
  • +
+
+
+
+
+ + +UTILS.KnotsToMps(knots) + +
+
+ + + +

Parameter

+
    +
  • + +

    knots :

    + +
  • +
+
+
+
+
+ + +UTILS.MetersToFeet(meters) + +
+
+ + + +

Parameter

+
    +
  • + +

    meters :

    + +
  • +
+
+
+
+
+ + +UTILS.MetersToNM(meters) + +
+
+ + + +

Parameter

+
    +
  • + +

    meters :

    + +
  • +
+
+
+
+
+ + +UTILS.MpsToKmph(mps) + +
+
+ + + +

Parameter

+
    +
  • + +

    mps :

    + +
  • +
+
+
+
+
+ + +UTILS.MpsToKnots(mps) + +
+
+ + + +

Parameter

+
    +
  • + +

    mps :

    + +
  • +
+
+
+
+
+ + +UTILS.NMToMeters(NM) + +
+
+ + + +

Parameter

+
    +
  • + +

    NM :

    + +
  • +
+
+
+
+
+ + +UTILS.OneLineSerialize(tbl) + +
+
+ + + + +

porting in Slmod's serialize_slmod2

+ +

Parameter

+
    +
  • + +

    tbl :

    + +
  • +
+
+
+
+
+ + +UTILS.Round(num, idp) + +
+
+ +

From http://lua-users.org/wiki/SimpleRound +use negative idp for rounding ahead of decimal place, positive for rounding after decimal place

+ +

Parameters

+
    +
  • + +

    num :

    + +
  • +
  • + +

    idp :

    + +
  • +
+
+
+
+
+ + +UTILS.ToDegree(angle) + +
+
+ + + +

Parameter

+
    +
  • + +

    angle :

    + +
  • +
+
+
+
+
+ + +UTILS.ToRadian(angle) + +
+
+ + + +

Parameter

+
    +
  • + +

    angle :

    + +
  • +
+
+
+
+
+ + +UTILS.tostringLL(lat, lon, acc, DMS) + +
+
+ + + + +

acc: +in DM: decimal point of minutes. +In DMS: decimal point of seconds. +position after the decimal of the least significant digit: +So: +42.32 - acc of 2.

+ + +

Parameters

+
    +
  • + +

    lat :

    + +
  • +
  • + +

    lon :

    + +
  • +
  • + +

    acc :

    + +
  • +
  • + +

    DMS :

    + +
  • +
+
+
+ +
+ +
+ + diff --git a/docs/Documentation/Zone.html b/docs/Documentation/Zone.html new file mode 100644 index 000000000..57eba9a61 --- /dev/null +++ b/docs/Documentation/Zone.html @@ -0,0 +1,2399 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module Zone

+ +

Core - ZONE classes define zones within your mission of various forms, with various capabilities.

+ + + +

Banner Image

+ +
+ +

There are essentially two core functions that zones accomodate:

+ +
    +
  • Test if an object is within the zone boundaries.
  • +
  • Provide the zone behaviour. Some zones are static, while others are moveable.
  • +
+ +

The object classes are using the zone classes to test the zone boundaries, which can take various forms:

+ +
    +
  • Test if completely within the zone.
  • +
  • Test if partly within the zone (for Group#GROUP objects).
  • +
  • Test if not in the zone.
  • +
  • Distance to the nearest intersecting point of the zone.
  • +
  • Distance to the center of the zone.
  • +
  • ...
  • +
+ +

Each of these ZONE classes have a zone name, and specific parameters defining the zone type:

+ +
    +
  • #ZONE_BASE: The ZONE_BASE class defining the base for all other zone classes.
  • +
  • #ZONE_RADIUS: The ZONE_RADIUS class defined by a zone name, a location and a radius.
  • +
  • #ZONE: The ZONE class, defined by the zone name as defined within the Mission Editor.
  • +
  • #ZONE_UNIT: The ZONE_UNIT class defines by a zone around a Unit#UNIT with a radius.
  • +
  • #ZONE_GROUP: The ZONE_GROUP class defines by a zone around a Group#GROUP with a radius.
  • +
  • #ZONE_POLYGON: The ZONE_POLYGON class defines by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.
  • +
+ +
+ +

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-02-28: ZONE_BASE:IsVec2InZone() replaces ZONE_BASE:IsPointVec2InZone().
+2017-02-28: ZONE_BASE:IsVec3InZone() replaces ZONE_BASE:IsPointVec3InZone().
+2017-02-28: ZONE_RADIUS:IsVec2InZone() replaces ZONE_RADIUS:IsPointVec2InZone().
+2017-02-28: ZONE_RADIUS:IsVec3InZone() replaces ZONE_RADIUS:IsPointVec3InZone().
+2017-02-28: ZONE_POLYGON:IsVec2InZone() replaces ZONE_POLYGON:IsPointVec2InZone().
+2017-02-28: ZONE_POLYGON:IsVec3InZone() replaces ZONE_POLYGON:IsPointVec3InZone().

+ +

2017-02-18: ZONE_POLYGON_BASE:GetRandomPointVec2() added.

+ +

2017-02-18: ZONE_POLYGON_BASE:GetRandomPointVec3() added.

+ +

2017-02-18: ZONE_RADIUS:GetRandomPointVec3( inner, outer ) added.

+ +

2017-02-18: ZONE_RADIUS:GetRandomPointVec2( inner, outer ) added.

+ +

2016-08-15: ZONE_BASE:GetName() added.

+ +

2016-08-15: ZONE_BASE:SetZoneProbability( ZoneProbability ) added.

+ +

2016-08-15: ZONE_BASE:GetZoneProbability() added.

+ +

2016-08-15: ZONE_BASE:GetZoneMaybe() added.

+ +
+ + +

Global(s)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ZONE +

ZONE class, extends Zone#ZONE_RADIUS

+ +

The ZONE class, defined by the zone name as defined within the Mission Editor.

+
ZONE_BASE +

ZONE_BASE class, extends Base#BASE

+ +

This class is an abstract BASE class for derived classes, and is not meant to be instantiated.

+
ZONE_GROUP +

ZONE_GROUP class, extends Zone#ZONE_RADIUS

+ +

The ZONE_GROUP class defines by a zone around a Group#GROUP with a radius.

+
ZONE_POLYGON +

ZONE_POLYGON class, extends Zone#ZONEPOLYGONBASE

+ +

The ZONE_POLYGON class defined by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.

+
ZONE_POLYGON_BASE +

ZONEPOLYGONBASE class, extends Zone#ZONE_BASE

+ +

The ZONEPOLYGONBASE class defined by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.

+
ZONE_RADIUS +

ZONE_RADIUS class, extends Zone#ZONE_BASE

+ +

The ZONE_RADIUS class defined by a zone name, a location and a radius.

+
ZONE_UNIT +

ZONE_UNIT class, extends Zone#ZONE_RADIUS

+ +

The ZONE_UNIT class defined by a zone around a Unit#UNIT with a radius.

+
+

Type ZONE

+ + + + + +
ZONE:New(ZoneName) +

Constructor of ZONE, taking the zone name.

+
+ +

Type ZONE_BASE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ZONE_BASE:BoundZone() +

Bound the zone boundaries with a tires.

+
ZONE_BASE:GetBoundingSquare() +

Get the bounding square the zone.

+
ZONE_BASE:GetName() +

Returns the name of the zone.

+
ZONE_BASE:GetPointVec2(Height) +

Returns a Point#POINT_VEC2 of the zone.

+
ZONE_BASE:GetPointVec3(Height) +

Returns a Point#POINT_VEC3 of the zone.

+
ZONE_BASE:GetRandomPointVec2() +

Define a random Point#POINT_VEC2 within the zone.

+
ZONE_BASE:GetRandomPointVec3() +

Define a random Point#POINT_VEC3 within the zone.

+
ZONE_BASE:GetRandomVec2() +

Define a random DCSTypes#Vec2 within the zone.

+
ZONE_BASE:GetVec2() +

Returns the DCSTypes#Vec2 coordinate of the zone.

+
ZONE_BASE:GetVec3(Height) +

Returns the DCSTypes#Vec3 of the zone.

+
ZONE_BASE:GetZoneMaybe() +

Get the zone taking into account the randomization probability of a zone to be selected.

+
ZONE_BASE:GetZoneProbability() +

Get the randomization probability of a zone to be selected.

+
ZONE_BASE:IsPointVec2InZone(PointVec2) +

Returns if a PointVec2 is within the zone.

+
ZONE_BASE:IsPointVec3InZone(PointVec3) +

Returns if a PointVec3 is within the zone.

+
ZONE_BASE:IsVec2InZone(Vec2) +

Returns if a Vec2 is within the zone.

+
ZONE_BASE:IsVec3InZone(Vec3) +

Returns if a Vec3 is within the zone.

+
ZONE_BASE:New(ZoneName) +

ZONE_BASE constructor

+
ZONE_BASE:SetZoneProbability(ZoneProbability) +

Set the randomization probability of a zone to be selected.

+
ZONE_BASE:SmokeZone(SmokeColor) +

Smokes the zone boundaries in a color.

+
ZONE_BASE.ZoneName +

Name of the zone.

+
ZONE_BASE.ZoneProbability +

A value between 0 and 1. 0 = 0% and 1 = 100% probability.

+
+ +

Type ZONE_BASE.BoundingSquare

+ + + + + + + + + + + + + + + + + +
ZONE_BASE.BoundingSquare.x1 +

The lower x coordinate (left down)

+
ZONE_BASE.BoundingSquare.x2 +

The higher x coordinate (right up)

+
ZONE_BASE.BoundingSquare.y1 +

The lower y coordinate (left down)

+
ZONE_BASE.BoundingSquare.y2 +

The higher y coordinate (right up)

+
+ +

Type ZONE_GROUP

+ + + + + + + + + + + + + + + + + +
ZONE_GROUP:GetRandomVec2() +

Returns a random location within the zone of the Group.

+
ZONE_GROUP:GetVec2() +

Returns the current location of the Group.

+
ZONE_GROUP:New(ZoneName, ZoneGROUP, Radius) +

Constructor to create a ZONE_GROUP instance, taking the zone name, a zone Group#GROUP and a radius.

+
ZONE_GROUP.ZoneGROUP + +
+ +

Type ZONE_POLYGON

+ + + + + +
ZONE_POLYGON:New(ZoneName, ZoneGroup) +

Constructor to create a ZONE_POLYGON instance, taking the zone name and the name of the Group#GROUP defined within the Mission Editor.

+
+ +

Type ZONE_POLYGON_BASE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ZONE_POLYGON_BASE:BoundZone(UnBound) +

Smokes the zone boundaries in a color.

+
ZONE_POLYGON_BASE:Flush() +

Flush polygon coordinates as a table in DCS.log.

+
ZONE_POLYGON_BASE:GetBoundingSquare() +

Get the bounding square the zone.

+
ZONE_POLYGON_BASE:GetRandomPointVec2() +

Return a Point#POINT_VEC2 object representing a random 2D point at landheight within the zone.

+
ZONE_POLYGON_BASE:GetRandomPointVec3() +

Return a Point#POINT_VEC3 object representing a random 3D point at landheight within the zone.

+
ZONE_POLYGON_BASE:GetRandomVec2() +

Define a random DCSTypes#Vec2 within the zone.

+
ZONE_POLYGON_BASE:GetVec2() +

Returns the center location of the polygon.

+
ZONE_POLYGON_BASE:IsVec2InZone(Vec2) +

Returns if a location is within the zone.

+
ZONE_POLYGON_BASE:New(ZoneName, PointsArray) +

Constructor to create a ZONEPOLYGONBASE instance, taking the zone name and an array of DCSTypes#Vec2, forming a polygon.

+
ZONE_POLYGON_BASE.Polygon +

The polygon defined by an array of DCSTypes#Vec2.

+
ZONE_POLYGON_BASE:SmokeZone(SmokeColor) +

Smokes the zone boundaries in a color.

+
+ +

Type ZONE_RADIUS

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ZONE_RADIUS:BoundZone(Points, UnBound, CountryID) +

Bounds the zone with tires.

+
ZONE_RADIUS:FlareZone(FlareColor, Points, Azimuth) +

Flares the zone boundaries in a color.

+
ZONE_RADIUS:GetRadius() +

Returns the radius of the zone.

+
ZONE_RADIUS:GetRandomPointVec2(inner, outer) +

Returns a Point#POINT_VEC2 object reflecting a random 2D location within the zone.

+
ZONE_RADIUS:GetRandomPointVec3(inner, outer) +

Returns a Point#POINT_VEC3 object reflecting a random 3D location within the zone.

+
ZONE_RADIUS:GetRandomVec2(inner, outer) +

Returns a random Vec2 location within the zone.

+
ZONE_RADIUS:GetVec2() +

Returns the DCSTypes#Vec2 of the zone.

+
ZONE_RADIUS:GetVec3(Height) +

Returns the DCSTypes#Vec3 of the ZONE_RADIUS.

+
ZONE_RADIUS:IsVec2InZone(Vec2) +

Returns if a location is within the zone.

+
ZONE_RADIUS:IsVec3InZone(Vec3) +

Returns if a point is within the zone.

+
ZONE_RADIUS:New(ZoneName, Vec2, Radius) +

Constructor of #ZONE_RADIUS, taking the zone name, the zone location and a radius.

+
ZONE_RADIUS.Radius +

The radius of the zone.

+
ZONE_RADIUS:SetRadius(Radius) +

Sets the radius of the zone.

+
ZONE_RADIUS:SetVec2(Vec2) +

Sets the DCSTypes#Vec2 of the zone.

+
ZONE_RADIUS:SmokeZone(SmokeColor, Points) +

Smokes the zone boundaries in a color.

+
ZONE_RADIUS.Vec2 +

The current location of the zone.

+
+ +

Type ZONE_UNIT

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ZONE_UNIT:GetRandomVec2() +

Returns a random location within the zone.

+
ZONE_UNIT:GetVec2() +

Returns the current location of the Unit#UNIT.

+
ZONE_UNIT:GetVec3(Height) +

Returns the DCSTypes#Vec3 of the ZONE_UNIT.

+
ZONE_UNIT.LastVec2 + +
ZONE_UNIT:New(ZoneName, ZoneUNIT, Radius) +

Constructor to create a ZONE_UNIT instance, taking the zone name, a zone unit and a radius.

+
ZONE_UNIT.ZoneUNIT + +
+ +

Global(s)

+
+
+ + #ZONE + +ZONE + +
+
+ +

ZONE class, extends Zone#ZONE_RADIUS

+ +

The ZONE class, defined by the zone name as defined within the Mission Editor.

+ + +

This class implements the inherited functions from #ZONE_RADIUS taking into account the own zone format and properties.

+ + +
+
+
+
+ + #ZONE_BASE + +ZONE_BASE + +
+
+ +

ZONE_BASE class, extends Base#BASE

+ +

This class is an abstract BASE class for derived classes, and is not meant to be instantiated.

+ + + +

Each zone has a name:

+ + + +

Each zone implements two polymorphic functions defined in Zone#ZONE_BASE:

+ + + +

A zone has a probability factor that can be set to randomize a selection between zones:

+ +
    +
  • ZONE_BASE.SetRandomizeProbability(): Set the randomization probability of a zone to be selected, taking a value between 0 and 1 ( 0 = 0%, 1 = 100% )
  • +
  • ZONE_BASE.GetRandomizeProbability(): Get the randomization probability of a zone to be selected, passing a value between 0 and 1 ( 0 = 0%, 1 = 100% )
  • +
  • ZONE_BASE.GetZoneMaybe(): Get the zone taking into account the randomization probability. nil is returned if this zone is not a candidate.
  • +
+ +

A zone manages Vectors:

+ + + +

A zone has a bounding square:

+ + + +

A zone can be marked:

+ + + + +
+
+
+
+ + #ZONE_GROUP + +ZONE_GROUP + +
+
+ +

ZONE_GROUP class, extends Zone#ZONE_RADIUS

+ +

The ZONE_GROUP class defines by a zone around a Group#GROUP with a radius.

+ + +

The current leader of the group defines the center of the zone. +This class implements the inherited functions from Zone#ZONE_RADIUS taking into account the own zone format and properties.

+ + +
+
+
+
+ + #ZONE_POLYGON + +ZONE_POLYGON + +
+
+ +

ZONE_POLYGON class, extends Zone#ZONEPOLYGONBASE

+ +

The ZONE_POLYGON class defined by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.

+ + +

This class implements the inherited functions from Zone#ZONE_RADIUS taking into account the own zone format and properties.

+ + +
+
+
+
+ + #ZONE_POLYGON_BASE + +ZONE_POLYGON_BASE + +
+
+ +

ZONEPOLYGONBASE class, extends Zone#ZONE_BASE

+ +

The ZONEPOLYGONBASE class defined by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.

+ + +

This class implements the inherited functions from Zone#ZONE_RADIUS taking into account the own zone format and properties. +This class is an abstract BASE class for derived classes, and is not meant to be instantiated.

+ +

Zone point randomization

+ +

Various functions exist to find random points within the zone.

+ + + + +
+
+
+
+ + #ZONE_RADIUS + +ZONE_RADIUS + +
+
+ +

ZONE_RADIUS class, extends Zone#ZONE_BASE

+ +

The ZONE_RADIUS class defined by a zone name, a location and a radius.

+ + +

This class implements the inherited functions from Core.Zone#ZONE_BASE taking into account the own zone format and properties.

+ +

ZONE_RADIUS constructor

+ + + +

Manage the radius of the zone

+ + + +

Manage the location of the zone

+ + + +

Zone point randomization

+ +

Various functions exist to find random points within the zone.

+ + + + +
+
+
+
+ + #ZONE_UNIT + +ZONE_UNIT + +
+
+ +

ZONE_UNIT class, extends Zone#ZONE_RADIUS

+ +

The ZONE_UNIT class defined by a zone around a Unit#UNIT with a radius.

+ + +

This class implements the inherited functions from #ZONE_RADIUS taking into account the own zone format and properties.

+ + +
+
+

Type Zone

+ +

Type ZONE

+

Field(s)

+
+
+ + +ZONE:New(ZoneName) + +
+
+ +

Constructor of ZONE, taking the zone name.

+ +

Parameter

+
    +
  • + +

    #string ZoneName : +The name of the zone as defined within the mission editor.

    + +
  • +
+

Return value

+ +

#ZONE:

+ + +
+
+ +

Type ZONE_BASE

+ +

The ZONE_BASE class

+ +

Field(s)

+
+
+ + +ZONE_BASE:BoundZone() + +
+
+ +

Bound the zone boundaries with a tires.

+ +
+
+
+
+ + +ZONE_BASE:GetBoundingSquare() + +
+
+ +

Get the bounding square the zone.

+ +

Return value

+ +

#nil: +The bounding square.

+ +
+
+
+
+ + +ZONE_BASE:GetName() + +
+
+ +

Returns the name of the zone.

+ +

Return value

+ +

#string: +The name of the zone.

+ +
+
+
+
+ + +ZONE_BASE:GetPointVec2(Height) + +
+
+ +

Returns a Point#POINT_VEC2 of the zone.

+ +

Parameter

+
    +
  • + +

    Dcs.DCSTypes#Distance Height : +The height to add to the land height where the center of the zone is located.

    + +
  • +
+

Return value

+ +

Core.Point#POINT_VEC2: +The PointVec2 of the zone.

+ +
+
+
+
+ + +ZONE_BASE:GetPointVec3(Height) + +
+
+ +

Returns a Point#POINT_VEC3 of the zone.

+ +

Parameter

+
    +
  • + +

    Dcs.DCSTypes#Distance Height : +The height to add to the land height where the center of the zone is located.

    + +
  • +
+

Return value

+ +

Core.Point#POINT_VEC3: +The PointVec3 of the zone.

+ +
+
+
+
+ + +ZONE_BASE:GetRandomPointVec2() + +
+
+ +

Define a random Point#POINT_VEC2 within the zone.

+ +

Return value

+ +

Core.Point#POINT_VEC2: +The PointVec2 coordinates.

+ +
+
+
+
+ + +ZONE_BASE:GetRandomPointVec3() + +
+
+ +

Define a random Point#POINT_VEC3 within the zone.

+ +

Return value

+ +

Core.Point#POINT_VEC3: +The PointVec3 coordinates.

+ +
+
+
+
+ + +ZONE_BASE:GetRandomVec2() + +
+
+ +

Define a random DCSTypes#Vec2 within the zone.

+ +

Return value

+ +

Dcs.DCSTypes#Vec2: +The Vec2 coordinates.

+ +
+
+
+
+ + +ZONE_BASE:GetVec2() + +
+
+ +

Returns the DCSTypes#Vec2 coordinate of the zone.

+ +

Return value

+ +

#nil:

+ + +
+
+
+
+ + +ZONE_BASE:GetVec3(Height) + +
+
+ +

Returns the DCSTypes#Vec3 of the zone.

+ +

Parameter

+
    +
  • + +

    Dcs.DCSTypes#Distance Height : +The height to add to the land height where the center of the zone is located.

    + +
  • +
+

Return value

+ +

Dcs.DCSTypes#Vec3: +The Vec3 of the zone.

+ +
+
+
+
+ + +ZONE_BASE:GetZoneMaybe() + +
+
+ +

Get the zone taking into account the randomization probability of a zone to be selected.

+ +

Return values

+
    +
  1. + +

    #ZONE_BASE: +The zone is selected taking into account the randomization probability factor.

    + +
  2. +
  3. + +

    #nil: +The zone is not selected taking into account the randomization probability factor.

    + +
  4. +
+
+
+
+
+ + +ZONE_BASE:GetZoneProbability() + +
+
+ +

Get the randomization probability of a zone to be selected.

+ +

Return value

+ +

#number: +A value between 0 and 1. 0 = 0% and 1 = 100% probability.

+ +
+
+
+
+ + +ZONE_BASE:IsPointVec2InZone(PointVec2) + +
+
+ +

Returns if a PointVec2 is within the zone.

+ +

Parameter

+ +

Return value

+ +

#boolean: +true if the PointVec2 is within the zone.

+ +
+
+
+
+ + +ZONE_BASE:IsPointVec3InZone(PointVec3) + +
+
+ +

Returns if a PointVec3 is within the zone.

+ +

Parameter

+ +

Return value

+ +

#boolean: +true if the PointVec3 is within the zone.

+ +
+
+
+
+ + +ZONE_BASE:IsVec2InZone(Vec2) + +
+
+ +

Returns if a Vec2 is within the zone.

+ +

Parameter

+ +

Return value

+ +

#boolean: +true if the Vec2 is within the zone.

+ +
+
+
+
+ + +ZONE_BASE:IsVec3InZone(Vec3) + +
+
+ +

Returns if a Vec3 is within the zone.

+ +

Parameter

+ +

Return value

+ +

#boolean: +true if the Vec3 is within the zone.

+ +
+
+
+
+ + +ZONE_BASE:New(ZoneName) + +
+
+ +

ZONE_BASE constructor

+ +

Parameter

+
    +
  • + +

    #string ZoneName : +Name of the zone.

    + +
  • +
+

Return value

+ +

#ZONE_BASE: +self

+ +
+
+
+
+ + +ZONE_BASE:SetZoneProbability(ZoneProbability) + +
+
+ +

Set the randomization probability of a zone to be selected.

+ +

Parameter

+
    +
  • + +

    ZoneProbability : +A value between 0 and 1. 0 = 0% and 1 = 100% probability.

    + +
  • +
+
+
+
+
+ + +ZONE_BASE:SmokeZone(SmokeColor) + +
+
+ +

Smokes the zone boundaries in a color.

+ +

Parameter

+ +
+
+
+
+ + #string + +ZONE_BASE.ZoneName + +
+
+ +

Name of the zone.

+ +
+
+
+
+ + #number + +ZONE_BASE.ZoneProbability + +
+
+ +

A value between 0 and 1. 0 = 0% and 1 = 100% probability.

+ +
+
+ +

Type ZONE_BASE.BoundingSquare

+ +

The ZONE_BASE.BoundingSquare

+ +

Field(s)

+
+
+ + Dcs.DCSTypes#Distance + +ZONE_BASE.BoundingSquare.x1 + +
+
+ +

The lower x coordinate (left down)

+ +
+
+
+
+ + Dcs.DCSTypes#Distance + +ZONE_BASE.BoundingSquare.x2 + +
+
+ +

The higher x coordinate (right up)

+ +
+
+
+
+ + Dcs.DCSTypes#Distance + +ZONE_BASE.BoundingSquare.y1 + +
+
+ +

The lower y coordinate (left down)

+ +
+
+
+
+ + Dcs.DCSTypes#Distance + +ZONE_BASE.BoundingSquare.y2 + +
+
+ +

The higher y coordinate (right up)

+ +
+
+ +

Type ZONE_GROUP

+

Field(s)

+
+
+ + +ZONE_GROUP:GetRandomVec2() + +
+
+ +

Returns a random location within the zone of the Group.

+ +

Return value

+ +

Dcs.DCSTypes#Vec2: +The random location of the zone based on the Group location.

+ +
+
+
+
+ + +ZONE_GROUP:GetVec2() + +
+
+ +

Returns the current location of the Group.

+ +

Return value

+ +

Dcs.DCSTypes#Vec2: +The location of the zone based on the Group location.

+ +
+
+
+
+ + +ZONE_GROUP:New(ZoneName, ZoneGROUP, Radius) + +
+
+ +

Constructor to create a ZONE_GROUP instance, taking the zone name, a zone Group#GROUP and a radius.

+ +

Parameters

+ +

Return value

+ +

#ZONE_GROUP: +self

+ +
+
+
+
+ + Wrapper.Group#GROUP + +ZONE_GROUP.ZoneGROUP + +
+
+ + + +
+
+ +

Type ZONE_POLYGON

+

Field(s)

+
+
+ + +ZONE_POLYGON:New(ZoneName, ZoneGroup) + +
+
+ +

Constructor to create a ZONE_POLYGON instance, taking the zone name and the name of the Group#GROUP defined within the Mission Editor.

+ + +

The Group#GROUP waypoints define the polygon corners. The first and the last point are automatically connected by ZONE_POLYGON.

+ +

Parameters

+
    +
  • + +

    #string ZoneName : +Name of the zone.

    + +
  • +
  • + +

    Wrapper.Group#GROUP ZoneGroup : +The GROUP waypoints as defined within the Mission Editor define the polygon shape.

    + +
  • +
+

Return value

+ +

#ZONE_POLYGON: +self

+ +
+
+ +

Type ZONE_POLYGON_BASE

+

Field(s)

+
+
+ + +ZONE_POLYGON_BASE:BoundZone(UnBound) + +
+
+ +

Smokes the zone boundaries in a color.

+ +

Parameter

+
    +
  • + +

    #boolean UnBound : +If true, the tyres will be destroyed.

    + +
  • +
+

Return value

+ +

#ZONEPOLYGONBASE: +self

+ +
+
+
+
+ + +ZONE_POLYGON_BASE:Flush() + +
+
+ +

Flush polygon coordinates as a table in DCS.log.

+ +

Return value

+ +

#ZONEPOLYGONBASE: +self

+ +
+
+
+
+ + +ZONE_POLYGON_BASE:GetBoundingSquare() + +
+
+ +

Get the bounding square the zone.

+ +

Return value

+ +

#ZONEPOLYGONBASE.BoundingSquare: +The bounding square.

+ +
+
+
+
+ + +ZONE_POLYGON_BASE:GetRandomPointVec2() + +
+
+ +

Return a Point#POINT_VEC2 object representing a random 2D point at landheight within the zone.

+ +

Return value

+ + +

Point#POINT_VEC2

+ +
+
+
+
+ + +ZONE_POLYGON_BASE:GetRandomPointVec3() + +
+
+ +

Return a Point#POINT_VEC3 object representing a random 3D point at landheight within the zone.

+ +

Return value

+ + +

Point#POINT_VEC3

+ +
+
+
+
+ + +ZONE_POLYGON_BASE:GetRandomVec2() + +
+
+ +

Define a random DCSTypes#Vec2 within the zone.

+ +

Return value

+ +

Dcs.DCSTypes#Vec2: +The Vec2 coordinate.

+ +
+
+
+
+ + +ZONE_POLYGON_BASE:GetVec2() + +
+
+ +

Returns the center location of the polygon.

+ +

Return value

+ +

Dcs.DCSTypes#Vec2: +The location of the zone based on the Group location.

+ +
+
+
+
+ + +ZONE_POLYGON_BASE:IsVec2InZone(Vec2) + +
+
+ +

Returns if a location is within the zone.

+ + +

Source learned and taken from: https://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html

+ +

Parameter

+ +

Return value

+ +

#boolean: +true if the location is within the zone.

+ +
+
+
+
+ + +ZONE_POLYGON_BASE:New(ZoneName, PointsArray) + +
+
+ +

Constructor to create a ZONEPOLYGONBASE instance, taking the zone name and an array of DCSTypes#Vec2, forming a polygon.

+ + +

The Group#GROUP waypoints define the polygon corners. The first and the last point are automatically connected.

+ +

Parameters

+ +

Return value

+ +

#ZONEPOLYGONBASE: +self

+ +
+
+
+
+ + #ZONE_POLYGON_BASE.ListVec2 + +ZONE_POLYGON_BASE.Polygon + +
+
+ +

The polygon defined by an array of DCSTypes#Vec2.

+ +
+
+
+
+ + +ZONE_POLYGON_BASE:SmokeZone(SmokeColor) + +
+
+ +

Smokes the zone boundaries in a color.

+ +

Parameter

+ +

Return value

+ +

#ZONEPOLYGONBASE: +self

+ +
+
+ +

Type ZONE_POLYGON_BASE.BoundingSquare

+ +

Type ZONE_POLYGON_BASE.ListVec2

+ +

A points array.

+ + +

Type ZONE_RADIUS

+ +

The ZONE_RADIUS class, defined by a zone name, a location and a radius.

+ +

Field(s)

+
+
+ + +ZONE_RADIUS:BoundZone(Points, UnBound, CountryID) + +
+
+ +

Bounds the zone with tires.

+ +

Parameters

+
    +
  • + +

    #number Points : +(optional) The amount of points in the circle.

    + +
  • +
  • + +

    #boolean UnBound : +If true the tyres will be destroyed.

    + +
  • +
  • + +

    CountryID :

    + +
  • +
+

Return value

+ +

#ZONE_RADIUS: +self

+ +
+
+
+
+ + +ZONE_RADIUS:FlareZone(FlareColor, Points, Azimuth) + +
+
+ +

Flares the zone boundaries in a color.

+ +

Parameters

+
    +
  • + +

    Utilities.Utils#FLARECOLOR FlareColor : +The flare color.

    + +
  • +
  • + +

    #number Points : +(optional) The amount of points in the circle.

    + +
  • +
  • + +

    Dcs.DCSTypes#Azimuth Azimuth : +(optional) Azimuth The azimuth of the flare.

    + +
  • +
+

Return value

+ +

#ZONE_RADIUS: +self

+ +
+
+
+
+ + +ZONE_RADIUS:GetRadius() + +
+
+ +

Returns the radius of the zone.

+ +

Return value

+ +

Dcs.DCSTypes#Distance: +The radius of the zone.

+ +
+
+
+
+ + +ZONE_RADIUS:GetRandomPointVec2(inner, outer) + +
+
+ +

Returns a Point#POINT_VEC2 object reflecting a random 2D location within the zone.

+ +

Parameters

+
    +
  • + +

    #number inner : +(optional) Minimal distance from the center of the zone. Default is 0.

    + +
  • +
  • + +

    #number outer : +(optional) Maximal distance from the outer edge of the zone. Default is the radius of the zone.

    + +
  • +
+

Return value

+ +

Core.Point#POINT_VEC2: +The Point#POINT_VEC2 object reflecting the random 3D location within the zone.

+ +
+
+
+
+ + +ZONE_RADIUS:GetRandomPointVec3(inner, outer) + +
+
+ +

Returns a Point#POINT_VEC3 object reflecting a random 3D location within the zone.

+ +

Parameters

+
    +
  • + +

    #number inner : +(optional) Minimal distance from the center of the zone. Default is 0.

    + +
  • +
  • + +

    #number outer : +(optional) Maximal distance from the outer edge of the zone. Default is the radius of the zone.

    + +
  • +
+

Return value

+ +

Core.Point#POINT_VEC3: +The Point#POINT_VEC3 object reflecting the random 3D location within the zone.

+ +
+
+
+
+ + +ZONE_RADIUS:GetRandomVec2(inner, outer) + +
+
+ +

Returns a random Vec2 location within the zone.

+ +

Parameters

+
    +
  • + +

    #number inner : +(optional) Minimal distance from the center of the zone. Default is 0.

    + +
  • +
  • + +

    #number outer : +(optional) Maximal distance from the outer edge of the zone. Default is the radius of the zone.

    + +
  • +
+

Return value

+ +

Dcs.DCSTypes#Vec2: +The random location within the zone.

+ +
+
+
+
+ + +ZONE_RADIUS:GetVec2() + +
+
+ +

Returns the DCSTypes#Vec2 of the zone.

+ +

Return value

+ +

Dcs.DCSTypes#Vec2: +The location of the zone.

+ +
+
+
+
+ + +ZONE_RADIUS:GetVec3(Height) + +
+
+ +

Returns the DCSTypes#Vec3 of the ZONE_RADIUS.

+ +

Parameter

+
    +
  • + +

    Dcs.DCSTypes#Distance Height : +The height to add to the land height where the center of the zone is located.

    + +
  • +
+

Return value

+ +

Dcs.DCSTypes#Vec3: +The point of the zone.

+ +
+
+
+
+ + +ZONE_RADIUS:IsVec2InZone(Vec2) + +
+
+ +

Returns if a location is within the zone.

+ +

Parameter

+ +

Return value

+ +

#boolean: +true if the location is within the zone.

+ +
+
+
+
+ + +ZONE_RADIUS:IsVec3InZone(Vec3) + +
+
+ +

Returns if a point is within the zone.

+ +

Parameter

+ +

Return value

+ +

#boolean: +true if the point is within the zone.

+ +
+
+
+
+ + +ZONE_RADIUS:New(ZoneName, Vec2, Radius) + +
+
+ +

Constructor of #ZONE_RADIUS, taking the zone name, the zone location and a radius.

+ +

Parameters

+ +

Return value

+ +

#ZONE_RADIUS: +self

+ +
+
+
+
+ + Dcs.DCSTypes#Distance + +ZONE_RADIUS.Radius + +
+
+ +

The radius of the zone.

+ +
+
+
+
+ + +ZONE_RADIUS:SetRadius(Radius) + +
+
+ +

Sets the radius of the zone.

+ +

Parameter

+ +

Return value

+ +

Dcs.DCSTypes#Distance: +The radius of the zone.

+ +
+
+
+
+ + +ZONE_RADIUS:SetVec2(Vec2) + +
+
+ +

Sets the DCSTypes#Vec2 of the zone.

+ +

Parameter

+ +

Return value

+ +

Dcs.DCSTypes#Vec2: +The new location of the zone.

+ +
+
+
+
+ + +ZONE_RADIUS:SmokeZone(SmokeColor, Points) + +
+
+ +

Smokes the zone boundaries in a color.

+ +

Parameters

+
    +
  • + +

    Utilities.Utils#SMOKECOLOR SmokeColor : +The smoke color.

    + +
  • +
  • + +

    #number Points : +(optional) The amount of points in the circle.

    + +
  • +
+

Return value

+ +

#ZONE_RADIUS: +self

+ +
+
+
+
+ + Dcs.DCSTypes#Vec2 + +ZONE_RADIUS.Vec2 + +
+
+ +

The current location of the zone.

+ +
+
+ +

Type ZONE_UNIT

+

Field(s)

+
+
+ + +ZONE_UNIT:GetRandomVec2() + +
+
+ +

Returns a random location within the zone.

+ +

Return value

+ +

Dcs.DCSTypes#Vec2: +The random location within the zone.

+ +
+
+
+
+ + +ZONE_UNIT:GetVec2() + +
+
+ +

Returns the current location of the Unit#UNIT.

+ +

Return value

+ +

Dcs.DCSTypes#Vec2: +The location of the zone based on the Unit#UNITlocation.

+ +
+
+
+
+ + +ZONE_UNIT:GetVec3(Height) + +
+
+ +

Returns the DCSTypes#Vec3 of the ZONE_UNIT.

+ +

Parameter

+
    +
  • + +

    Dcs.DCSTypes#Distance Height : +The height to add to the land height where the center of the zone is located.

    + +
  • +
+

Return value

+ +

Dcs.DCSTypes#Vec3: +The point of the zone.

+ +
+
+
+
+ + + +ZONE_UNIT.LastVec2 + +
+
+ + + +
+
+
+
+ + +ZONE_UNIT:New(ZoneName, ZoneUNIT, Radius) + +
+
+ +

Constructor to create a ZONE_UNIT instance, taking the zone name, a zone unit and a radius.

+ +

Parameters

+
    +
  • + +

    #string ZoneName : +Name of the zone.

    + +
  • +
  • + +

    Wrapper.Unit#UNIT ZoneUNIT : +The unit as the center of the zone.

    + +
  • +
  • + +

    Dcs.DCSTypes#Distance Radius : +The radius of the zone.

    + +
  • +
+

Return value

+ +

#ZONE_UNIT: +self

+ +
+
+
+
+ + Wrapper.Unit#UNIT + +ZONE_UNIT.ZoneUNIT + +
+
+ + + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/env.html b/docs/Documentation/env.html new file mode 100644 index 000000000..03986352d --- /dev/null +++ b/docs/Documentation/env.html @@ -0,0 +1,128 @@ + + + + + + +
+
+ +
+
+
+ + + diff --git a/docs/Documentation/index.html b/docs/Documentation/index.html new file mode 100644 index 000000000..91ea5f63f --- /dev/null +++ b/docs/Documentation/index.html @@ -0,0 +1,566 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AI_Balancer +

Single-Player:No / Multi-Player:Yes / AI:Yes / Human:No / Types:All -- AI Balancing will replace in multi player missions +non-occupied human slots with AI groups, in order to provide an engaging simulation environment, +even when there are hardly any players in the mission.

+ +

Banner Image

+ +
+ +

1) AIBalancer#AIBALANCER class, extends Fsm#FSM_SET

+ +

The AIBalancer#AIBALANCER class monitors and manages as many replacement AI groups as there are +CLIENTS in a SET_CLIENT collection, which are not occupied by human players.

+
AI_Cap +

AI - Execute Combat Air Patrol (CAP).

+ +

Banner Image

+ +
+ +

AI CAP classes makes AI Controllables execute a Combat Air Patrol.

+
AI_Cas +

AI -- Provide Close Air Support to friendly ground troops.

+ +

Banner Image

+ +
+ +

AI CAS classes makes AI Controllables execute a Close Air Support.

+
AI_Patrol +

AI -- Air Patrolling or Staging.

+ +

Banner Image

+ +
+ +

AI PATROL classes makes AI Controllables execute an Patrol.

+
Account +

Actions - ACTACCOUNT classes account for (detect, count & report) various DCS events occuring on Units.

+
Airbase +

This module contains the AIRBASE classes.

+
AirbasePolice +

This module contains the AIRBASEPOLICE classes.

+
Assign +

(SP) (MP) (FSM) Accept or reject process for player (task) assignments.

+
Base +

Core - BASE forms the basis of the MOOSE framework.

+
Cargo +

Core -- Management of CARGO logistics, that can be transported from and to transportation carriers.

+
CleanUp +

The CLEANUP class keeps an area clean of crashing or colliding airplanes.

+
Client +

This module contains the CLIENT class.

+
CommandCenter +

A COMMANDCENTER is the owner of multiple missions within MOOSE.

+
Controllable +

This module contains the CONTROLLABLE class.

+
DCSAirbase + +
DCSCoalitionObject + +
DCSCommand + +
DCSController + +
DCSGroup + +
DCSObject + +
DCSTask + +
DCSTypes + +
DCSUnit + +
DCSVec3 + +
DCSWorld + +
DCSZone + +
DCScountry + +
DCStimer + +
DCStrigger + +
Database +

This module contains the DATABASE class, managing the database of mission objects.

+
Detection +

Functional - DETECTION_ classes model the detection of enemy units by FACs or RECCEs and group them according various methods.

+
DetectionManager +

This module contains the DETECTION_MANAGER class and derived classes.

+
Escort +

Taking the lead of AI escorting your flight.

+
Event +

Core - EVENT models DCS event dispatching using a publish-subscribe model.

+
Fsm +

Core - The FSM (Finite State Machine) class and derived FSM_ classes +are design patterns allowing efficient (long-lasting) processes and workflows.

+
Group +

Wrapper -- GROUP is a wrapper class for the DCS Class Group.

+
Identifiable +

This module contains the IDENTIFIABLE class.

+
Menu +

Core -- MENU_ classes model the definition of hierarchical menu structures and commands for players within a mission.

+
Message +

Core - MESSAGE class takes are of the real-time notifications and messages to players during a simulation.

+
MissileTrainer +

This module contains the MISSILETRAINER class.

+
Mission +

A MISSION is the main owner of a Mission orchestration within MOOSE .

+
Movement +

Limit the simultaneous movement of Groups within a running Mission.

+
Object +

This module contains the OBJECT class.

+
Point +

Core - POINT_VEC classes define an extensive API to manage 3D points in the simulation space.

+
Positionable +

This module contains the POSITIONABLE class.

+
Process_JTAC + +
Process_Pickup + +
Radio +

Core - The RADIO class is responsible for transmitting radio communications.

+
Route +

(SP) (MP) (FSM) Route AI or players through waypoints or to zones.

+
Scenery +

This module contains the SCENERY class.

+
ScheduleDispatcher +

This module defines the SCHEDULEDISPATCHER class, which is used by a central object called _SCHEDULEDISPATCHER.

+
Scheduler +

Core - SCHEDULER prepares and handles the execution of functions over scheduled time (intervals).

+
Scoring +

Single-Player:Yes / Multi-Player:Yes / Core:Yes -- Administer the scoring of player achievements, +and create a CSV file logging the scoring events for use at team or squadron websites.

+ +

Banner Image

+ +
+ +

The #SCORING class administers the scoring of player achievements, +and creates a CSV file logging the scoring events and results for use at team or squadron websites.

+
Sead +

Provides defensive behaviour to a set of SAM sites within a running Mission.

+
Set +

Core - SET_ classes define collections of objects to perform bulk actions and logically group objects.

+
Smoke +

(SP) (MP) (FSM) Route AI or players through waypoints or to zones.

+
Spawn +

Functional -- Spawn dynamically new GROUPs in your missions.

+
SpawnStatic +

Core -- Spawn dynamically new STATICs in your missions.

+
Static +

This module contains the STATIC class.

+
StaticObject + +
Task +

Tasking -- This module contains the TASK class.

+
Task_A2G +

Tasking - The TASK_A2G models tasks for players in Air to Ground engagements.

+
Task_A2G_Dispatcher +

Tasking - The TASKA2GDISPATCHER creates and manages player TASK_A2G tasks based on detected targets.

+
Task_Cargo +

Tasking (Release 2.1) -- The TASK_CARGO models tasks for players to transport Cargo.

+
Task_PICKUP +

This module contains the TASK_PICKUP classes.

+
Unit +

Wrapper - UNIT is a wrapper class for the DCS Class Unit.

+
Utils +

This module contains derived utilities taken from the MIST framework, +which are excellent tools to be reused in an OO environment!.

+
Zone +

Core - ZONE classes define zones within your mission of various forms, with various capabilities.

+
env + +
land + +
routines +

Various routines

+
+
+ +
+ + diff --git a/docs/Documentation/land.html b/docs/Documentation/land.html new file mode 100644 index 000000000..f6b7ca91c --- /dev/null +++ b/docs/Documentation/land.html @@ -0,0 +1,323 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module land

+ + + +

Global(s)

+ + + + + +
land + +
+

Type land

+ + + + + + + + + + + + + +
land.SurfaceType + +
land.getHeight(point) +

Returns altitude MSL of the point.

+
land.getSurfaceType(point) +

returns surface type at the given point.

+
+ +

Type land.SurfaceType

+ + + + + + + + + + + + + + + + + + + + + +
land.SurfaceType.LAND + +
land.SurfaceType.ROAD + +
land.SurfaceType.RUNWAY + +
land.SurfaceType.SHALLOW_WATER + +
land.SurfaceType.WATER + +
+ +

Global(s)

+
+
+ + #land + +land + +
+
+ + + +
+
+

Type land

+

Field(s)

+
+
+ + #land.SurfaceType + +land.SurfaceType + +
+
+ + + +
+
+
+
+ + +land.getHeight(point) + +
+
+ +

Returns altitude MSL of the point.

+ +

Parameter

+
    +
  • + +

    #Vec2 point : +point on the ground.

    + +
  • +
+

Return value

+ +

Dcs.DCSTypes#Distance:

+ + +
+
+
+
+ + +land.getSurfaceType(point) + +
+
+ +

returns surface type at the given point.

+ +

Parameter

+
    +
  • + +

    #Vec2 point : +Point on the land.

    + +
  • +
+

Return value

+ +

#land.SurfaceType:

+ + +
+
+ +

Type Vec2

+ +

Type land.SurfaceType

+

Field(s)

+
+
+ + +land.SurfaceType.LAND + +
+
+ + + +
+
+
+
+ + +land.SurfaceType.ROAD + +
+
+ + + +
+
+
+
+ + +land.SurfaceType.RUNWAY + +
+
+ + + +
+
+
+
+ + +land.SurfaceType.SHALLOW_WATER + +
+
+ + + +
+
+
+
+ + +land.SurfaceType.WATER + +
+
+ + + +
+
+ +
+ +
+ + diff --git a/docs/Documentation/routines.html b/docs/Documentation/routines.html new file mode 100644 index 000000000..2503b891b --- /dev/null +++ b/docs/Documentation/routines.html @@ -0,0 +1,1232 @@ + + + + + + +
+
+ +
+
+
+
+ +
+

Module routines

+ +

Various routines

+ +

Global(s)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Alive + +
ChooseInfantry(TeleportPrefixTable, TeleportMax) + +
EscortCarrier(CarrierGroup, EscortPrefix, EscortLastWayPoint, EscortEngagementDistanceMax, EscortTargetTypes) + +
EscortCount + +
EscortMissionName + +
GetUnitHeight(CheckUnit) + +
GroupAlive(groupName) + +
LandCarrier(CarrierGroup, LandingZonePrefix) + +
MessageToAll(MsgText, MsgTime, MsgName) + +
MessageToBlue(MsgText, MsgTime, MsgName) + +
MessageToUnit(UnitName, MsgText, MsgTime, MsgName) + +
MusicRegister(SndRef, SndFile, SndTime) + +
MusicReset(flg) + +
MusicToPlayer(SndRef, PlayerName, SndContinue) + +
PlaneActivate(groupNameFormat, flg) + +
PlayerGroup + +
SendMessageToCarrier(CarrierGroup, CarrierMessage) + +
SpawnSettings + +
SpawnedInfantry + +
Su34AttackCarlVinson(groupName) + +
Su34AttackNorth(groupName) + +
Su34AttackWest(groupName) + +
Su34Destroyed(groupName) + +
Su34Hold(groupName) + +
Su34IsDead() + +
Su34Menu(groupName) + +
Su34MenuPath + +
Su34Menus + +
Su34Orbit(groupName) + +
Su34OverviewStatus() + +
Su34RTB(groupName) + +
Su34Status + +
Su34TakeOff(groupName) + +
TeleportPrefixTableCount + +
TeleportPrefixTableIndex + +
UpdateBoardMsg() + +
_MusicTable + +
boardMsgAll + +
boardMsgRed + +
getCarrierHeight(CarrierGroup) + +
lookup_table + +
routines + +
spairs(t, order) + +
+

Global(s)

+
+
+ + + +Alive + +
+
+ + + +
+
+
+
+ + +ChooseInfantry(TeleportPrefixTable, TeleportMax) + +
+
+ + + +

Parameters

+
    +
  • + +

    TeleportPrefixTable :

    + +
  • +
  • + +

    TeleportMax :

    + +
  • +
+
+
+
+
+ + +EscortCarrier(CarrierGroup, EscortPrefix, EscortLastWayPoint, EscortEngagementDistanceMax, EscortTargetTypes) + +
+
+ + + +

Parameters

+
    +
  • + +

    CarrierGroup :

    + +
  • +
  • + +

    EscortPrefix :

    + +
  • +
  • + +

    EscortLastWayPoint :

    + +
  • +
  • + +

    EscortEngagementDistanceMax :

    + +
  • +
  • + +

    EscortTargetTypes :

    + +
  • +
+
+
+
+
+ + #number + +EscortCount + +
+
+ + + +
+
+
+
+ + + +EscortMissionName + +
+
+ + + +
+
+
+
+ + +GetUnitHeight(CheckUnit) + +
+
+ + + +

Parameter

+
    +
  • + +

    CheckUnit :

    + +
  • +
+
+
+
+
+ + +GroupAlive(groupName) + +
+
+ + + +

Parameter

+
    +
  • + +

    groupName :

    + +
  • +
+
+
+
+
+ + +LandCarrier(CarrierGroup, LandingZonePrefix) + +
+
+ + + +

Parameters

+
    +
  • + +

    CarrierGroup :

    + +
  • +
  • + +

    LandingZonePrefix :

    + +
  • +
+
+
+
+
+ + +MessageToAll(MsgText, MsgTime, MsgName) + +
+
+ + + +

Parameters

+
    +
  • + +

    MsgText :

    + +
  • +
  • + +

    MsgTime :

    + +
  • +
  • + +

    MsgName :

    + +
  • +
+
+
+
+
+ + +MessageToBlue(MsgText, MsgTime, MsgName) + +
+
+ + + +

Parameters

+
    +
  • + +

    MsgText :

    + +
  • +
  • + +

    MsgTime :

    + +
  • +
  • + +

    MsgName :

    + +
  • +
+
+
+
+
+ + +MessageToUnit(UnitName, MsgText, MsgTime, MsgName) + +
+
+ + + +

Parameters

+
    +
  • + +

    UnitName :

    + +
  • +
  • + +

    MsgText :

    + +
  • +
  • + +

    MsgTime :

    + +
  • +
  • + +

    MsgName :

    + +
  • +
+
+
+
+
+ + +MusicRegister(SndRef, SndFile, SndTime) + +
+
+ + + +

Parameters

+
    +
  • + +

    SndRef :

    + +
  • +
  • + +

    SndFile :

    + +
  • +
  • + +

    SndTime :

    + +
  • +
+
+
+
+
+ + +MusicReset(flg) + +
+
+ + + +

Parameter

+
    +
  • + +

    flg :

    + +
  • +
+
+
+
+
+ + +MusicToPlayer(SndRef, PlayerName, SndContinue) + +
+
+ + + +

Parameters

+
    +
  • + +

    SndRef :

    + +
  • +
  • + +

    PlayerName :

    + +
  • +
  • + +

    SndContinue :

    + +
  • +
+
+
+
+
+ + +PlaneActivate(groupNameFormat, flg) + +
+
+ + + +

Parameters

+
    +
  • + +

    groupNameFormat :

    + +
  • +
  • + +

    flg :

    + +
  • +
+
+
+
+
+ + + +PlayerGroup + +
+
+ + + +
+
+
+
+ + +SendMessageToCarrier(CarrierGroup, CarrierMessage) + +
+
+ + + +

Parameters

+
    +
  • + +

    CarrierGroup :

    + +
  • +
  • + +

    CarrierMessage :

    + +
  • +
+
+
+
+
+ + + +SpawnSettings + +
+
+ + + +
+
+
+
+ + #number + +SpawnedInfantry + +
+
+ + + +
+
+
+
+ + +Su34AttackCarlVinson(groupName) + +
+
+ + + +

Parameter

+
    +
  • + +

    groupName :

    + +
  • +
+
+
+
+
+ + +Su34AttackNorth(groupName) + +
+
+ + + +

Parameter

+
    +
  • + +

    groupName :

    + +
  • +
+
+
+
+
+ + +Su34AttackWest(groupName) + +
+
+ + + +

Parameter

+
    +
  • + +

    groupName :

    + +
  • +
+
+
+
+
+ + +Su34Destroyed(groupName) + +
+
+ + + +

Parameter

+
    +
  • + +

    groupName :

    + +
  • +
+
+
+
+
+ + +Su34Hold(groupName) + +
+
+ + + +

Parameter

+
    +
  • + +

    groupName :

    + +
  • +
+
+
+
+
+ + +Su34IsDead() + +
+
+ + + +
+
+
+
+ + +Su34Menu(groupName) + +
+
+ + + +

Parameter

+
    +
  • + +

    groupName :

    + +
  • +
+
+
+
+
+ + + +Su34MenuPath + +
+
+ + + +
+
+
+
+ + #number + +Su34Menus + +
+
+ + + +
+
+
+
+ + +Su34Orbit(groupName) + +
+
+ + + +

Parameter

+
    +
  • + +

    groupName :

    + +
  • +
+
+
+
+
+ + +Su34OverviewStatus() + +
+
+ + + +
+
+
+
+ + +Su34RTB(groupName) + +
+
+ + + +

Parameter

+
    +
  • + +

    groupName :

    + +
  • +
+
+
+
+
+ + + +Su34Status + +
+
+ + + +
+
+
+
+ + +Su34TakeOff(groupName) + +
+
+ + + +

Parameter

+
    +
  • + +

    groupName :

    + +
  • +
+
+
+
+
+ + +TeleportPrefixTableCount + +
+
+ + + +
+
+
+
+ + + +TeleportPrefixTableIndex + +
+
+ + + +
+
+
+
+ + +UpdateBoardMsg() + +
+
+ + + +
+
+
+
+ + + +_MusicTable + +
+
+ + + +
+
+
+
+ + + +boardMsgAll + +
+
+ + + +
+
+
+
+ + + +boardMsgRed + +
+
+ + + +
+
+
+
+ + +getCarrierHeight(CarrierGroup) + +
+
+ + + +

Parameter

+
    +
  • + +

    CarrierGroup :

    + +
  • +
+
+
+
+
+ + + +lookup_table + +
+
+ + + +
+
+
+
+ + + +routines + +
+
+ + + +
+
+
+
+ + +spairs(t, order) + +
+
+ + + +

Parameters

+
    +
  • + +

    t :

    + +
  • +
  • + +

    order :

    + +
  • +
+
+
+

Type routines

+ +
+ +
+ +