faction: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " |r1=[[" to " |r1= [[")
m (Text replacement - "\{\{Feature *\| *Informative *\| ([^↵]+) *\}\}" to "{{Feature|informative|$1}}")
 
(2 intermediate revisions by the same user not shown)
Line 99: Line 99:
{{!}}}
{{!}}}


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


|s1= [[faction]] unitName
|s1= [[faction]] unitName
Line 107: Line 107:
|r1= [[String]]
|r1= [[String]]


|x1= <code>[[private]] _playerFaction = [[faction]] [[player]];</code>
|x1= <sqf>private _playerFaction = faction player;</sqf>


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


<dl class="command_description">
{{Note
 
|user= TankBuster
<dt><dt>
|timestamp= 20100319165600
<dd class="notedate">
|text= 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'.
<dt class="note">[[User:Tankbuster|Tankbuster]]</dt>
}}
<dd class="note">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'.</dd>
 
</dl>

Latest revision as of 18:11, 15 March 2024

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.png1.00 A2 OA Logo.png1.50 Arma 3 logo black.png1.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:
side Side

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
TankBuster - c
Posted on Mar 19, 2010 - 16:56 (UTC)
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'.