OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Tyger on 24 Aug 2004, 15:36:22
-
this is driving me nuts again. I've had problems like this in th past but now its returning to haunt me.
any one know why this isn't working?
(count units squad_1) < 2 && (count units squad_2) < 2
the trigger won't activate, even if they are dead. Its an array so I can't do the ! (canMove squad_1)
i've also tried:
(count units squad_1 < 2) && (count units squad_2 < 2)
count units squad_1 < 2 && count units squad_2 < 2
anyone help?
-
the squad_1 was defined as group ?
squad = group soldier name ?
if not u shud do somin like
(count units group squad_1) < 2 && (count units group squad_2) < 2
donno :P mess w/ da () som more ;)
LCD OUT
-
if you are writing this in a trigger condition field try using "AND" to separate the two conditions. also try using <= instead of <
failing that you could put in the player init:
men1 = []; men2 = []
and then in the init of each man in the groups men1 = men1 + [this] or men2 = men2 +[this]
then make the condition:
(men1 <= 2) AND (men2 <= 2)
no guarantees on the syntax but something like that... :P
ppl, feel free to correct me
-
i'll try fleeing squad_1 etc.
that might be more realistic anyway. Thanks for the help thought
Cheers :cheers:
-
try using "AND" to separate the two conditions.
as was used...
&& means AND
|| means OR...
Both work with triggers just fine... (if that's what you meant...)
I believe count units group squad_1 < 2 should work...
Worked for me...
There must be something hairy somewheres else...
Also, it can take a while until the group leader realises some of his group is dead... The dead stay in the group until the group leader knows they are dead...
-
hater kint just remind me somin
u can use the not alive command 4 that :P
"alive _X" count units groupname < 2
or
"alive _X" count units group soldiername < 2
2 check how meny of em were alive nd not wait till da count refreshes ;)
LCD OUT
-
it LOOKS like lcd's idea might work i'll check it myself later on guys.
:gunman: :moon:
-
2 check how meny of em were alive nd not wait till da count refreshes
Of course...
I was just trying to keep the Tygers syntaxes :P
-
yea right :P
u just forgot ;) ;D
now ill take this place 2 spam ;D :-X
test me mision or ill kill a pinguin :gunman:
LCD OUT
-
Count units GrpName seems to return the number of units the leader of the group thinks he has, so if some have been killed and he has not realised it yet count will give you a higher number than you might expect. If the whole squad gets wipped out it can take several minutes for count units GrpName to become zero.
-
@ THobson
wich is y i stated da oder method ;)
LCD OUT
-
I can see your method works. I only mentioned it because I am not sure how many people realise it can take minutes for count to adjust to the correct number, especially if the all the units in the group are dead.