Banner Image

Module Ops.OpsGroup

Ops - Generic group enhancement functions.


Author: funkyfranky

Global(s)

Global OPSGROUP

Something must be left to chance; nothing is sure in a sea fight above all. --- Horatio Nelson


Banner Image

The OPSGROUP Concept

The OPSGROUP class contains common functions used by other classes such as FLIGHGROUP and NAVYGROUP.

#OPSGROUP OPSGROUP

Something must be left to chance; nothing is sure in a sea fight above all. --- Horatio Nelson


Banner Image

The OPSGROUP Concept

The OPSGROUP class contains common functions used by other classes such as FLIGHGROUP and NAVYGROUP.

This class is not meant to be used itself by the end user.

Type(s)

OPSGROUP , extends Core.Fsm#FSM , extends Core.Base#BASE
Fields and Methods inherited from OPSGROUP Description

OPSGROUP:Activate(delay)

Activate a late activated group.

OPSGROUP:AddCheckZone(CheckZone)

Add a zone that triggers and event if the group enters or leaves any of the zones.

OPSGROUP:AddMission(Mission)

Add mission to queue.

OPSGROUP:AddTask(task, clock, description, prio, duration)

Add a scheduled task.

OPSGROUP:AddTaskEnroute(task)

Add an enroute task.

OPSGROUP:AddTaskWaypoint(task, waypointindex, description, prio, duration)

Add a waypoint task.

OPSGROUP:CheckTaskDescriptionUnique(description)

Check if task description is unique.

OPSGROUP.ClassName

Name of the class.

OPSGROUP:ClearTasks(DCSTask)

Clear DCS tasks.

OPSGROUP:CountRemainingMissison()

Count remaining missons.

OPSGROUP:CountRemainingTasks()

Count the number of tasks that still pending in the queue.

OPSGROUP.Debug

Debug mode. Messages to all about status.

OPSGROUP.ElementStatus

OPSGROUP:GetAmmoElement(element)

Get the number of shells a unit or group currently has.

OPSGROUP:GetAmmoTot()

Get total amount of ammunition of the whole group.

OPSGROUP:GetAmmoUnit(unit, display)

Get the number of shells a unit or group currently has.

OPSGROUP:GetCoalition()

Get coalition.

OPSGROUP:GetCoordinate()

Get current coordinate of the group.

OPSGROUP:GetDetectedUnits()

Get set of detected units.

OPSGROUP:GetElementByName(unitname)

Get the element of a group.

OPSGROUP:GetGroup()

Get MOOSE GROUP object.

OPSGROUP:GetHeading()

Get current heading of the group.

OPSGROUP:GetLifePoints()

Returns the absolute (average) life points of the group.

OPSGROUP:GetMissionByID(id)

Get mission by its id (auftragsnummer).

OPSGROUP:GetMissionByTaskID(taskid)

Get mission by its task id.

OPSGROUP:GetMissionCurrent()

Get current mission.

OPSGROUP:GetName()

Get the group name.

OPSGROUP:GetNelements(status)

Get number of elements alive.

OPSGROUP:GetNextWaypointCoordinate()

Get coordinate of next waypoint of the group.

OPSGROUP:GetROE()

Get current ROE of the group.

OPSGROUP:GetTaskByID(id, status)

Get task by its id.

OPSGROUP:GetTaskCurrent()

Get the currently executed task if there is any.

OPSGROUP:GetTasksWaypoint(n)

Get the unfinished waypoint tasks

OPSGROUP:GetWaypoint(indx)

Get waypoint.

OPSGROUP:GetWaypointCoordinate(wp)

Get next waypoint coordinates.

OPSGROUP:GetWaypointCurrent()

Get current waypoint.

OPSGROUP:GetWaypointFinal()

Get final waypoint.

OPSGROUP:GetWaypointIndexNext(cyclic)

Get next waypoint index.

OPSGROUP:GetWaypointNext(cyclic)

Get next waypoint.

OPSGROUP:GetWaypointSpeed(indx)

Get waypoint speed.

OPSGROUP:InitWaypoints(waypoints)

Initialize Mission Editor waypoints.

OPSGROUP:IsAlive()

Check if group is alive.

OPSGROUP:IsDead()

Check if group is dead.

OPSGROUP:IsInUtero()

Check if group is in state in utero.

OPSGROUP:IsLateActivated()

Check if this group is currently "late activated" and needs to be "activated" to appear in the mission.

OPSGROUP:IsSpawned()

Check if group is in state spawned.

OPSGROUP:IsStopped()

Check if FSM is stopped.

OPSGROUP:IsUncontrolled()

Check if this group is currently "uncontrolled" and needs to be "started" to begin its route.

OPSGROUP:New(Group)

Create a new OPSGROUP class object.

OPSGROUP:NewTaskScheduled(task, clock, description, prio, duration)

Create a scheduled task.

OPSGROUP:PushTask(DCSTask)

Push DCS task.

OPSGROUP:RemoveMission(Mission)

Remove mission from queue.

OPSGROUP:RemoveTask(Task)

Remove task from task queue.

OPSGROUP:RemoveWaypoint(wpindex)

Remove a waypoint.

OPSGROUP:Route(waypoints, delay)

Route group along waypoints.

OPSGROUP:RouteToMission(mission, delay)

Route group to mission.

OPSGROUP:SelfDestruction(Delay, ExplosionPower)

Self destruction of group.

OPSGROUP:SetCheckZones(CheckZonesSet)

Define a SET of zones that trigger and event if the group enters or leaves any of the zones.

OPSGROUP:SetDefaultROE(roe)

Set the default ROE for the group.

OPSGROUP:SetDefaultROT(roe)

Set the default ROT for the group.

OPSGROUP:SetDetection(Switch)

Set detection on or off.

OPSGROUP:SetOptionROE(roe)

Set current ROE for the group.

OPSGROUP:SetOptionROT(rot)

Set ROT for the group.

OPSGROUP:SetTask(DCSTask)

Set DCS task.

OPSGROUP:Status()

Triggers the FSM event "Status".

OPSGROUP.TaskStatus

OPSGROUP.TaskType

OPSGROUP:_AllSameStatus(unitname, status)

Check if all elements of the group have the same status (or are dead).

OPSGROUP:_AllSimilarStatus(status)

Check if all elements of the group have the same status (or are dead).

OPSGROUP:_CheckDetectedUnits()

Check detected units.

OPSGROUP:_CheckInZones()

Check if group is in zones.

OPSGROUP:_GetNextMission()

Get next mission.

OPSGROUP:_GetNextTask()

Get next task in queue.

OPSGROUP:_MissileCategoryName(categorynumber)

Returns a name of a missile category.

OPSGROUP._PassingWaypoint(group, opsgroup, i)

Function called when a group is passing a waypoint.

OPSGROUP:_SetElementStatusAll(status)

Set status for all elements (except dead ones).

OPSGROUP:_SortTaskQueue()

Sort task queue.

OPSGROUP._TaskDone(group, opsgroup, task)

Function called when a task is done.

OPSGROUP._TaskExecute(group, opsgroup, task)

Function called when a task is executed.

OPSGROUP:_UpdateStatus(element, newstatus, airbase)

Check if all elements of the group have the same status or are dead.

OPSGROUP:_UpdateWaypointTasks(n)

Initialize Mission Editor waypoints.

OPSGROUP:__Status(delay)

Triggers the FSM event "Status" after a delay.

OPSGROUP:__Stop(delay)

Triggers the FSM event "Stop" after a delay.

OPSGROUP.ai

If true, group is purely AI.

OPSGROUP.attribute

Generalized attribute.

OPSGROUP.checkzones

Set of zones.

OPSGROUP.currentmission

The ID (auftragsnummer) of the currently assigned AUFTRAG.

OPSGROUP.currentwp

Current waypoint.

OPSGROUP.detectedunits

Set of detected units.

OPSGROUP.detectionOn

If true, detected units of the group are analyzed.

OPSGROUP.elements

Table of elements, i.e. units of the group.

OPSGROUP.eplrs

If true, EPLRS data link is on.

OPSGROUP.eplrsDefault

Default EPLRS data link setting.

OPSGROUP.formation

Current formation setting.

OPSGROUP.formationDefault

Default formation setting.

OPSGROUP.group

Group object.

OPSGROUP.groupinitialized

If true, group parameters were initialized.

OPSGROUP.groupname

Name of the group.

OPSGROUP.inzones

Set of zones in which the group is currently in.

OPSGROUP.isAircraft

If true, group is airplane or helicopter.

OPSGROUP.isGround

If true, group is some ground unit.

OPSGROUP.isLateActivated

Is the group late activated.

OPSGROUP.isNaval

If true, group is ships or submarine.

OPSGROUP.isUncontrolled

Is the group uncontrolled.

OPSGROUP.lid

Class id string for output to DCS log file.

OPSGROUP.missionpaused

Paused mission.

OPSGROUP.missionqueue

Queue of missions.

OPSGROUP:onafterCheckZone(From, Event, To)

On after "CheckZone" event.

OPSGROUP:onafterDetectedUnit(From, Event, To, Unit)

On after "DetectedUnit" event.

OPSGROUP:onafterDetectedUnitNew(From, Event, To, Unit)

On after "DetectedUnitNew" event.

OPSGROUP:onafterEnterZone(From, Event, To, Zone)

On after "EnterZone" event.

OPSGROUP:onafterGotoWaypoint(From, Event, To, n)

On after "GotoWaypoint" event.

OPSGROUP:onafterLeaveZone(From, Event, To, Zone)

On after "LeaveZone" event.

OPSGROUP:onafterMissionCancel(From, Event, To, Mission)

On after "MissionCancel" event.

OPSGROUP:onafterMissionDone(From, Event, To, Mission)

On after "MissionDone" event.

OPSGROUP:onafterMissionExecute(From, Event, To, Mission)

On after "MissionExecute" event.

OPSGROUP:onafterMissionStart(From, Event, To, Mission)

On after "MissionStart" event.

OPSGROUP:onafterPassingWaypoint(From, Event, To, n, N)

On after "PassingWaypoint" event.

OPSGROUP:onafterPauseMission(From, Event, To)

On after "PauseMission" event.

OPSGROUP:onafterQueueUpdate(From, Event, To)

On after "QueueUpdate" event.

OPSGROUP:onafterTaskCancel(From, Event, To, Task)

On after "TaskCancel" event.

OPSGROUP:onafterTaskDone(From, Event, To, Task)

On after "TaskDone" event.

OPSGROUP:onafterTaskExecute(From, Event, To, Task)

On after TaskExecute event.

OPSGROUP:onafterUnpauseMission(From, Event, To)

On after "UnpauseMission" event.

OPSGROUP:onbeforeMissionStart(From, Event, To, Mission)

On before "MissionStart" event.

OPSGROUP:onbeforeTaskDone(From, Event, To, Task)

On before "TaskDone" event.

OPSGROUP.passedfinalwp

Group has passed the final waypoint.

OPSGROUP.position

Current position of the group.

OPSGROUP.radioFreq

Currently used radio frequency in MHz.

OPSGROUP.radioFreqDefault

Default radio frequency in MHz.

OPSGROUP.radioModu

Currently used radio modulation radio.modulation.AM or radio.modulation.FM.

OPSGROUP.radioModuDefault

Default Radio modulation radio.modulation.AM or radio.modulation.FM.

OPSGROUP.radioOn

If true, radio is currently turned on.

OPSGROUP.radioQueue

Radio queue.

OPSGROUP.respawning

Group is being respawned.

OPSGROUP.roe

Current ROE setting.

OPSGROUP.roeDefault

Default ROE setting.

OPSGROUP.rot

Current ROT setting.

OPSGROUP.rotDefault

Default ROT setting.

OPSGROUP.speedCruise

Cruising speed in km/h.

OPSGROUP.speedmax

Max speed in km/h.

OPSGROUP.tacanBeacon

The unit acting as TACAN beacon.

OPSGROUP.tacanChannel

The currenly used TACAN channel.

OPSGROUP.tacanChannelDefault

The default TACAN channel.

OPSGROUP.tacanMorse

The currently used TACAN morse code.

OPSGROUP.tacanMorseDefault

The default TACAN morse code.

OPSGROUP.tacanOn

If true, TACAN is currently active.

OPSGROUP.taskcounter

Running number of task ids.

OPSGROUP.taskcurrent

ID of current task. If 0, there is no current task assigned.

OPSGROUP.taskenroute

Enroute task of the group.

OPSGROUP.taskpaused

Paused tasks.

OPSGROUP.taskqueue

Queue of tasks.

OPSGROUP.template

Template of the group.

OPSGROUP.traveldist

Distance traveled in meters. This is a lower bound!

OPSGROUP.traveltime

Time.

OPSGROUP.verbose

Verbosity level. 0=silent.

OPSGROUP.version

NavyGroup version.

OPSGROUP.waypoints

Table of waypoints.

OPSGROUP.waypoints0

Table of initial waypoints.

Fields and Methods inherited from FSM Description

OPSGROUP:AddEndState(State)

Adds an End state.

OPSGROUP: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.

OPSGROUP:AddScore(State, ScoreText, Score)

Adds a score for the FSM to be achieved.

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

Adds a score for the FSM_PROCESS to be achieved.

OPSGROUP:AddTransition(From, Event, To)

Add a new transition rule to the FSM.

OPSGROUP.CallScheduler

OPSGROUP.Events

OPSGROUP:GetCurrentState()

OPSGROUP:GetEndStates()

Returns the End states.

OPSGROUP:GetProcess(From, Event)

OPSGROUP:GetProcesses()

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

OPSGROUP:GetScores()

Returns a table with the scores defined.

OPSGROUP:GetStartState()

Returns the start state of the FSM.

OPSGROUP:GetState()

OPSGROUP:GetSubs()

Returns a table with the Subs defined.

OPSGROUP:GetTransitions()

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

OPSGROUP:Is(State)

OPSGROUP:LoadCallBacks(CallBackTable)

OPSGROUP:New()

Creates a new FSM object.

OPSGROUP.Scores

OPSGROUP:SetProcess(From, Event, Fsm)

OPSGROUP:SetStartState(State)

Sets the start state of the FSM.

OPSGROUP._EndStates

OPSGROUP._EventSchedules

OPSGROUP._Processes

OPSGROUP._Scores

OPSGROUP._StartState

OPSGROUP._Transitions

OPSGROUP:_add_to_map(Map, Event)

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

OPSGROUP:_create_transition(EventName)

OPSGROUP:_delayed_transition(EventName)

OPSGROUP:_eventmap(Events, EventStructure)

OPSGROUP:_gosub(ParentFrom, ParentEvent)

OPSGROUP:_handler(EventName, ...)

OPSGROUP:_isendstate(Current)

OPSGROUP:_submap(subs, sub, name)

OPSGROUP:can(e)

OPSGROUP:cannot(e)

OPSGROUP.current

OPSGROUP.endstates

OPSGROUP:is(state)

OPSGROUP.options

OPSGROUP.subs

Fields and Methods inherited from BASE Description

OPSGROUP.ClassID

The ID number of the class.

OPSGROUP.ClassName

The name of the class.

OPSGROUP.ClassNameAndID

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

OPSGROUP:ClearState(Object, StateName)

Clear the state of an object.

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

Creation of a Birth Event.

OPSGROUP:CreateEventCrash(EventTime, Initiator)

Creation of a Crash Event.

OPSGROUP:CreateEventDead(EventTime, Initiator)

Creation of a Dead Event.

OPSGROUP:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

OPSGROUP:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

OPSGROUP:E(Arguments)

Log an exception which will be traced always.

OPSGROUP:EventDispatcher()

Returns the event dispatcher

OPSGROUP:EventRemoveAll()

Remove all subscribed events

OPSGROUP:F(Arguments)

Trace a function call.

OPSGROUP:F2(Arguments)

Trace a function call level 2.

OPSGROUP:F3(Arguments)

Trace a function call level 3.

OPSGROUP:GetClassID()

Get the ClassID of the class instance.

OPSGROUP:GetClassName()

Get the ClassName of the class instance.

OPSGROUP:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

OPSGROUP:GetEventPriority()

Get the Class Event processing Priority.

OPSGROUP:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

OPSGROUP:GetState(Object, Key)

Get a Value given a Key from the Object.

OPSGROUP:HandleEvent(Event, EventFunction)

Subscribe to a DCS Event.

OPSGROUP:I(Arguments)

Log an information which will be traced always.

OPSGROUP:Inherit(Child, Parent)

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

OPSGROUP:IsInstanceOf(ClassName)

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

OPSGROUP:IsTrace()

Enquires if tracing is on (for the class).

OPSGROUP:New()

BASE constructor.

OPSGROUP:OnEvent(EventData)

Occurs when an object is completely destroyed.

OPSGROUP:OnEventBaseCaptured(EventData)

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

OPSGROUP:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

OPSGROUP:OnEventCrash(EventData)

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

OPSGROUP:OnEventDead(EventData)

Occurs when an object is dead.

OPSGROUP:OnEventDetailedFailure(EventData)

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

OPSGROUP:OnEventEjection(EventData)

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

OPSGROUP:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

OPSGROUP:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

OPSGROUP:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

OPSGROUP:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

OPSGROUP:OnEventKill(EventData)

Occurs on the death of a unit.

OPSGROUP: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.

OPSGROUP:OnEventLandingAfterEjection(EventData)

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

OPSGROUP:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

OPSGROUP:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

OPSGROUP:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

OPSGROUP:OnEventMissionEnd(EventData)

Occurs when a mission ends

OPSGROUP:OnEventMissionStart(EventData)

Occurs when a mission starts

OPSGROUP:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

OPSGROUP:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

OPSGROUP:OnEventPlayerLeaveUnit(EventData)

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

OPSGROUP:OnEventRefueling(EventData)

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

OPSGROUP:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

OPSGROUP:OnEventScore(EventData)

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

OPSGROUP:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

OPSGROUP:OnEventShootingStart(EventData)

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

OPSGROUP:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

OPSGROUP:OnEventTakeoff(EventData)

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

OPSGROUP:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

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

Schedule a new time event.

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

Schedule a new time event.

OPSGROUP:ScheduleStop(SchedulerFunction)

Stops the Schedule.

OPSGROUP.Scheduler

OPSGROUP:SetEventPriority(EventPriority)

Set the Class Event processing Priority.

OPSGROUP:SetState(Object, Key, Value)

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

OPSGROUP:T(Arguments)

Trace a function logic level 1.

OPSGROUP:T2(Arguments)

Trace a function logic level 2.

OPSGROUP:T3(Arguments)

Trace a function logic level 3.

OPSGROUP:TraceAll(TraceAll)

Trace all methods in MOOSE

OPSGROUP:TraceClass(Class)

Set tracing for a class

OPSGROUP:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

OPSGROUP:TraceLevel(Level)

Set trace level

OPSGROUP:TraceOff()

Set trace off.

OPSGROUP:TraceOn()

Set trace on.

OPSGROUP: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.

OPSGROUP:UnHandleEvent(Event)

UnSubscribe to a DCS event.

OPSGROUP._

OPSGROUP:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

OPSGROUP:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

OPSGROUP.__

OPSGROUP:onEvent(event)

Fields and Methods inherited from OPSGROUP.Ammo Description

OPSGROUP.Ammo.Bombs

Amount of bombs.

OPSGROUP.Ammo.Guns

Amount of gun shells.

OPSGROUP.Ammo.Missiles

Amount of missiles.

OPSGROUP.Ammo.MissilesAA

Amount of air-to-air missiles.

OPSGROUP.Ammo.MissilesAG

Amount of air-to-ground missiles.

OPSGROUP.Ammo.MissilesAS

Amount of anti-ship missiles.

OPSGROUP.Ammo.MissilesBM

Amount of ballistic missiles.

OPSGROUP.Ammo.MissilesCR

Amount of cruise missiles.

OPSGROUP.Ammo.MissilesSA

OPSGROUP.Ammo.Rockets

Amount of rockets.

OPSGROUP.Ammo.Torpedos

Amount of torpedos.

OPSGROUP.Ammo.Total

Total amount of ammo.

Fields and Methods inherited from OPSGROUP.Element Description

OPSGROUP.Element.status

Fields and Methods inherited from OPSGROUP.ElementStatus Description

OPSGROUP.ElementStatus.AIRBORNE

Element is airborne. Either after takeoff or after air start.

OPSGROUP.ElementStatus.ARRIVED

Element arrived at its parking spot and shut down its engines.

OPSGROUP.ElementStatus.DEAD

Element is dead after it crashed, pilot ejected or pilot dead events.

OPSGROUP.ElementStatus.ENGINEON

Element started its engines.

OPSGROUP.ElementStatus.INUTERO

Element was not spawned yet or its status is unknown so far.

OPSGROUP.ElementStatus.LANDED

Element landed and is taxiing to its parking spot.

OPSGROUP.ElementStatus.LANDING

Element is landing.

OPSGROUP.ElementStatus.PARKING

Element is parking after spawned on ramp.

OPSGROUP.ElementStatus.SPAWNED

Element was spawned into the world.

OPSGROUP.ElementStatus.TAKEOFF

Element took of after takeoff event.

OPSGROUP.ElementStatus.TAXIING

Element is taxiing after engine startup.

Fields and Methods inherited from OPSGROUP.EnrouteTask Description

OPSGROUP.EnrouteTask.DCStask

DCS task structure table.

OPSGROUP.EnrouteTask.WaypointIndex

Waypoint number at which the enroute task is added.

Fields and Methods inherited from OPSGROUP.Task Description

OPSGROUP.Task.dcstask

DCS task structure.

OPSGROUP.Task.description

Brief text which describes the task.

OPSGROUP.Task.duration

Duration before task is cancelled in seconds. Default never.

OPSGROUP.Task.id

Task ID. Running number to get the task.

OPSGROUP.Task.prio

Priority.

OPSGROUP.Task.status

Task status.

OPSGROUP.Task.stopflag

If flag is set to 1 (=true), the task is stopped.

OPSGROUP.Task.time

Abs. mission time when to execute the task.

OPSGROUP.Task.timestamp

Abs. mission time, when task was started.

OPSGROUP.Task.type

Type of task: either SCHEDULED or WAYPOINT.

OPSGROUP.Task.waypoint

Waypoint index if task is a waypoint task.

Fields and Methods inherited from OPSGROUP.TaskStatus Description

OPSGROUP.TaskStatus.DONE

Task is done.

OPSGROUP.TaskStatus.EXECUTING

Task is being executed.

OPSGROUP.TaskStatus.PAUSED

Task is paused.

OPSGROUP.TaskStatus.SCHEDULED

Task is scheduled.

Fields and Methods inherited from OPSGROUP.TaskType Description

OPSGROUP.TaskType.SCHEDULED

Task is scheduled and will be executed at a given time.

OPSGROUP.TaskType.WAYPOINT

Task is executed at a specific waypoint.

OPSGROUP class.

Field(s)

#string OPSGROUP.ClassName

Name of the class.

#boolean OPSGROUP.Debug

Debug mode. Messages to all about status.

#boolean OPSGROUP.ai

If true, group is purely AI.

#string OPSGROUP.attribute

Generalized attribute.

#number OPSGROUP.currentmission

The ID (auftragsnummer) of the currently assigned AUFTRAG.

#number OPSGROUP.currentwp

Current waypoint.

Core.Set#SET_UNIT OPSGROUP.detectedunits

Set of detected units.

#boolean OPSGROUP.detectionOn

If true, detected units of the group are analyzed.

#table OPSGROUP.elements

Table of elements, i.e. units of the group.

#boolean OPSGROUP.eplrs

If true, EPLRS data link is on.

#boolean OPSGROUP.eplrsDefault

Default EPLRS data link setting.

#number OPSGROUP.formation

Current formation setting.

#number OPSGROUP.formationDefault

Default formation setting.

#boolean OPSGROUP.groupinitialized

If true, group parameters were initialized.

#string OPSGROUP.groupname

Name of the group.

Core.Set#SET_ZONE OPSGROUP.inzones

Set of zones in which the group is currently in.

#boolean OPSGROUP.isAircraft

If true, group is airplane or helicopter.

#boolean OPSGROUP.isGround

If true, group is some ground unit.

#boolean OPSGROUP.isLateActivated

Is the group late activated.

#boolean OPSGROUP.isNaval

If true, group is ships or submarine.

#boolean OPSGROUP.isUncontrolled

Is the group uncontrolled.

#string OPSGROUP.lid

Class id string for output to DCS log file.

#table OPSGROUP.missionqueue

Queue of missions.

#boolean OPSGROUP.passedfinalwp

Group has passed the final waypoint.

Core.Point#COORDINATE OPSGROUP.position

Current position of the group.

#number OPSGROUP.radioFreq

Currently used radio frequency in MHz.

#number OPSGROUP.radioFreqDefault

Default radio frequency in MHz.

#number OPSGROUP.radioModu

Currently used radio modulation radio.modulation.AM or radio.modulation.FM.

#number OPSGROUP.radioModuDefault

Default Radio modulation radio.modulation.AM or radio.modulation.FM.

#boolean OPSGROUP.radioOn

If true, radio is currently turned on.

#boolean OPSGROUP.respawning

Group is being respawned.

#string OPSGROUP.roe

Current ROE setting.

#string OPSGROUP.roeDefault

Default ROE setting.

#string OPSGROUP.rot

Current ROT setting.

#string OPSGROUP.rotDefault

Default ROT setting.

#number OPSGROUP.speedCruise

Cruising speed in km/h.

#number OPSGROUP.speedmax

Max speed in km/h.

Wrapper.Unit#UNIT OPSGROUP.tacanBeacon

The unit acting as TACAN beacon.

#number OPSGROUP.tacanChannel

The currenly used TACAN channel.

#number OPSGROUP.tacanChannelDefault

The default TACAN channel.

#string OPSGROUP.tacanMorse

The currently used TACAN morse code.

#string OPSGROUP.tacanMorseDefault

The default TACAN morse code.

#boolean OPSGROUP.tacanOn

If true, TACAN is currently active.

#number OPSGROUP.taskcounter

Running number of task ids.

#number OPSGROUP.taskcurrent

ID of current task. If 0, there is no current task assigned.

#table OPSGROUP.taskenroute

Enroute task of the group.

#table OPSGROUP.taskpaused

Paused tasks.

#table OPSGROUP.taskqueue

Queue of tasks.

#table OPSGROUP.template

Template of the group.

#number OPSGROUP.traveldist

Distance traveled in meters. This is a lower bound!

#number OPSGROUP.traveltime

Time.

#number OPSGROUP.verbose

Verbosity level. 0=silent.

#string OPSGROUP.version

NavyGroup version.

#table OPSGROUP.waypoints

Table of waypoints.

#table OPSGROUP.waypoints0

Table of initial waypoints.

Function(s)

Activate a late activated group.

Defined in:

OPSGROUP

Parameter:

#number delay

(Optional) Delay in seconds before the group is activated. Default is immediately.

Return value:

self

Add a zone that triggers and event if the group enters or leaves any of the zones.

Defined in:

OPSGROUP

Parameter:

Core.Zone#ZONE CheckZone

Zone to check.

Return value:

self

Add mission to queue.

Defined in:

OPSGROUP

Parameter:

Mission for this group.

Return value:

self

Add a scheduled task.

Defined in:

OPSGROUP

Parameters:

#table task

DCS task table structure.

#string clock

Mission time when task is executed. Default in 5 seconds. If argument passed as #number, it defines a relative delay in seconds.

#string description

Brief text describing the task, e.g. "Attack SAM".

#number prio

Priority of the task.

#number duration

Duration before task is cancelled in seconds counted after task started. Default never.

Return value:

The task structure.

Add an enroute task.

Defined in:

OPSGROUP

Parameter:

#table task

DCS task table structure.

Add a waypoint task.

Defined in:

OPSGROUP

Parameters:

#table task

DCS task table structure.

#number waypointindex

Number of waypoint. Counting starts at one! Default is the as next waypoint.

#string description

Brief text describing the task, e.g. "Attack SAM".

#number prio

Priority of the task. Number between 1 and 100. Default is 50.

#number duration

Duration before task is cancelled in seconds counted after task started. Default never.

Return value:

The task structure.

Check if task description is unique.

Defined in:

OPSGROUP

Parameter:

#string description

Task destription

Return value:

#boolean:

If true, no other task has the same description.

Clear DCS tasks.

Defined in:

OPSGROUP

Parameter:

#table DCSTask

DCS task structure.

Return value:

self

Count remaining missons.

Defined in:

OPSGROUP

Return value:

#number:

Number of missions to be done.

Count the number of tasks that still pending in the queue.

Defined in:

OPSGROUP

Return values:

#number:

Total number of tasks remaining.

#number:

Number of SCHEDULED tasks remaining.

#number:

Number of WAYPOINT tasks remaining.

Get the number of shells a unit or group currently has.

For a group the ammo count of all units is summed up.

Defined in:

OPSGROUP

Parameter:

The element.

Return value:

Ammo data.

Get total amount of ammunition of the whole group.

Defined in:

OPSGROUP

Return value:

Ammo data.

Get the number of shells a unit or group currently has.

For a group the ammo count of all units is summed up.

Defined in:

OPSGROUP

Parameters:

The unit object.

#boolean display

Display ammo table as message to all. Default false.

Return value:

Ammo data.

Get coalition.

Defined in:

OPSGROUP

Return value:

#number:

Coalition side of carrier.

Get current coordinate of the group.

Defined in:

OPSGROUP

Return value:

The coordinate (of the first unit) of the group.

Get set of detected units.

Defined in:

OPSGROUP

Return value:

Set of detected units.

Get the element of a group.

Defined in:

OPSGROUP

Parameter:

#string unitname

Name of unit.

Return value:

The element.

Get MOOSE GROUP object.

Defined in:

OPSGROUP

Return value:

Moose group object.

Get current heading of the group.

Defined in:

OPSGROUP

Return value:

#number:

Current heading of the group in degrees.

Returns the absolute (average) life points of the group.

Defined in:

OPSGROUP

Return values:

#number:

Life points. If group contains more than one element, the average is given.

#number:

Initial life points.

Get mission by its id (auftragsnummer).

Defined in:

OPSGROUP

Parameter:

#number id

Mission id (auftragsnummer).

Return value:

The mission.

Get mission by its task id.

Defined in:

OPSGROUP

Parameter:

#number taskid

The id of the (waypoint) task of the mission.

Return value:

The mission.

Get current mission.

Defined in:

OPSGROUP

Return value:

The current mission or nil.

Get the group name.

Defined in:

OPSGROUP

Return value:

#string:

Group name.

Get number of elements alive.

Defined in:

OPSGROUP

Parameter:

#string status

(Optional) Only count number, which are in a special status.

Return value:

#number:

Number of elements.

Get coordinate of next waypoint of the group.

Defined in:

OPSGROUP

Return values:

Coordinate of the next waypoint.

#number:

Number of waypoint.

Get current ROE of the group.

Defined in:

OPSGROUP

Return value:

#number:

Current ROE.

Get task by its id.

Defined in:

OPSGROUP

Parameters:

#number id

Task id.

#string status

(Optional) Only return tasks with this status, e.g. OPSGROUP.TaskStatus.SCHEDULED.

Return value:

The task or nil.

Get the currently executed task if there is any.

Defined in:

OPSGROUP

Return value:

Current task or nil.

Get the unfinished waypoint tasks

Defined in:

OPSGROUP

Parameter:

#number n

Waypoint index. Counting starts at one.

Return value:

#table:

Table of tasks. Table could also be empty {}.

Get waypoint.

Defined in:

OPSGROUP

Parameter:

#number indx

Waypoint index.

Return value:

#table:

Waypoint table.

Get next waypoint coordinates.

Defined in:

OPSGROUP

Parameter:

#table wp

Waypoint table.

Return value:

Coordinate of the next waypoint.

Get current waypoint.

Defined in:

OPSGROUP

Return value:

#table:

Waypoint table.

Get final waypoint.

Defined in:

OPSGROUP

Return value:

#table:

Waypoint table.

Get next waypoint index.

Defined in:

OPSGROUP

Parameter:

#boolean cyclic

If true, return first waypoint if last waypoint was reached.

Return value:

#number:

Next waypoint index.

Get next waypoint.

Defined in:

OPSGROUP

Parameter:

#boolean cyclic

If true, return first waypoint if last waypoint was reached.

Return value:

#table:

Waypoint table.

Get waypoint speed.

Defined in:

OPSGROUP

Parameter:

#number indx

Waypoint index.

Return value:

#number:

Speed set at waypoint in knots.

Initialize Mission Editor waypoints.

Defined in:

OPSGROUP

Parameter:

#table waypoints

Table of waypoints. Default is from group template.

Return value:

self

Check if group is alive.

Defined in:

OPSGROUP

Return value:

#boolean:

true if group is exists and is activated, false if group is exist but is NOT activated. nil otherwise, e.g. the GROUP object is nil or the group is not spawned yet.

Check if group is dead.

Defined in:

OPSGROUP

Return value:

#boolean:

If true, all units/elements of the group are dead.

Check if group is in state in utero.

Defined in:

OPSGROUP

Return value:

#boolean:

If true, group is not spawned yet.

Check if this group is currently "late activated" and needs to be "activated" to appear in the mission.

Defined in:

OPSGROUP

Return value:

#boolean:

Is this the group late activated?

Check if group is in state spawned.

Defined in:

OPSGROUP

Return value:

#boolean:

If true, group is spawned.

Check if FSM is stopped.

Defined in:

OPSGROUP

Return value:

#boolean:

If true, FSM state is stopped.

Check if this group is currently "uncontrolled" and needs to be "started" to begin its route.

Defined in:

OPSGROUP

Return value:

#boolean:

If this group uncontrolled.

Create a new OPSGROUP class object.

Defined in:

OPSGROUP

Parameter:

The group object. Can also be given by its group name as #string.

Return value:

self

Create a scheduled task.

Defined in:

OPSGROUP

Parameters:

#table task

DCS task table structure.

#string clock

Mission time when task is executed. Default in 5 seconds. If argument passed as #number, it defines a relative delay in seconds.

#string description

Brief text describing the task, e.g. "Attack SAM".

#number prio

Priority of the task.

#number duration

Duration before task is cancelled in seconds counted after task started. Default never.

Return value:

The task structure.

Push DCS task.

Defined in:

OPSGROUP

Parameter:

#table DCSTask

DCS task structure.

Return value:

self

Remove mission from queue.

Defined in:

OPSGROUP

Parameter:

Mission to be removed.

Return value:

self

Remove task from task queue.

Defined in:

OPSGROUP

Parameter:

The task to be removed from the queue.

Return value:

#boolean:

True if task could be removed.

Remove a waypoint.

Defined in:

OPSGROUP

Parameter:

#number wpindex

Waypoint number.

Return value:

self

Route group along waypoints.

Defined in:

OPSGROUP

Parameters:

#table waypoints

Table of waypoints.

delay

Return value:

self

Route group to mission.

Defined in:

OPSGROUP

Parameters:

The mission table.

#number delay

Delay in seconds.

Self destruction of group.

An explosion is created at the position of each element.

Defined in:

OPSGROUP

Parameters:

#number Delay

Delay in seconds. Default now.

#number ExplosionPower

(Optional) Explosion power in kg TNT. Default 500 kg.

Return value:

#number:

Relative fuel in percent.

Define a SET of zones that trigger and event if the group enters or leaves any of the zones.

Defined in:

OPSGROUP

Parameter:

Core.Set#SET_ZONE CheckZonesSet

Set of zones.

Return value:

self

Set the default ROE for the group.

This is the ROE state gets when the group is spawned or to which it defaults back after a mission.

Defined in:

OPSGROUP

Parameter:

#number roe

ROE of group. Default is ENUMS.ROE.ReturnFire.

Return value:

self

Set the default ROT for the group.

This is the ROT state gets when the group is spawned or to which it defaults back after a mission.

Defined in:

OPSGROUP

Parameter:

#number roe

ROE of group. Default is ENUMS.ROT.PassiveDefense.

Return value:

self

Set detection on or off.

Defined in:

OPSGROUP

Parameter:

#boolean Switch

If true, detection is on. If false or nil, detection is off. Default is off.

Return value:

self

Set current ROE for the group.

Defined in:

OPSGROUP

Parameter:

#string roe

ROE of group. Default is the value defined by :SetDefaultROE().

Return value:

self

Set ROT for the group.

Defined in:

OPSGROUP

Parameter:

#string rot

ROT of group. Default is the value defined by :SetDefaultROT().

Return value:

self

Set DCS task.

Enroute tasks are injected automatically.

Defined in:

OPSGROUP

Parameter:

#table DCSTask

DCS task structure.

Return value:

self

Triggers the FSM event "Status".

Defined in:

OPSGROUP

Check if all elements of the group have the same status (or are dead).

Defined in:

OPSGROUP

Parameters:

#string unitname

Name of unit.

status

Check if all elements of the group have the same status (or are dead).

Defined in:

OPSGROUP

Parameter:

#string status

Status to check.

Return value:

#boolean:

If true, all elements have a similar status.

Check detected units.

Defined in:

OPSGROUP

Check if group is in zones.

Defined in:

OPSGROUP

Get next mission.

Defined in:

OPSGROUP

Return value:

Next mission or nil.

Get next task in queue.

Task needs to be in state SCHEDULED and time must have passed.

Defined in:

OPSGROUP

Return value:

The next task in line or nil.

Returns a name of a missile category.

Defined in:

OPSGROUP

Parameter:

#number categorynumber

Number of missile category from weapon missile category enumerator. See https://wiki.hoggitworld.com/view/DCS_Class_Weapon

Return value:

#string:

Missile category name.

Function called when a group is passing a waypoint.

Defined in:

OPSGROUP

Parameters:

Group that passed the waypoint

#OPSGROUP opsgroup

Ops group object.

#number i

Waypoint number that has been reached.

Set status for all elements (except dead ones).

Defined in:

OPSGROUP

Parameter:

#string status

Element status.

Sort task queue.

Defined in:

OPSGROUP

Function called when a task is done.

Defined in:

OPSGROUP

Parameters:

Group for which the task is done.

#OPSGROUP opsgroup

Ops group.

Task.

Function called when a task is executed.

Defined in:

OPSGROUP

Parameters:

Group which should execute the task.

#OPSGROUP opsgroup

Ops group.

Task.

Check if all elements of the group have the same status or are dead.

Defined in:

OPSGROUP

Parameters:

Element.

#string newstatus

New status of element

Airbase if applicable.

Initialize Mission Editor waypoints.

Defined in:

OPSGROUP

Parameter:

#number n

Waypoint

Triggers the FSM event "Status" after a delay.

Defined in:

OPSGROUP

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Stop" after a delay.

Stops the OPSGROUP and all its event handlers.

Defined in:

OPSGROUP

Parameter:

#number delay

Delay in seconds.

On after "CheckZone" event.

Defined in:

OPSGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "DetectedUnit" event.

Add newly detected unit to detected units set.

Defined in:

OPSGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The detected unit.

On after "DetectedUnitNew" event.

Defined in:

OPSGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The detected unit.

On after "EnterZone" event.

Sets self.inzones[zonename]=true.

Defined in:

OPSGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The zone that the group entered.

On after "GotoWaypoint" event.

Group will got to the given waypoint and execute its route from there.

Defined in:

OPSGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

#number n

The goto waypoint number.

On after "LeaveZone" event.

Sets self.inzones[zonename]=false.

Defined in:

OPSGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The zone that the group entered.

On after "MissionCancel" event.

Cancels the mission.

Defined in:

OPSGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The mission to be cancelled.

On after "MissionDone" event.

Defined in:

OPSGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "MissionExecute" event.

Mission execution began.

Defined in:

OPSGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The mission table.

On after "MissionStart" event.

Defined in:

OPSGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The mission table.

On after "PassingWaypoint" event.

Defined in:

OPSGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

#number n

Waypoint passed.

#number N

Total number of waypoints.

On after "PauseMission" event.

Defined in:

OPSGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "QueueUpdate" event.

Defined in:

OPSGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "TaskCancel" event.

Cancels the current task or simply sets the status to DONE if the task is not the current one.

Defined in:

OPSGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The task to cancel. Default is the current task (if any).

On after "TaskDone" event.

Defined in:

OPSGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after TaskExecute event.

Defined in:

OPSGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "UnpauseMission" event.

Defined in:

OPSGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On before "MissionStart" event.

Defined in:

OPSGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

The mission table.

On before "TaskDone" event.

Deny transition if task status is PAUSED.

Defined in:

OPSGROUP

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Field(s)

#string OPSGROUP.ClassName

Name of the class.

#boolean OPSGROUP.Debug

Debug mode. Messages to all about status.

#boolean OPSGROUP.ai

If true, group is purely AI.

#string OPSGROUP.attribute

Generalized attribute.

#number OPSGROUP.currentmission

The ID (auftragsnummer) of the currently assigned AUFTRAG.

#number OPSGROUP.currentwp

Current waypoint.

Core.Set#SET_UNIT OPSGROUP.detectedunits

Set of detected units.

#boolean OPSGROUP.detectionOn

If true, detected units of the group are analyzed.

#table OPSGROUP.elements

Table of elements, i.e. units of the group.

#boolean OPSGROUP.eplrs

If true, EPLRS data link is on.

#boolean OPSGROUP.eplrsDefault

Default EPLRS data link setting.

#number OPSGROUP.formation

Current formation setting.

#number OPSGROUP.formationDefault

Default formation setting.

#boolean OPSGROUP.groupinitialized

If true, group parameters were initialized.

#string OPSGROUP.groupname

Name of the group.

Core.Set#SET_ZONE OPSGROUP.inzones

Set of zones in which the group is currently in.

#boolean OPSGROUP.isAircraft

If true, group is airplane or helicopter.

#boolean OPSGROUP.isGround

If true, group is some ground unit.

#boolean OPSGROUP.isLateActivated

Is the group late activated.

#boolean OPSGROUP.isNaval

If true, group is ships or submarine.

#boolean OPSGROUP.isUncontrolled

Is the group uncontrolled.

#string OPSGROUP.lid

Class id string for output to DCS log file.

#table OPSGROUP.missionqueue

Queue of missions.

#boolean OPSGROUP.passedfinalwp

Group has passed the final waypoint.

Core.Point#COORDINATE OPSGROUP.position

Current position of the group.

#number OPSGROUP.radioFreq

Currently used radio frequency in MHz.

#number OPSGROUP.radioFreqDefault

Default radio frequency in MHz.

#number OPSGROUP.radioModu

Currently used radio modulation radio.modulation.AM or radio.modulation.FM.

#number OPSGROUP.radioModuDefault

Default Radio modulation radio.modulation.AM or radio.modulation.FM.

#boolean OPSGROUP.radioOn

If true, radio is currently turned on.

#boolean OPSGROUP.respawning

Group is being respawned.

#string OPSGROUP.roe

Current ROE setting.

#string OPSGROUP.roeDefault

Default ROE setting.

#string OPSGROUP.rot

Current ROT setting.

#string OPSGROUP.rotDefault

Default ROT setting.

#number OPSGROUP.speedCruise

Cruising speed in km/h.

#number OPSGROUP.speedmax

Max speed in km/h.

Wrapper.Unit#UNIT OPSGROUP.tacanBeacon

The unit acting as TACAN beacon.

#number OPSGROUP.tacanChannel

The currenly used TACAN channel.

#number OPSGROUP.tacanChannelDefault

The default TACAN channel.

#string OPSGROUP.tacanMorse

The currently used TACAN morse code.

#string OPSGROUP.tacanMorseDefault

The default TACAN morse code.

#boolean OPSGROUP.tacanOn

If true, TACAN is currently active.

#number OPSGROUP.taskcounter

Running number of task ids.

#number OPSGROUP.taskcurrent

ID of current task. If 0, there is no current task assigned.

#table OPSGROUP.taskenroute

Enroute task of the group.

#table OPSGROUP.taskpaused

Paused tasks.

#table OPSGROUP.taskqueue

Queue of tasks.

#table OPSGROUP.template

Template of the group.

#number OPSGROUP.traveldist

Distance traveled in meters. This is a lower bound!

#number OPSGROUP.traveltime

Time.

#number OPSGROUP.verbose

Verbosity level. 0=silent.

#string OPSGROUP.version

NavyGroup version.

#table OPSGROUP.waypoints

Table of waypoints.

#table OPSGROUP.waypoints0

Table of initial waypoints.

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 OPSGROUP.ClassName

Name of the class.

#boolean OPSGROUP.Debug

Debug mode. Messages to all about status.

#boolean OPSGROUP.ai

If true, group is purely AI.

#string OPSGROUP.attribute

Generalized attribute.

#number OPSGROUP.currentmission

The ID (auftragsnummer) of the currently assigned AUFTRAG.

#number OPSGROUP.currentwp

Current waypoint.

Core.Set#SET_UNIT OPSGROUP.detectedunits

Set of detected units.

#boolean OPSGROUP.detectionOn

If true, detected units of the group are analyzed.

#table OPSGROUP.elements

Table of elements, i.e. units of the group.

#boolean OPSGROUP.eplrs

If true, EPLRS data link is on.

#boolean OPSGROUP.eplrsDefault

Default EPLRS data link setting.

#number OPSGROUP.formation

Current formation setting.

#number OPSGROUP.formationDefault

Default formation setting.

#boolean OPSGROUP.groupinitialized

If true, group parameters were initialized.

#string OPSGROUP.groupname

Name of the group.

Core.Set#SET_ZONE OPSGROUP.inzones

Set of zones in which the group is currently in.

#boolean OPSGROUP.isAircraft

If true, group is airplane or helicopter.

#boolean OPSGROUP.isGround

If true, group is some ground unit.

#boolean OPSGROUP.isLateActivated

Is the group late activated.

#boolean OPSGROUP.isNaval

If true, group is ships or submarine.

#boolean OPSGROUP.isUncontrolled

Is the group uncontrolled.

#string OPSGROUP.lid

Class id string for output to DCS log file.

#table OPSGROUP.missionqueue

Queue of missions.

#boolean OPSGROUP.passedfinalwp

Group has passed the final waypoint.

Core.Point#COORDINATE OPSGROUP.position

Current position of the group.

#number OPSGROUP.radioFreq

Currently used radio frequency in MHz.

#number OPSGROUP.radioFreqDefault

Default radio frequency in MHz.

#number OPSGROUP.radioModu

Currently used radio modulation radio.modulation.AM or radio.modulation.FM.

#number OPSGROUP.radioModuDefault

Default Radio modulation radio.modulation.AM or radio.modulation.FM.

#boolean OPSGROUP.radioOn

If true, radio is currently turned on.

#boolean OPSGROUP.respawning

Group is being respawned.

#string OPSGROUP.roe

Current ROE setting.

#string OPSGROUP.roeDefault

Default ROE setting.

#string OPSGROUP.rot

Current ROT setting.

#string OPSGROUP.rotDefault

Default ROT setting.

#number OPSGROUP.speedCruise

Cruising speed in km/h.

#number OPSGROUP.speedmax

Max speed in km/h.

Wrapper.Unit#UNIT OPSGROUP.tacanBeacon

The unit acting as TACAN beacon.

#number OPSGROUP.tacanChannel

The currenly used TACAN channel.

#number OPSGROUP.tacanChannelDefault

The default TACAN channel.

#string OPSGROUP.tacanMorse

The currently used TACAN morse code.

#string OPSGROUP.tacanMorseDefault

The default TACAN morse code.

#boolean OPSGROUP.tacanOn

If true, TACAN is currently active.

#number OPSGROUP.taskcounter

Running number of task ids.

#number OPSGROUP.taskcurrent

ID of current task. If 0, there is no current task assigned.

#table OPSGROUP.taskenroute

Enroute task of the group.

#table OPSGROUP.taskpaused

Paused tasks.

#table OPSGROUP.taskqueue

Queue of tasks.

#table OPSGROUP.template

Template of the group.

#number OPSGROUP.traveldist

Distance traveled in meters. This is a lower bound!

#number OPSGROUP.traveltime

Time.

#number OPSGROUP.verbose

Verbosity level. 0=silent.

#string OPSGROUP.version

NavyGroup version.

#table OPSGROUP.waypoints

Table of waypoints.

#table OPSGROUP.waypoints0

Table of initial waypoints.

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

Ammo data.

Field(s)

#number OPSGROUP.Ammo.Bombs

Amount of bombs.

#number OPSGROUP.Ammo.Guns

Amount of gun shells.

#number OPSGROUP.Ammo.Missiles

Amount of missiles.

#number OPSGROUP.Ammo.MissilesAA

Amount of air-to-air missiles.

#number OPSGROUP.Ammo.MissilesAG

Amount of air-to-ground missiles.

#number OPSGROUP.Ammo.MissilesAS

Amount of anti-ship missiles.

#number OPSGROUP.Ammo.MissilesBM

Amount of ballistic missiles.

#number OPSGROUP.Ammo.MissilesCR

Amount of cruise missiles.

#number OPSGROUP.Ammo.Rockets

Amount of rockets.

#number OPSGROUP.Ammo.Torpedos

Amount of torpedos.

#number OPSGROUP.Ammo.Total

Total amount of ammo.

Function(s)

Field(s)

Function(s)

Status of group element.

Field(s)

#string OPSGROUP.ElementStatus.AIRBORNE

Element is airborne. Either after takeoff or after air start.

#string OPSGROUP.ElementStatus.ARRIVED

Element arrived at its parking spot and shut down its engines.

#string OPSGROUP.ElementStatus.DEAD

Element is dead after it crashed, pilot ejected or pilot dead events.

#string OPSGROUP.ElementStatus.ENGINEON

Element started its engines.

#string OPSGROUP.ElementStatus.INUTERO

Element was not spawned yet or its status is unknown so far.

#string OPSGROUP.ElementStatus.LANDED

Element landed and is taxiing to its parking spot.

#string OPSGROUP.ElementStatus.LANDING

Element is landing.

#string OPSGROUP.ElementStatus.PARKING

Element is parking after spawned on ramp.

#string OPSGROUP.ElementStatus.SPAWNED

Element was spawned into the world.

#string OPSGROUP.ElementStatus.TAKEOFF

Element took of after takeoff event.

#string OPSGROUP.ElementStatus.TAXIING

Element is taxiing after engine startup.

Function(s)

Enroute task.

Field(s)

DCS#Task OPSGROUP.EnrouteTask.DCStask

DCS task structure table.

#number OPSGROUP.EnrouteTask.WaypointIndex

Waypoint number at which the enroute task is added.

Function(s)

Task structure.

Field(s)

#table OPSGROUP.Task.dcstask

DCS task structure.

#string OPSGROUP.Task.description

Brief text which describes the task.

#number OPSGROUP.Task.duration

Duration before task is cancelled in seconds. Default never.

#number OPSGROUP.Task.id

Task ID. Running number to get the task.

#number OPSGROUP.Task.prio

Priority.

#string OPSGROUP.Task.status

Task status.

Core.UserFlag#USERFLAG OPSGROUP.Task.stopflag

If flag is set to 1 (=true), the task is stopped.

#number OPSGROUP.Task.time

Abs. mission time when to execute the task.

#number OPSGROUP.Task.timestamp

Abs. mission time, when task was started.

#string OPSGROUP.Task.type

Type of task: either SCHEDULED or WAYPOINT.

#number OPSGROUP.Task.waypoint

Waypoint index if task is a waypoint task.

Function(s)

Ops group task status.

Field(s)

#string OPSGROUP.TaskStatus.DONE

Task is done.

#string OPSGROUP.TaskStatus.EXECUTING

Task is being executed.

#string OPSGROUP.TaskStatus.PAUSED

Task is paused.

#string OPSGROUP.TaskStatus.SCHEDULED

Task is scheduled.

Function(s)

Ops group task status.

Field(s)

#string OPSGROUP.TaskType.SCHEDULED

Task is scheduled and will be executed at a given time.

#string OPSGROUP.TaskType.WAYPOINT

Task is executed at a specific waypoint.

Function(s)