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: Remove All Weapons from a Group  (Read 2107 times)

0 Members and 1 Guest are viewing this topic.

Offline CaptainChunk

  • Members
  • *
Remove All Weapons from a Group
« on: 22 Dec 2009, 17:39:46 »
Hello,

Been browsing around on these forums for over a year and have searched extensively for an answer to my question but have not discovered one:

Q. How do I remove all weapons from a group? I've tried removallweaponsthis (that seems to only affect the leader of the group) and various forms of "_x removeallweapons" from each units group this

No luck so far.

I've found plenty of answers for removing the weapons from each individual soldier one at a time but would prefer when I put a group down on the map just to remove their weapons all at once.

Any help would be much appreciated.


Walter_E_Kurtz

  • Guest
Re: Remove All Weapons from a Group
« Reply #1 on: 22 Dec 2009, 18:10:31 »
You were very close. Basically the _x replaces this, as follows

removeAllWeapons this   --->   "removeAllWeapons _x" ...

Thus, your answer is:

"removeAllWeapons _x" forEach units this

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Remove All Weapons from a Group
« Reply #2 on: 22 Dec 2009, 18:11:17 »
Welcome to OFPEC  :good:

You're almost there with the syntax:

Code: [Select]
{removeAllWeapons _x} forEach units group this
in the init line of the group leader - or any unit for that matter.

Once again, welcome!

Offline GW

  • ofp cadet
  • Members
  • *
  • The great Himalaya
Re: Remove All Weapons from a Group
« Reply #3 on: 22 Dec 2009, 18:12:10 »
I also need this question answer.
Be happy.
ofp die-hard fan for whole life

Offline CaptainChunk

  • Members
  • *
Re: Remove All Weapons from a Group
« Reply #4 on: 22 Dec 2009, 19:12:06 »
Thanks guys, worked perfectly!  :)