BIS fnc getFactions: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " +" to " ")
m (Text replacement - " +" to " ")
Line 44: Line 44:
|seealso= [[faction]], [[side]]
|seealso= [[faction]], [[side]]
}}
}}


[[Category:{{Name|arma2}}: Functions|{{uc:getFactions}}]]
[[Category:{{Name|arma2}}: Functions|{{uc:getFactions}}]]

Revision as of 23:56, 10 June 2021

Hover & click on the images for description

Description

Description:
Description needed
Execution:
call
Groups:
Sides

Syntax

Syntax:
Syntax needed
Parameters:
parameter:
  • Nothing or empty Array - returns all factions
  • Object - returns index of the object side
  • Array - side of the first element is returned, others are ignored
 
Return Value:
Return value needed

Examples

Example 1:
call BIS_fnc_getFactions; // returns all factions
Example 2:
[] call BIS_fnc_getFactions; // same as Example 1
Example 3:
[player] call BIS_fnc_getFactions; // returns index of player's faction
Example 4:
["BLU_F"] call BIS_fnc_getFactions; // returns index of given faction
Example 5:
[[]] call BIS_fnc_getFactions; // will return all faction sides
Example 6:
[[player]] call BIS_fnc_getFactions; // will return player's side

Additional Information

See also:
factionside

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