ShackTactical Assign Gear Script
From F2 EN
Contents |
Description
Changing the gear for different unit types within a ShackTac platoon can become very time consuming if using commands entered directly into the INIT field of each unit (in the editor). The ShackTactical Assign Gear Script provides an easy way to quickly and easily assign the correct gear for all the standard roles in a ShackTac platoon (and attachments), from platoon commander to rifleman.
Required files
All the code associated with this component is found in:
- f\common\@ShackTac_assignGear.sqf
How to use
Calling the script
To call the script for a unit you must edit its INIT line in the editor to include the following code:
nul = ["pltco",this] execVM "f\common\@ShackTac_assignGear.sqf";
Note that the precise code will change depending on the type of role you want the unit to play; so in the example above the unit has been defined as a platoon commander, but if you wanted the unit to be a rifleman the code would be:
nul = ["r",this] execVM "f\common\@ShackTac_assignGear.sqf";
For a full set of available roles and corresponding code please see the table below.
Available unit types
By default, the following unit types are available:
| Unit Type | Code |
|---|---|
| Platoon Commander | nul = ["pltco",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Platoon Sgt. | nul = ["pltsgt",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Platoon Medic | nul = ["pltm",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Platoon HQ Rifleman | nul = ["pltr",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Squad Leader | nul = ["sl",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Medic/Corpsman | nul = ["m",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Fireteam Leader | nul = ["ftl",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Automatic Rifleman | nul = ["ar",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Assistant Automatic Rifleman | nul = ["aar",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Rifleman (AT) | nul = ["rat",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Rifleman | nul = ["r",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Medium MG Gunner | nul = ["mmgg",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Medium MG Assistant Gunner | nul = ["mmgag",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Medium MG Ammo Man | nul = ["mmgam",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Medium AT Gunner | nul = ["matg",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Medium AT Assistant Gunner | nul = ["matag",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Medium AT Ammo Man | nul = ["matam",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Heavy AT Gunner | nul = ["hatg",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Heavy AT Assistant Gunner | nul = ["hatag",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Heavy AT Ammo Man | nul = ["hatam",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Sniper | nul = ["sn",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
| Spotter | nul = ["sp",this] execVM "f\common\@ShackTac_assignGear.sqf"; |
Changing faction equipment
The equipment and weapons for each faction are defined in a series of variables contained near the start of the file f\common\@ShackTac_assignGear.sqf. For example, to change the equipment and weapons for USMC units open the file and look for the line:
// EQUIPMENT: USMC
In the block of code beneath simply change the values of variable such as _rifle or _rifleGL. For example, to change the standard rifle from an M16A4 to an AK74, edit the following line:
_rifle = "M16A4";
Change it to:
_rifle = "AK_74";
Changing a unit type loadout
The equipment and weapons for each faction are defined using blocks of code in the file f\common\@ShackTac_assignGear.sqf. For example, to change the equipment and weapons for a sniper open the file and look for the line:
// LOADOUT: SNIPER
In the block of code beneath simply change the variable used with the addweapon and addmagazine commands. For example, to replace a sniper's rifle with the standard rifle for that faction, edit the following lines:
{_unit addmagazine _snmag} foreach [1,2,3,4,5];
_unit addweapon _snrifle;
Change them to:
{_unit addmagazine _riflemag} foreach [1,2,3,4,5,6,7];
_unit addweapon _rifle;
Tips
- All the standard ShackTac platoons (and attachments) pre-placed in the mission.sqm file included in F2 already have the appropriate calls in the INIT lines of every unit.
- By default the script has been edited to provide Western weapons and equipment to USMC units, and Soviet Bloc weapons and equipment to all remaining factions.
How to disable
In the editor, edit each unit's INIT to remove the following code:
nul = ["pltco",this] execVM "f\common\@ShackTac_assignGear.sqf";
Note: The string "pltco" in the example above will change (see table above).
Credits
- kevb0
- Wolf
- Dslyecxi
- Fer
