Module Ops.CSAR
+Ops -- Combat Search and Rescue.
+ + + ++ +
CSAR - MOOSE based Helicopter CSAR Operations.
+ ++ +
Missions:
+ +CSAR - Combat Search & Rescue
+ ++ +
Main Features:
+ +-
+
- MOOSE-based Helicopter CSAR Operations for Players. +
+ +
Author: Applevangelist (Moose Version), Ciribob (original), Thanks to: Shadowze, Cammel (testing)
+ +Global(s)
Global CSAR |
+
+ Combat search and rescue (CSAR) are search and rescue operations that are carried out during war that are within or near combat zones. (Wikipedia) + ++ +
CSAR Concept+ +
|
+
Combat search and rescue (CSAR) are search and rescue operations that are carried out during war that are within or near combat zones. (Wikipedia)
+ ++ +

CSAR Concept
+ +-
+
- MOOSE-based Helicopter CSAR Operations for Players. +
-
+
- Object oriented refactoring of Ciribob's fantastic CSAR script. +
- No need for extra MIST loading. +
- Additional events to tailor your mission. +
0. Prerequisites
+ +You need to load an .ogg soundfile for the pilot's beacons into the mission, e.g. "beacon.ogg", use a once trigger, "sound to country" for that. +Create a late-activated single infantry unit as template in the mission editor and name it e.g. "Downed Pilot".
+ +1. Basic Setup
+ +A basic setup example is the following:
+ + -- Instantiate and start a CSAR for the blue side, with template "Downed Pilot" and alias "Luftrettung"
+ local my_csar = CSAR:New(coalition.side.BLUE,"Downed Pilot","Luftrettung")
+ -- options
+ my_csar.immortalcrew = true -- downed pilot spawn is immortal
+ my_csar.invisiblecrew = false -- downed pilot spawn is visible
+ -- start the FSM
+ my_csar:__Start(5)
+
+
+2. Options
+ +The following options are available (with their defaults). Only set the ones you want changed:
+ + self.allowDownedPilotCAcontrol = false -- Set to false if you don\'t want to allow control by Combined Arms.
+ self.allowFARPRescue = true -- allows pilots to be rescued by landing at a FARP or Airbase. Else MASH only!
+ self.autosmoke = false -- automatically smoke a downed pilot\'s location when a heli is near.
+ self.autosmokedistance = 1000 -- distance for autosmoke
+ self.coordtype = 1 -- Use Lat/Long DDM (0), Lat/Long DMS (1), MGRS (2), Bullseye imperial (3) or Bullseye metric (4) for coordinates.
+ self.csarOncrash = false -- (WIP) If set to true, will generate a downed pilot when a plane crashes as well.
+ self.enableForAI = false -- set to false to disable AI pilots from being rescued.
+ self.pilotRuntoExtractPoint = true -- Downed pilot will run to the rescue helicopter up to self.extractDistance in meters.
+ self.extractDistance = 500 -- Distance the downed pilot will start to run to the rescue helicopter.
+ self.immortalcrew = true -- Set to true to make wounded crew immortal.
+ self.invisiblecrew = false -- Set to true to make wounded crew insvisible.
+ self.loadDistance = 75 -- configure distance for pilots to get into helicopter in meters.
+ self.mashprefix = {"MASH"} -- prefixes of #GROUP objects used as MASHes.
+ self.max_units = 6 -- max number of pilots that can be carried if #CSAR.AircraftType is undefined.
+ self.messageTime = 15 -- Time to show messages for in seconds. Doubled for long messages.
+ self.radioSound = "beacon.ogg" -- the name of the sound file to use for the pilots\' radio beacons.
+ self.smokecolor = 4 -- Color of smokemarker, 0 is green, 1 is red, 2 is white, 3 is orange and 4 is blue.
+ self.useprefix = true -- Requires CSAR helicopter #GROUP names to have the prefix(es) defined below.
+ self.csarPrefix = { "helicargo", "MEDEVAC"} -- #GROUP name prefixes used for useprefix=true - DO NOT use # in helicopter names in the Mission Editor!
+ self.verbose = 0 -- set to > 1 for stats output for debugging.
+ -- (added 0.1.4) limit amount of downed pilots spawned by **ejection** events
+ self.limitmaxdownedpilots = true
+ self.maxdownedpilots = 10
+ -- (added 0.1.8) - allow to set far/near distance for approach and optionally pilot must open doors
+ self.approachdist_far = 5000 -- switch do 10 sec interval approach mode, meters
+ self.approachdist_near = 3000 -- switch to 5 sec interval approach mode, meters
+ self.pilotmustopendoors = false -- switch to true to enable check of open doors
+
+
+2.1 Experimental Features
+ + WARNING - Here\'ll be dragons!
+ DANGER - For this to work you need to de-sanitize your mission environment (all three entries) in <DCS root>\Scripts\MissionScripting.lua
+ Needs SRS => 1.9.6 to work (works on the **server** side of SRS)
+ self.useSRS = false -- Set true to use FF\'s SRS integration
+ self.SRSPath = "E:\\Progra~1\\DCS-SimpleRadio-Standalone\\" -- adjust your own path in your SRS installation -- server(!)
+ self.SRSchannel = 300 -- radio channel
+ self.SRSModulation = radio.modulation.AM -- modulation
+
+
+3. Results
+ +Number of successful landings with save pilots and aggregated number of saved pilots is stored in these variables in the object:
+ + self.rescues -- number of successful landings *with* saved pilots
+ self.rescuedpilots -- aggregated number of pilots rescued from the field (of *all* players)
+
+
+4. Events
+ +The class comes with a number of FSM-based events that missions designers can use to shape their mission. + These are:
+ +4.1. PilotDown.
+ + The event is triggered when a new downed pilot is detected. Use e.g. `function my_csar:OnAfterPilotDown(...)` to link into this event:
+
+ function my_csar:OnAfterPilotDown(from, event, to, spawnedgroup, frequency, groupname, coordinates_text)
+ ... your code here ...
+ end
+
+
+4.2. Approach.
+ + A CSAR helicpoter is closing in on a downed pilot. Use e.g. `function my_csar:OnAfterApproach(...)` to link into this event:
+
+ function my_csar:OnAfterApproach(from, event, to, heliname, groupname)
+ ... your code here ...
+ end
+
+
+4.3. Boarded.
+ + The pilot has been boarded to the helicopter. Use e.g. `function my_csar:OnAfterBoarded(...)` to link into this event:
+
+ function my_csar:OnAfterBoarded(from, event, to, heliname, groupname)
+ ... your code here ...
+ end
+
+
+4.4. Returning.
+ + The CSAR helicopter is ready to return to an Airbase, FARP or MASH. Use e.g. `function my_csar:OnAfterReturning(...)` to link into this event:
+
+ function my_csar:OnAfterReturning(from, event, to, heliname, groupname)
+ ... your code here ...
+ end
+
+
+4.5. Rescued.
+ + The CSAR helicopter has landed close to an Airbase/MASH/FARP and the pilots are safe. Use e.g. `function my_csar:OnAfterRescued(...)` to link into this event:
+
+ function my_csar:OnAfterRescued(from, event, to, heliunit, heliname, pilotssaved)
+ ... your code here ...
+ end
+
+
+5. Spawn downed pilots at location to be picked up.
+ + If missions designers want to spawn downed pilots into the field, e.g. at mission begin to give the helicopter guys works, they can do this like so:
+
+ -- Create downed "Pilot Wagner" in #ZONE "CSAR_Start_1" at a random point for the blue coalition
+ my_csar:SpawnCSARAtZone( "CSAR_Start_1", coalition.side.BLUE, "Pilot Wagner", true )
+
+
+
+
+Type(s)
| Fields and Methods inherited from CSAR | +Description | +
|---|---|
| + | + + | +
| + |
+ Name of the class. + |
+
| + | + + | +
| + |
+ Create a new CSAR object and start the FSM. + |
+
CSAR:OnAfterApproach(From, Event, To, Heliname, Woundedgroupname) |
+
+ On After "Aproach" event. + |
+
CSAR:OnAfterBoarded(From, Event, To, Heliname, Woundedgroupname) |
+
+ On After "Boarded" event. + |
+
CSAR:OnAfterPilotDown(From, Event, To, Group, Frequency, Leadername, CoordinatesText) |
+
+ On After "PilotDown" event. + |
+
CSAR:OnAfterRescued(From, Event, To, HeliUnit, HeliName, PilotsSaved) |
+
+ On After "Rescued" event. + |
+
CSAR:OnAfterReturning(From, Event, To, Heliname, Woundedgroupname) |
+
+ On After "Returning" event. + |
+
| + | + + | +
| + | + + | +
| + | + + | +
| + |
+ Updated and sorted list of known NDB beacons (in kHz!) from the available maps. + |
+
CSAR:SpawnCSARAtZone(Zone, Coalition, Description, RandomPoint, Nomessage) |
+
+ Function to add a CSAR object into the scene at a zone coordinate. + |
+
| + |
+ Triggers the FSM event "Start". + |
+
| + |
+ Triggers the FSM event "Status". + |
+
| + | + + | +
| + |
+ (Internal) Function to add beacon to downed pilot. + |
+
| + |
+ (Internal) Function to spawn a CSAR object into the scene. + |
+
| + |
+ (Internal) Populate F10 menu for CSAR players. + |
+
| + |
+ (Internal) Add options to a downed pilot + |
+
CSAR:_CheckCloseWoundedGroup(_distance, _heliUnit, _heliName, _woundedGroup, _woundedGroupName) |
+
+ (Internal) Function to check if heli is close to group. + |
+
CSAR:_CheckGroupNotKIA(_woundedGroup, _woundedGroupName, _heliUnit, _heliName) |
+
+ (Internal) Check if group not KIA. + |
+
| + |
+ (Internal) Check if a name is in downed pilot table + |
+
| + |
+ (Internal) Display onboarded rescued pilots. + |
+
| + |
+ (Internal) Check state of wounded group. + |
+
| + |
+ (Internal) Helper function to count active downed pilots. + |
+
| + |
+ (Internal) Function to insert downed pilot tracker object. + |
+
| + |
+ (Internal) Display active SAR tasks to player. + |
+
CSAR:_DisplayMessageToSAR(_unit, _text, _time, _clear, _speak) |
+
+ (Internal) Display message to single Unit. + |
+
| + |
+ (Internal) Display info to all SAR groups. + |
+
| + |
+ (Internal) Function to check for dupe eject events. + |
+
| + | + + | +
| + |
+ (Internal) Pop frequency from prepopulated table. + |
+
| + |
+ (Internal) Populate table with available beacon frequencies. + |
+
| + |
+ (Internal) Function to determine clockwise direction for flares. + |
+
| + |
+ (Internal) Find the closest downed pilot to a heli. + |
+
| + |
+ (Internal) Determine distance to closest MASH. + |
+
| + |
+ (Internal) Return distance in meters between two coordinates. + |
+
| + |
+ (Internal) Function to get string of a group's position. + |
+
| + |
+ (Internal) Check and return Wrappe.Unit#UNIT based on the name if alive. + |
+
CSAR:_InitSARForPilot(_downedGroup, _GroupName, _freq, _nomessage) |
+
+ (Internal) Initialize the action for a pilot. + |
+
| + |
+ (internal) Function to check if the heli door(s) are open. + |
+
| + |
+ (Internal) Move group to destination. + |
+
CSAR:_PickupUnit(_heliUnit, _pilotName, _woundedGroup, _woundedGroupName) |
+
+ (Internal) Function to pickup the wounded pilot from the ground. + |
+
| + |
+ (Internal) Count pilots on board. + |
+
| + |
+ (Internal) Function to pop a smoke at a wounded pilot's positions. + |
+
| + |
+ (Internal) Helper to decide if we're over max limit. + |
+
| + |
+ (Internal) Helper function to (re-)add beacon to downed pilot. + |
+
| + |
+ (Internal) Check if a name is in downed pilot table and remove it. + |
+
| + |
+ (Internal) Request smoke at closest downed pilot. + |
+
| + |
+ (Internal) Mark pilot as rescued and remove from tables. + |
+
| + |
+ (Internal) Monitor in-flight returning groups. + |
+
| + |
+ (Internal) Fire a flare at the point of a downed pilot. + |
+
CSAR:_SpawnCsarAtZone(_zone, _coalition, _description, _randomPoint, _nomessage) |
+
+ (Internal) Function to add a CSAR object into the scene at a zone coordinate. + |
+
| + |
+ (Internal) Spawn a downed pilot + |
+
| + |
+ Triggers the FSM event "Start" after a delay. + |
+
| + |
+ Triggers the FSM event "Status" after a delay. + |
+
| + |
+ Triggers the FSM event "Stop" after a delay. + |
+
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + |
+ Coalition side number, e.g. |
+
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + |
+ Class id string for output to DCS log file. + |
+
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + |
+ (Internal) Function called after Start() event. + |
+
| + |
+ (Internal) Function called after Status() event. + |
+
| + |
+ (Internal) Function called after Stop() event. + |
+
CSAR:onbeforeApproach(From, Event, To, Heliname, Woundedgroupname) |
+
+ (Internal) Function called before Approach() event. + |
+
CSAR:onbeforeBoarded(From, Event, To, Heliname, Woundedgroupname) |
+
+ (Internal) Function called before Boarded() event. + |
+
CSAR:onbeforePilotDown(From, Event, To, Group, Frequency, Leadername, CoordinatesText) |
+
+ (Internal) Function called before PilotDown() event. + |
+
CSAR:onbeforeRescued(From, Event, To, HeliUnit, HeliName, PilotsSaved) |
+
+ (Internal) Function called before Rescued() event. + |
+
CSAR:onbeforeReturning(From, Event, To, Heliname, Woundedgroupname) |
+
+ (Internal) Function called before Returning() event. + |
+
| + |
+ (Internal) Function called before Status() event. + |
+
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + |
+ Verbosity level. + |
+
| + |
+ CSAR class version. + |
+
| + | + + | +
| Fields and Methods inherited from FSM | +Description | +
|---|---|
| + |
+ Adds an End 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. + |
+
| + |
+ Adds a score for the FSM to be achieved. + |
+
| + |
+ Adds a score for the FSM_PROCESS to be achieved. + |
+
| + |
+ Add a new transition rule to the FSM. + |
+
| + |
+ Call scheduler. + |
+
| + |
+ Name of the class. + |
+
| + | + + | +
| + |
+ Get current state. + |
+
| + |
+ Returns the End states. + |
+
| + | + + | +
| + |
+ Returns a table of the SubFSM rules defined within the FSM. + |
+
| + |
+ Returns a table with the scores defined. + |
+
| + |
+ Returns the start state of the FSM. + |
+
| + |
+ Get current state. + |
+
| + |
+ Returns a table with the Subs defined. + |
+
| + |
+ Returns a table of the transition rules defined within the FSM. + |
+
| + |
+ Check if FSM is in state. + |
+
| + |
+ Load call backs. + |
+
| + |
+ Creates a new FSM object. + |
+
| + |
+ Scores. + |
+
| + | + + | +
| + |
+ Sets the start state of the FSM. + |
+
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + |
+ Add to map. + |
+
| + |
+ Call handler. + |
+
| + |
+ Create transition. + |
+
| + |
+ Delayed transition. + |
+
| + |
+ Event map. + |
+
| + |
+ Go sub. + |
+
| + |
+ Handler. + |
+
| + |
+ Is end state. + |
+
| + |
+ Sub maps. + |
+
| + |
+ Check if can do an event. + |
+
| + |
+ Check if cannot do an event. + |
+
| + |
+ Current state name. + |
+
| + | + + | +
| + |
+ Check if FSM is in state. + |
+
| + |
+ Options. + |
+
| + |
+ Subs. + |
+
| Fields and Methods inherited from BASE | +Description | +
|---|---|
| + |
+ The ID number of the class. + |
+
| + |
+ The name of the class. + |
+
| + |
+ The name of the class concatenated with the ID number of the class. + |
+
| + |
+ Clear the state of an object. + |
+
CSAR:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
+
+ Creation of a Birth Event. + |
+
| + |
+ Creation of a Crash Event. + |
+
| + |
+ Creation of a Dead Event. + |
+
| + |
+ Creation of a |
+
| + |
+ Creation of a Remove Unit Event. + |
+
| + |
+ Creation of a Takeoff Event. + |
+
| + |
+ Log an exception which will be traced always. + |
+
| + |
+ Returns the event dispatcher + |
+
| + |
+ Remove all subscribed events + |
+
| + |
+ Trace a function call. + |
+
| + |
+ Trace a function call level 2. + |
+
| + |
+ Trace a function call level 3. + |
+
| + |
+ Get the ClassID of the class instance. + |
+
| + |
+ Get the ClassName of the class instance. + |
+
| + |
+ Get the ClassName + ClassID of the class instance. + |
+
| + |
+ Get the Class Event processing Priority. + |
+
| + |
+ This is the worker method to retrieve the Parent class. + |
+
| + |
+ Get a Value given a Key from the Object. + |
+
| + |
+ Subscribe to a DCS Event. + |
+
| + |
+ Log an information which will be traced always. + |
+
| + |
+ This is the worker method to inherit from a parent class. + |
+
| + |
+ This is the worker method to check if an object is an (sub)instance of a class. + |
+
| + |
+ Enquires if tracing is on (for the class). + |
+
| + |
+ BASE constructor. + |
+
| + |
+ Occurs when an object is completely destroyed. + |
+
| + |
+ BDA. + |
+
| + |
+ Occurs when a ground unit captures either an airbase or a farp. + |
+
| + |
+ Occurs when any object is spawned into the mission. + |
+
| + |
+ Occurs when any aircraft crashes into the ground and is completely destroyed. + |
+
| + |
+ Occurs when an object is dead. + |
+
| + |
+ Unknown precisely what creates this event, likely tied into newer damage model. + |
+
| + |
+ Discard chair after ejection. + |
+
| + |
+ Occurs when a pilot ejects from an aircraft +initiator : The unit that has ejected + |
+
| + |
+ Occurs when any aircraft shuts down its engines. + |
+
| + |
+ Occurs when any aircraft starts its engines. + |
+
| + |
+ Occurs whenever an object is hit by a weapon. + |
+
| + |
+ Occurs when any system fails on a human controlled aircraft. + |
+
| + |
+ Occurs on the death of a unit. + |
+
| + |
+ Occurs when an aircraft lands at an airbase, farp or ship +initiator : The unit that has landed +place: Object that the unit landed on. + |
+
| + |
+ Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. + |
+
| + |
+ Landing quality mark. + |
+
| + |
+ Occurs when a new mark was added. + |
+
| + |
+ Occurs when a mark text was changed. + |
+
| + |
+ Occurs when a mark was removed. + |
+
| + |
+ Occurs when a mission ends + |
+
| + |
+ Occurs when a mission starts + |
+
| + |
+ Weapon add. + |
+
| + |
+ Occurs when the pilot of an aircraft is killed. + |
+
| + |
+ Occurs when a player enters a slot and takes control of an aircraft. + |
+
| + |
+ Occurs when any player assumes direct control of a unit. + |
+
| + |
+ Occurs when any player relieves control of a unit to the AI. + |
+
| + |
+ Occurs when an aircraft connects with a tanker and begins taking on fuel. + |
+
| + |
+ Occurs when an aircraft is finished taking fuel. + |
+
| + |
+ Occurs when any modification to the "Score" as seen on the debrief menu would occur. + |
+
| + |
+ Occurs when any unit stops firing its weapon. + |
+
| + |
+ Occurs when any unit begins firing a weapon that has a high rate of fire. + |
+
| + |
+ Occurs whenever any unit in a mission fires a weapon. + |
+
| + |
+ Occurs when an aircraft takes off from an airbase, farp, or ship. + |
+
| + |
+ Trigger zone. + |
+
| + |
+ Occurs when the game thinks an object is destroyed. + |
+
| + |
+ Schedule a new time event. + |
+
CSAR:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
+
+ Schedule a new time event. + |
+
| + |
+ Stops the Schedule. + |
+
| + | + + | +
| + |
+ Set the Class Event processing Priority. + |
+
| + |
+ Set a state or property of the Object given a Key and a Value. + |
+
| + |
+ Trace a function logic level 1. + |
+
| + |
+ Trace a function logic level 2. + |
+
| + |
+ Trace a function logic level 3. + |
+
| + |
+ Trace all methods in MOOSE + |
+
| + |
+ Set tracing for a class + |
+
| + |
+ Set tracing for a specific method of class + |
+
| + |
+ Set trace level + |
+
| + |
+ Set trace off. + |
+
| + |
+ Set trace on. + |
+
| + |
+ 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. + |
+
| + |
+ UnSubscribe to a DCS event. + |
+
| + | + + | +
CSAR:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
+
+ Trace a function call. + |
+
CSAR:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
+
+ Trace a function logic. + |
+
| + | + + | +
| + | + + | +
| Fields and Methods inherited from CSAR.AircraftType | +Description | +
|---|---|
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + | + + | +
| + |
+ Unit type name. + |
+
| Fields and Methods inherited from CSAR.DownedPilot | +Description | +
|---|---|
| + |
+ Description. + |
+
| + |
+ Frequency of the NDB. + |
+
| + |
+ Spawned group object. + |
+
| + |
+ Pilot index. + |
+
| + |
+ Name of the spawned group. + |
+
| + |
+ Name of the original unit. + |
+
| + |
+ Player name if applicable. + |
+
| + |
+ Coalition. + |
+
| + |
+ Timestamp for approach process + |
+
| + |
+ Typename of Unit. + |
+
-
+
- CSAR class, extends Core.Base#BASE, Core.Fsm#FSM +
Field(s)
+Name of the class.
+ +modulation
+ +adjust your own path in your server(!)
+ +radio channel
+ +Updated and sorted list of known NDB beacons (in kHz!) from the available maps.
+ +tables, mainly for tracking actions
+ +GROUP_SET of all helis
+ +Set to false if you don't want to allow control by Combined arms.
+ +allows pilot to be rescued by landing at a FARP or Airbase
+ +switch do 10 sec interval approach mode, meters
+ +switch to 5 sec interval approach mode, meters
+ +automatically smoke location when heli is near
+ +distance for autosmoke + added 0.1.4
+ +Coalition side number, e.g. coalition.side.RED.
Use Lat/Long DDM (0), Lat/Long DMS (1), MGRS (2), Bullseye imperial (3) or Bullseye metric (4) for coordinates.
+ +If set to true, will generate a csar when a plane crashes as well.
+ +prefixes used for useprefix=true - DON'T use # in names!
+ +table of CSAR unit names
+ +Replacement woundedGroups
+ +set to false to disable AI units from being rescued.
+ +Distance the Downed pilot will run to the rescue helicopter
+ +tracks heli close message ie heli < 500m distance
+ +tracks if the first message has been sent of the heli being visible
+ +tracks status of a helis hover above a downed pilot
+ +Set to true to make wounded crew immortal
+ +contain a table for each SAR with all units he has with the original names
+ +Set to true to make wounded crew insvisible
+ +Class id string for output to DCS log file.
+ +configure distance for pilot to get in helicopter in meters.
+ +seconds
+ +currently only GROUP objects, maybe support STATICs also?
+ +prefixes used to find MASHes
+ +max number of pilots that can be carried
+ +Time to show longer messages for in seconds
+ +Downed Pilot will run to the rescue helicopter up to self.extractDistance METERS
+ +switch to true to enable check on open doors
+ +the name of the sound file to use for the Pilot radio beacons. If this isnt added to the mission BEACONS WONT WORK!
+ +tracks smoke markers for groups
+ +Color of smokemarker for blue side, 0 is green, 1 is red, 2 is white, 3 is orange and 4 is blue
+ +Use FF's SRS integration
+ +Use the Prefixed defined below, Requires Unit have the Prefix defined below
+ +Verbosity level.
+ +CSAR class version.
+ +contains the new group of units
+ +Function(s)
+Create a new CSAR object and start the FSM.
+ +Defined in:
+CSAR
+Parameters:
++ #number + Coalition +
+Coalition side. Can also be passed as a string "red", "blue" or "neutral".
+ ++ #string + Template +
+Name of the late activated infantry unit standing in for the downed pilot.
+ ++ #string + Alias +
+An optional alias how this object is called in the logs etc.
+ +Return value:
+self
+ +On After "Aproach" event.
+ + +Heli close to downed Pilot.
+ +Defined in:
+CSAR
+Parameters:
++ #string + From +
+From state.
+ ++ #string + Event +
+Event.
+ ++ #string + To +
+To state.
+ ++ #string + Heliname +
+Name of the helicopter group.
+ ++ #string + Woundedgroupname +
+Name of the downed pilot's group.
+ +On After "Boarded" event.
+ + +Downed pilot boarded heli.
+ +Defined in:
+CSAR
+Parameters:
++ #string + From +
+From state.
+ ++ #string + Event +
+Event.
+ ++ #string + To +
+To state.
+ ++ #string + Heliname +
+Name of the helicopter group.
+ ++ #string + Woundedgroupname +
+Name of the downed pilot's group.
+ +On After "PilotDown" event.
+ + +Downed Pilot detected.
+ +Defined in:
+CSAR
+Parameters:
++ #string + From +
+From state.
+ ++ #string + Event +
+Event.
+ ++ #string + To +
+To state.
+ ++ Wrapper.Group#GROUP + Group +
+Group object of the downed pilot.
+ ++ #number + Frequency +
+Beacon frequency in kHz.
+ ++ #string + Leadername +
+Name of the #UNIT of the downed pilot.
+ ++ #string + CoordinatesText +
+String of the position of the pilot. Format determined by self.coordtype.
+ +On After "Rescued" event.
+ + +Pilot(s) have been brought to the MASH/FARP/AFB.
+ +Defined in:
+CSAR
+Parameters:
++ #string + From +
+From state.
+ ++ #string + Event +
+Event.
+ ++ #string + To +
+To state.
+ ++ Wrapper.Unit#UNIT + HeliUnit +
+Unit of the helicopter.
+ ++ #string + HeliName +
+Name of the helicopter group.
+ ++ #number + PilotsSaved +
+Number of the saved pilots on board when landing.
+ +On After "Returning" event.
+ + +Heli can return home with downed pilot(s).
+ +Defined in:
+CSAR
+Parameters:
++ #string + From +
+From state.
+ ++ #string + Event +
+Event.
+ ++ #string + To +
+To state.
+ ++ #string + Heliname +
+Name of the helicopter group.
+ ++ #string + Woundedgroupname +
+Name of the downed pilot's group.
+ +Function to add a CSAR object into the scene at a zone coordinate.
+ + +For mission designers wanting to add e.g. PoWs to the scene.
+ +Defined in:
+CSAR
+Parameters:
++ #string + Zone +
+Name of the zone.
+ ++ #number + Coalition +
+Coalition.
+ ++ #string + Description +
+(optional) Description.
+ ++ #boolean + RandomPoint +
+(optional) Random yes or no.
+ ++ #boolean + Nomessage +
+(optional) If true, don't send a message to SAR.
+ +Usage:
+If missions designers want to spawn downed pilots into the field, e.g. at mission begin, to give the helicopter guys works, they can do this like so:
+
+ -- Create downed "Pilot Wagner" in #ZONE "CSAR_Start_1" at a random point for the blue coalition
+ my_csar:SpawnCSARAtZone( "CSAR_Start_1", coalition.side.BLUE, "Pilot Wagner", true )
+
+CSAR:Start()
+Triggers the FSM event "Start".
+ + +Starts the CSAR. Initializes parameters and starts event handlers.
+ +Defined in:
+CSAR
+(Internal) Function to add beacon to downed pilot.
+ +Defined in:
+CSAR
+Parameters:
++ Wrapper.Group#GROUP + _group +
+Group #GROUP object.
+ ++ #number + _freq +
+Frequency to use
+ +(Internal) Function to spawn a CSAR object into the scene.
+ +Defined in:
+CSAR
+Parameters:
++ #number + _coalition +
+Coalition
+ ++ DCS#country.id + _country +
+Country ID
+ ++ Core.Point#COORDINATE + _point +
+Coordinate
+ ++ #string + _typeName +
+Typename
+ ++ #string + _unitName +
+Unitname
+ ++ #string + _playerName +
+Playername
+ ++ #number + _freq +
+Frequency
+ ++ #boolean + noMessage +
++ #string + _description +
+Description
+ +(Internal) Populate F10 menu for CSAR players.
+ +Defined in:
+CSAR
+(Internal) Add options to a downed pilot
+ +Defined in:
+CSAR
+Parameter:
++ Wrapper.Group#GROUP + group +
+Group to use.
+ +(Internal) Function to check if heli is close to group.
+ +Defined in:
+CSAR
+Parameters:
++ #number + _distance +
++ Wrapper.Unit#UNIT + _heliUnit +
++ #string + _heliName +
++ Wrapper.Group#GROUP + _woundedGroup +
++ #string + _woundedGroupName +
+Return value:
+#boolean:
+Outcome
+ +(Internal) Check if group not KIA.
+ +Defined in:
+CSAR
+Parameters:
++ Wrapper.Group#GROUP + _woundedGroup +
++ #string + _woundedGroupName +
++ Wrapper.Unit#UNIT + _heliUnit +
++ #string + _heliName +
+Return value:
+#boolean:
+Outcome
+ +(Internal) Check if a name is in downed pilot table
+ +Defined in:
+CSAR
+Parameter:
++ #string + name +
+Name to search for.
+ +Return values:
+ +(Internal) Display onboarded rescued pilots.
+ +Defined in:
+CSAR
+Parameter:
++ #string + _unitName +
+Name of the chopper
+ +(Internal) Check state of wounded group.
+ +Defined in:
+CSAR
+Parameters:
++ #string + heliname +
+heliname
+ ++ #string + woundedgroupname +
+woundedgroupname
+ +(Internal) Helper function to count active downed pilots.
+ +Defined in:
+CSAR
+Return value:
+#number:
+Number of pilots in the field.
+ +(Internal) Function to insert downed pilot tracker object.
+ +Defined in:
+CSAR
+Parameters:
++ Wrapper.Group#GROUP + Group +
+The #GROUP object
+ ++ #string + Groupname +
+Name of the spawned group.
+ ++ #number + Side +
+Coalition.
+ ++ #string + OriginalUnit +
+Name of original Unit.
+ ++ #string + Description +
+Descriptive text.
+ ++ #string + Typename +
+Typename of unit.
+ ++ #number + Frequency +
+Frequency of the NDB in Hz
+ ++ #string + Playername +
+Name of Player (if applicable)
+ +Return value:
+self.
+ +(Internal) Display active SAR tasks to player.
+ +Defined in:
+CSAR
+Parameter:
++ #string + _unitName +
+Unit to display to
+ +(Internal) Display message to single Unit.
+ +Defined in:
+CSAR
+Parameters:
++ Wrapper.Unit#UNIT + _unit +
+Unit #UNIT to display to.
+ ++ #string + _text +
+Text of message.
+ ++ #number + _time +
+Message show duration.
+ ++ #boolean + _clear +
+(optional) Clear screen.
+ ++ #boolean + _speak +
+(optional) Speak message via SRS.
+ +(Internal) Display info to all SAR groups.
+ +Defined in:
+CSAR
+Parameters:
++ #string + _message +
+Message to display.
+ ++ #number + _side +
+Coalition of message.
+ ++ #number + _messagetime +
+How long to show.
+ +(Internal) Function to check for dupe eject events.
+ +Defined in:
+CSAR
+Parameter:
++ #string + _unitname +
+Name of unit.
+ +Return value:
+#boolean:
+Outcome
+ +TODO: Split in functions per Event type +- (Internal) Event handler. + @param #CSAR self
+ +Defined in:
+CSAR
+Parameter:
++ EventData +
+(Internal) Pop frequency from prepopulated table.
+ +Defined in:
+CSAR
+Return value:
+#number:
+frequency
+ +(Internal) Populate table with available beacon frequencies.
+ +Defined in:
+CSAR
+(Internal) Function to determine clockwise direction for flares.
+ +Defined in:
+CSAR
+Parameters:
++ Wrapper.Unit#UNIT + _heli +
+The Helicopter
+ ++ Wrapper.Group#GROUP + _group +
+The downed Group
+ +Return value:
+#number:
+direction
+ +(Internal) Find the closest downed pilot to a heli.
+ +Defined in:
+CSAR
+Parameter:
++ Wrapper.Unit#UNIT + _heli +
+Helicopter #UNIT
+ +Return value:
+#table:
+Table of results
+ +(Internal) Determine distance to closest MASH.
+ +Defined in:
+CSAR
+Parameter:
++ Wrapper.Unit#UNIT + _heli +
+Helicopter #UNIT
+ +(Internal) Return distance in meters between two coordinates.
+ +Defined in:
+CSAR
+Parameters:
++ Core.Point#COORDINATE + _point1 +
+Coordinate one
+ ++ Core.Point#COORDINATE + _point2 +
+Coordinate two
+ +Return value:
+#number:
+Distance in meters
+ +(Internal) Function to get string of a group's position.
+ +Defined in:
+CSAR
+Parameter:
++ Wrapper.Controllable#CONTROLLABLE + _woundedGroup +
+Group or Unit object.
+ +Return value:
+#string:
+Coordinates as Text
+ +(Internal) Check and return Wrappe.Unit#UNIT based on the name if alive.
+ +Defined in:
+CSAR
+Parameters:
++ #string + _unitname +
+Name of Unit
+ ++ _unitName +
+Return value:
+or nil
+ +(Internal) Initialize the action for a pilot.
+ +Defined in:
+CSAR
+Parameters:
++ Wrapper.Group#GROUP + _downedGroup +
+The group to rescue.
+ ++ #string + _GroupName +
+Name of the Group
+ ++ #number + _freq +
+Beacon frequency.
+ ++ #boolean + _nomessage +
+Send message true or false.
+ +(internal) Function to check if the heli door(s) are open.
+ + +Thanks to Shadowze.
+ +Defined in:
+CSAR
+Parameter:
++ #string + unit_name +
+Name of unit.
+ +Return value:
+#boolean:
+outcome The outcome.
+ +(Internal) Move group to destination.
+ +Defined in:
+CSAR
+Parameters:
++ Wrapper.Group#GROUP + _leader +
++ Core.Point#COORDINATE + _destination +
+(Internal) Function to pickup the wounded pilot from the ground.
+ +Defined in:
+CSAR
+Parameters:
++ Wrapper.Unit#UNIT + _heliUnit +
+Object of the group.
+ ++ #string + _pilotName +
+Name of the pilot.
+ ++ Wrapper.Group#GROUP + _woundedGroup +
+Object of the group.
+ ++ #string + _woundedGroupName +
+Name of the group.
+ +(Internal) Count pilots on board.
+ +Defined in:
+CSAR
+Parameter:
++ #string + _heliName +
+Return value:
+#number:
+count
+ +(Internal) Function to pop a smoke at a wounded pilot's positions.
+ +Defined in:
+CSAR
+Parameters:
++ #string + _woundedGroupName +
+Name of the group.
+ ++ Wrapper.Group#GROUP + _woundedLeader +
+Object of the group.
+ +(Internal) Helper to decide if we're over max limit.
+ +Defined in:
+CSAR
+Return value:
+#boolean:
+True or false.
+ +(Internal) Helper function to (re-)add beacon to downed pilot.
+ +Defined in:
+CSAR
+Parameter:
++ #table + _args +
+Arguments
+ +(Internal) Check if a name is in downed pilot table and remove it.
+ +Defined in:
+CSAR
+Parameters:
++ #string + name +
+Name to search for.
+ ++ #boolean + force +
+Force removal.
+ +Return value:
+#boolean:
+Outcome.
+ +(Internal) Request smoke at closest downed pilot.
+ +Defined in:
+CSAR
+Parameter:
++ #string + _unitName +
+Name of the helicopter
+ +(Internal) Mark pilot as rescued and remove from tables.
+ +(Internal) Monitor in-flight returning groups.
+ +Defined in:
+CSAR
+Parameters:
++ #string + heliname +
+Heli name
+ ++ #string + groupname +
+Group name
+ +(Internal) Fire a flare at the point of a downed pilot.
+ +Defined in:
+CSAR
+Parameter:
++ #string + _unitName +
+Name of the unit.
+ +(Internal) Function to add a CSAR object into the scene at a zone coordinate.
+ + +For mission designers wanting to add e.g. PoWs to the scene.
+ +Defined in:
+CSAR
+Parameters:
++ #string + _zone +
+Name of the zone.
+ ++ #number + _coalition +
+Coalition.
+ ++ #string + _description +
+(optional) Description.
+ ++ #boolean + _randomPoint +
+(optional) Random yes or no.
+ ++ #boolean + _nomessage +
+(optional) If true, don't send a message to SAR.
+ +(Internal) Spawn a downed pilot
+ +Defined in:
+CSAR
+Parameters:
++ #number + country +
+Country for template.
+ ++ Core.Point#COORDINATE + point +
+Coordinate to spawn at.
+ ++ #number + frequency +
+Frequency of the pilot's beacon
+ +Return values:
+group The #GROUP object.
+ +#string:
+alias The alias name.
+ +Triggers the FSM event "Start" after a delay.
+ + +Starts the CSAR. Initializes parameters and starts event handlers.
+ +Defined in:
+CSAR
+Parameter:
++ #number + delay +
+Delay in seconds.
+ +Triggers the FSM event "Status" after a delay.
+ +Defined in:
+CSAR
+Parameter:
++ #number + delay +
+Delay in seconds.
+ +Triggers the FSM event "Stop" after a delay.
+ + +Stops the CSAR and all its event handlers.
+ +Defined in:
+CSAR
+Parameter:
++ #number + delay +
+Delay in seconds.
+ +(Internal) Function called after Start() event.
+ +Defined in:
+CSAR
+Parameters:
++ #string + From +
+From state.
+ ++ #string + Event +
+Event triggered.
+ ++ #string + To +
+To state.
+ +(Internal) Function called after Status() event.
+ +Defined in:
+CSAR
+Parameters:
++ #string + From +
+From state.
+ ++ #string + Event +
+Event triggered.
+ ++ #string + To +
+To state.
+ +(Internal) Function called after Stop() event.
+ +Defined in:
+CSAR
+Parameters:
++ #string + From +
+From state.
+ ++ #string + Event +
+Event triggered.
+ ++ #string + To +
+To state.
+ +(Internal) Function called before Approach() event.
+ +Defined in:
+CSAR
+Parameters:
++ #string + From +
+From state.
+ ++ #string + Event +
+Event triggered.
+ ++ #string + To +
+To state.
+ ++ #string + Heliname +
+Name of the helicopter group.
+ ++ #string + Woundedgroupname +
+Name of the downed pilot's group.
+ +(Internal) Function called before Boarded() event.
+ +Defined in:
+CSAR
+Parameters:
++ #string + From +
+From state.
+ ++ #string + Event +
+Event triggered.
+ ++ #string + To +
+To state.
+ ++ #string + Heliname +
+Name of the helicopter group.
+ ++ #string + Woundedgroupname +
+Name of the downed pilot's group.
+ +(Internal) Function called before PilotDown() event.
+ +Defined in:
+CSAR
+Parameters:
++ #string + From +
+From state.
+ ++ #string + Event +
+Event triggered.
+ ++ #string + To +
+To state.
+ ++ Wrapper.Group#GROUP + Group +
+Group object of the downed pilot.
+ ++ #number + Frequency +
+Beacon frequency in kHz.
+ ++ #string + Leadername +
+Name of the #UNIT of the downed pilot.
+ ++ #string + CoordinatesText +
+String of the position of the pilot. Format determined by self.coordtype.
+ +(Internal) Function called before Rescued() event.
+ +Defined in:
+CSAR
+Parameters:
++ #string + From +
+From state.
+ ++ #string + Event +
+Event triggered.
+ ++ #string + To +
+To state.
+ ++ Wrapper.Unit#UNIT + HeliUnit +
+Unit of the helicopter.
+ ++ #string + HeliName +
+Name of the helicopter group.
+ ++ #number + PilotsSaved +
+Number of the saved pilots on board when landing.
+ +(Internal) Function called before Returning() event.
+ +Defined in:
+CSAR
+Parameters:
++ #string + From +
+From state.
+ ++ #string + Event +
+Event triggered.
+ ++ #string + To +
+To state.
+ ++ #string + Heliname +
+Name of the helicopter group.
+ ++ #string + Woundedgroupname +
+Name of the downed pilot's group.
+ +(Internal) Function called before Status() event.
+ +Defined in:
+CSAR
+Parameters:
++ #string + From +
+From state.
+ ++ #string + Event +
+Event triggered.
+ ++ #string + To +
+To state.
+ +Field(s)
+Name of the class.
+ +modulation
+ +adjust your own path in your server(!)
+ +radio channel
+ +Updated and sorted list of known NDB beacons (in kHz!) from the available maps.
+ +tables, mainly for tracking actions
+ +GROUP_SET of all helis
+ +Set to false if you don't want to allow control by Combined arms.
+ +allows pilot to be rescued by landing at a FARP or Airbase
+ +switch do 10 sec interval approach mode, meters
+ +switch to 5 sec interval approach mode, meters
+ +automatically smoke location when heli is near
+ +distance for autosmoke + added 0.1.4
+ +Coalition side number, e.g. coalition.side.RED.
Use Lat/Long DDM (0), Lat/Long DMS (1), MGRS (2), Bullseye imperial (3) or Bullseye metric (4) for coordinates.
+ +If set to true, will generate a csar when a plane crashes as well.
+ +prefixes used for useprefix=true - DON'T use # in names!
+ +table of CSAR unit names
+ +Replacement woundedGroups
+ +set to false to disable AI units from being rescued.
+ +Distance the Downed pilot will run to the rescue helicopter
+ +tracks heli close message ie heli < 500m distance
+ +tracks if the first message has been sent of the heli being visible
+ +tracks status of a helis hover above a downed pilot
+ +Set to true to make wounded crew immortal
+ +contain a table for each SAR with all units he has with the original names
+ +Set to true to make wounded crew insvisible
+ +Class id string for output to DCS log file.
+ +configure distance for pilot to get in helicopter in meters.
+ +seconds
+ +currently only GROUP objects, maybe support STATICs also?
+ +prefixes used to find MASHes
+ +max number of pilots that can be carried
+ +Time to show longer messages for in seconds
+ +Downed Pilot will run to the rescue helicopter up to self.extractDistance METERS
+ +switch to true to enable check on open doors
+ +the name of the sound file to use for the Pilot radio beacons. If this isnt added to the mission BEACONS WONT WORK!
+ +tracks smoke markers for groups
+ +Color of smokemarker for blue side, 0 is green, 1 is red, 2 is white, 3 is orange and 4 is blue
+ +Use FF's SRS integration
+ +Use the Prefixed defined below, Requires Unit have the Prefix defined below
+ +Verbosity level.
+ +CSAR class version.
+ +contains the new group of units
+ +Function(s)
+Adds an End state.
+ +Defined in:
+Parameter:
++ #string + State +
+The FSM 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.
+ ++ Core.Fsm#FSM_PROCESS + Process +
+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.
+ +Get current state.
+ +Returns the End states.
+ +Returns a table of the SubFSM rules defined within the FSM.
+ +Returns a table with the scores defined.
+ +Returns the start state of the FSM.
+ +Defined in:
+Return value:
+#string:
+A string containing the start state.
+ +Get current state.
+ +Returns a table with the Subs defined.
+ +Returns a table of the transition rules defined within the FSM.
+ +Check if FSM is in state.
+ +Defined in:
+Parameters:
++ #string + State +
+State name.
+ ++ #boolean + If +
+true, FSM is in this state.
+ +Load call backs.
+ +Defined in:
+Parameter:
++ #table + CallBackTable +
+Table of call backs.
+ +Defined in:
+Parameters:
++ From +
++ Event +
++ Fsm +
+Sets the start state of the FSM.
+ +Defined in:
+Parameter:
++ #string + State +
+A string defining the start state.
+ +Add to map.
+ +Defined in:
+Parameters:
++ #table + Map +
+Map.
+ ++ #table + Event +
+Event table.
+ +Call handler.
+ +Defined in:
+Parameters:
++ #string + step +
+Step "onafter", "onbefore", "onenter", "onleave".
+ ++ #string + trigger +
+Trigger.
+ ++ #table + params +
+Parameters.
+ ++ #string + EventName +
+Event name.
+ +Return value:
+Value.
+ +Create transition.
+ +Defined in:
+Parameter:
++ #string + EventName +
+Event name.
+ +Return value:
+#function:
+Function.
+ +Delayed transition.
+ +Defined in:
+Parameter:
++ #string + EventName +
+Event name.
+ +Return value:
+#function:
+Function.
+ +Event map.
+ +Defined in:
+Parameters:
++ #table + Events +
+Events.
+ ++ #table + EventStructure +
+Event structure.
+ +Go sub.
+ +Defined in:
+Parameters:
++ #string + ParentFrom +
+Parent from state.
+ ++ #string + ParentEvent +
+Parent event name.
+ +Return value:
+#table:
+Subs.
+ +Handler.
+ +Defined in:
+Parameters:
++ #string + EventName +
+Event name.
+ ++ ... +
+Arguments.
+ +Is end state.
+ +Defined in:
+Parameter:
++ #string + Current +
+Current state name.
+ +Return values:
+#table:
+FSM parent.
+ +#string:
+Event name.
+ +Sub maps.
+ +Defined in:
+Parameters:
++ #table + subs +
+Subs.
+ ++ #table + sub +
+Sub.
+ ++ #string + name +
+Name.
+ +CSAR:can(e)
+Check if can do an event.
+ +Defined in:
+Parameter:
++ #string + e +
+Event name.
+ +Return values:
+#boolean:
+If true, FSM can do the event.
+ +#string:
+To state.
+ +Check if cannot do an event.
+ +Defined in:
+Parameter:
++ #string + e +
+Event name.
+ +Return value:
+#boolean:
+If true, FSM cannot do the event.
+ +Check if FSM is in state.
+ +Defined in:
+Parameters:
++ #string + State +
+State name.
+ ++ #boolean + If +
+true, FSM is in this state.
+ ++ state +
+Field(s)
+Name of the class.
+ +modulation
+ +adjust your own path in your server(!)
+ +radio channel
+ +Updated and sorted list of known NDB beacons (in kHz!) from the available maps.
+ +tables, mainly for tracking actions
+ +GROUP_SET of all helis
+ +Set to false if you don't want to allow control by Combined arms.
+ +allows pilot to be rescued by landing at a FARP or Airbase
+ +switch do 10 sec interval approach mode, meters
+ +switch to 5 sec interval approach mode, meters
+ +automatically smoke location when heli is near
+ +distance for autosmoke + added 0.1.4
+ +Coalition side number, e.g. coalition.side.RED.
Use Lat/Long DDM (0), Lat/Long DMS (1), MGRS (2), Bullseye imperial (3) or Bullseye metric (4) for coordinates.
+ +If set to true, will generate a csar when a plane crashes as well.
+ +prefixes used for useprefix=true - DON'T use # in names!
+ +table of CSAR unit names
+ +Replacement woundedGroups
+ +set to false to disable AI units from being rescued.
+ +Distance the Downed pilot will run to the rescue helicopter
+ +tracks heli close message ie heli < 500m distance
+ +tracks if the first message has been sent of the heli being visible
+ +tracks status of a helis hover above a downed pilot
+ +Set to true to make wounded crew immortal
+ +contain a table for each SAR with all units he has with the original names
+ +Set to true to make wounded crew insvisible
+ +Class id string for output to DCS log file.
+ +configure distance for pilot to get in helicopter in meters.
+ +seconds
+ +currently only GROUP objects, maybe support STATICs also?
+ +prefixes used to find MASHes
+ +max number of pilots that can be carried
+ +Time to show longer messages for in seconds
+ +Downed Pilot will run to the rescue helicopter up to self.extractDistance METERS
+ +switch to true to enable check on open doors
+ +the name of the sound file to use for the Pilot radio beacons. If this isnt added to the mission BEACONS WONT WORK!
+ +tracks smoke markers for groups
+ +Color of smokemarker for blue side, 0 is green, 1 is red, 2 is white, 3 is orange and 4 is blue
+ +Use FF's SRS integration
+ +Use the Prefixed defined below, Requires Unit have the Prefix defined below
+ +Verbosity level.
+ +CSAR class version.
+ +contains the new group of units
+ +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 S_EVENT_PLAYER_ENTER_AIRCRAFT event.
Defined in:
+ +Parameter:
++ Wrapper.Unit#UNIT + PlayerUnit +
+The aircraft unit the player entered.
+ +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
+ +Remove all subscribed events
+ +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.
+ +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()
+
+
+
+
+
+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:
++ Core.Event#EVENTS + EventID +
+Event ID.
+ ++ #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).
+ +CSAR:New()
+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
+
+
+
+Occurs when an object is completely destroyed.
+ + +initiator : The unit that is was destroyed.
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +BDA.
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+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:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +Occurs when any object is spawned into the mission.
+ + +initiator : The unit that was spawned
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +Occurs when any aircraft crashes into the ground and is completely destroyed.
+ + +initiator : The unit that has crashed
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +Occurs when an object is dead.
+ + +initiator : The unit that is dead.
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+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:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +Discard chair after ejection.
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +Occurs when a pilot ejects from an aircraft +initiator : The unit that has ejected
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +Occurs when any aircraft shuts down its engines.
+ + +initiator : The unit that is stopping its engines.
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +Occurs when any aircraft starts its engines.
+ + +initiator : The unit that is starting its engines.
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+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:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +Occurs when any system fails on a human controlled aircraft.
+ + +initiator : The unit that had the failure
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+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:
++ Core.Event#EVENTDATA + EventData +
+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:
++ Core.Event#EVENTDATA + EventData +
+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:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +Landing quality mark.
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +Occurs when a new mark was added.
+ + +MarkID: ID of the mark.
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +Occurs when a mark text was changed.
+ + +MarkID: ID of the mark.
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +Occurs when a mark was removed.
+ + +MarkID: ID of the mark.
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +Occurs when a mission ends
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +Occurs when a mission starts
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +Weapon add.
+ + +Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted.
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+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:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +Occurs when a player enters a slot and takes control of an aircraft.
+ + +NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. +initiator : The unit that is being taken control of.
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+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:
++ Core.Event#EVENTDATA + EventData +
+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:
++ Core.Event#EVENTDATA + EventData +
+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:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +Occurs when an aircraft is finished taking fuel.
+ + +initiator : The unit that was receiving fuel.
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+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:
++ Core.Event#EVENTDATA + EventData +
+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:
++ Core.Event#EVENTDATA + EventData +
+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:
++ Core.Event#EVENTDATA + EventData +
+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:
++ Core.Event#EVENTDATA + EventData +
+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:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +Trigger zone.
+ +Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+The EventData structure.
+ +Occurs when the game thinks an object is destroyed.
+ + + +-
+
- initiator: The unit that is was destroyed. +
Defined in:
+ +Parameter:
++ Core.Event#EVENTDATA + EventData +
+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
+ +Set tracing for a specific method of class
+ +Defined in:
+ +Parameters:
++ #string + Class +
++ #string + Method +
+Set trace level
+ +Set trace off.
+ +Set trace on.
+ +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:
++ Core.Event#EVENTS + EventID +
+Event ID.
+ +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
All slot / Limit settings
+ +Field(s)
+Unit type name.
+ +Function(s)
+Downed pilots info.
+ +Field(s)
+Description.
+ +Frequency of the NDB.
+ +Pilot index.
+ +Name of the spawned group.
+ +Name of the original unit.
+ +Player name if applicable.
+ +Coalition.
+ +Timestamp for approach process
+ +Typename of Unit.
+ +
+
+
+
+