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: FlightControl


Global(s)

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.

Type ZONE_GOAL_CARGO

ZONE_GOAL_CARGO:Attack()

Attack Trigger for ZONEGOALCARGO

ZONE_GOAL_CARGO:Capture()

Capture Trigger for ZONEGOALCARGO

ZONE_GOAL_CARGO.Coalition
ZONE_GOAL_CARGO:Empty()

Empty Trigger for ZONEGOALCARGO

ZONE_GOAL_CARGO:GetCoalition()

Get the owning coalition of the zone.

ZONE_GOAL_CARGO:GetCoalitionName()

Get the owning coalition name of the zone.

ZONE_GOAL_CARGO:Guard()

Guard Trigger for ZONEGOALCARGO

ZONE_GOAL_CARGO:IsAttacked()
ZONE_GOAL_CARGO:IsCaptured()
ZONE_GOAL_CARGO:IsEmpty()
ZONE_GOAL_CARGO:IsGuarded()
ZONE_GOAL_CARGO:Mark()

Mark.

ZONE_GOAL_CARGO.MarkBlue
ZONE_GOAL_CARGO.MarkRed
ZONE_GOAL_CARGO:New(Zone, Coalition)

ZONEGOALCARGO Constructor.

ZONE_GOAL_CARGO:OnAfterAttack(From, Event, To)

Attack Handler OnAfter for ZONEGOALCARGO

ZONE_GOAL_CARGO:OnAfterCapture(From, Event, To)

Capture Handler OnAfter for ZONEGOALCARGO

ZONE_GOAL_CARGO:OnAfterEmpty(From, Event, To)

Empty Handler OnAfter for ZONEGOALCARGO

ZONE_GOAL_CARGO:OnAfterGuard(From, Event, To)

Guard Handler OnAfter for ZONEGOALCARGO

ZONE_GOAL_CARGO:OnBeforeAttack(From, Event, To)

Attack Handler OnBefore for ZONEGOALCARGO

ZONE_GOAL_CARGO:OnBeforeCapture(From, Event, To)

Capture Handler OnBefore for ZONEGOALCARGO

ZONE_GOAL_CARGO:OnBeforeEmpty(From, Event, To)

Empty Handler OnBefore for ZONEGOALCARGO

ZONE_GOAL_CARGO:OnBeforeGuard(From, Event, To)

Guard Handler OnBefore for ZONEGOALCARGO

ZONE_GOAL_CARGO.ScheduleStatusZone
ZONE_GOAL_CARGO:SetCoalition(Coalition)

Set the owning coalition of the zone.

ZONE_GOAL_CARGO.SmokeScheduler
ZONE_GOAL_CARGO.States
ZONE_GOAL_CARGO:StatusZone()

Check status Coalition ownership.

ZONE_GOAL_CARGO:__Attack(Delay)

Attack Asynchronous Trigger for ZONEGOALCARGO

ZONE_GOAL_CARGO:__Capture(Delay)

Capture Asynchronous Trigger for ZONEGOALCARGO

ZONE_GOAL_CARGO:__Empty(Delay)

Empty Asynchronous Trigger for ZONEGOALCARGO

ZONE_GOAL_CARGO:__Guard(Delay)

Guard Asynchronous Trigger for ZONEGOALCARGO

ZONE_GOAL_CARGO:onafterGuard()

When started, check the Coalition status.

ZONE_GOAL_CARGO:onenterAttacked()
ZONE_GOAL_CARGO:onenterCaptured()
ZONE_GOAL_CARGO:onenterEmpty()
ZONE_GOAL_CARGO:onenterGuarded()

Bound.

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

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

Extends Functional.ZoneGoal#ZONE_GOAL

Field(s)

ZONE_GOAL_CARGO:Attack()

Attack Trigger for ZONEGOALCARGO

ZONE_GOAL_CARGO:Capture()

Capture Trigger for ZONEGOALCARGO

ZONE_GOAL_CARGO.Coalition
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:IsAttacked()
ZONE_GOAL_CARGO:IsCaptured()
ZONE_GOAL_CARGO:IsEmpty()
ZONE_GOAL_CARGO:IsGuarded()
ZONE_GOAL_CARGO:Mark()

Mark.

ZONE_GOAL_CARGO.MarkBlue
ZONE_GOAL_CARGO.MarkRed
ZONE_GOAL_CARGO:New(Zone, Coalition)

ZONEGOALCARGO Constructor.

Parameters

Return value

#ZONE_GOAL_CARGO:

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.ScheduleStatusZone
ZONE_GOAL_CARGO:SetCoalition(Coalition)

Set the owning coalition of the zone.

Parameter

ZONE_GOAL_CARGO.SmokeScheduler
#table ZONE_GOAL_CARGO.States
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.

ZONE_GOAL_CARGO:onenterAttacked()
ZONE_GOAL_CARGO:onenterCaptured()
ZONE_GOAL_CARGO:onenterEmpty()
ZONE_GOAL_CARGO:onenterGuarded()

Bound.