DCS singleton coalition

From DCS World Wiki - Hoggitworld.com
Revision as of 07:23, 17 March 2022 by Grimes (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Singleton: coalition Added with: 1.2.0
Description: The coalition singleton contains functions that gets information on the all of the units within the mission. It also has two of the most powerful functions that are capable of spawning groups and static objects into the mission.
Functions: addGroup, addStaticObject, getGroups, getStaticObjects, getAirbases. getPlayers, getServiceProviders, addRefPoint, getRefPoints, getMainRefPoint, getCountryCoalition
Enumerators and Other Data: Side enumerator defines the teams present in the sim.
coalition.side = {
   NEUTRAL = 0
   RED = 1
   BLUE = 2
}

Service enumerator defines the types of services available via radio communications that are coalition wide.

coalition.service = {
  ATC = 0
  AWACS = 1
  TANKER = 2
  FAC = 3
}
Notes: While not found within the coalition.side table there is a value of -1 used to represent "all" that is present in some scripting functionality. The best example is found within markupToAll.