Difference between revisions of "DCS func getCoalition"

From DCS World Wiki - Hoggitworld.com
m (1 revision imported)
 
Line 23: Line 23:
 
  1 = red
 
  1 = red
 
  2 = blue
 
  2 = blue
 +
 +
Airbase objects can return 3 if the base has red and blue coalition units within the capture perimeter.
  
 
|reqType1= Class
 
|reqType1= Class

Revision as of 00:58, 5 June 2021

Scripting Root

Envrioment: Mission Scripting
Function: getCoalition Added with: 1.2.0
Member Of: Object, Group, Coalition Object
Syntax: enum coalition.side Object.getCoalition(Class Self )
Description: Returns an enumerator that defines the coalition that an object currently belongs to.

Function also works with Unit, Static Object, Airbase, Weapon


Return Value: enum coalition.side
Return Example: Sides are as follows
0 = neutral
1 = red
2 = blue

Airbase objects can return 3 if the base has red and blue coalition units within the capture perimeter.

Examples:
Related Functions: Object Class Functions: isExist, destroy, getCategory, getTypeName, getDesc, hasAttribute, getName, getPoint, getPosition, getVelocity, inAir

Coalition Object Class Functions: getCoalition, getCountry

Group Class Functions: isExist, activate, destroy, getCategory, getCoalition, getName, getID, getUnit, getUnits, getSize, getInitialSize, getController, enableEmission

Notes: