Module ZoneGoalCoalition
Core -- Base class that models processes to achieve goals involving a Zone for a Coalition.
ZONEGOALCOALITION models processes that have a Goal with a defined achievement involving a Zone for a Coalition.
Derived classes implement the ways how the achievements can be realized.
Author: Sven Van de Velde (FlightControl)
Global(s)
| ZONE_GOAL_COALITION |
ZONEGOALCOALITION class, extends ZoneGoal#ZONE_GOALZONEGOALCOALITION models processes that have a Goal with a defined achievement involving a Zone for a Coalition. |
Type ZONE_GOAL
| ZONE_GOAL.ScheduleStatusZone | |
| ZONE_GOAL.SmokeScheduler |
Type ZONE_GOAL_COALITION
Global(s)
- #ZONE_GOAL_COALITION ZONE_GOAL_COALITION
-
ZONEGOALCOALITION class, extends ZoneGoal#ZONE_GOAL
ZONEGOALCOALITION models processes that have a Goal with a defined achievement involving a Zone for a Coalition.
Derived classes implement the ways how the achievements can be realized.
1. ZONEGOALCOALITION constructor
- ZONEGOALCOALITION.New(): Creates a new ZONEGOALCOALITION object.
2. ZONEGOALCOALITION is a finite state machine (FSM).
2.1 ZONEGOALCOALITION States
- Captured: The Zone has been captured by an other coalition.
- Attacked: The Zone is currently intruded by an other coalition. There are units of the owning coalition and an other coalition in the Zone.
- Guarded: 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 ZONEGOALCOALITION 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 ZONEGOALCOALITION State Machine
Hello | World ------|------ Test|Test2
Type ZoneGoalCoalition
Type ZONE_GOAL
Field(s)
Type ZONE_GOAL_COALITION
Field(s)
- ZONE_GOAL_COALITION:Attack()
-
Attack Trigger for ZONEGOALCOALITION
- ZONE_GOAL_COALITION:Capture()
-
Capture Trigger for ZONEGOALCOALITION
- ZONE_GOAL_COALITION:GetCoalition()
-
Get the owning coalition of the zone.
Return value
DCSCoalition.DCSCoalition#coalition: Coalition.
- ZONE_GOAL_COALITION:GetCoalitionName()
-
Get the owning coalition name of the zone.
Return value
#string: Coalition name.
- ZONE_GOAL_COALITION:New(Zone, Coalition)
-
ZONEGOALCOALITION 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_COALITION:OnAfterAttack(From, Event, To)
-
Attack Handler OnAfter for ZONEGOALCOALITION
Parameters
-
#string From: -
#string Event: -
#string To:
-
- ZONE_GOAL_COALITION:OnAfterCapture(From, Event, To)
-
Capture Handler OnAfter for ZONEGOALCOALITION
Parameters
-
#string From: -
#string Event: -
#string To:
-
- ZONE_GOAL_COALITION:OnBeforeAttack(From, Event, To)
-
Attack Handler OnBefore for ZONEGOALCOALITION
Parameters
-
#string From: -
#string Event: -
#string To:
Return value
#boolean:
-
- ZONE_GOAL_COALITION:OnBeforeCapture(From, Event, To)
-
Capture Handler OnBefore for ZONEGOALCOALITION
Parameters
-
#string From: -
#string Event: -
#string To:
Return value
#boolean:
-
- ZONE_GOAL_COALITION:OnEnterAttacked(From, Event, To)
-
Attacked State Handler OnEnter for ZONEGOALCOALITION
Parameters
-
#string From: -
#string Event: -
#string To:
-
- ZONE_GOAL_COALITION:OnEnterCaptured(From, Event, To)
-
Captured State Handler OnEnter for ZONEGOALCOALITION
Parameters
-
#string From: -
#string Event: -
#string To:
-
- ZONE_GOAL_COALITION:OnLeaveAttacked(From, Event, To)
-
Attacked State Handler OnLeave for ZONEGOALCOALITION
Parameters
-
#string From: -
#string Event: -
#string To:
Return value
#boolean:
-
- ZONE_GOAL_COALITION:OnLeaveCaptured(From, Event, To)
-
Captured State Handler OnLeave for ZONEGOALCOALITION
Parameters
-
#string From: -
#string Event: -
#string To:
Return value
#boolean:
-
- ZONE_GOAL_COALITION:SetCoalition(Coalition)
-
Set the owning coalition of the zone.
Parameter
-
DCSCoalition.DCSCoalition#coalition Coalition:
-
- ZONE_GOAL_COALITION:StatusZone()
-
Check status Coalition ownership.
- ZONE_GOAL_COALITION:__Attack(Delay)
-
Attack Asynchronous Trigger for ZONEGOALCOALITION
Parameter
-
#number Delay:
-
- ZONE_GOAL_COALITION:__Capture(Delay)
-
Capture Asynchronous Trigger for ZONEGOALCOALITION
Parameter
-
#number Delay:
-
- ZONE_GOAL_COALITION:onafterGuard()
-
When started, check the Coalition status.