Asmodeuz 54 Posted July 29, 2018 Hello, I thought the following script would remove all magazines from a soldier (be it a dynamically spawned AI or human player) upon getting killed but for reasons unknown to me nothing gets removed ever: _removeMagazinesFromAnyone = addMissionEventHandler ["EntityKilled", { params["_killed","_killer","_instigator"]; if (_killed isKindOf "CAManBase") then { (_this select 0) spawn { sleep 1; {_this removeMagazine _x} forEach magazines _this; }; }; }]; When testing the script with a mission on a dedicated server there's no script errors. What gives in this case? All in all I'm looking for a script that would remove everything* else from killed units except the containers (vest, backpack, uniform) they use to carry stuff. *though not necessarily main weapon since there's another script that makes picking one up not possible Edit: Solved by using in this case removeMagazineGlobal instead of just removeMagazine Share this post Link to post Share on other sites
gc8 971 Posted July 29, 2018 try removeMagazineGlobal 1 Share this post Link to post Share on other sites
Asmodeuz 54 Posted July 29, 2018 9 minutes ago, gc8 said: try removeMagazineGlobal That was it then, removeMagazineGlobal.. damned that I at in no point happened to stumble on that before coming here to ask Any way, cheers gc8 for coming and sharing this quick fix! 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted July 30, 2018 10 hours ago, Asmodeuz said: All in all I'm looking for a script that would remove everything* else from killed units except the containers (vest, backpack, uniform) they use to carry stuff. Hello there Asmodeuz ! Check this: Share this post Link to post Share on other sites