Jun Xiao 3 Posted September 12, 2018 HI. I had an idea , for the AI to disassemble the static weapon ,then carry a backpack. I searched for a long time, but there was no answer. How to let AI remove static weapons and carry backpack. Scripts or code are fine thanks. 1 Share this post Link to post Share on other sites
SpaceHippo 26 Posted September 13, 2018 Used the BI function BIS_fnc_packStaticWeapon. This code will tell two units two disassemble and pick up a mortar but only works under specific conditions: You must have a Mortar Asst. unit in your group (Preferably the unit, "B_support_AMort_F," from what I've tested). You must also have a Mortar Gunner unit in your group (Preferably the unit, "B_support_Mort_F," from what I've tested). The two units must be in your group. [ (group player), (nearestObject [player, "staticWeapon"]), (leader group player) ] call BIS_fnc_packStaticWeapon; If anyone on the forums wants to change the code and make it less restricted that would be kind of you. 1 Share this post Link to post Share on other sites
Jun Xiao 3 Posted September 13, 2018 5 hours ago, SpaceHippo said: Used the BI function BIS_fnc_packStaticWeapon. This code will tell two units two disassemble and pick up a mortar but only works under specific conditions: You must have a Mortar Asst. unit in your group (Preferably the unit, "B_support_AMort_F," from what I've tested). You must also have a Mortar Gunner unit in your group (Preferably the unit, "B_support_Mort_F," from what I've tested). The two units must be in your group. [ (group player), (nearestObject [player, "staticWeapon"]), (leader group player) ] call BIS_fnc_packStaticWeapon; If anyone on the forums wants to change the code and make it less restricted that would be kind of you. spacehippo First thank you for your help. This problem has been bothering me for a long time. I don't know much about scripting. These can be used to assemble static weapons. mortar_gunner addEventHandler ["WeaponAssembled", { _this select 0 action ["GetInGunner", _this select 1]; }]; _base = unitBackpack mortar_assistant_gunner; mortar_assistant_gunner action ["PutBag"]; mortar_gunner action ["Assemble", _base]; If the player is not in the group.How does AI disarm static weapons? Share this post Link to post Share on other sites
cb65 85 Posted September 13, 2018 8 hours ago, Jun Xiao said: HI. I had an idea , for the AI to disassemble the static weapon ,then carry a backpack. I searched for a long time, but there was no answer. How to let AI remove static weapons and carry backpack. Scripts or code are fine thanks. Have a look at this script. https://forums.bohemia.net/forums/topic/206426-arma-3-script-handleautodeploy/ Cheers. 1 Share this post Link to post Share on other sites
Jun Xiao 3 Posted September 13, 2018 10 hours ago, cb65 said: Have a look at this script. https://forums.bohemia.net/forums/topic/206426-arma-3-script-handleautodeploy/ Cheers. cb65 Thank you. It's Great. This script is very professional. It would be nice to use this script to trigger other static weapons.I'll try to use RHS static weapons. Unfortunately, it's too hard for me. Share this post Link to post Share on other sites