Module ZoneCaptureCoalition

Functional (wIP) -- Models the process to capture a Zone for a Coalition, which is guarded by another Coalition.


Author: Sven Van de Velde (FlightControl)


Global(s)

ZONE_CAPTURE_COALITION

ZONECAPTURECOALITION class, extends ZoneGoalCoalition#ZONEGOALCOALITION

Models the process to capture a Zone for a Coalition, which is guarded by another Coalition.

Type ZONE_CAPTURE_COALITION

ZONE_CAPTURE_COALITION:Attack()

Attack Trigger for ZONECAPTURECOALITION

ZONE_CAPTURE_COALITION:Capture()

Capture Trigger for ZONECAPTURECOALITION

ZONE_CAPTURE_COALITION:Empty()

Empty Trigger for ZONECAPTURECOALITION

ZONE_CAPTURE_COALITION:Guard()

Guard Trigger for ZONECAPTURECOALITION

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

Mark.

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

ZONECAPTURECOALITION Constructor.

ZONE_CAPTURE_COALITION:OnAfterAttack(From, Event, To)

Attack Handler OnAfter for ZONECAPTURECOALITION

ZONE_CAPTURE_COALITION:OnAfterCapture(From, Event, To)

Capture Handler OnAfter for ZONECAPTURECOALITION

ZONE_CAPTURE_COALITION:OnAfterEmpty(From, Event, To)

Empty Handler OnAfter for ZONECAPTURECOALITION

ZONE_CAPTURE_COALITION:OnAfterGuard(From, Event, To)

Guard Handler OnAfter for ZONECAPTURECOALITION

ZONE_CAPTURE_COALITION:OnBeforeAttack(From, Event, To)

Attack Handler OnBefore for ZONECAPTURECOALITION

ZONE_CAPTURE_COALITION:OnBeforeCapture(From, Event, To)

Capture Handler OnBefore for ZONECAPTURECOALITION

ZONE_CAPTURE_COALITION:OnBeforeEmpty(From, Event, To)

Empty Handler OnBefore for ZONECAPTURECOALITION

ZONE_CAPTURE_COALITION:OnBeforeGuard(From, Event, To)

Guard Handler OnBefore for ZONECAPTURECOALITION

ZONE_CAPTURE_COALITION.ScheduleStatusZone
ZONE_CAPTURE_COALITION.SmokeScheduler
ZONE_CAPTURE_COALITION.States
ZONE_CAPTURE_COALITION:StatusZone()

Check status Coalition ownership.

ZONE_CAPTURE_COALITION:__Attack(Delay)

Attack Asynchronous Trigger for ZONECAPTURECOALITION

ZONE_CAPTURE_COALITION:__Capture(Delay)

Capture Asynchronous Trigger for ZONECAPTURECOALITION

ZONE_CAPTURE_COALITION:__Empty(Delay)

Empty Asynchronous Trigger for ZONECAPTURECOALITION

ZONE_CAPTURE_COALITION:__Guard(Delay)

Guard Asynchronous Trigger for ZONECAPTURECOALITION

ZONE_CAPTURE_COALITION:onafterGuard()

When started, check the Coalition status.

ZONE_CAPTURE_COALITION:onenterAttacked()
ZONE_CAPTURE_COALITION:onenterCaptured()
ZONE_CAPTURE_COALITION:onenterEmpty()
ZONE_CAPTURE_COALITION:onenterGuarded()

Bound.

Global(s)

#ZONE_CAPTURE_COALITION ZONE_CAPTURE_COALITION

ZONECAPTURECOALITION class, extends ZoneGoalCoalition#ZONEGOALCOALITION

Models the process to capture a Zone for a Coalition, which is guarded by another Coalition.

The Zone is initially Guarded by the owning coalition, which is the coalition that initially occupies the zone with units of its coalition. Once units of an other coalition are entering the Zone, the state will change to Attacked. As long as these units remain in the zone, the state keeps set to Attacked. When all units are destroyed in the Zone, the state will change to Empty, which expresses that the Zone is empty, and can be captured. When units of the other coalition are in the Zone, and no other units of the owning coalition is in the Zone, the Zone is captured, and its state will change to Captured.

Event handlers can be defined by the mission designer to action on the state transitions.

1. ZONECAPTURECOALITION constructor

2. ZONECAPTURECOALITION is a finite state machine (FSM).

2.1 ZONECAPTURECOALITION 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 ZONECAPTURECOALITION 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.

Type ZoneCaptureCoalition

Type ZONE_CAPTURE_COALITION

Field(s)

ZONE_CAPTURE_COALITION:Attack()

Attack Trigger for ZONECAPTURECOALITION

ZONE_CAPTURE_COALITION:Capture()

Capture Trigger for ZONECAPTURECOALITION

ZONE_CAPTURE_COALITION:Empty()

Empty Trigger for ZONECAPTURECOALITION

ZONE_CAPTURE_COALITION:Guard()

Guard Trigger for ZONECAPTURECOALITION

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

Mark.

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

ZONECAPTURECOALITION Constructor.

Parameters

Return value

#ZONECAPTURECOALITION:

ZONE_CAPTURE_COALITION:OnAfterAttack(From, Event, To)

Attack Handler OnAfter for ZONECAPTURECOALITION

Parameters

  • #string From :

  • #string Event :

  • #string To :

ZONE_CAPTURE_COALITION:OnAfterCapture(From, Event, To)

Capture Handler OnAfter for ZONECAPTURECOALITION

Parameters

  • #string From :

  • #string Event :

  • #string To :

ZONE_CAPTURE_COALITION:OnAfterEmpty(From, Event, To)

Empty Handler OnAfter for ZONECAPTURECOALITION

Parameters

  • #string From :

  • #string Event :

  • #string To :

ZONE_CAPTURE_COALITION:OnAfterGuard(From, Event, To)

Guard Handler OnAfter for ZONECAPTURECOALITION

Parameters

  • #string From :

  • #string Event :

  • #string To :

ZONE_CAPTURE_COALITION:OnBeforeAttack(From, Event, To)

Attack Handler OnBefore for ZONECAPTURECOALITION

Parameters

  • #string From :

  • #string Event :

  • #string To :

Return value

#boolean:

ZONE_CAPTURE_COALITION:OnBeforeCapture(From, Event, To)

Capture Handler OnBefore for ZONECAPTURECOALITION

Parameters

  • #string From :

  • #string Event :

  • #string To :

Return value

#boolean:

ZONE_CAPTURE_COALITION:OnBeforeEmpty(From, Event, To)

Empty Handler OnBefore for ZONECAPTURECOALITION

Parameters

  • #string From :

  • #string Event :

  • #string To :

Return value

#boolean:

ZONE_CAPTURE_COALITION:OnBeforeGuard(From, Event, To)

Guard Handler OnBefore for ZONECAPTURECOALITION

Parameters

  • #string From :

  • #string Event :

  • #string To :

Return value

#boolean:

ZONE_CAPTURE_COALITION.ScheduleStatusZone
ZONE_CAPTURE_COALITION.SmokeScheduler
ZONE_CAPTURE_COALITION.States
ZONE_CAPTURE_COALITION:StatusZone()

Check status Coalition ownership.

ZONE_CAPTURE_COALITION:__Attack(Delay)

Attack Asynchronous Trigger for ZONECAPTURECOALITION

Parameter

  • #number Delay :

ZONE_CAPTURE_COALITION:__Capture(Delay)

Capture Asynchronous Trigger for ZONECAPTURECOALITION

Parameter

  • #number Delay :

ZONE_CAPTURE_COALITION:__Empty(Delay)

Empty Asynchronous Trigger for ZONECAPTURECOALITION

Parameter

  • #number Delay :

ZONE_CAPTURE_COALITION:__Guard(Delay)

Guard Asynchronous Trigger for ZONECAPTURECOALITION

Parameter

  • #number Delay :

ZONE_CAPTURE_COALITION:onafterGuard()

When started, check the Coalition status.

ZONE_CAPTURE_COALITION:onenterAttacked()
ZONE_CAPTURE_COALITION:onenterCaptured()
ZONE_CAPTURE_COALITION:onenterEmpty()
ZONE_CAPTURE_COALITION:onenterGuarded()

Bound.