OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: chrisb1220 on 08 Nov 2002, 03:27:51

Title: Multiple ppl not alive
Post 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:
Title: Re:Multiple ppl not alive
Post by: mcnorth on 08 Nov 2002, 03:47:37
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.
Title: Re:Multiple ppl not alive
Post by: Bremmer on 08 Nov 2002, 10:47:08
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  :)
Title: Re:Multiple ppl not alive
Post by: mcnorth on 08 Nov 2002, 12:34:39
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.
Title: Re:Multiple ppl not alive
Post by: chrisb1220 on 08 Nov 2002, 14:47:50
Thanx all. I'll just put the and in the middle since it's only three.
  Thanx again.