OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Chunky heffer on 27 Sep 2005, 22:34:55
-
Sorry if repost but I searched for an hour.
Anway please could you tell me how to tick off a convoy for instance in the briefing.
i have set up a trigger and its dimensions are 0 and 0.
Condition = NOT ALIVE T1;NOT ALIVE T2;NOT ALIVE T3
On Activation = "3" objstatus "DONE"
This above does not work. I get (Type Bool, expected nothing)
but if I put one unit in the Condition field it does work. e.g
Condition = NOT ALIVE t1.
it works.
Help me, please. I am slowly going bald
-
(not alive t1) and (not alive t2) etc
You can use 'or' instead of 'and' in appropriate circumstances. Semicolons in the Condition line are meaningless which is why you are getting the error.
Oh, and
Welcome to the forum!
Well done for searching so hard ... that's a very difficult one to find.
If T1 and the rest are vehicles rather than soldiers, I'd recommend not using the alive command. It can be unreliable with vehicles: the vehicle looks destroyed but hasn't registered as not alive. Use not canMove (and/or canFire if appropriate) instead.
-
Wow thank you for quick response. Thanks for welcoming me.
-
you could also do this:
"alive _x" count [T1,T2,T3,etc] = 0
or for vehicles:
"canmove _x" count [T1,T2,T3,etc] = 0
slightly less typing
-
if that's for a conditional field it should be
? (("alive _x" count [T1,T2,T3,etc]) == 0)
or for vehicles:
? (("canmove _x" count [T1,T2,T3,etc]) == 0)
i find the brackets help keep the logic neatly packaged.
-
Triggerhappy's otherwise excellent answer has one small mistake: the = should be ==.
Also, I never use == when it can be avoided. I don't trust either the game or the computer not to make a mistake. I'd use <0.4 instead of ==0.
If its for the condition field of a trigger you don't need the ? at the start.
-
Don't confuse him. Macca your first answer should do fine. He can always come back for more advanced info later on. ;)
-
also gto save using a few words you can use
!alive t1 and !alive t2 and !alive t3
basically the ! acts as a not or isnt its the same as Mac's idea but using a tiny bit of text but i dont think it matters much
-
Triggerhappy's otherwise excellent answer has one small mistake: the = should be ==
if its not 1 small error its another....
mac is a good spell-checker ;D :P