mjr.hassle 13 Posted March 20, 2013 Hi. So I'm working on a basic AI recruitment script, and I'd like to be able to create a unit with a silenced weapon. I've used an add action to call the following: "B_Soldier_F" createUnit [getMarkerPos "recruit", group player] That bit works fine, but I don't know how to include the 'addPrimaryWeaponItem' to add the silencer to the rifle. I'm pretty sure the entire syntax needs to change, but honestly..I'm clueless. :) Any help/ideas would be greatly appreciated. I'm kinda hoping I've completely missed a silenced soldier class somewhere. Whilst that would be embarrassing, it would be convenient. ;) Share this post Link to post Share on other sites
tryteyker 28 Posted March 20, 2013 _cnt = createCenter WEST; // Use if you don't have any other BLUFOR units spawned. _grp = createGroup WEST; // This will be needed for later on in the createUnit command. _soldier = _grp createUnit ["B_Soldier_F",(getmarkerpos "recruit"),[],0,"NONE"]; // Using createUnit array is almost always a better option. Don't forget to assign a variable to the whole thing (_soldier in this case). _soldier addPrimaryWeaponItem "SilencerClassName"; // Edit the string accordingly, dunno the classname for the silencer. _soldier will be the leader of _grp. If you want the soldier to join the players group instead, remove _cnt, _grp and replace _grp in the createUnit line with the following: (group player) Share this post Link to post Share on other sites
XSOF - Toxx 10 Posted March 20, 2013 See http://browser.six-projects.net/cfg_weapons/classlist?version=67 for classnames Sound Suppressor (7.62 mm): muzzle_snds_B Sound Suppressor (6.5 mm NATO): muzzle_snds_H Sound Suppressor LMG (6.5 mm): muzzle_snds_H_MG Sound Suppressor (9 mm): muzzle_snds_L Share this post Link to post Share on other sites
mjr.hassle 13 Posted March 20, 2013 Thank you both very much! Works perfectly. :) Share this post Link to post Share on other sites