Home   Help Search Login Register  

Author Topic: adding an additional condition to a count units trigger...  (Read 1146 times)

0 Members and 1 Guest are viewing this topic.

Offline filth

  • Members
  • *
  • Who's the bad man?
here's what i've got:

a trigger set up to count the units of a particular group (in this case a group called charlie). this is what i have in the condition field:

({vehicle _x in thislist} count units charlie) < 3

this runs a script which ends the mission if the numbers dwindle too much. now... this works fine if the trigger is meant to count the units throughout the mission, but i actually only want the units counted up to a certain point when another condition is met.

this condition is: antiarmoursquadinposition.

i've tried setting this condition to false in the init.sqs and adding the condition to the line in the trigger to get the following condition line:

antiarmoursquadinposition = false && ({vehicle _x in thislist} count units charlie) < 3

but the trigger doesn't want to fire with this extra condition imposed on it. basically, i only want to count the units in charlie group up to a certain condition point and then it doesn't matter if they all get wiped out.

(if antiarmoursquadinposition = true i don't want the trigger to fire).

can anyone help, plz? cheers, filth.
« Last Edit: 04 Jul 2007, 01:48:18 by filth_merchant 101 »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: adding an additional condition to a count units trigger...
« Reply #1 on: 02 Jul 2007, 01:49:35 »
Try antiarmoursquadinposition == false


Planck
I know a little about a lot, and a lot about a little.

Offline filth

  • Members
  • *
  • Who's the bad man?
Re: adding an additional condition to a count units trigger...
« Reply #2 on: 02 Jul 2007, 22:20:57 »
thanks for the offer planck, but it doesn't seem to work.  :confused: i tried:

antiarmoursquadinposition == false && ({vehicle _x in thislist} count units charlie) < 3

and it won't take the command.


Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: adding an additional condition to a count units trigger...
« Reply #3 on: 03 Jul 2007, 19:49:36 »
Don't use ==  != with logical variables.... either use nothing or not
Code: [Select]
not antiarmoursquadinposition && ({vehicle _x in thislist} count units charlie) < 3
urp!

Offline filth

  • Members
  • *
  • Who's the bad man?
Re: adding an additional condition to a count units trigger...
« Reply #4 on: 04 Jul 2007, 01:47:45 »
cheers nut. works like a charm.   :cool2: