Skip to content

Color Teams

shadow-fa edited this page Jan 28, 2018 · 6 revisions
File location f\setTeamColours\f_setTeamColours.sqf
Enabled by default? Yes
Enable/Disable in init.sqf
Runs on Client

The Color Team Component automatically assigns individual units in a fireteam to color teams based on unit variable names. By default, this splits fireteams into two color teams: a cover-focused Blue team consisting of the fireteam leader and autoriflemen, and an assault-focused Red team consisting of the AT man and riflemen.

Changing Unit Color Teams

Color teams can also be changed by editing the following lines:

// Set suffixes for each color
private _white = [];
private _red = ["_AT","_R1","_R2"];
private _blue = ["_AR1","_AR2","_FTL"];
private _yellow = [];
private _green = [];

Units containing any of the strings in each array will be assigned to that color team. For example, if _red = ["redteam"], a unit named "a_redteam_member" will automatically be assigned to the red color team if he is in a fireteam with a fireteam leader.

Changing Fireteam Leaders

The component will only run on fireteams with a fireteam leader, as identified by unit variables. By default, the variable name format for fireteam leaders is "Unit<SIDENAME>_<GROUPNAME>_FTL" (eg. "UnitNATO_A1_FTL"). This can be changed by changing the following line in f_setTeamColours.sqf:

private _leaders = ["_FTL"];

Any unit containing any of the _leaders strings will be identified as a fireteam leader.

Disabling Component

This component can be disabled by commenting out the following line in init.sqf:

f_script_setTeamColours = [] execVM "f\setTeamColours\f_setTeamColours.sqf";

Clone this wiki locally