OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Hellbender on 09 Nov 2007, 17:35:34
-
I have a trigger that counts how many civilians are alive. If the count drops below 6, the objective is failed. It's tried and true, and works fine when I test it!
The problem is that in my mission, the empty (civilian) vehicles that are parked in the town seem to count as live civilians, so of course that screws up the count!
Is there anything I can do about that or do I have to simply take the vehicles into account in my trigger?
-
I'm assuming you are using a condition of
(count thisList) < 6
You'll also find that a vehicle counts as one, whether it is empty or it is a bus filled with civilians. You need to both ignore vehicles and count all the crew in those vehicles.
You could try the condition:
men = 0; { men = men + (count (crew _x)) } forEach thisList; men < 6
which counts the total number of civilians within the trigger area, including those on foot or currently in vehicles, but not including the vehicles themselves.
-
Thanks Spooner!
That did the trick! :good: