saddle 19 Posted February 25, 2022 Hello everyone, and thank you for taking the time. As the title suggests this is what I am trying to work out and I have been trying to learn and figure this out on my own for almost two weeks now. I have done many different tests and workarounds but not managed to solve it; What I am trying to create is a script that when any and all AI is killed, pre-placed or spawned, all numbers of a specific inventory item .. in this case first aid kits are removed. I don't want any of the enemies to have any first aid kits at all. In my case as a Zeus, I want to manage the number of first aid kits given to players on my own and that they will not loot them on bodies for themselves. - removeItem command solves the issue, but it also removes many other items. - removeItem(s) has not worked out during my testing either. - removeAssignedItems is not what I am looking for either. Some different attempts so far which has not worked: { if (!isPlayer _x) then { _x removeItems "vn_o_item_firstaid_01"; _x removeItems "vn_b_item_firstaid_01"; _x removeItems "vn_o_item_firstaidkit"; _x removeItems "vn_b_item_firstaidkit"; _x removeItems "Item_FirstAidKit"; }; } foreach (allUnits); if (faction _killed == "O_PAVN") then { removeItems "vn_o_item_firstaid_01" _killed; removeItems "vn_b_item_firstaid_01" _killed; removeItems "vn_o_item_firstaidkit" _killed; removeItems "vn_b_item_firstaidkit" _killed; removeItems "Item_FirstAidKit" _killed; deleteVehicle (nearestObject [_killed, "WeaponHolderSimulated"]); }; Any feedback is appreciated! Share this post Link to post Share on other sites
Joe98 91 Posted February 26, 2022 How about: Place man A1 on the map with the exact load out Place man A2 on the map with the exact load out (except for a first aid kit) trigger: If man A1 is killed, man A2 is transported to required location. . Share this post Link to post Share on other sites
saddle 19 Posted February 26, 2022 1 hour ago, Joe98 said: How about: Place man A1 on the map with the exact load out Place man A2 on the map with the exact load out (except for a first aid kit) trigger: If man A1 is killed, man A2 is transported to required location. . Optimally I would want a script to deal with it as I am busy a great deal as a Zeus. I would also want to be able to spawn units on the get-go and with lots of different types of gear. Share this post Link to post Share on other sites
pierremgi 4850 Posted February 26, 2022 Try: {_unit = _x; {_unit removeItems _x} forEach ["vn_b_item_firstaidkit","vn_o_item_firstaidkit","FirstAidKit","Medikit","vn_b_item_medikit_01"]} forEach (allUnits select {!isPlayer _x}) Share this post Link to post Share on other sites
saddle 19 Posted February 26, 2022 4 hours ago, pierremgi said: Try: {_unit = _x; {_unit removeItems _x} forEach ["vn_b_item_firstaidkit","vn_o_item_firstaidkit","FirstAidKit","Medikit","vn_b_item_medikit_01"]} forEach (allUnits select {!isPlayer _x}) Cheers pierremgi, It makes no difference so far. All medical items in the inventory of AI are there as normal. Share this post Link to post Share on other sites
pierremgi 4850 Posted February 26, 2022 3 hours ago, saddle said: Cheers pierremgi, It makes no difference so far. All medical items in the inventory of AI are there as normal. That works for me. I tested before posted. Are you sure you tested my code? In which context (DLCs, mods, script, trigger...)? What a watch line (console) returns if you point at a unit testing : items cursorObject arrayIntersect items cursorObject ? Share this post Link to post Share on other sites
saddle 19 Posted February 26, 2022 2 hours ago, pierremgi said: That works for me. I tested before posted. Are you sure you tested my code? In which context (DLCs, mods, script, trigger...)? What a watch line (console) returns if you point at a unit testing : items cursorObject arrayIntersect items cursorObject ? I did test the code, but now I am starting to think that I have been testing it wrong .. I do want it in a script, as in an sql file. This is how I test it? Running the Prairie Fire DLC, but I assume that is no issue since the classnames are already set to the DLC first aid kits and not the standard Share this post Link to post Share on other sites
saddle 19 Posted February 27, 2022 I have not managed to work it out Share this post Link to post Share on other sites