arma-3-scripts/loadout_to_backpack.sqf
2021-02-03 18:29:26 +00:00

32 lines
1.2 KiB
Plaintext

/* Simple loadout swap by Dagger
TO USE: Simply place the script in the missions root folder, place down a object and add the following line to the init:
this addAction ["Swap to Dive Gear", "loadout_to_backpack.sqf"]
Note: The player will need to use the same backpack to swap back into the loadout gear.
*/
// Save Player Loadout
player setVariable ["Loadout_To_Backpack",getUnitLoadout player];
// Add Action to Drop Backpack and Switch to Normal Loadout
player addAction ["Unload Gear from Backpack", {
player setUnitLoadout (player getVariable ["Loadout_To_Backpack",[]]);
removeAllActions player;
loadout_backpack = "rhsgref_hidf_alicepack" createVehicle position player;
loadout_backpack addAction ["Swap to Dive Gear", "loadout_to_backpack.sqf"];
}];
// Prevents Duplication of players backpack
removeBackpack player;
// Add Alice Pack
player addBackpack "rhsgref_hidf_alicepack";
// Add Dive Gear (You change the vaules below to change what gear it will swap to so like Dive Gear or Halo Jump Gear)
player forceAddUniform "U_B_Wetsuit";
player addVest "V_RebreatherB";
player addGoggles "G_B_Diving";
// Remove Backpack on ground
deleteVehicle objectParent loadout_backpack;