Difference between revisions of "DCS func setCoalition"

From DCS World Wiki - Hoggitworld.com
(Created page with "{{Template:dcs_funcs |fName= setCoalition |vNum= 2.8.8 |par1= Airbase |par2= |par3= |par4= |desc= Changes the passed airbase object's coalition...")
 
(No difference)

Latest revision as of 17:18, 16 August 2023

Scripting Root

Envrioment: Mission Scripting
Function: setCoalition Added with: 2.8.8
Member Of: Airbase
Syntax: nothing Airbase.setCoalition(Class Self , number coa enum )
Description: Changes the passed airbase object's coalition to the set value. Must be used with Airbase.autoCapture to disable auto capturing of the base, otherwise the base can revert back to a different coalition depending on the situation and built in game capture rules.
coalition.side = {
   NEUTRAL = 0
   RED = 1
   BLUE = 2
}


Return Value: nothing
Return Example:
Examples:
Related Functions: Airbase Functions: getCallsign, getUnit, getID, getCategoryEx, getParking, getRunways, getTechObjectPos, getRadioSilentMode, setRadioSilentMode, autoCapture, autoCaptureIsOn, setCoalition, getWarehouse,
Notes: Can be called on ships, however they will still behave as if the unit belonged to their initial coalition. I didn't test it further than that other than to make sure it didn't crash and to see what happened. -Grimes.