Module Account

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

Banner Image


Global(s)

Global ACT_ACCOUNT

Global ACT_ACCOUNT_DEADS

Type(s)

Extends Core.Fsm#FSM_PROCESS

#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.

Function(s)

Creates a new DESTROY process.

Return value:

#ACT_ACCOUNT:

StateMachine callback function

Parameters:
Wrapper.Unit#UNIT ProcessUnit

#string Event

#string From

#string To

StateMachine callback function

Parameters:
Wrapper.Unit#UNIT ProcessUnit

#string Event

#string From

#string To

StateMachine callback function

Parameters:
Wrapper.Unit#UNIT ProcessUnit

#string Event

#string From

#string To

Extends #ACT_ACCOUNT

#ACT_ACCOUNT_DEADS 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:

Function(s)

Parameter:
FsmAccount

Creates a new DESTROY process.

Parameters:
Core.Set#SET_UNIT TargetSetUnit

#string TaskName

StateMachine callback function

Parameters:
Wrapper.Unit#UNIT ProcessUnit

#string From

#string Event

#string To

StateMachine callback function

Parameters:
Wrapper.Unit#UNIT ProcessUnit

#string From

#string Event

#string To

StateMachine callback function

Parameters:
Wrapper.Unit#UNIT ProcessUnit

#string From

#string Event

#string To

StateMachine callback function

Parameters:
Wrapper.Unit#UNIT ProcessUnit

#string Event

#string From

#string To

Task