Module ZoneGoalCargo
Functional (WIP) -- Base class that models processes to achieve goals involving a Zone and Cargo.
ZONEGOALCARGO models processes that have a Goal with a defined achievement involving a Zone and Cargo.
Derived classes implement the ways how the achievements can be realized.
Author: Sven Van de Velde (FlightControl)
Global(s)
| ZONE_GOAL_CARGO |
ZONEGOALCARGO class, extends ZoneGoal#ZONE_GOALZONEGOALCARGO models processes that have a Goal with a defined achievement involving a Zone and Cargo. |
Type ZONE_GOAL_CARGO
Global(s)
- #ZONE_GOAL_CARGO ZONE_GOAL_CARGO
-
ZONEGOALCARGO class, extends ZoneGoal#ZONE_GOAL
ZONEGOALCARGO models processes that have a Goal with a defined achievement involving a Zone and Cargo.
Derived classes implement the ways how the achievements can be realized.
1. ZONEGOALCARGO constructor
- ZONEGOALCARGO.New(): Creates a new ZONEGOALCARGO object.
2. ZONEGOALCARGO is a finite state machine (FSM).
2.1 ZONEGOALCARGO States
- Deployed: The Zone has been captured by an other coalition.
- Airborne: The Zone is currently intruded by an other coalition. There are units of the owning coalition and an other coalition in the Zone.
- Loaded: The Zone is guarded by the owning coalition. There is no other unit of an other coalition in the Zone.
- Empty: The Zone is empty. There is not valid unit in the Zone.
2.2 ZONEGOALCARGO Events
- Capture: The Zone has been captured by an other coalition.
- Attack: The Zone is currently intruded by an other coalition. There are units of the owning coalition and an other coalition in the Zone.
- Guard: The Zone is guarded by the owning coalition. There is no other unit of an other coalition in the Zone.
- Empty: The Zone is empty. There is not valid unit in the Zone.
2.3 ZONEGOALCARGO State Machine
Type ZoneGoalCargo
Type ZONE_GOAL_CARGO
Field(s)
- ZONE_GOAL_CARGO:Attack()
-
Attack Trigger for ZONEGOALCARGO
- ZONE_GOAL_CARGO:Capture()
-
Capture Trigger for ZONEGOALCARGO
- ZONE_GOAL_CARGO:Empty()
-
Empty Trigger for ZONEGOALCARGO
- ZONE_GOAL_CARGO:GetCoalition()
-
Get the owning coalition of the zone.
Return value
DCSCoalition.DCSCoalition#coalition: Coalition.
- ZONE_GOAL_CARGO:GetCoalitionName()
-
Get the owning coalition name of the zone.
Return value
#string: Coalition name.
- ZONE_GOAL_CARGO:Guard()
-
Guard Trigger for ZONEGOALCARGO
- ZONE_GOAL_CARGO:Mark()
-
Mark.
- ZONE_GOAL_CARGO:New(Zone, Coalition)
-
ZONEGOALCARGO Constructor.
Parameters
-
Core.Zone#ZONE Zone: A Zone object with the goal to be achieved. -
DCSCoalition.DCSCoalition#coalition Coalition: The initial coalition owning the zone.
Return value
-
- ZONE_GOAL_CARGO:OnAfterAttack(From, Event, To)
-
Attack Handler OnAfter for ZONEGOALCARGO
Parameters
-
#string From: -
#string Event: -
#string To:
-
- ZONE_GOAL_CARGO:OnAfterCapture(From, Event, To)
-
Capture Handler OnAfter for ZONEGOALCARGO
Parameters
-
#string From: -
#string Event: -
#string To:
-
- ZONE_GOAL_CARGO:OnAfterEmpty(From, Event, To)
-
Empty Handler OnAfter for ZONEGOALCARGO
Parameters
-
#string From: -
#string Event: -
#string To:
-
- ZONE_GOAL_CARGO:OnAfterGuard(From, Event, To)
-
Guard Handler OnAfter for ZONEGOALCARGO
Parameters
-
#string From: -
#string Event: -
#string To:
-
- ZONE_GOAL_CARGO:OnBeforeAttack(From, Event, To)
-
Attack Handler OnBefore for ZONEGOALCARGO
Parameters
-
#string From: -
#string Event: -
#string To:
Return value
#boolean:
-
- ZONE_GOAL_CARGO:OnBeforeCapture(From, Event, To)
-
Capture Handler OnBefore for ZONEGOALCARGO
Parameters
-
#string From: -
#string Event: -
#string To:
Return value
#boolean:
-
- ZONE_GOAL_CARGO:OnBeforeEmpty(From, Event, To)
-
Empty Handler OnBefore for ZONEGOALCARGO
Parameters
-
#string From: -
#string Event: -
#string To:
Return value
#boolean:
-
- ZONE_GOAL_CARGO:OnBeforeGuard(From, Event, To)
-
Guard Handler OnBefore for ZONEGOALCARGO
Parameters
-
#string From: -
#string Event: -
#string To:
Return value
#boolean:
-
- ZONE_GOAL_CARGO:SetCoalition(Coalition)
-
Set the owning coalition of the zone.
Parameter
-
DCSCoalition.DCSCoalition#coalition Coalition:
-
- ZONE_GOAL_CARGO:StatusZone()
-
Check status Coalition ownership.
- ZONE_GOAL_CARGO:__Attack(Delay)
-
Attack Asynchronous Trigger for ZONEGOALCARGO
Parameter
-
#number Delay:
-
- ZONE_GOAL_CARGO:__Capture(Delay)
-
Capture Asynchronous Trigger for ZONEGOALCARGO
Parameter
-
#number Delay:
-
- ZONE_GOAL_CARGO:__Empty(Delay)
-
Empty Asynchronous Trigger for ZONEGOALCARGO
Parameter
-
#number Delay:
-
- ZONE_GOAL_CARGO:__Guard(Delay)
-
Guard Asynchronous Trigger for ZONEGOALCARGO
Parameter
-
#number Delay:
-
- ZONE_GOAL_CARGO:onafterGuard()
-
When started, check the Coalition status.