OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: FlyingDuck on 12 Aug 2006, 14:39:42

Title: Trigger activation when more people are dead
Post by: FlyingDuck on 12 Aug 2006, 14:39:42
Hey,

I want a trigger that activate when the player killed more then 1 man. Now I use a trigger with condition: not (alive G1)
Now is it, If I kill G1 the trigger activates, but I want that the trigger activates when I killed  G1, G2 and G3. I tried something like : not (alive G1, G2, G3) And: not (alive G1); not (alive G2); not (alive G3) But this won`t work.

I hope you can help me ( My englisch isn`t very well :P)
 

Title: Re: Trigger activation when more people are dead
Post by: Terox on 12 Aug 2006, 15:15:17
(! alive G1)&& (! aliveG2)&&(! aliveG3)

or

{alive _x count [G1,G2,G3] == 0}
Title: Re: Trigger activation when more people are dead
Post by: dmakatra on 12 Aug 2006, 17:48:35
(! alive G1)&& (! aliveG2)&&(! aliveG3)
Simplified version, before you start using those fancy &&s and ||s. ;)

(not alive G1) and (not alive G2) and (not alive G3)
Title: Re: Trigger activation when more people are dead
Post by: macguba on 12 Aug 2006, 18:35:17
Neils, your English is just fine.  :thumbsup:
Title: Re: Trigger activation when more people are dead
Post by: THobson on 13 Aug 2006, 08:32:41
I am with dmakatra, using words makes it easier to read but the && and the || also work. 

I think the line:

{alive _x count [G1,G2,G3] == 0}

Needs brackets as follows

{(alive _x) count [G1,G2,G3] == 0}

Indeed Niels your English is fine
Title: Re: Trigger activation when more people are dead
Post by: FlyingDuck on 13 Aug 2006, 14:08:48
Thank you all guys, I use dmakatra`s way to do it. This one can I remember very easy :P
Title: Re: Trigger activation when more people are dead
Post by: THobson on 13 Aug 2006, 14:58:35
It is easy for three units.  For a lot of units it can be a real pain.  That is where the:

{(alive _x) count [G1,G2,G3] == 0}

will really save effort.
Title: Re: Trigger activation when more people are dead
Post by: Seven on 13 Aug 2006, 17:24:41
or in a trigger

"alive _x" count [G1,G2,G3] == 0

will also do :)
but better to learn the correct way of using brackets I think  ;D