Difference between revisions of "DCS func getCoalition"

From DCS World Wiki - Hoggitworld.com
 
Line 3: Line 3:
 
|fName= getCoalition
 
|fName= getCoalition
  
|vNum= 1.2.0
+
|vNum= 1.2.4
  
 
|par1= [[DCS_Class_Object|Object]]
 
|par1= [[DCS_Class_Object|Object]]
Line 47: Line 47:
 
}}
 
}}
 
[[Category:Class Functions|getCoalition]]
 
[[Category:Class Functions|getCoalition]]
 +
[[Category:Game Patch 1.2.4|getCoalition]]

Latest revision as of 23:59, 20 March 2022

Scripting Root

Envrioment: Mission Scripting
Function: getCoalition Added with: 1.2.4
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: