OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: chrisb1220 on 08 Nov 2002, 03:27:51
-
I need to make a tigg with the condition: not alive bmp1,bmp2,bmp3. I know how to make it work with just one bmp, but I can't figure out how to get all 3 in. PLEASE HELP! :help:
-
You can do,
not alive bmp1 AND not alive bmp2 AND not alive bmp3
in which case all 3 have to be dead before the trigger fires.
I think you can also do, (for less typing)
!alive bmp1 AND !alive bmp2 AND !alive bmp3
the AND probably doesn't have to be capitalized.
There's also another, easier way if they're in the same group but I'm at the office (intercoursing the canine, aka f**cking off) and can't remember the details at the moment.
-
mcnorths solution works fine, but it can become a bit tiresome typing in ... and not alive ... and not alive ..., especially if you have lots of units to check (fancy doing that ten times? how about a hundred?)
As mcnorth suggested if the units are in a group then there is an easy solution.
"alive _x" count units group bmp1 == 0
This counts the number of living units in bmp1s group (ie bmp1,bmp2,bmp3) and sets off the trigger if all units are dead.
If the units aren't grouped you can define an array of the units you are interested in (use an init file or any init line for this)
bmps = [bmp1,bmp2,bmp3]
Now you can use a similar condition to the group one:
"alive _x" count bmps
Hope that all makes sense :)
-
Yeah, that's it! Bremmer's solution is the one to remember because one day you'll want to use it on an even dozen guys. Typing does get to be a drag, especially with fat fingers that resemble hot dogs or Kielbasa sausage.
-
Thanx all. I'll just put the and in the middle since it's only three.
Thanx again.