Home   Help Search Login Register  

Author Topic: Remove All Weapons from a Group  (Read 1287 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!  :)