faction: Difference between revisions

From Bohemia Interactive Community
m (Text replacement - "_{10,} " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma2 |Game name=
| arma2


|arg= global |Multiplayer Arguments=
|arg= global


|1.00|Game version=
|1.00


|gr1= Object Manipulation |GROUP1=
|gr1= Object Manipulation


|gr2= Sides |GROUP2=
|gr2= Sides


| Gets unit faction. Factions were introduced in {{arma2}} and are defined under ''CfgFactionClasses''.
| Gets unit faction. Factions were introduced in {{arma2}} and are defined under ''CfgFactionClasses''.
Line 91: Line 91:
{{!}}}
{{!}}}


{{Informative | If a unit's faction is not defined in its config, an empty string is returned.}} |DESCRIPTION=
{{Informative | If a unit's faction is not defined in its config, an empty string is returned.}}


| [[faction]] unitName |SYNTAX=
| [[faction]] unitName


|p1= unitName: [[Object]] |PARAMETER1=
|p1= unitName: [[Object]]


| [[String]] |RETURNVALUE=
| [[String]]
   
   
|x1= <code>[[private]] _playerFaction = [[faction]] [[player]];</code> |EXAMPLE1=
|x1= <code>[[private]] _playerFaction = [[faction]] [[player]];</code>


| [[side]], [[Side]] |SEEALSO=
| [[side]], [[Side]]
}}
}}



Revision as of 00:36, 18 January 2021

Hover & click on the images for description

Description

Description:
Gets unit faction. Factions were introduced in Arma 2 and are defined under CfgFactionClasses.
Side Logo A2.png 1.00 A2 OA Logo.png 1.51 Arma 3 logo black.png 1.96
west/blufor
  • USMC
  • CDF
  • BIS_US
  • BIS_CZ
  • BIS_GER
  • BIS_BAF (BAF DLC)
  • BLU_F (NATO)
  • BLU_G_F (FIA)
  • BLU_T_F (Pacific NATO, Apex Expansion)
  • BLU_CTRG_F (Pacific CTRG, Apex Expansion)
  • BLU_GEN_F (Gendarmerie, Apex Expansion)
  • BLU_W_F (Woodland NATO, Contact Expansion)
east/opfor
  • INS (ChDKZ)
  • RU (Russia)
  • BIS_TK (Takistan army)
  • BIS_TK_INS (TK insurgents)
  • OPF_F (Iranian CSAT)
  • OPF_G_F (FIA)
  • OPF_T_F (Chinese CSAT, Apex Expansion)
  • OPF_R_F (Spetznatz, Contact Expansion)
resistance/
independent
  • GUE (Guerilla)
  • BIS_TK_GUE
  • BIS_UN (United Nations)
  • PMC_BAF (PMC DLC)
  • IND_F (AAF)
  • IND_G_F (FIA)
  • IND_C_F (Syndikat, Apex Expansion)
  • IND_E_F (LDF, Contact Expansion)
  • IND_L_F (Looters, Contact Expansion)
civilian
  • CIV
  • CIV_RU
  • BIS_TK_CIV
  • BIS_CIV_special
  • CIV_F
  • CIV_IDAP_F (Laws of War DLC)
If a unit's faction is not defined in its config, an empty string is returned.
Groups:
Object ManipulationSides

Syntax

Syntax:
faction unitName
Parameters:
unitName: Object
Return Value:
String

Examples

Example 1:
private _playerFaction = faction player;

Additional Information

See also:
sideSide

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note

Notes

Tankbuster
Faction behaves slightly differently to side. Side can refer to the pilot or commander of a vehicle, but faction never changes. It always returns the 'country of manufacture'.

Bottom Section