sproyd 2 Posted April 1, 2013 http://community.bistudio.com/wiki/assignItem AssignItem Assigns existing item from inventory (uniform, vest, backpack) to a correct slot. unit assignItem item What's the opposite of this? Its not RemoveItem because that is a create/destroy command - which is the opposite of AddItem. I'm looking for the command that takes something from the assigned slot (i.e. weapon attachments/binocs) and puts them into the players uniform/vest/pack. Share this post Link to post Share on other sites
Krecik1218 1 Posted April 1, 2013 unit unassignItem Itemname example: this unassignItem "ItemCompass"; Share this post Link to post Share on other sites
sproyd 2 Posted April 7, 2013 Okay thanks, this won't work with weapon attachments though... The weapon stays on the gun. Also, when using AssignItem with weapon attachments - the weapon disappears from inventory but does not get attached to the gun even if the slot is empty. Any ideas? Share this post Link to post Share on other sites
taltsinth 1 Posted April 7, 2013 AssignItem is not the right command to use to attach silencers and so forth. Try addprimaryweaponitem to attach such items to weapons. Share this post Link to post Share on other sites
cobra4v320 27 Posted April 7, 2013 http://community.bistudio.com/wiki/removeItemFromPrimaryWeapon Share this post Link to post Share on other sites
sproyd 2 Posted April 7, 2013 @TalTsinth and @cobra4v320 Thanks for your suggestions but they are not right. addprimaryweaponitem and removeprimaryweaponitem are create/destroy commands. I would like the AI to equip weapon attachments and remove them to/from inventory just like AssignItem works in this regard for NVGs. Share this post Link to post Share on other sites
taltsinth 1 Posted April 7, 2013 (edited) @TalTsinth and @cobra4v320Thanks for your suggestions but they are not right. addprimaryweaponitem and removeprimaryweaponitem are create/destroy commands. I would like the AI to equip weapon attachments and remove them to/from inventory just like AssignItem works in this regard for NVGs. Your first post mentioned this was for player's, not AI. If it's AI wise, it's easier to simply do the following using the commands Cobra and I have given. i.e. addprimaryweaponitem & removeItemFromPrimaryWeapon. Player's can also use this method if you truly want to script it however, that is why the inventory system is there. Example: To add the scope on to a weapon this aremoveitem "optic_Arco"; //remove the scope from inventory this addprimaryweaponitem "optic_Arco"; //add the scope to the weapon To remove the scope on the weapon this removeItemFromPrimaryWeapon "optic_Arco";//remove the scope from the weapon this additem "optic_Arco"; //add the scope to the inventory, generally vest is first //(unitBackpack this) additemcargo ["optic_Arco", 1]; //This will place it in the backpack instead You simply can't use AssignItem/unAssignItem the way you want to. Edited April 7, 2013 by TalTsinth Share this post Link to post Share on other sites
sproyd 2 Posted April 7, 2013 Thanks TalTsinth. I guess this is the workaround. I am going to log a bug on tracker as AssignItem works for NVGs and so should work for weaponitems too. I imagine that is the intention but the command just hasn't been updated with the new weapon attachment system. Share this post Link to post Share on other sites