Search the Community
Showing results for tags 'removemagazine'.
Found 1 result
-
[SOLVED] Remove all magazines and items from soldiers upon getting killed
Asmodeuz posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
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- 3 replies
-
- entitykilled
- addmissioneventhandler
-
(and 3 more)
Tagged with: