Lineman 3 Posted August 21, 2018 For example: AI has sawn-off shotgun in backpack. What would I place in a trigger's On Activation to equip the shotgun? Share this post Link to post Share on other sites
Mr H. 402 Posted August 21, 2018 something like this maybe (untested): if ( "BAF_L85A2_RIS_SUSAT" in backpackItems Your_AI)then { Your_AI addMagazine "30Rnd_556x45_Stanag"; Your_AI addWeapon "BAF_L85A2_RIS_SUSAT"; Your_AI removeItemFromBackpack "BAF_L85A2_RIS_SUSAT"; }; change classes names as needed 2 1 Share this post Link to post Share on other sites
Grumpy Old Man 3550 Posted August 21, 2018 4 hours ago, Mr H. said: something like this maybe (untested): if ( "BAF_L85A2_RIS_SUSAT" in backpackItems Your_AI)then { Your_AI addMagazine "30Rnd_556x45_Stanag"; Your_AI addWeapon "BAF_L85A2_RIS_SUSAT"; Your_AI removeItemFromBackpack "BAF_L85A2_RIS_SUSAT"; }; change classes names as needed Another solution would be this: _AI action ["TakeWeapon",backpackContainer _AI,"hgun_P07_F"]; If the AI has a P07 in the backpack he will first play some default "take" action and then equip the pistol, if currently no other gun has been equipped. Cheers 3 Share this post Link to post Share on other sites
Mr H. 402 Posted August 21, 2018 yep @Grumpy Old Man's solution is actually way better than mine ^^ use his solution instead 1 Share this post Link to post Share on other sites
Lineman 3 Posted August 24, 2018 On 21/08/2018 at 10:06 AM, Mr H. said: something like this maybe (untested): if ( "BAF_L85A2_RIS_SUSAT" in backpackItems Your_AI)then { Your_AI addMagazine "30Rnd_556x45_Stanag"; Your_AI addWeapon "BAF_L85A2_RIS_SUSAT"; Your_AI removeItemFromBackpack "BAF_L85A2_RIS_SUSAT"; }; change classes names as needed On 21/08/2018 at 3:12 PM, Grumpy Old Man said: Another solution would be this: _AI action ["TakeWeapon",backpackContainer _AI,"hgun_P07_F"]; If the AI has a P07 in the backpack he will first play some default "take" action and then equip the pistol, if currently no other gun has been equipped. Cheers Thank you both! Share this post Link to post Share on other sites