faction: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Comments" to "|Comments=")
m (Some wiki formatting)
 
(38 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma2 |= Game name
|game1= arma2
|arg= global|Multiplayer Arguments=
|version1= 1.00


|1.00|= Game version
|game2= arma2oa
____________________________________________________________________________________________
|version2= 1.50


| Gets unit faction. Factions are defined under ''CfgFactionClasses''. If the given faction is not defined, the command returns empty string. Standard Factions include:<br>
|game3= tkoh
|version3= 1.00


{{GVI|arma2|1.00}} '''Arma 2'''
|game4= arma3
* West: "USMC", "CDF"
|version4= 0.50
* East: "RU", "INS"
* Guer: "GUE"
* Civ: "CIV", "CIV_RU"


{{GVI|arma2oa|1.62}} '''Arma 2 - Operation Arrowhead'''
|arg= global
* West: "BIS_US", "BIS_CZ", "BIS_GER"
* East: "BIS_TK", "BIS_TK_INS"
* Guer: "BIS_TK_GUE", "BIS_UN"
* Civ: "BIS_TK_CIV", "BIS_CIV_special"


'''British Armed Forces DLC'''
|gr1= Object Manipulation
* West: "BIS_BAF"


'''Private Military Company DLC'''
|gr2= Sides
* Guer: "PMC_BAF"


{{GVI|arma3|1.00}} '''Arma 3'''
|descr= Gets unit faction. Factions were introduced in {{arma2}} and are defined under ''CfgFactionClasses''.
* West: "BLU_F" (NATO), "BLU_G_F" (FIA)
* East: "OPF_F" (CSAT), "OPF_G_F" (FIA)
* Guer: "IND_F" (AAF), "IND_G_F" (FIA)
* Civ: "CIV_F" (Civilians)


'''Arma 3 - APEX'''
{{{!}} class="wikitable align-center-col-1 valign-top-col-2 valign-top-col-3 valign-top-col-4" style{{=}}"font-size: 0.9em; white-space: nowrap"
* West: "BLU_T_F" (Pacific NATO), "BLU_CTRG_F" (Pacific CTRG), "BLU_GEN_F" (Gendarmerie)
! Side
* East: "OPF_T_F"
! {{GVI|arma2|1.00}}
* Guer: "IND_C_F" (Syndikat)
! {{GVI|arma2oa|1.50}}
! {{GVI|arma3|1.96}}


{{GVI|arma3|1.76}} '''Arma 3 - Laws of War DLC'''
{{!}}-
* "CIV_IDAP_F"
{{!}} [[west]]/[[blufor]]


|DESCRIPTION=
{{!}} <!-- Arma 2 -->
____________________________________________________________________________________________
* {{hl|USMC}}
* {{hl|CDF}}


| '''faction''' unitName |SYNTAX=
{{!}} <!-- Arma 2 OA -->
* {{hl|BIS_US}}
* {{hl|BIS_CZ}}
* {{hl|BIS_GER}}
* {{hl|BIS_BAF}} (BAF DLC)


|p1= unitName: [[Object]] |PARAMETER1=
{{!}} <!-- Arma 3 -->
* {{hl|BLU_F}} (NATO)
* {{hl|BLU_G_F}} (FIA)
* {{hl|BLU_T_F}} (Pacific NATO, Apex Expansion)
* {{hl|BLU_CTRG_F}} (Pacific CTRG, Apex Expansion)
* {{hl|BLU_GEN_F}} (Gendarmerie, Apex Expansion)
* {{hl|BLU_W_F}} (Woodland NATO, Contact Expansion)


| [[String]] |RETURNVALUE=
{{!}}-
____________________________________________________________________________________________
{{!}} [[east]]/[[opfor]]
 
|x1= <code>_playersFaction = [[faction]] [[player]];</code> |EXAMPLE1=
____________________________________________________________________________________________


| [[side]], [[Side]] |SEEALSO=
{{!}} <!-- Arma 2 -->
* {{hl|INS}} (ChDKZ)
* {{hl|RU}} (Russia)


}}
{{!}} <!-- Arma 2 OA -->
* {{hl|BIS_TK}} (Takistan army)
* {{hl|BIS_TK_INS}} (TK insurgents)
 
{{!}} <!-- Arma 3 -->
* {{hl|OPF_F}} (Iranian CSAT)
* {{hl|OPF_G_F}} (FIA)
* {{hl|OPF_T_F}} (Chinese CSAT, Apex Expansion)
* {{hl|OPF_R_F}} (Spetznatz, Contact Expansion)
 
{{!}}-
{{!}} [[resistance]]/<br>[[independent]]
 
{{!}} <!-- Arma 2 -->
* {{hl|GUE}} (Guerilla)
 
{{!}} <!-- Arma 2 OA -->
* {{hl|BIS_TK_GUE}}
* {{hl|BIS_UN}} (United Nations)
* {{hl|PMC_BAF}} (PMC DLC)
 
{{!}} <!-- Arma 3 -->
* {{hl|IND_F}} (AAF)
* {{hl|IND_G_F}} (FIA)
* {{hl|IND_C_F}} (Syndikat, Apex Expansion)
* {{hl|IND_E_F}} (LDF, Contact Expansion)
* {{hl|IND_L_F}} (Looters, Contact Expansion)
 
{{!}}-
{{!}} [[civilian]]
 
{{!}} <!-- Arma 2 -->
* {{hl|CIV}}
* {{hl|CIV_RU}}
 
{{!}} <!-- Arma 2 OA -->
* {{hl|BIS_TK_CIV}}
* {{hl|BIS_CIV_special}}
 
{{!}} <!-- Arma 3 -->
* {{hl|CIV_F}}
* {{hl|CIV_IDAP_F}} (Laws of War DLC)
{{!}}}
 
{{Feature|informative|If a unit's faction is not defined in its config, an empty string is returned.}}
 
|s1= [[faction]] unitName
 
|p1= unitName: [[Object]]


<h3 style="display:none">Notes</h3>
|r1= [[String]]
<dl class="command_description">
<!-- Note Section BEGIN -->


<dd class="notedate">
|x1= <sqf>private _playerFaction = faction player;</sqf>
<dt class="note">[[User:Tankbuster|Tankbuster]]
<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'.


<!-- Note Section END -->
|seealso= [[side]] [[Side]]
</dl>
}}


<h3 style="display:none">Bottom Section</h3>
{{Note
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
|user= Tankbuster
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
|timestamp= 20100319165600
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
|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'.
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 09:05, 10 February 2025

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'.