OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: SaS TrooP on 27 Dec 2009, 16:43:48

Title: Removing weapons after death
Post by: SaS TrooP on 27 Dec 2009, 16:43:48
OK, here's probably last problem I am facing. I want to disarm every AI that got killed to prevent player taking its weapons.  But I really dont know how to make it. Can someone explain me or write such a script?
Title: Re: Removing weapons after death
Post by: Rellikki on 27 Dec 2009, 17:17:24
You can do it with a simple event handler:

Code: [Select]
{_x addEventHandler ["killed", "removeAllWeapons (_this select 0)"]} forEach allUnits;
Type it in a trigger or somewhere and every unit will be then disarmed when killed.