Search the Community
Showing results for tags 'predefined loadouts'.
Found 1 result
-
Trying to use addaction to give loudouts to players.
Conmanxful posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
So i'm trying to make a script where a Crate is empty but has the "AddAction" command to give certain loadouts. However i'm trying to do it the easy way by exporting the loadouts from VA and just have the player call the whole script to give them the new gear... In the init line of the crate i put this addaction ["Give Rifleman Loadout", "Rifleman.sqf"]; Then for the rifleman.sqf script i pasted the exported arsenal loadout into there hoping it would work and added in a (_this =_this = ["give rifleman loadout", [_this] select 1];) to target the caller for the script to execute on. for reference _this = ["give rifleman loadout", [_this] select 1]; removeAllWeapons this; removeAllItems this; removeAllAssignedItems this; removeUniform this; removeVest this; removeBackpack this; removeHeadgear this; removeGoggles this; comment "Add containers"; this forceAddUniform "rhs_uniform_FROG01_wd"; for "_i" from 1 to 10 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_EarPlugs"; for "_i" from 1 to 10 do {this addItemToUniform "ACE_morphine";}; this addItemToUniform "ACE_MapTools"; this addItemToUniform "ACE_microDAGR"; this addItemToUniform "ACE_Flashlight_XL50"; this addItemToUniform "rhs_mag_m18_purple"; this addVest "rhsusf_spc_teamleader"; for "_i" from 1 to 6 do {this addItemToVest "rhs_mag_30Rnd_556x45_M855A1_Stanag_No_Tracer";}; for "_i" from 1 to 6 do {this addItemToVest "rhs_mag_M433_HEDP";}; for "_i" from 1 to 2 do {this addItemToVest "rhs_mag_an_m8hc";}; for "_i" from 1 to 2 do {this addItemToVest "rhs_mag_m67";}; this addItemToVest "rhs_mag_mk84"; this addItemToVest "rhs_mag_mk3a2"; for "_i" from 1 to 3 do {this addItemToVest "rhsusf_mag_17Rnd_9x19_FMJ";}; this addBackpack "rhsusf_falconii"; this addItemToBackpack "rhsusf_acc_nt4_black"; this addItemToBackpack "rhsusf_acc_anpeq15_bk"; this addItemToBackpack "acc_flashlight_pistol"; this addItemToBackpack "rhsusf_ANPVS_15"; this addItemToBackpack "rhsusf_acc_omega9k"; for "_i" from 1 to 4 do {this addItemToBackpack "rhs_mag_30Rnd_556x45_M855A1_Stanag_No_Tracer";}; for "_i" from 1 to 3 do {this addItemToBackpack "rhs_mag_M585_white";}; for "_i" from 1 to 3 do {this addItemToBackpack "rhs_mag_m715_Green";}; for "_i" from 1 to 3 do {this addItemToBackpack "rhs_mag_m713_Red";}; for "_i" from 1 to 3 do {this addItemToBackpack "rhs_mag_m714_White";}; this addItemToBackpack "Laserbatteries"; this addHeadgear "rhsusf_lwh_helmet_marpatwd"; this addGoggles "rhsusf_oakley_goggles_blk"; comment "Add weapons"; this addWeapon "rhs_weap_mk18_m320"; this addPrimaryWeaponItem "rhsusf_acc_ACOG_RMR"; this addWeapon "rhsusf_weap_glock17g4"; this addWeapon "Laserdesignator"; comment "Add items"; this linkItem "ItemMap"; this linkItem "ItemCompass"; this linkItem "ACE_Altimeter"; this linkItem "ItemRadio"; this linkItem "ItemGPS"; Thats the whole Rifleman.sqf Script and it says that "this" is an undefined variable... Please note i'm not well versed in scripting, hell i'm starting out mostly, so i don't even know what i'm doing wrong.