05hunterd 0 Posted June 7, 2010 Hi all! I'm making a mission atm [obviously] and wanted to use the wizard from ArmAEdit to replace my units' gear. This is what it spat out: ; **************************************************************** ; Custom unit script for Operation Flashpoint ; Created with ArmA Edit - Version 1.3.4000 ; HELP: Run this script from the INITIALIZATION box of the unit. ; CODE: [this] exec "UNIT_142.sqs" ; **************************************************************** ; Get the unit parameter given _unit = _this select 0 ; Strip the units current gear removeAllWeapons _unit ; Add the new gear to the unit _unit addMagazine "30Rnd_556x45_G36SD" _unit addMagazine "30Rnd_556x45_G36SD" _unit addMagazine "30Rnd_556x45_G36SD" _unit addMagazine "30Rnd_556x45_G36SD" _unit addMagazine "30Rnd_556x45_G36SD" _unit addMagazine "30Rnd_556x45_G36SD" _unit addWeapon "G36_C_SD_eotech" _unit selectWeapon "G36_C_SD_eotech" _unit addMagazine "15Rnd_9x19_M9SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addMagazine "15Rnd_9x19_M9SD" _unit addWeapon "M9SD" _unit addWeapon "Binocular" _unit addWeapon "NVGoggles" _unit addWeapon "ACE_Keycuffs" _unit addWeapon "ACE_M7A3" _unit addWeapon "ACE_M84" _unit addWeapon "ACE_Earplugs" _unit addWeapon "ACE_GlassesGasMask_US" Exit I can't see anything wrong with this myself...but I get '[#] _unit addWeapon "ACE_GlassesGasMask_US"' Error Undefined variable in expression: _unit ...any suggestions..? :confused: Share this post Link to post Share on other sites
Big Dawg KS 5 Posted June 7, 2010 Well, that wizzard was written for OFP, and so it's spitting out code in SQS format. Let's make it more up-to-date. ; Get the unit parameter given _unit = _this; ; Strip the units current gear removeAllWeapons _unit; ; Add the new gear to the unit _unit addMagazine "30Rnd_556x45_G36SD"; _unit addMagazine "30Rnd_556x45_G36SD"; _unit addMagazine "30Rnd_556x45_G36SD"; _unit addMagazine "30Rnd_556x45_G36SD"; _unit addMagazine "30Rnd_556x45_G36SD"; _unit addMagazine "30Rnd_556x45_G36SD"; _unit addWeapon "G36_C_SD_eotech"; _unit selectWeapon "G36_C_SD_eotech"; _unit addMagazine "15Rnd_9x19_M9SD"; _unit addMagazine "15Rnd_9x19_M9SD"; _unit addMagazine "15Rnd_9x19_M9SD"; _unit addWeapon "M9SD"; _unit addWeapon "Binocular"; _unit addWeapon "NVGoggles"; _unit addWeapon "ACE_Keycuffs"; _unit addWeapon "ACE_M7A3"; _unit addWeapon "ACE_M84"; _unit addWeapon "ACE_Earplugs"; _unit addWeapon "ACE_GlassesGasMask_US"; Change the file extension to .sqf, and call it like so: rearm = this execVM "<filename>.sqf" Share this post Link to post Share on other sites
05hunterd 0 Posted June 7, 2010 :D Superb! Cheers Big Dawg! I considered .sqf format and tried it...but didn't make any adjustments regarding the script itself etc. I've replaced the OFP stuff with ArmA 2 so I can keep the ArmA settings too and use it for both... TYVM again :bigsmile: Share this post Link to post Share on other sites