faction: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Does not work for groups http://dev-heaven.net/issues/show/5414)
m (Text replacement - "\{\{Feature *\| *Informative *\| ([^↵]+) *\}\}" to "{{Feature|informative|$1}}")
 
(58 intermediate revisions by 13 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma2 |= Game name
|game1= arma2
|version1= 1.00


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


| Gets unit faction. Standard factions in Arma 2 are: "USMC", "INS", "CDF", "RU", "CIV", "GUE", "CIV_RU". Factions are defined under cfgFactionClasses. If faction is not defined, returns empty string. |= Description
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| String <nowiki>=</nowiki> '''faction''' unitName |= Syntax
|game4= arma3
|version4= 0.50


|p1= unitName: [[Object]] |= Parameter 1
|arg= global


| [[String]]. See above. |= Return value
|gr1= Object Manipulation
____________________________________________________________________________________________
 
|x1= <pre>_faction = faction _object;</pre> |= Example 1
____________________________________________________________________________________________


| |= See also
|gr2= Sides


}}
|descr= Gets unit faction. Factions were introduced in {{arma2}} and are defined under ''CfgFactionClasses''.
 
{{{!}} class="wikitable" style{{=}}"font-size: 0.9em; white-space: nowrap"
! Side
! {{GVI|arma2|1.00}}
! {{GVI|arma2oa|1.50}}
! {{GVI|arma3|1.96}}
 
{{!}}-
{{!}} style="text-align: center" {{!}} [[west]]/[[blufor]]
 
{{!}} <!-- Arma 2 -->
* USMC
* CDF
 
{{!}} <!-- Arma 2 OA -->
* BIS_US
* BIS_CZ
* BIS_GER
* BIS_BAF (BAF DLC)
 
{{!}} <!-- Arma 3 -->
* 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)
 
{{!}}-
{{!}} style{{=}}"text-align: center" {{!}} [[east]]/[[opfor]]
 
{{!}} <!-- Arma 2 -->
* INS (ChDKZ)
* RU (Russia)
 
{{!}} <!-- Arma 2 OA -->
* BIS_TK (Takistan army)
* BIS_TK_INS (TK insurgents)
 
{{!}} <!-- Arma 3 -->
* OPF_F (Iranian CSAT)
* OPF_G_F (FIA)
* OPF_T_F (Chinese CSAT, Apex Expansion)
* OPF_R_F (Spetznatz, Contact Expansion)
 
{{!}}-
{{!}} style="text-align: center" {{!}} [[resistance]]/<br>[[independent]]
 
{{!}} <!-- Arma 2 -->
* GUE (Guerilla)
 
{{!}} <!-- Arma 2 OA -->
* BIS_TK_GUE
* BIS_UN (United Nations)
* PMC_BAF (PMC DLC)
 
{{!}} <!-- Arma 3 -->
* 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)
 
{{!}}-
{{!}} style="text-align: center" {{!}} [[civilian]]
 
{{!}} <!-- Arma 2 -->
* CIV
* CIV_RU
 
{{!}} <!-- Arma 2 OA -->
* BIS_TK_CIV
* BIS_CIV_special
 
{{!}} <!-- Arma 3 -->
* CIV_F
* 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]]
 
|r1= [[String]]


<h3 style="display:none">Notes</h3>
|x1= <sqf>private _playerFaction = faction player;</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- 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|{{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'.
}}

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