Module Functional.ZoneGoal
Functional - Base class that models processes to achieve goals involving a Zone.
ZONE_GOAL models processes that have a Goal with a defined achievement involving a Zone. Derived classes implement the ways how the achievements can be realized.
Author: FlightControl
Contributions: funkyfranky, Applevangelist
Global(s)
Global ZONE_GOAL |
Models processes that have a Goal with a defined achievement involving a Zone. |
Models processes that have a Goal with a defined achievement involving a Zone.
Derived classes implement the ways how the achievements can be realized.
1. ZONE_GOAL constructor
- ZONE_GOAL.New(): Creates a new ZONE_GOAL object.
2. ZONE_GOAL is a finite state machine (FSM).
2.1 ZONE_GOAL States
- None: Initial State
2.2 ZONE_GOAL Events
- DestroyedUnit: A Wrapper.Unit is destroyed in the Zone. The event will only get triggered if the method ZONE_GOAL.MonitorDestroyedUnits() is used.
Type(s)
Fields and Methods inherited from ZONE_GOAL | Description |
---|---|
DestroyedUnit event. |
|
Flare the zone boundary. |
|
Get the Zone. |
|
Get the name of the Zone. |
|
Activate the event UnitDestroyed to be fired when a unit is destroyed in the zone. |
|
ZONE_GOAL Constructor. |
|
ZONE_GOAL:OnAfterDestroyedUnit(From, Event, To, DestroyedUnit, PlayerName) |
DestroyedUnit Handler OnAfter for ZONE_GOAL |
Activate smoking of zone with the color or the current owner. |
|
Set the smoke color. |
|
Check status Smoke. |
|
DestroyedUnit delayed event |
|
When started, check the Smoke and the Zone status. |
Field(s)
Function(s)
Flare the zone boundary.
Activate the event UnitDestroyed to be fired when a unit is destroyed in the zone.
Defined in:
ZONE_GOAL
ZONE_GOAL Constructor.
Defined in:
ZONE_GOAL
Parameter:
A Core.Zone object with the goal to be achieved. Alternatively, can be handed as the name of late activated group describing a ZONE_POLYGON with its waypoints.
Return value:
DestroyedUnit Handler OnAfter for ZONE_GOAL
Defined in:
ZONE_GOAL
Parameters:
#string From
#string Event
#string To
Wrapper.Unit#UNIT DestroyedUnit
The destroyed unit.
#string PlayerName
The name of the player.
Activate smoking of zone with the color or the current owner.
Defined in:
ZONE_GOAL
Parameter:
#boolean switch
If true or nil activate smoke. If false or nil, no smoke.
Return value:
Set the smoke color.
@param #ZONE_GOAL self @param Core.Event#EVENTDATA EventData Event data table.
Defined in:
ZONE_GOAL
Parameter:
EventData
DestroyedUnit delayed event
Defined in:
ZONE_GOAL
Parameter:
#number delay
Delay in seconds.