Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Removing weapons after death  (Read 2897 times)

0 Members and 1 Guest are viewing this topic.

Offline SaS TrooP

  • Members
  • *
  • n00b always & everywhere
Removing weapons after death
« 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?

Offline Rellikki

  • Members
  • *
  • Die-hard OFP player
Re: Removing weapons after death
« Reply #1 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.