diff --git a/Moose Development/Moose/Tasking/Task_CARGO.lua b/Moose Development/Moose/Tasking/Task_CARGO.lua
index b61eb6b86..44d3523d9 100644
--- a/Moose Development/Moose/Tasking/Task_CARGO.lua
+++ b/Moose Development/Moose/Tasking/Task_CARGO.lua
@@ -1,11 +1,20 @@
---- **Tasking** - The TASK_CARGO models tasks for players to transport @{Cargo}.
---
--- ![Banner Image]()
---
+--- **Tasking (Release 2.1)** -- The TASK_CARGO models tasks for players to transport @{Cargo}.
--
+-- 
--
-- ====
--
+-- Cargo are units or cargo objects within DCS world that allow to be transported or sling loaded by other units.
+-- The CARGO class, as part of the moose core, is able to Board, Load, UnBoard and UnLoad from Carrier units.
+-- This collection of classes in this module define tasks for human players to handle cargo objects.
+-- Cargo can be transported, picked-up, deployed and sling-loaded from and to other places.
+--
+-- The following classes are important to consider:
+--
+-- * @{#TASK_CARGO_TRANSPORT}: 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:
@@ -23,8 +32,6 @@
--
-- ### Contributions:
--
--- * **[WingThor]**: Concept, Advice & Testing.
---
-- ### Authors:
--
-- * **FlightControl**: Concept, Design & Programming.
diff --git a/docs/Documentation/AI_Balancer.html b/docs/Documentation/AI_Balancer.html
index 2b5f48f01..5e65668f3 100644
--- a/docs/Documentation/AI_Balancer.html
+++ b/docs/Documentation/AI_Balancer.html
@@ -63,6 +63,7 @@
The #AI_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 AICARGO is a state machine: it manages the different events and states of the cargo.
-All derived classes from AICARGO follow the same state machine, expose the same cargo event functions, and provide the same cargo states.
-
-
1.2.1) AI_CARGO Events:
-
-
-
AI_CARGO.Board( ToCarrier ): Boards the cargo to a carrier.
-
AI_CARGO.Load( ToCarrier ): Loads the cargo into a carrier, regardless of its position.
-
AI_CARGO.UnBoard( ToPointVec2 ): UnBoard the cargo from a carrier. This will trigger a movement of the cargo to the option ToPointVec2.
-
AI_CARGO.UnLoad( ToPointVec2 ): UnLoads the cargo from a carrier.
-
AI_CARGO.Dead( Controllable ): The cargo is dead. The cargo process will be ended.
-
-
-
1.2.2) AI_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.
-
-
-
1.2.3) AI_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.
-
-
-
2) #AICARGOUNIT class
-
-
The AICARGOUNIT 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 AICARGOUNIT objects to and from carriers.
-
-
5) #AICARGOGROUPED class
-
-
The AICARGOGROUPED class defines a cargo that is represented by a group of UNIT objects within the simulator, and can be transported by a carrier.
-Use the event functions as described above to Load, UnLoad, Board, UnBoard the AICARGOUNIT objects to and from carriers.
This module is still under construction, but is described above works already, and will keep working ...
@@ -160,19 +108,25 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the A
The AI_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 AI_CARGO is a state machine: it manages the different events and states of the cargo.
+All derived classes from AI_CARGO follow the same state machine, expose the same cargo event functions, and provide the same cargo states.
#AI( ToCarrier ): Loads the cargo into a carrier, regardless of its position.
+
#AI( ToPointVec2 ): UnBoard the cargo from a carrier. This will trigger a movement of the cargo to the option ToPointVec2.
+
#AI( ToPointVec2 ): UnLoads the cargo from a carrier.
+
#AI( Controllable ): The cargo is dead. The cargo process will be ended.
+
+
+
AI_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.
+
+
+
AI_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.
+
@@ -681,6 +713,12 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the A
+
AI_CARGO_GROUP class
+
+
The AI_CARGO_GROUP class defines a cargo that is represented by a group of Unit objects within the simulator, and can be transported by a carrier.
+
+
+
Use the event functions as described above to Load, UnLoad, Board, UnBoard the AI_CARGO_GROUP to and from carrier.
@@ -695,6 +733,12 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the A
+
AI_CARGO_GROUPED class
+
+
The AI_CARGO_GROUPED class defines a cargo that is represented by a group of UNIT objects within the simulator, and can be transported by a carrier.
+
+
+
Use the event functions as described above to Load, UnLoad, Board, UnBoard the AI_CARGO_UNIT objects to and from carriers.
@@ -737,6 +781,14 @@ Use the event functions as described above to Load, UnLoad, Board, UnBoard the A
#function IteratorFunction :
-The function that will be called when there is an alive player in the database. The function needs to accept a CLIENT parameter.
+The function that will be called object in the database. The function needs to accept a CLIENT parameter.
@@ -989,7 +1157,7 @@ self
#function IteratorFunction :
-The function that will be called when there is an alive GROUP in the database. The function needs to accept a GROUP parameter.
+The function that will be called for each object in the database. The function needs to accept a GROUP parameter.
@@ -1021,7 +1189,7 @@ self
#function IteratorFunction :
-The function that will be called when there is an player in the database. The function needs to accept the player name.
+The function that will be called for each object in the database. The function needs to accept the player name.
@@ -1053,7 +1221,7 @@ self
#function IteratorFunction :
-The function that will be called when there is was a player in the database. The function needs to accept a UNIT parameter.
+The function that will be called for each object in the database. The function needs to accept a UNIT parameter.
@@ -1085,7 +1253,7 @@ self
#function IteratorFunction :
-The function that will be called when there is an alive UNIT in the database. The function needs to accept a UNIT parameter.
+The function that will be called for each object in the database. The function needs to accept a UNIT parameter.
@@ -1343,6 +1511,48 @@ self
-- 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()
#boolean:
-Returns true if the Group is completely within the Zone#ZONE_BASE
+Returns true if the Group is not within the Zone#ZONE_BASE
@@ -1555,7 +1556,7 @@ The zone to test.
Return value
#boolean:
-Returns true if the Group is completely within the Zone#ZONE_BASE
+Returns true if the Group is partially within the Zone#ZONE_BASE
diff --git a/docs/Documentation/Identifiable.html b/docs/Documentation/Identifiable.html
index 26302176c..79739cbf9 100644
--- a/docs/Documentation/Identifiable.html
+++ b/docs/Documentation/Identifiable.html
@@ -63,6 +63,7 @@
@@ -923,6 +1046,72 @@ The default "time interval" is after 0.001 seconds.
You can set the "yield interval", and the "time interval". (See above).
+
+
+
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:
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.
TASK.SetTimeOut(): Set timer in seconds before task gets cancelled if not assigned.
-
-
-
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.
@@ -132,7 +91,9 @@ Use the method TASK.AddScore() to add scores whe
TASK.SetTimeOut(): Set timer in seconds before task gets cancelled if not assigned.
+
+
+
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.
@@ -776,10 +752,7 @@ Use the method TASK.AddScore() to add scores whe
#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.
Tasking (Release 2.1) -- The TASK_CARGO models tasks for players to transport Cargo.
+
+
+
+
+
+
+
+
Cargo are units or cargo objects within DCS world that allow to be transported or sling loaded by other units.
+The CARGO class, as part of the moose core, is able to Board, Load, UnBoard and UnLoad from Carrier units.
+This collection of classes in this module define tasks for human players to handle 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:
The ZONE_GROUP class defines by a zone around a Group#GROUP with a radius.
@@ -708,8 +724,6 @@
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.
-
-
@@ -723,15 +737,13 @@ This class implements the inherited functions from Zone#ZONEPOLYGONBASE
+
The ZONEPOLYGONBASE class defined by a sequence of Group#GROUP waypoints within the Mission Editor, forming a polygon.
@@ -753,7 +765,7 @@ 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.
-
6.1) Zone point randomization
+
Zone point randomization
Various functions exist to find random points within the zone.
@@ -763,8 +775,6 @@ This class is an abstract BASE class for derived classes, and is not meant to be