OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: filth on 02 Jul 2007, 00:48:23

Title: adding an additional condition to a count units trigger...
Post by: filth on 02 Jul 2007, 00:48:23
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.
Title: Re: adding an additional condition to a count units trigger...
Post by: Planck on 02 Jul 2007, 01:49:35
Try antiarmoursquadinposition == false


Planck
Title: Re: adding an additional condition to a count units trigger...
Post by: filth 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.

Title: Re: adding an additional condition to a count units trigger...
Post by: Mr.Peanut 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
Title: Re: adding an additional condition to a count units trigger...
Post by: filth on 04 Jul 2007, 01:47:45
cheers nut. works like a charm.   :cool2: