Banner Image

Module Functional.Suppression

Functional - Suppress fire of ground units when they get hit.


Features:

  • Hold fire of attacked units when being fired upon.
  • Retreat to a user defined zone.
  • Fall back on hits.
  • Take cover on hits.
  • Gaussian distribution of suppression time.

Missions:

MOOSE - ALL Demo Missions


When ground units get hit by (suppressive) enemy fire, they will not be able to shoot back for a certain amount of time.

The implementation is based on an idea and script by MBot. See the DCS forum threat for details.

In addition to suppressing the fire, conditions can be specified, which let the group retreat to a defined zone, move away from the attacker or hide at a nearby scenery object.


YouTube Channel

MOOSE YouTube Channel


Author: funkyfranky

Contributions: FlightControl


Global(s)

Global SUPPRESSION

Mimic suppressive enemy fire and let groups flee or retreat.

#SUPPRESSION SUPPRESSION

Mimic suppressive enemy fire and let groups flee or retreat.

Suppression Process

Process

The suppression process can be described as follows.

CombatReady

A group starts in the state CombatReady. In this state the group is ready to fight. The ROE is set to either "Weapon Free" or "Return Fire". The alarm state is set to either "Auto" or "Red".

Event Hit

The most important event in this scenario is the Hit event. This is an event of the FSM and triggered by the DCS event hit.

Suppressed

After the Hit event the group changes its state to Suppressed. Technically, the ROE of the group is changed to "Weapon Hold". The suppression of the group will last a certain amount of time. It is randomized an will vary each time the group is hit. The expected suppression time is set to 15 seconds by default. But the actual value is sampled from a Gaussian distribution.

Process

The graph shows the distribution of suppression times if a group would be hit 100,000 times. As can be seen, on most hits the group gets suppressed for around 15 seconds. Other values are also possible but they become less likely the further away from the "expected" suppression time they are. Minimal and maximal suppression times can also be specified. By default these are set to 5 and 25 seconds, respectively. This can also be seen in the graph because the tails of the Gaussian distribution are cut off at these values.

Event Recovered

After the suppression time is over, the event Recovered is initiated and the group becomes CombatReady again. The ROE of the group will be set to "Weapon Free".

Of course, it can also happen that a group is hit again while it is still suppressed. In that case a new random suppression time is calculated. If the new suppression time is longer than the remaining suppression of the previous hit, then the group recovers when the suppression time of the last hit has passed. If the new suppression time is shorter than the remaining suppression, the group will recover after the longer time of the first suppression has passed.

For example:

  • A group gets hit the first time and is suppressed for - let's say - 15 seconds.
  • After 10 seconds, i.e. when 5 seconds of the old suppression are left, the group gets hit a again.
  • A new suppression time is calculated which can be smaller or larger than the remaining 5 seconds.
  • If the new suppression time is smaller, e.g. three seconds, than five seconds, the group will recover after the 5 remaining seconds of the first suppression have passed.
  • If the new suppression time is longer than last suppression time, e.g. 10 seconds, then the group will recover after the 10 seconds of the new hit have passed.

Generally speaking, the suppression times are not just added on top of each other. Because this could easily lead to the situation that a group never becomes CombatReady again before it gets destroyed.

The mission designer can capture the event Recovered by the function SUPPRESSION.OnAfterRecovered().

Flee Events and States

Apart from being suppressed the groups can also flee from the enemy under certain conditions.

Event Retreat

The first option is a retreat. This can be enabled by setting a retreat zone, i.e. a trigger zone defined in the mission editor.

If the group takes a certain amount of damage, the event Retreat will be called and the group will start to move to the retreat zone. The group will be in the state Retreating, which means that its ROE is set to "Weapon Hold" and the alarm state is set to "Green". Setting the alarm state to green is necessary to enable the group to move under fire.

When the group has reached the retreat zone, the event Retreated is triggered and the state will change to Retreated (note that both the event and the state of the same name in this case). ROE and alarm state are set to "Return Fire" and "Auto", respectively. The group will stay in the retreat zone and not actively participate in the combat any more.

If no option retreat zone has been specified, the option retreat is not available.

The mission designer can capture the events Retreat and Retreated by the functions SUPPRESSION.OnAfterRetreat() and SUPPRESSION.OnAfterRetreated().

Fallback

If a group is attacked by another ground group, it has the option to fall back, i.e. move away from the enemy. The probability of the event FallBack to happen depends on the damage of the group that was hit. The more a group gets damaged, the more likely FallBack event becomes.

If the group enters the state FallingBack it will move 100 meters in the opposite direction of the attacking unit. ROE and alarmstate are set to "Weapon Hold" and "Green", respectively.

At the fallback point the group will wait for 60 seconds before it resumes its normal mission.

The mission designer can capture the event FallBack by the function SUPPRESSION.OnAfterFallBack().

TakeCover

If a group is hit by either another ground or air unit, it has the option to "take cover" or "hide". This means that the group will move to a random scenery object in it vicinity.

Analogously to the fall back case, the probability of a TakeCover event to occur, depends on the damage of the group. The more a group is damaged, the more likely it becomes that a group takes cover.

When a TakeCover event occurs an area with a radius of 300 meters around the hit group is searched for an arbitrary scenery object. If at least one scenery object is found, the group will move there. One it has reached its "hideout", it will wait there for two minutes before it resumes its normal mission.

If more than one scenery object is found, the group will move to a random one. If no scenery object is near the group the TakeCover event is rejected and the group will not move.

The mission designer can capture the event TakeCover by the function SUPPRESSION.OnAfterTakeCover().

Choice of FallBack or TakeCover if both are enabled?

If both FallBack and TakeCover events are enabled by the functions SUPPRESSION.Fallback() and SUPPRESSION.Takecover() the algorithm does the following:

  • If the attacking unit is a ground unit, then the FallBack event is executed.
  • Otherwise, i.e. if the attacker is not a ground unit, then the TakeCover event is triggered.

FightBack

When a group leaves the states TakingCover or FallingBack the event FightBack is triggered. This changes the ROE and the alarm state back to their default values.

The mission designer can capture the event FightBack by the function SUPPRESSION.OnAfterFightBack()

Examples

Simple Suppression

This example shows the basic steps to use suppressive fire for a group.

Process

Customization and Fine Tuning

The following user functions can be used to change the default values

Type(s)

Fields and Methods inherited from SUPPRESSION Description

SUPPRESSION.AlarmState

SUPPRESSION.AutoEngage

SUPPRESSION.BattleZone

SUPPRESSION.ClassName

Name of the class.

SUPPRESSION.Controllable

Controllable of the FSM. Must be a ground group.

SUPPRESSION.CurrentAlarmState

Alam state the group is currently in.

SUPPRESSION.CurrentROE

ROE the group currently has.

SUPPRESSION.DCSdesc

SUPPRESSION:Dead()

Trigger "Dead" event.

SUPPRESSION.Debug

Write Debug messages to DCS log file and send Debug messages to all players.

SUPPRESSION:DebugOn()

Turn Debug mode on.

SUPPRESSION.DefaultAlarmState

Alarm state the group will go to when it is changed back from another state. Default is "Auto".

SUPPRESSION.DefaultROE

ROE the group will get once suppression is over. Default is "Free".

SUPPRESSION:FallBack(AttackUnit)

Trigger "FallBack" event.

SUPPRESSION:Fallback(switch)

Enable fall back if a group is hit.

SUPPRESSION.FallbackDist

Distance in meters the unit will fall back.

SUPPRESSION.FallbackHeading

Heading in degrees to which the group should fall back. Default is directly away from the attacking unit.

SUPPRESSION.FallbackON

If true, group can fall back, i.e. move away from the attacking unit.

SUPPRESSION.FallbackWait

Time in seconds the unit will wait at the fall back point before it resumes its mission.

SUPPRESSION:FightBack()

Trigger "FightBack" event.

SUPPRESSION:FlareOn()

Flare units when they are hit, die or recover from suppression.

SUPPRESSION.Formation

Formation which will be used when falling back, taking cover or retreating. Default "Vee".

SUPPRESSION:Hit(Unit, AttackUnit)

Trigger "Hit" event.

SUPPRESSION.IniGroupStrength

Number of units in a group at start.

SUPPRESSION.IsInfantry

True if group has attribute Infantry.

SUPPRESSION.MenuF10

Main F10 menu for suppresion, i.e.

SUPPRESSION.MenuON

If true creates a entry in the F10 menu.

SUPPRESSION:MenuOn(switch)

Create an F10 menu entry for the suppressed group.

SUPPRESSION:New(group)

Creates a new AI_suppression object.

SUPPRESSION.Nhit

Number of times the group was hit.

SUPPRESSION:OnAfterDead(Controllable, From, Event, To)

User function for OnAfter "Dead" event.

SUPPRESSION:OnAfterFallBack(Controllable, From, Event, To, AttackUnit)

User function for OnAfter "FallBack" event.

SUPPRESSION:OnAfterFightBack(Controllable, From, Event, To)

User function for OnAfter "FlightBack" event.

SUPPRESSION:OnAfterHit(Controllable, From, Event, To, Unit, AttackUnit)

User function for OnAfter "Hit" event.

SUPPRESSION:OnAfterOutOfAmmo(Controllable, From, Event, To)

User function for OnAfter "OutOfAmmo" event.

SUPPRESSION:OnAfterRecovered(Controllable, From, Event, To)

User function for OnAfter "Recovered" event.

SUPPRESSION:OnAfterRetreat(Controllable, From, Event, To)

User function for OnAfter "Retreat" event.

SUPPRESSION:OnAfterRetreated(Controllable, From, Event, To)

User function for OnAfter "Retreated" event.

SUPPRESSION:OnAfterStatus(Controllable, From, Event, To)

User function for OnAfter "Status" event.

SUPPRESSION:OnAfterTakeCover(Controllable, From, Event, To, Hideout)

User function for OnAfter "TakeCover" event.

SUPPRESSION:OnBeforeFallBack(Controllable, From, Event, To, AttackUnit)

User function for OnBefore "FallBack" event.

SUPPRESSION:OnBeforeFightBack(Controllable, From, Event, To)

User function for OnBefore "FlightBack" event.

SUPPRESSION:OnBeforeHit(Controllable, From, Event, To, Unit, AttackUnit)

User function for OnBefore "Hit" event.

SUPPRESSION:OnBeforeRecovered(Controllable, From, Event, To)

User function for OnBefore "Recovered" event.

SUPPRESSION:OnBeforeRetreat(Controllable, From, Event, To)

User function for OnBefore "Retreat" event.

SUPPRESSION:OnBeforeRetreated(Controllable, From, Event, To)

User function for OnBefore "Retreated" event.

SUPPRESSION:OnBeforeTakeCover(Controllable, From, Event, To, Hideout)

User function for OnBefore "TakeCover" event.

SUPPRESSION:OrderFallBack()

Order group to fall back between 100 and 150 meters in a random direction.

SUPPRESSION:OrderRetreat()

Order group to retreat to a pre-defined zone.

SUPPRESSION:OrderTakeCover()

Order group to take cover at a nearby scenery object.

SUPPRESSION:OutOfAmmo()

Trigger "OutOfAmmo" event.

SUPPRESSION.PmaxFlee

Maximum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 90 %.

SUPPRESSION.PminFlee

Minimum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 10 %.

SUPPRESSION.ROE

SUPPRESSION.Recovered(Delay, self)

Trigger "Recovered" event after a delay.

SUPPRESSION:Retreat()

Trigger "Retreat" event.

SUPPRESSION.RetreatDamage

Damage in percent at which the group will be ordered to retreat.

SUPPRESSION.RetreatWait

Time in seconds the group will wait in the retreat zone before it resumes its mission. Default two hours.

SUPPRESSION.RetreatZone

Zone to which a group retreats.

SUPPRESSION:Retreated()

Trigger "Retreated" event.

SUPPRESSION:SetDefaultAlarmState(alarmstate)

Set alarm state a group will get after it returns from a fall back or take cover.

SUPPRESSION:SetDefaultROE(roe)

Set Rules of Engagement (ROE) a group will get when it recovers from suppression.

SUPPRESSION:SetFallbackDistance(distance)

Set distance a group will fall back when it gets hit.

SUPPRESSION:SetFallbackWait(time)

Set time a group waits at its fall back position before it resumes its normal mission.

SUPPRESSION:SetFormation(formation)

Set the formation a group uses for fall back, hide or retreat.

SUPPRESSION:SetMaximumFleeProbability(probability)

Set maximum probability that a group flees (falls back or takes cover) after a hit event.

SUPPRESSION:SetMinimumFleeProbability(probability)

Set minimum probability that a group flees (falls back or takes cover) after a hit event.

SUPPRESSION:SetRetreatDamage(damage)

Set damage threshold before a group is ordered to retreat if a retreat zone was defined.

SUPPRESSION:SetRetreatWait(time)

Set time a group waits in the retreat zone before it resumes its mission.

SUPPRESSION:SetRetreatZone(zone)

Set the zone to which a group retreats after being damaged too much.

SUPPRESSION:SetSpeed(speed)

Set speed a group moves at for fall back, hide or retreat.

SUPPRESSION:SetSuppressionTime(Tave, Tmin, Tmax)

Set average, minimum and maximum time a unit is suppressed each time it gets hit.

SUPPRESSION:SetTakecoverPlace(Hideout)

Set hideout place explicitly.

SUPPRESSION:SetTakecoverRange(range)

Set distance a group searches for hideout places.

SUPPRESSION:SetTakecoverWait(time)

Set time a group waits at its hideout position before it resumes its normal mission.

SUPPRESSION:SmokeOn()

Smoke positions where units fall back to, hide or retreat.

SUPPRESSION.Speed

Speed the unit will use when falling back, taking cover or retreating. Default 999.

SUPPRESSION.SpeedMax

Maximum speed of group in km/h.

SUPPRESSION:Status()

Trigger "Status" event.

SUPPRESSION:StatusReport(message)

Status of group.

SUPPRESSION:TakeCover(Hideout)

Trigger "TakeCover" event.

SUPPRESSION:Takecover(switch)

Enable take cover option if a unit is hit.

SUPPRESSION.TakecoverON

If true, group can hide at a nearby scenery object.

SUPPRESSION.TakecoverRange

Range in which the group will search for scenery objects to hide at.

SUPPRESSION.TakecoverWait

Time in seconds the group will hide before it will resume its mission.

SUPPRESSION.Tsuppress_ave

Average time in seconds a group gets suppressed. Actual value is sampled randomly from a Gaussian distribution.

SUPPRESSION.Tsuppress_max

Maximum time in seconds the group gets suppressed.

SUPPRESSION.Tsuppress_min

Minimum time in seconds the group gets suppressed.

SUPPRESSION.TsuppressionOver

Time at which the suppression will be over.

SUPPRESSION.Type

Type of the group.

SUPPRESSION:_CreateMenuGroup()

Create F10 main menu, i.e.

SUPPRESSION:_EventFromTo(BA, Event, From, To)

Print event-from-to string to DCS log file.

SUPPRESSION:_GetLife()

Get (relative) life in percent of a group.

SUPPRESSION:_Heading(a, b)

Heading from point a to point b in degrees.

SUPPRESSION:_OnEventDead(EventData)

Event handler for Dead event of suppressed groups.

SUPPRESSION:_OnEventHit(EventData)

Event handler for Dead event of suppressed groups.

SUPPRESSION._Passing_Waypoint(group, Fsm, i, final)

Function called when group is passing a waypoint.

SUPPRESSION:_Random_Gaussian(x0, sigma, xmin, xmax)

Generate Gaussian pseudo-random numbers.

SUPPRESSION:_Run(fin, speed, formation, wait)

Make group run/drive to a certain point.

SUPPRESSION:_SearchHideout()

Search a place to hide.

SUPPRESSION:_SetAlarmState(state)

Sets the alarm state of the group and updates the current alarm state variable.

SUPPRESSION:_SetROE(roe)

Sets the ROE for the group and updates the current ROE variable.

SUPPRESSION:_Suppress()

Suppress fire of a unit by setting its ROE to "Weapon Hold".

SUPPRESSION:__Dead(Delay)

Trigger "Dead" event after a delay.

SUPPRESSION:__FallBack(Delay, AttackUnit)

Trigger "FallBack" event after a delay.

SUPPRESSION:__FightBack(Delay)

Trigger "FightBack" event after a delay.

SUPPRESSION:__Hit(Delay, Unit, AttackUnit)

Trigger "Hit" event after a delay.

SUPPRESSION:__OutOfAmmo(Delay)

Trigger "OutOfAmmo" event after a delay.

SUPPRESSION:__Retreat(Delay)

Trigger "Retreat" event after a delay.

SUPPRESSION:__Retreated(Delay)

Trigger "Retreated" event after a delay.

SUPPRESSION:__Status(Delay)

Trigger "Status" event after a delay.

SUPPRESSION:__TakeCover(Delay, Hideout)

Trigger "TakeCover" event after a delay.

SUPPRESSION.eventmoose

If true, events are handled by MOOSE. If false, events are handled directly by DCS eventhandler. Default true.

SUPPRESSION.flare

Flare units when they get hit or die.

SUPPRESSION.hideout

Coordinate/place where the group will try to take cover.

SUPPRESSION.lid

String for DCS log file.

SUPPRESSION:onEvent(Event)

Event handler for suppressed groups.

SUPPRESSION:onafterDead(Controllable, From, Event, To)

After "Dead" event, when a unit has died.

SUPPRESSION:onafterFallBack(Controllable, From, Event, To, AttackUnit)

After "FallBack" event.

SUPPRESSION:onafterFightBack(Controllable, From, Event, To)

After "FightBack" event.

SUPPRESSION:onafterHit(Controllable, From, Event, To, Unit, AttackUnit)

After "Hit" event.

SUPPRESSION:onafterOutOfAmmo(Controllable, From, Event, To)

After "OutOfAmmo" event.

SUPPRESSION:onafterRecovered(Controllable, From, Event, To)

After "Recovered" event.

SUPPRESSION:onafterRetreat(Controllable, From, Event, To)

After "Retreat" event.

SUPPRESSION:onafterRetreated(Controllable, From, Event, To)

After "Retreateded" event.

SUPPRESSION:onafterStart(Controllable, From, Event, To)

After "Start" event.

SUPPRESSION:onafterStatus(Controllable, From, Event, To)

After "Status" event.

SUPPRESSION:onafterStop(Controllable, From, Event, To)

After "Stop" event.

SUPPRESSION:onafterTakeCover(Controllable, From, Event, To, Hideout)

After "TakeCover" event.

SUPPRESSION:onbeforeFallBack(Controllable, From, Event, To, AttackUnit)

Before "FallBack" event.

SUPPRESSION:onbeforeRecovered(Controllable, From, Event, To)

Before "Recovered" event.

SUPPRESSION:onbeforeRetreat(Controllable, From, Event, To)

Before "Retreat" event.

SUPPRESSION:onbeforeRetreated(Controllable, From, Event, To)

Before "Retreateded" event.

SUPPRESSION:onbeforeTakeCover(Controllable, From, Event, To, Hideout)

Before "TakeCover" event.

SUPPRESSION.smoke

Smoke places to which the group retreats, falls back or hides.

SUPPRESSION.version

PSEUDOATC version.

Fields and Methods inherited from FSM_CONTROLLABLE Description

SUPPRESSION.Controllable

SUPPRESSION:GetControllable()

Gets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

SUPPRESSION:New(FSMT, Controllable)

Creates a new FSM_CONTROLLABLE object.

SUPPRESSION:OnAfterStop(Controllable, From, Event, To)

OnAfter Transition Handler for Event Stop.

SUPPRESSION:OnBeforeStop(Controllable, From, Event, To)

OnBefore Transition Handler for Event Stop.

SUPPRESSION:OnEnterStopped(Controllable, From, Event, To)

OnEnter Transition Handler for State Stopped.

SUPPRESSION:OnLeaveStopped(Controllable, From, Event, To)

OnLeave Transition Handler for State Stopped.

SUPPRESSION:SetControllable(FSMControllable)

Sets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

SUPPRESSION:Stop()

Synchronous Event Trigger for Event Stop.

SUPPRESSION:__Stop(Delay)

Asynchronous Event Trigger for Event Stop.

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

Fields and Methods inherited from FSM Description

SUPPRESSION:AddEndState(State)

Adds an End state.

SUPPRESSION:AddProcess(From, Event, Process, ReturnEvents)

Set the default Process template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Wrapper.Controllable by the task.

SUPPRESSION:AddScore(State, ScoreText, Score)

Adds a score for the FSM to be achieved.

SUPPRESSION:AddScoreProcess(From, Event, State, ScoreText, Score)

Adds a score for the FSM_PROCESS to be achieved.

SUPPRESSION:AddTransition(From, Event, To)

Add a new transition rule to the FSM.

SUPPRESSION.CallScheduler

SUPPRESSION.Events

SUPPRESSION:GetCurrentState()

SUPPRESSION:GetEndStates()

Returns the End states.

SUPPRESSION:GetProcess(From, Event)

SUPPRESSION:GetProcesses()

Returns a table of the SubFSM rules defined within the FSM.

SUPPRESSION:GetScores()

Returns a table with the scores defined.

SUPPRESSION:GetStartState()

Returns the start state of the FSM.

SUPPRESSION:GetState()

SUPPRESSION:GetSubs()

Returns a table with the Subs defined.

SUPPRESSION:GetTransitions()

Returns a table of the transition rules defined within the FSM.

SUPPRESSION:Is(State)

SUPPRESSION:LoadCallBacks(CallBackTable)

SUPPRESSION:New()

Creates a new FSM object.

SUPPRESSION.Scores

SUPPRESSION:SetProcess(From, Event, Fsm)

SUPPRESSION:SetStartState(State)

Sets the start state of the FSM.

SUPPRESSION._EndStates

SUPPRESSION._EventSchedules

SUPPRESSION._Processes

SUPPRESSION._Scores

SUPPRESSION._StartState

SUPPRESSION._Transitions

SUPPRESSION:_add_to_map(Map, Event)

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

SUPPRESSION:_create_transition(EventName)

SUPPRESSION:_delayed_transition(EventName)

SUPPRESSION:_eventmap(Events, EventStructure)

SUPPRESSION:_gosub(ParentFrom, ParentEvent)

SUPPRESSION:_handler(EventName, ...)

SUPPRESSION:_isendstate(Current)

SUPPRESSION:_submap(subs, sub, name)

SUPPRESSION:can(e)

SUPPRESSION:cannot(e)

SUPPRESSION.current

SUPPRESSION.endstates

SUPPRESSION:is(state)

SUPPRESSION.options

SUPPRESSION.subs

Fields and Methods inherited from BASE Description

SUPPRESSION.ClassID

The ID number of the class.

SUPPRESSION.ClassName

The name of the class.

SUPPRESSION.ClassNameAndID

The name of the class concatenated with the ID number of the class.

SUPPRESSION:ClearState(Object, StateName)

Clear the state of an object.

SUPPRESSION:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace)

Creation of a Birth Event.

SUPPRESSION:CreateEventCrash(EventTime, Initiator)

Creation of a Crash Event.

SUPPRESSION:CreateEventDead(EventTime, Initiator)

Creation of a Dead Event.

SUPPRESSION:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

SUPPRESSION:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

SUPPRESSION:E(Arguments)

Log an exception which will be traced always.

SUPPRESSION:EventDispatcher()

Returns the event dispatcher

SUPPRESSION:EventRemoveAll()

Remove all subscribed events

SUPPRESSION:F(Arguments)

Trace a function call.

SUPPRESSION:F2(Arguments)

Trace a function call level 2.

SUPPRESSION:F3(Arguments)

Trace a function call level 3.

SUPPRESSION:GetClassID()

Get the ClassID of the class instance.

SUPPRESSION:GetClassName()

Get the ClassName of the class instance.

SUPPRESSION:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

SUPPRESSION:GetEventPriority()

Get the Class Event processing Priority.

SUPPRESSION:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

SUPPRESSION:GetState(Object, Key)

Get a Value given a Key from the Object.

SUPPRESSION:HandleEvent(Event, EventFunction)

Subscribe to a DCS Event.

SUPPRESSION:I(Arguments)

Log an information which will be traced always.

SUPPRESSION:Inherit(Child, Parent)

This is the worker method to inherit from a parent class.

SUPPRESSION:IsInstanceOf(ClassName)

This is the worker method to check if an object is an (sub)instance of a class.

SUPPRESSION:IsTrace()

Enquires if tracing is on (for the class).

SUPPRESSION:New()

BASE constructor.

SUPPRESSION:OnEvent(EventData)

Occurs when an object is completely destroyed.

SUPPRESSION:OnEventBaseCaptured(EventData)

Occurs when a ground unit captures either an airbase or a farp.

SUPPRESSION:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

SUPPRESSION:OnEventCrash(EventData)

Occurs when any aircraft crashes into the ground and is completely destroyed.

SUPPRESSION:OnEventDead(EventData)

Occurs when an object is dead.

SUPPRESSION:OnEventDetailedFailure(EventData)

Unknown precisely what creates this event, likely tied into newer damage model.

SUPPRESSION:OnEventEjection(EventData)

Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected

SUPPRESSION:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

SUPPRESSION:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

SUPPRESSION:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

SUPPRESSION:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

SUPPRESSION:OnEventKill(EventData)

Occurs on the death of a unit.

SUPPRESSION:OnEventLand(EventData)

Occurs when an aircraft lands at an airbase, farp or ship initiator : The unit that has landed place: Object that the unit landed on.

SUPPRESSION:OnEventLandingAfterEjection(EventData)

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

SUPPRESSION:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

SUPPRESSION:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

SUPPRESSION:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

SUPPRESSION:OnEventMissionEnd(EventData)

Occurs when a mission ends

SUPPRESSION:OnEventMissionStart(EventData)

Occurs when a mission starts

SUPPRESSION:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

SUPPRESSION:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

SUPPRESSION:OnEventPlayerLeaveUnit(EventData)

Occurs when any player relieves control of a unit to the AI.

SUPPRESSION:OnEventRefueling(EventData)

Occurs when an aircraft connects with a tanker and begins taking on fuel.

SUPPRESSION:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

SUPPRESSION:OnEventScore(EventData)

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

SUPPRESSION:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

SUPPRESSION:OnEventShootingStart(EventData)

Occurs when any unit begins firing a weapon that has a high rate of fire.

SUPPRESSION:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

SUPPRESSION:OnEventTakeoff(EventData)

Occurs when an aircraft takes off from an airbase, farp, or ship.

SUPPRESSION:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

SUPPRESSION:ScheduleOnce(Start, SchedulerFunction, ...)

Schedule a new time event.

SUPPRESSION:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...)

Schedule a new time event.

SUPPRESSION:ScheduleStop(SchedulerFunction)

Stops the Schedule.

SUPPRESSION.Scheduler

SUPPRESSION:SetEventPriority(EventPriority)

Set the Class Event processing Priority.

SUPPRESSION:SetState(Object, Key, Value)

Set a state or property of the Object given a Key and a Value.

SUPPRESSION:T(Arguments)

Trace a function logic level 1.

SUPPRESSION:T2(Arguments)

Trace a function logic level 2.

SUPPRESSION:T3(Arguments)

Trace a function logic level 3.

SUPPRESSION:TraceAll(TraceAll)

Trace all methods in MOOSE

SUPPRESSION:TraceClass(Class)

Set tracing for a class

SUPPRESSION:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

SUPPRESSION:TraceLevel(Level)

Set trace level

SUPPRESSION:TraceOff()

Set trace off.

SUPPRESSION:TraceOn()

Set trace on.

SUPPRESSION:TraceOnOff(TraceOnOff)

Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

SUPPRESSION:UnHandleEvent(Event)

UnSubscribe to a DCS event.

SUPPRESSION._

SUPPRESSION:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

SUPPRESSION:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

SUPPRESSION.__

SUPPRESSION:onEvent(event)

Fields and Methods inherited from SUPPRESSION.AlarmState Description

SUPPRESSION.AlarmState.Auto

Automatic.

SUPPRESSION.AlarmState.Green

Green.

SUPPRESSION.AlarmState.Red

Red.

Fields and Methods inherited from SUPPRESSION.ROE Description

SUPPRESSION.ROE.Free

Weapon fire.

SUPPRESSION.ROE.Hold

Hold fire.

SUPPRESSION.ROE.Return

Return fire.

SUPPRESSION class

Field(s)

#string SUPPRESSION.ClassName

Name of the class.

Wrapper.Controllable#CONTROLLABLE SUPPRESSION.Controllable

Controllable of the FSM. Must be a ground group.

#string SUPPRESSION.CurrentAlarmState

Alam state the group is currently in.

#string SUPPRESSION.CurrentROE

ROE the group currently has.

SUPPRESSION.DCSdesc

Get DCS descriptors of group.

#boolean SUPPRESSION.Debug

Write Debug messages to DCS log file and send Debug messages to all players.

#string SUPPRESSION.DefaultAlarmState

Alarm state the group will go to when it is changed back from another state. Default is "Auto".

#string SUPPRESSION.DefaultROE

ROE the group will get once suppression is over. Default is "Free".

#number SUPPRESSION.FallbackDist

Distance in meters the unit will fall back.

#number SUPPRESSION.FallbackHeading

Heading in degrees to which the group should fall back. Default is directly away from the attacking unit.

#boolean SUPPRESSION.FallbackON

If true, group can fall back, i.e. move away from the attacking unit.

#number SUPPRESSION.FallbackWait

Time in seconds the unit will wait at the fall back point before it resumes its mission.

#string SUPPRESSION.Formation

Formation which will be used when falling back, taking cover or retreating. Default "Vee".

#number SUPPRESSION.IniGroupStrength

Number of units in a group at start.

#boolean SUPPRESSION.IsInfantry

True if group has attribute Infantry.

#string SUPPRESSION.MenuF10

Main F10 menu for suppresion, i.e.

F10/Suppression.

#boolean SUPPRESSION.MenuON

If true creates a entry in the F10 menu.

#number SUPPRESSION.Nhit

Number of times the group was hit.

#number SUPPRESSION.PmaxFlee

Maximum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 90 %.

#number SUPPRESSION.PminFlee

Minimum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 10 %.

#number SUPPRESSION.RetreatDamage

Damage in percent at which the group will be ordered to retreat.

#number SUPPRESSION.RetreatWait

Time in seconds the group will wait in the retreat zone before it resumes its mission. Default two hours.

Core.Zone#ZONE SUPPRESSION.RetreatZone

Zone to which a group retreats.

#number SUPPRESSION.Speed

Speed the unit will use when falling back, taking cover or retreating. Default 999.

#number SUPPRESSION.SpeedMax

Maximum speed of group in km/h.

#boolean SUPPRESSION.TakecoverON

If true, group can hide at a nearby scenery object.

#number SUPPRESSION.TakecoverRange

Range in which the group will search for scenery objects to hide at.

#number SUPPRESSION.TakecoverWait

Time in seconds the group will hide before it will resume its mission.

#number SUPPRESSION.Tsuppress_ave

Average time in seconds a group gets suppressed. Actual value is sampled randomly from a Gaussian distribution.

#number SUPPRESSION.Tsuppress_max

Maximum time in seconds the group gets suppressed.

#number SUPPRESSION.Tsuppress_min

Minimum time in seconds the group gets suppressed.

#number SUPPRESSION.TsuppressionOver

Time at which the suppression will be over.

#string SUPPRESSION.Type

Type of the group.

#boolean SUPPRESSION.eventmoose

If true, events are handled by MOOSE. If false, events are handled directly by DCS eventhandler. Default true.

#boolean SUPPRESSION.flare

Flare units when they get hit or die.

Core.Point#COORDINATE SUPPRESSION.hideout

Coordinate/place where the group will try to take cover.

#string SUPPRESSION.lid

String for DCS log file.

#boolean SUPPRESSION.smoke

Smoke places to which the group retreats, falls back or hides.

#number SUPPRESSION.version

PSEUDOATC version.

Function(s)

Trigger "Dead" event.

Defined in:

SUPPRESSION

Turn Debug mode on.

Enables messages and more output to DCS log file.

Defined in:

SUPPRESSION

Trigger "FallBack" event.

Defined in:

SUPPRESSION

Parameter:

Wrapper.Unit#UNIT AttackUnit

Attacking unit. We will move away from this.

Enable fall back if a group is hit.

Defined in:

SUPPRESSION

Parameter:

#boolean switch

Enable=true or disable=false fall back of group.

Trigger "FightBack" event.

Defined in:

SUPPRESSION

Flare units when they are hit, die or recover from suppression.

Defined in:

SUPPRESSION

Trigger "Hit" event.

Defined in:

SUPPRESSION

Parameters:

Unit that was hit.

Wrapper.Unit#UNIT AttackUnit

Unit that attacked.

Create an F10 menu entry for the suppressed group.

The menu is mainly for Debugging purposes.

Defined in:

SUPPRESSION

Parameter:

#boolean switch

Enable=true or disable=false menu group. Default is true.

Creates a new AI_suppression object.

Defined in:

SUPPRESSION

Parameter:

The GROUP object for which suppression should be applied.

Return value:

SUPPRESSION object or nil if group does not exist or is not a ground group.

User function for OnAfter "Dead" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "FallBack" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Wrapper.Unit#UNIT AttackUnit

Attacking unit. We will move away from this.

User function for OnAfter "FlightBack" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "Hit" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Unit that was hit.

Wrapper.Unit#UNIT AttackUnit

Unit that attacked.

User function for OnAfter "OutOfAmmo" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "Recovered" event.

Defined in:

SUPPRESSION

Parameters:

of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "Retreat" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "Retreated" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "Status" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

User function for OnAfter "TakeCover" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Place where the group will hide.

User function for OnBefore "FallBack" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Wrapper.Unit#UNIT AttackUnit

Attacking unit. We will move away from this.

Return value:

#boolean:

User function for OnBefore "FlightBack" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Return value:

#boolean:

User function for OnBefore "Hit" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Unit that was hit.

Wrapper.Unit#UNIT AttackUnit

Unit that attacked.

Return value:

#boolean:

User function for OnBefore "Recovered" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Return value:

#boolean:

User function for OnBefore "Retreat" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Return value:

#boolean:

User function for OnBefore "Retreated" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Return value:

#boolean:

User function for OnBefore "TakeCover" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Place where the group will hide.

Return value:

#boolean:

Order group to fall back between 100 and 150 meters in a random direction.

Defined in:

SUPPRESSION

Order group to retreat to a pre-defined zone.

Defined in:

SUPPRESSION

Order group to take cover at a nearby scenery object.

Defined in:

SUPPRESSION

Trigger "OutOfAmmo" event.

Defined in:

SUPPRESSION

Trigger "Recovered" event after a delay.

Defined in:

SUPPRESSION

Parameters:

#number Delay

Delay in seconds.

Trigger "Retreat" event.

Defined in:

SUPPRESSION

Trigger "Retreated" event.

Defined in:

SUPPRESSION

Set alarm state a group will get after it returns from a fall back or take cover.

Defined in:

SUPPRESSION

Parameter:

#string alarmstate

Alarm state. Possible "Auto", "Green", "Red". Default is "Auto".

Set Rules of Engagement (ROE) a group will get when it recovers from suppression.

Defined in:

SUPPRESSION

Parameter:

#string roe

ROE after suppression. Possible "Free", "Hold" or "Return". Default "Free".

Set distance a group will fall back when it gets hit.

Defined in:

SUPPRESSION

Parameter:

#number distance

Distance in meters.

Set time a group waits at its fall back position before it resumes its normal mission.

Defined in:

SUPPRESSION

Parameter:

#number time

Time in seconds.

Set the formation a group uses for fall back, hide or retreat.

Defined in:

SUPPRESSION

Parameter:

#string formation

Formation of the group. Default "Vee".

Set maximum probability that a group flees (falls back or takes cover) after a hit event.

Default is 90%.

Defined in:

SUPPRESSION

Parameter:

#number probability

Probability in percent.

Set minimum probability that a group flees (falls back or takes cover) after a hit event.

Default is 10%.

Defined in:

SUPPRESSION

Parameter:

#number probability

Probability in percent.

Set damage threshold before a group is ordered to retreat if a retreat zone was defined.

If the group consists of only a singe unit, this referrs to the life of the unit. If the group consists of more than one unit, this referrs to the group strength relative to its initial strength.

Defined in:

SUPPRESSION

Parameter:

#number damage

Damage in percent. If group gets damaged above this value, the group will retreat. Default 50 %.

Set time a group waits in the retreat zone before it resumes its mission.

Default is two hours.

Defined in:

SUPPRESSION

Parameter:

#number time

Time in seconds. Default 7200 seconds = 2 hours.

Set the zone to which a group retreats after being damaged too much.

Defined in:

SUPPRESSION

Parameter:

MOOSE zone object.

Set speed a group moves at for fall back, hide or retreat.

Defined in:

SUPPRESSION

Parameter:

#number speed

Speed in km/h of group. Default max speed the group can do.

Set average, minimum and maximum time a unit is suppressed each time it gets hit.

Defined in:

SUPPRESSION

Parameters:

#number Tave

Average time [seconds] a group will be suppressed. Default is 15 seconds.

#number Tmin

(Optional) Minimum time [seconds] a group will be suppressed. Default is 5 seconds.

#number Tmax

(Optional) Maximum time a group will be suppressed. Default is 25 seconds.

Set hideout place explicitly.

Defined in:

SUPPRESSION

Parameter:

Place where the group will hide after the TakeCover event.

Set distance a group searches for hideout places.

Defined in:

SUPPRESSION

Parameter:

#number range

Search range in meters.

Set time a group waits at its hideout position before it resumes its normal mission.

Defined in:

SUPPRESSION

Parameter:

#number time

Time in seconds.

Smoke positions where units fall back to, hide or retreat.

Defined in:

SUPPRESSION

Trigger "Status" event.

Defined in:

SUPPRESSION

Status of group.

Current ROE, alarm state, life.

Defined in:

SUPPRESSION

Parameter:

#boolean message

Send message to all players.

Trigger "TakeCover" event.

Defined in:

SUPPRESSION

Parameter:

Place where the group will hide.

Enable take cover option if a unit is hit.

Defined in:

SUPPRESSION

Parameter:

#boolean switch

Enable=true or disable=false fall back of group.

Create F10 main menu, i.e.

F10/Suppression. The menu is mainly for Debugging purposes.

Defined in:

SUPPRESSION

Print event-from-to string to DCS log file.

Defined in:

SUPPRESSION

Parameters:

#string BA

Before/after info.

#string Event

Event.

#string From

From state.

#string To

To state.

Get (relative) life in percent of a group.

Function returns the value of the units with the smallest and largest life. Also the average value of all groups is returned.

Defined in:

SUPPRESSION

Return values:

#number:

Smallest life value of all units.

#number:

Largest life value of all units.

#number:

Average life value of all alife groups

#number:

Average life value of all groups including already dead ones.

#number:

Relative group strength.

Heading from point a to point b in degrees.

Defined in:

SUPPRESSION

Parameters:

Coordinate.

Coordinate.

Return value:

#number:

angle Angle from a to b in degrees.

Event handler for Dead event of suppressed groups.

Defined in:

SUPPRESSION

Parameter:

Event handler for Dead event of suppressed groups.

Defined in:

SUPPRESSION

Parameter:

Function called when group is passing a waypoint.

At the last waypoint we set the group back to CombatReady.

Defined in:

SUPPRESSION

Parameters:

Group which is passing a waypoint.

The suppression object.

#number i

Waypoint number that has been reached.

#boolean final

True if it is the final waypoint. Start Fightback.

Generate Gaussian pseudo-random numbers.

Defined in:

SUPPRESSION

Parameters:

#number x0

Expectation value of distribution.

#number sigma

(Optional) Standard deviation. Default 10.

#number xmin

(Optional) Lower cut-off value.

#number xmax

(Optional) Upper cut-off value.

Return value:

#number:

Gaussian random number.

Make group run/drive to a certain point.

We put in several intermediate waypoints because sometimes the group stops before it arrived at the desired point.

Defined in:

SUPPRESSION

Parameters:

Coordinate where we want to go.

#number speed

Speed of group. Default is 20.

#string formation

Formation of group. Default is "Vee".

#number wait

Time the group will wait/hold at final waypoint. Default is 30 seconds.

Search a place to hide.

This is any scenery object in the vicinity.

Defined in:

SUPPRESSION

Return values:

Coordinate of the hideout place.

nil If no scenery object is within search radius.

Sets the alarm state of the group and updates the current alarm state variable.

Defined in:

SUPPRESSION

Parameter:

#string state

Alarm state the group will get. Possible "Auto", "Green", "Red". Default is self.DefaultAlarmState.

Sets the ROE for the group and updates the current ROE variable.

Defined in:

SUPPRESSION

Parameter:

#string roe

ROE the group will get. Possible "Free", "Hold", "Return". Default is self.DefaultROE.

Suppress fire of a unit by setting its ROE to "Weapon Hold".

Defined in:

SUPPRESSION

Trigger "Dead" event after a delay.

Defined in:

SUPPRESSION

Parameter:

#number Delay

Delay in seconds.

Trigger "FallBack" event after a delay.

Defined in:

SUPPRESSION

Parameters:

#number Delay

Delay in seconds.

Wrapper.Unit#UNIT AttackUnit

Attacking unit. We will move away from this.

Trigger "FightBack" event after a delay.

Defined in:

SUPPRESSION

Parameter:

#number Delay

Delay in seconds.

Trigger "Hit" event after a delay.

Defined in:

SUPPRESSION

Parameters:

#number Delay

Delay in seconds.

Unit that was hit.

Wrapper.Unit#UNIT AttackUnit

Unit that attacked.

Trigger "OutOfAmmo" event after a delay.

Defined in:

SUPPRESSION

Parameter:

#number Delay

Delay in seconds.

Trigger "Retreat" event after a delay.

Defined in:

SUPPRESSION

Parameter:

#number Delay

Delay in seconds.

Trigger "Retreated" event after a delay.

Defined in:

SUPPRESSION

Parameter:

#number Delay

Delay in seconds.

Trigger "Status" event after a delay.

Defined in:

SUPPRESSION

Parameter:

#number Delay

Delay in seconds.

Trigger "TakeCover" event after a delay.

Defined in:

SUPPRESSION

Parameters:

#number Delay

Delay in seconds.

Place where the group will hide.

Event handler for suppressed groups.

Defined in:

SUPPRESSION

Parameter:

Event

After "Dead" event, when a unit has died.

When all units of a group are dead, FSM is stopped and eventhandler removed.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "FallBack" event.

We get the heading away from the attacker and route the group a certain distance in that direction.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Wrapper.Unit#UNIT AttackUnit

Attacking unit. We will move away from this.

After "FightBack" event.

ROE and Alarm state are set back to default.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "Hit" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Unit that was hit.

Wrapper.Unit#UNIT AttackUnit

Unit that attacked.

After "OutOfAmmo" event.

Triggered when group is completely out of ammo.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "Recovered" event.

Group has recovered and its ROE is set back to the "normal" unsuppressed state. Optionally the group is flared green.

Defined in:

SUPPRESSION

Parameters:

of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "Retreat" event.

Find a random point in the retreat zone and route the group there.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "Retreateded" event.

Group has reached the retreat zone. Set ROE to return fire and alarm state to auto.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "Start" event.

Initialized ROE and alarm state. Starts the event handler.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "Status" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "Stop" event.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

After "TakeCover" event.

Group will run to a nearby scenery object and "hide" there for a certain time.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Place where the group will hide.

Before "FallBack" event.

We check that group is not already falling back.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Wrapper.Unit#UNIT AttackUnit

Attacking unit. We will move away from this.

Return value:

#boolean:

Before "Recovered" event.

Check if suppression time is over.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Return value:

#boolean:

Before "Retreat" event.

We check that the group is not already retreating.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Return value:

#boolean:

True if transition is allowed, False if transition is forbidden.

Before "Retreateded" event.

Check that the group is really in the retreat zone.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Before "TakeCover" event.

Search an area around the group for possible scenery objects where the group can hide.

Defined in:

SUPPRESSION

Parameters:

Controllable of the group.

#string From

From state.

#string Event

Event.

#string To

To state.

Place where the group will hide.

Return value:

#boolean:

Field(s)

#string SUPPRESSION.ClassName

Name of the class.

Wrapper.Controllable#CONTROLLABLE SUPPRESSION.Controllable

Controllable of the FSM. Must be a ground group.

#string SUPPRESSION.CurrentAlarmState

Alam state the group is currently in.

#string SUPPRESSION.CurrentROE

ROE the group currently has.

SUPPRESSION.DCSdesc

Get DCS descriptors of group.

#boolean SUPPRESSION.Debug

Write Debug messages to DCS log file and send Debug messages to all players.

#string SUPPRESSION.DefaultAlarmState

Alarm state the group will go to when it is changed back from another state. Default is "Auto".

#string SUPPRESSION.DefaultROE

ROE the group will get once suppression is over. Default is "Free".

#number SUPPRESSION.FallbackDist

Distance in meters the unit will fall back.

#number SUPPRESSION.FallbackHeading

Heading in degrees to which the group should fall back. Default is directly away from the attacking unit.

#boolean SUPPRESSION.FallbackON

If true, group can fall back, i.e. move away from the attacking unit.

#number SUPPRESSION.FallbackWait

Time in seconds the unit will wait at the fall back point before it resumes its mission.

#string SUPPRESSION.Formation

Formation which will be used when falling back, taking cover or retreating. Default "Vee".

#number SUPPRESSION.IniGroupStrength

Number of units in a group at start.

#boolean SUPPRESSION.IsInfantry

True if group has attribute Infantry.

#string SUPPRESSION.MenuF10

Main F10 menu for suppresion, i.e.

F10/Suppression.

#boolean SUPPRESSION.MenuON

If true creates a entry in the F10 menu.

#number SUPPRESSION.Nhit

Number of times the group was hit.

#number SUPPRESSION.PmaxFlee

Maximum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 90 %.

#number SUPPRESSION.PminFlee

Minimum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 10 %.

#number SUPPRESSION.RetreatDamage

Damage in percent at which the group will be ordered to retreat.

#number SUPPRESSION.RetreatWait

Time in seconds the group will wait in the retreat zone before it resumes its mission. Default two hours.

Core.Zone#ZONE SUPPRESSION.RetreatZone

Zone to which a group retreats.

#number SUPPRESSION.Speed

Speed the unit will use when falling back, taking cover or retreating. Default 999.

#number SUPPRESSION.SpeedMax

Maximum speed of group in km/h.

#boolean SUPPRESSION.TakecoverON

If true, group can hide at a nearby scenery object.

#number SUPPRESSION.TakecoverRange

Range in which the group will search for scenery objects to hide at.

#number SUPPRESSION.TakecoverWait

Time in seconds the group will hide before it will resume its mission.

#number SUPPRESSION.Tsuppress_ave

Average time in seconds a group gets suppressed. Actual value is sampled randomly from a Gaussian distribution.

#number SUPPRESSION.Tsuppress_max

Maximum time in seconds the group gets suppressed.

#number SUPPRESSION.Tsuppress_min

Minimum time in seconds the group gets suppressed.

#number SUPPRESSION.TsuppressionOver

Time at which the suppression will be over.

#string SUPPRESSION.Type

Type of the group.

#boolean SUPPRESSION.eventmoose

If true, events are handled by MOOSE. If false, events are handled directly by DCS eventhandler. Default true.

#boolean SUPPRESSION.flare

Flare units when they get hit or die.

Core.Point#COORDINATE SUPPRESSION.hideout

Coordinate/place where the group will try to take cover.

#string SUPPRESSION.lid

String for DCS log file.

#boolean SUPPRESSION.smoke

Smoke places to which the group retreats, falls back or hides.

#number SUPPRESSION.version

PSEUDOATC version.

Function(s)

Gets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

Creates a new FSM_CONTROLLABLE object.

Defined in:

Parameters:

#table FSMT

Finite State Machine Table

(optional) The CONTROLLABLE object that the FSM_CONTROLLABLE governs.

Return value:

OnAfter Transition Handler for Event Stop.

Defined in:

Parameters:

The Controllable Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

OnBefore Transition Handler for Event Stop.

Defined in:

Parameters:

The Controllable Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

Return value:

#boolean:

Return false to cancel Transition.

OnEnter Transition Handler for State Stopped.

Defined in:

Parameters:

The Controllable Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

OnLeave Transition Handler for State Stopped.

Defined in:

Parameters:

The Controllable Object managed by the FSM.

#string From

The From State string.

#string Event

The Event string.

#string To

The To State string.

Return value:

#boolean:

Return false to cancel Transition.

Sets the CONTROLLABLE object that the FSM_CONTROLLABLE governs.

Defined in:

Parameter:

Return value:

Synchronous Event Trigger for Event Stop.

Asynchronous Event Trigger for Event Stop.

Defined in:

Parameter:

#number Delay

The delay in seconds.

Defined in:

Parameters:

step

trigger

params

EventName

Field(s)

#string SUPPRESSION.ClassName

Name of the class.

Wrapper.Controllable#CONTROLLABLE SUPPRESSION.Controllable

Controllable of the FSM. Must be a ground group.

#string SUPPRESSION.CurrentAlarmState

Alam state the group is currently in.

#string SUPPRESSION.CurrentROE

ROE the group currently has.

SUPPRESSION.DCSdesc

Get DCS descriptors of group.

#boolean SUPPRESSION.Debug

Write Debug messages to DCS log file and send Debug messages to all players.

#string SUPPRESSION.DefaultAlarmState

Alarm state the group will go to when it is changed back from another state. Default is "Auto".

#string SUPPRESSION.DefaultROE

ROE the group will get once suppression is over. Default is "Free".

#number SUPPRESSION.FallbackDist

Distance in meters the unit will fall back.

#number SUPPRESSION.FallbackHeading

Heading in degrees to which the group should fall back. Default is directly away from the attacking unit.

#boolean SUPPRESSION.FallbackON

If true, group can fall back, i.e. move away from the attacking unit.

#number SUPPRESSION.FallbackWait

Time in seconds the unit will wait at the fall back point before it resumes its mission.

#string SUPPRESSION.Formation

Formation which will be used when falling back, taking cover or retreating. Default "Vee".

#number SUPPRESSION.IniGroupStrength

Number of units in a group at start.

#boolean SUPPRESSION.IsInfantry

True if group has attribute Infantry.

#string SUPPRESSION.MenuF10

Main F10 menu for suppresion, i.e.

F10/Suppression.

#boolean SUPPRESSION.MenuON

If true creates a entry in the F10 menu.

#number SUPPRESSION.Nhit

Number of times the group was hit.

#number SUPPRESSION.PmaxFlee

Maximum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 90 %.

#number SUPPRESSION.PminFlee

Minimum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 10 %.

#number SUPPRESSION.RetreatDamage

Damage in percent at which the group will be ordered to retreat.

#number SUPPRESSION.RetreatWait

Time in seconds the group will wait in the retreat zone before it resumes its mission. Default two hours.

Core.Zone#ZONE SUPPRESSION.RetreatZone

Zone to which a group retreats.

#number SUPPRESSION.Speed

Speed the unit will use when falling back, taking cover or retreating. Default 999.

#number SUPPRESSION.SpeedMax

Maximum speed of group in km/h.

#boolean SUPPRESSION.TakecoverON

If true, group can hide at a nearby scenery object.

#number SUPPRESSION.TakecoverRange

Range in which the group will search for scenery objects to hide at.

#number SUPPRESSION.TakecoverWait

Time in seconds the group will hide before it will resume its mission.

#number SUPPRESSION.Tsuppress_ave

Average time in seconds a group gets suppressed. Actual value is sampled randomly from a Gaussian distribution.

#number SUPPRESSION.Tsuppress_max

Maximum time in seconds the group gets suppressed.

#number SUPPRESSION.Tsuppress_min

Minimum time in seconds the group gets suppressed.

#number SUPPRESSION.TsuppressionOver

Time at which the suppression will be over.

#string SUPPRESSION.Type

Type of the group.

#boolean SUPPRESSION.eventmoose

If true, events are handled by MOOSE. If false, events are handled directly by DCS eventhandler. Default true.

#boolean SUPPRESSION.flare

Flare units when they get hit or die.

Core.Point#COORDINATE SUPPRESSION.hideout

Coordinate/place where the group will try to take cover.

#string SUPPRESSION.lid

String for DCS log file.

#boolean SUPPRESSION.smoke

Smoke places to which the group retreats, falls back or hides.

#number SUPPRESSION.version

PSEUDOATC version.

Function(s)

Adds an End state.

Defined in:

Parameter:

State

Set the default Process template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Wrapper.Controllable by the task.

Defined in:

Parameters:

#table From

Can contain a string indicating the From state or a table of strings containing multiple From states.

#string Event

The Event name.

An sub-process FSM.

#table ReturnEvents

A table indicating for which returned events of the SubFSM which Event must be triggered in the FSM.

Return value:

The SubFSM.

Adds a score for the FSM to be achieved.

Defined in:

Parameters:

#string State

is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

#string ScoreText

is a text describing the score that is given according the status.

#number Score

is a number providing the score of the status.

Return value:

#FSM:

self

Adds a score for the FSM_PROCESS to be achieved.

Defined in:

Parameters:

#string From

is the From State of the main process.

#string Event

is the Event of the main process.

#string State

is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

#string ScoreText

is a text describing the score that is given according the status.

#number Score

is a number providing the score of the status.

Return value:

#FSM:

self

Add a new transition rule to the FSM.

A transition rule defines when and if the FSM can transition from a state towards another state upon a triggered event.

Defined in:

Parameters:

#table From

Can contain a string indicating the From state or a table of strings containing multiple From states.

#string Event

The Event name.

#string To

The To state.

Returns the End states.

Defined in:

Defined in:

Parameters:

From

Event

Returns a table of the SubFSM rules defined within the FSM.

Defined in:

Return value:

#table:

Returns a table with the scores defined.

Defined in:

Returns the start state of the FSM.

Defined in:

Return value:

#string:

A string containing the start state.

Returns a table with the Subs defined.

Defined in:

Returns a table of the transition rules defined within the FSM.

Defined in:

Return value:

#table:

Defined in:

Parameter:

State

Defined in:

Parameter:

CallBackTable

Creates a new FSM object.

Defined in:

Return value:

#FSM:

Defined in:

Parameters:

From

Event

Fsm

Sets the start state of the FSM.

Defined in:

Parameter:

#string State

A string defining the start state.

Defined in:

Parameters:

Map

Event

Defined in:

Parameters:

step

trigger

params

EventName

Defined in:

Parameter:

EventName

Defined in:

Parameter:

EventName

Defined in:

Parameters:

Events

EventStructure

Defined in:

Parameters:

ParentFrom

ParentEvent

Defined in:

Parameters:

EventName

...

Defined in:

Parameter:

Current

Defined in:

Parameters:

subs

sub

name

Defined in:

Parameter:

e

Defined in:

Parameter:

e

Defined in:

Parameter:

state

Field(s)

#string SUPPRESSION.ClassName

Name of the class.

Wrapper.Controllable#CONTROLLABLE SUPPRESSION.Controllable

Controllable of the FSM. Must be a ground group.

#string SUPPRESSION.CurrentAlarmState

Alam state the group is currently in.

#string SUPPRESSION.CurrentROE

ROE the group currently has.

SUPPRESSION.DCSdesc

Get DCS descriptors of group.

#boolean SUPPRESSION.Debug

Write Debug messages to DCS log file and send Debug messages to all players.

#string SUPPRESSION.DefaultAlarmState

Alarm state the group will go to when it is changed back from another state. Default is "Auto".

#string SUPPRESSION.DefaultROE

ROE the group will get once suppression is over. Default is "Free".

#number SUPPRESSION.FallbackDist

Distance in meters the unit will fall back.

#number SUPPRESSION.FallbackHeading

Heading in degrees to which the group should fall back. Default is directly away from the attacking unit.

#boolean SUPPRESSION.FallbackON

If true, group can fall back, i.e. move away from the attacking unit.

#number SUPPRESSION.FallbackWait

Time in seconds the unit will wait at the fall back point before it resumes its mission.

#string SUPPRESSION.Formation

Formation which will be used when falling back, taking cover or retreating. Default "Vee".

#number SUPPRESSION.IniGroupStrength

Number of units in a group at start.

#boolean SUPPRESSION.IsInfantry

True if group has attribute Infantry.

#string SUPPRESSION.MenuF10

Main F10 menu for suppresion, i.e.

F10/Suppression.

#boolean SUPPRESSION.MenuON

If true creates a entry in the F10 menu.

#number SUPPRESSION.Nhit

Number of times the group was hit.

#number SUPPRESSION.PmaxFlee

Maximum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 90 %.

#number SUPPRESSION.PminFlee

Minimum probability in percent that a group will flee (fall back or take cover) at each hit event. Default is 10 %.

#number SUPPRESSION.RetreatDamage

Damage in percent at which the group will be ordered to retreat.

#number SUPPRESSION.RetreatWait

Time in seconds the group will wait in the retreat zone before it resumes its mission. Default two hours.

Core.Zone#ZONE SUPPRESSION.RetreatZone

Zone to which a group retreats.

#number SUPPRESSION.Speed

Speed the unit will use when falling back, taking cover or retreating. Default 999.

#number SUPPRESSION.SpeedMax

Maximum speed of group in km/h.

#boolean SUPPRESSION.TakecoverON

If true, group can hide at a nearby scenery object.

#number SUPPRESSION.TakecoverRange

Range in which the group will search for scenery objects to hide at.

#number SUPPRESSION.TakecoverWait

Time in seconds the group will hide before it will resume its mission.

#number SUPPRESSION.Tsuppress_ave

Average time in seconds a group gets suppressed. Actual value is sampled randomly from a Gaussian distribution.

#number SUPPRESSION.Tsuppress_max

Maximum time in seconds the group gets suppressed.

#number SUPPRESSION.Tsuppress_min

Minimum time in seconds the group gets suppressed.

#number SUPPRESSION.TsuppressionOver

Time at which the suppression will be over.

#string SUPPRESSION.Type

Type of the group.

#boolean SUPPRESSION.eventmoose

If true, events are handled by MOOSE. If false, events are handled directly by DCS eventhandler. Default true.

#boolean SUPPRESSION.flare

Flare units when they get hit or die.

Core.Point#COORDINATE SUPPRESSION.hideout

Coordinate/place where the group will try to take cover.

#string SUPPRESSION.lid

String for DCS log file.

#boolean SUPPRESSION.smoke

Smoke places to which the group retreats, falls back or hides.

#number SUPPRESSION.version

PSEUDOATC version.

Function(s)

Clear the state of an object.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

StateName

The key that is should be cleared.

Creation of a Birth Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

#string IniUnitName

The initiating unit name.

place

subplace

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Dead Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

The ClassName + ClassID is formatted as '%s#%09d'.

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Return value:

#number:

The Event processing Priority.

This is the worker method to retrieve the Parent class.

Note that the Parent class must be passed to call the parent class method.

self:GetParent(self):ParentMethod()


Defined in:

Parameters:

#BASE Child

This is the Child class from which the Parent class needs to be retrieved.

#BASE FromClass

(Optional) The class from which to get the parent.

Return value:

Get a Value given a Key from the Object.

Note that if the Object is destroyed, nillified or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

Key

The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!

Return value:

The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.

Subscribe to a DCS Event.

Defined in:

Parameters:

#function EventFunction

(optional) The function to be called when the event occurs for the unit.

Return value:

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

This is the worker method to inherit from a parent class.

Defined in:

Parameters:

Child

is the Child class that inherits.

#BASE Parent

is the Parent class that the Child inherits from.

Return value:

Child

This is the worker method to check if an object is an (sub)instance of a class.

Examples:

  • ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false

Defined in:

Parameter:

ClassName

is the name of the class or the class itself to run the check against

Return value:

#boolean:

Enquires if tracing is on (for the class).

Defined in:

Return value:

#boolean:

BASE constructor.

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

function EVENT:New()
  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
  return self
end
  

Defined in:

Return value:

Occurs when an object is completely destroyed.

initiator : The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Occurs when a ground unit captures either an airbase or a farp.

initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

initiator : The unit that was spawned

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft crashes into the ground and is completely destroyed.

initiator : The unit that has crashed

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

initiator : The unit that is dead.

Defined in:

Parameter:

The EventData structure.

Unknown precisely what creates this event, likely tied into newer damage model.

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

initiator : The unit that is stopping its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

initiator : The unit that is starting its engines.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

initiator : The unit that had the failure

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs.

  • initiator: The unit that killed the target
  • target: Target Object
  • weapon: Weapon Object

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft lands at an airbase, farp or ship initiator : The unit that has landed place: Object that the unit landed on.

Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker.

  • initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
  • place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
  • subplace: is always 0 for unknown reasons.

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player relieves control of a unit to the AI.

initiator : The unit that the player left.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft connects with a tanker and begins taking on fuel.

initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

initiator : The unit that was receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. initiator : The unit that was doing the shooting.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit begins firing a weapon that has a high rate of fire.

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft takes off from an airbase, farp, or ship.

initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#number:

The ScheduleID of the planned schedule.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#number Repeat

Specifies the interval in seconds when the scheduler will call the event function.

#number RandomizeFactor

Specifies a randomization factor between 0 and 1 to randomize the Repeat.

#number Stop

Specifies the amount of seconds when the scheduler will be stopped.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#number:

The ScheduleID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

Set the Class Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Parameter:

#number EventPriority

The Event processing Priority.

Return value:

self

Set a state or property of the Object given a Key and a Value.

Note that if the Object is destroyed, nillified or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that will hold the Value set by the Key.

Key

The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!

Value

The value to is stored in the object.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

#string Method

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.

Defined in:

Parameter:

#boolean TraceOnOff

Switch the tracing on or off.

Usage:

-- Switch the tracing On
BASE:TraceOnOff( true )

-- Switch the tracing Off
BASE:TraceOnOff( false )

UnSubscribe to a DCS event.

Defined in:

Parameter:

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

TODO: Complete DCS#Event structure.
- The main event handling function... This function captures all events generated for the class. @param #BASE self @param DCS#Event event

Defined in:

Parameter:

event

Enumerator of possible alarm states.

Field(s)

#string SUPPRESSION.AlarmState.Auto

Automatic.

Function(s)

Enumerator of possible rules of engagement.

Field(s)

#string SUPPRESSION.ROE.Free

Weapon fire.

#string SUPPRESSION.ROE.Hold

Hold fire.

#string SUPPRESSION.ROE.Return

Return fire.

Function(s)