Module Account

Actions - ACTACCOUNT classes account for (detect, count & report) various DCS events occuring on Units.

Banner Image


Global(s)

ACT_ACCOUNT
ACT_ACCOUNT_DEADS

Type ACT_ACCOUNT

ACT_ACCOUNT.ClassName
ACT_ACCOUNT.DisplayCount
ACT_ACCOUNT:New()

Creates a new DESTROY process.

ACT_ACCOUNT.TargetSetUnit
ACT_ACCOUNT:onafterEvent(ProcessUnit, Event, From, To)

StateMachine callback function

ACT_ACCOUNT:onafterStart(ProcessUnit, Event, From, To)

StateMachine callback function

ACT_ACCOUNT:onenterWaiting(ProcessUnit, Event, From, To)

StateMachine callback function

Type ACT_ACCOUNT_DEADS

ACT_ACCOUNT_DEADS.ClassName
ACT_ACCOUNT_DEADS.DisplayCategory
ACT_ACCOUNT_DEADS.DisplayCount
ACT_ACCOUNT_DEADS.DisplayInterval
ACT_ACCOUNT_DEADS.DisplayMessage
ACT_ACCOUNT_DEADS.DisplayTime
ACT_ACCOUNT_DEADS:Init(FsmAccount)
ACT_ACCOUNT_DEADS:New(TargetSetUnit, TaskName)

Creates a new DESTROY process.

ACT_ACCOUNT_DEADS.TargetSetUnit
ACT_ACCOUNT_DEADS.TaskName
ACT_ACCOUNT_DEADS:onafterEvent(ProcessUnit, Event, From, To, Task)

StateMachine callback function

ACT_ACCOUNT_DEADS:onenterAccount(ProcessUnit, Event, From, To, Task, EventData)

StateMachine callback function

ACT_ACCOUNT_DEADS:onenterReport(ProcessUnit, Event, From, To, Task)

StateMachine callback function

ACT_ACCOUNT_DEADS:onfuncEventDead(EventData)

Global(s)

#ACT_ACCOUNT ACT_ACCOUNT
#ACT_ACCOUNT_DEADS ACT_ACCOUNT_DEADS

Type Account

Type ACT_ACCOUNT

#ACT_ACCOUNT FSM class, extends Fsm#FSM_PROCESS

ACT_ACCOUNT state machine:

This class is a state machine: it manages a process that is triggered by events causing state transitions to occur.

All derived classes from this class will start with the class name, followed by a _. See the relevant derived class descriptions below. Each derived class follows exactly the same process, using the same events and following the same state transitions, but will have different implementation behaviour upon each event or state transition.

ACT_ACCOUNT States

  • Asigned: The player is assigned.
  • Waiting: Waiting for an event.
  • Report: Reporting.
  • Account: Account for an event.
  • Accounted: All events have been accounted for, end of the process.
  • Failed: Failed the process.

ACT_ACCOUNT Events

  • Start: Start the process.
  • Wait: Wait for an event.
  • Report: Report the status of the accounting.
  • Event: An event happened, process the event.
  • More: More targets.
  • NoMore (*): No more targets.
  • Fail (*): The action process has failed.

(*) End states of the process.

ACT_ACCOUNT state transition methods:

State transition functions can be set by the mission designer customizing or improving the behaviour of the state. There are 2 moments when state transition methods will be called by the state machine:

  • Before the state transition. The state transition method needs to start with the name OnBefore + the name of the state. If the state transition method returns false, then the processing of the state transition will not be done! If you want to change the behaviour of the AIControllable at this event, return false, but then you'll need to specify your own logic using the AIControllable!

  • After the state transition. The state transition method needs to start with the name OnAfter + the name of the state. These state transition methods need to provide a return value, which is specified at the function description.

Field(s)

#string ACT_ACCOUNT.ClassName
#number ACT_ACCOUNT.DisplayCount
ACT_ACCOUNT:New()

Creates a new DESTROY process.

Return value

#ACT_ACCOUNT:

Set#SET_UNIT ACT_ACCOUNT.TargetSetUnit
ACT_ACCOUNT:onafterEvent(ProcessUnit, Event, From, To)

StateMachine callback function

Parameters

ACT_ACCOUNT:onafterStart(ProcessUnit, Event, From, To)

StateMachine callback function

Parameters

ACT_ACCOUNT:onenterWaiting(ProcessUnit, Event, From, To)

StateMachine callback function

Parameters

Type ACT_ACCOUNT_DEADS

#ACTACCOUNTDEADS FSM class, extends Fsm.Account#ACT_ACCOUNT

The ACTACCOUNTDEADS class accounts (detects, counts and reports) successful kills of DCS units.

The process is given a Set of units that will be tracked upon successful destruction. The process will end after each target has been successfully destroyed. Each successful dead will trigger an Account state transition that can be scored, modified or administered.

ACTACCOUNTDEADS constructor:

Field(s)

#string ACT_ACCOUNT_DEADS.ClassName
#string ACT_ACCOUNT_DEADS.DisplayCategory

Targets is the default display category

#number ACT_ACCOUNT_DEADS.DisplayCount
#number ACT_ACCOUNT_DEADS.DisplayInterval
#boolean ACT_ACCOUNT_DEADS.DisplayMessage
#number ACT_ACCOUNT_DEADS.DisplayTime

10 seconds is the default

ACT_ACCOUNT_DEADS:Init(FsmAccount)

Parameter

  • FsmAccount :

ACT_ACCOUNT_DEADS:New(TargetSetUnit, TaskName)

Creates a new DESTROY process.

Parameters

Set#SET_UNIT ACT_ACCOUNT_DEADS.TargetSetUnit
ACT_ACCOUNT_DEADS.TaskName
ACT_ACCOUNT_DEADS:onafterEvent(ProcessUnit, Event, From, To, Task)

StateMachine callback function

Parameters

ACT_ACCOUNT_DEADS:onenterAccount(ProcessUnit, Event, From, To, Task, EventData)

StateMachine callback function

Parameters

ACT_ACCOUNT_DEADS:onenterReport(ProcessUnit, Event, From, To, Task)

StateMachine callback function

Parameters

ACT_ACCOUNT_DEADS:onfuncEventDead(EventData)

Parameter