Banner Image

Module Actions.Act_Assist

(SP) (MP) (FSM) Route AI or players through waypoints or to zones.

ACT_ASSIST 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_ASSIST Events:

These are the events defined in this class:

  • Start: The process is started.
  • Next: The process is smoking the targets in the given zone.

ACT_ASSIST Event methods:

Event methods are available (dynamically allocated by the state machine), that accomodate for state transitions occurring in the process. There are two types of event methods, which you can use to influence the normal mechanisms in the state machine:

  • Immediate: The event method has exactly the name of the event.
  • Delayed: The event method starts with a __ + the name of the event. The first parameter of the event method is a number value, expressing the delay in seconds when the event will be executed.

ACT_ASSIST States:

  • None: The controllable did not receive route commands.
  • AwaitSmoke (*): The process is awaiting to smoke the targets in the zone.
  • Smoking (*): The process is smoking the targets in the zone.
  • Failed (*): The process has failed.

(*) End states of the process.

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


1) #ACT_ASSIST_SMOKE_TARGETS_ZONE class, extends #ACT_ASSIST

The ACT_ASSIST_SMOKE_TARGETS_ZONE class implements the core functions to smoke targets in a Core.Zone. The targets are smoked within a certain range around each target, simulating a realistic smoking behaviour. At random intervals, a new target is smoked.

1.1) ACT_ASSIST_SMOKE_TARGETS_ZONE constructor:

Developer Note

Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE Therefore, this class is considered to be deprecated


Global(s)

Global ACT_ASSIST

Global ACT_ASSIST_SMOKE_TARGETS_ZONE

Type(s)

Fields and Methods inherited from FSM_PROCESS Description

ACT_ASSIST:Assign(Task, ProcessUnit)

Assign the process to a Wrapper.Unit and activate the process.

ACT_ASSIST:Copy(Controllable, Task)

Creates a new FSM_PROCESS object based on this FSM_PROCESS.

ACT_ASSIST:GetCommandCenter()

Gets the mission of the process.

ACT_ASSIST:GetMission()

Gets the mission of the process.

ACT_ASSIST:GetTask()

Gets the task of the process.

ACT_ASSIST:Init(FsmProcess)

ACT_ASSIST:Message(Message)

Send a message of the Tasking.Task to the Group of the Unit.

ACT_ASSIST:New(Controllable, Task)

Creates a new FSM_PROCESS object.

ACT_ASSIST:Remove()

Removes an FSM_PROCESS object.

ACT_ASSIST:SetTask(Task)

Sets the task of the process.

ACT_ASSIST.Task

ACT_ASSIST:_call_handler(step, trigger, params, EventName)

ACT_ASSIST:onenterFailed(ProcessUnit, Task, From, Event, To)

ACT_ASSIST:onstatechange(ProcessUnit, Event, From, To, Task)

StateMachine callback function for a FSM_PROCESS

ACT_ASSIST class

Field(s)

Function(s)

Creates a new target smoking state machine.

The process will request from the menu if it accepts the task, if not, the unit is removed from the simulator.

Defined in:

ACT_ASSIST

Return value:

StateMachine callback function

Defined in:

ACT_ASSIST

Parameters:

#string Event

#string From

#string To

StateMachine callback function

Defined in:

ACT_ASSIST

Parameters:

#string Event

#string From

#string To

Field(s)

Function(s)

Assign the process to a Wrapper.Unit and activate the process.

Defined in:

Parameters:

Wrapper.Unit#UNIT ProcessUnit

Return value:

self

Creates a new FSM_PROCESS object based on this FSM_PROCESS.

Defined in:

Parameters:

Controllable

Task

Return value:

Gets the mission of the process.

Gets the mission of the process.

Defined in:

Return value:

Gets the task of the process.

Defined in:

Return value:

Defined in:

Parameter:

FsmProcess

Send a message of the Tasking.Task to the Group of the Unit.

Defined in:

Parameter:

Message

Creates a new FSM_PROCESS object.

Defined in:

Parameters:

Controllable

Task

Return value:

Removes an FSM_PROCESS object.

Defined in:

Return value:

Sets the task of the process.

Defined in:

Parameter:

Return value:

Defined in:

Parameters:

step

trigger

params

EventName

Defined in:

Parameters:

ProcessUnit

Task

From

Event

To

StateMachine callback function for a FSM_PROCESS

Defined in:

Parameters:

#string Event

#string From

#string To

Task

ACT_ASSIST_SMOKE_TARGETS_ZONE class

Field(s)

Function(s)

Defined in:

ACT_ASSIST_SMOKE_TARGETS_ZONE

Parameter:

FsmSmoke

Creates a new target smoking state machine.

The process will request from the menu if it accepts the task, if not, the unit is removed from the simulator.

Defined in:

ACT_ASSIST_SMOKE_TARGETS_ZONE

Parameters:

Core.Set#SET_UNIT TargetSetUnit

Core.Zone#ZONE_BASE TargetZone

StateMachine callback function

Defined in:

ACT_ASSIST_SMOKE_TARGETS_ZONE

Parameters:

#string Event

#string From

#string To