Home   Help Search Login Register  

Author Topic: Check To See If Any Group Memeber Has Weapon  (Read 838 times)

0 Members and 1 Guest are viewing this topic.

Offline sharkyjoe

  • Members
  • *
  • Have you taken a BMP out at 500 meters??
Check To See If Any Group Memeber Has Weapon
« on: 29 Mar 2005, 23:37:27 »
Three West guys and Ammocrate filled with Strela Launchers inside trigger area.I have a trigger that needs to fire when any member in group has a weapon 9k32launcher.
 Right now i have the trig. set to West- Present-Once
Condition: grp1 hasweapon "9k32launcher".
I get an- Error hasweapon:  type group; expect object.
Looked in Comref and said Object or group if ya pass group leader is considered.
Also tried the Group Trigger -Vech, Grp leader, anybody.
this and in this list  hasweapon 9k32launcher --in Condition Line.
Ran out of ideas
Remember the 7 Ps??--- Proper Previous Planning Prevents Pathetically Poor Performance

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:Check To See If Any Group Memeber Has Weapon
« Reply #1 on: 30 Mar 2005, 00:10:44 »
Try this (I cannot check it as I am at work but I think it will work):

{_x hasweapon "9k32launcher"} count units grp1 > 0

Offline sharkyjoe

  • Members
  • *
  • Have you taken a BMP out at 500 meters??
Re:Check To See If Any Group Memeber Has Weapon
« Reply #2 on: 30 Mar 2005, 00:35:35 »
Yep Worked like a charm.
Ok the _x is a locall variable
has weapon "9k32launcher" and Grp1-figured that out
the rest of it { } count units > 0
How did ya come up with that - no arguement here it works great but i liked to know for future reference.

Thank You Very Much Raptorsaurus  ;D
What?!?You Don't have OFP On your computer at work?? I thought Everbody did. No just kidding, I dont either.

« Last Edit: 31 Mar 2005, 06:35:23 by sharkyjoe »
Remember the 7 Ps??--- Proper Previous Planning Prevents Pathetically Poor Performance

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Check To See If Any Group Memeber Has Weapon
« Reply #3 on: 30 Mar 2005, 02:54:30 »
Check the count command in the comref.
Plenty of reviewed ArmA missions for you to play

Offline sharkyjoe

  • Members
  • *
  • Have you taken a BMP out at 500 meters??
Re:Check To See If Any Group Memeber Has Weapon
« Reply #4 on: 31 Mar 2005, 06:34:48 »
Hmm I See  :o , but I don't think I would have come up with that Scripted line in a in a year. I have lots to learn. Thanks Everyone. :)
Remember the 7 Ps??--- Proper Previous Planning Prevents Pathetically Poor Performance