OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: sharkyjoe 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
-
Try this (I cannot check it as I am at work but I think it will work):
{_x hasweapon "9k32launcher"} count units grp1 > 0
-
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.
-
Check the count command in the comref.
-
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. :)