OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: bobthedinosaur on 16 Jan 2004, 19:42:30
-
i know how to put a true statement in a condition field
eg. if i've got a trigger that made "word1 = true" then i can go and put "word1" in another trigger's condition field
but if i want the trigger to go off when word1 is false then i don't know what to put in the trigger's condition field
also how do you make a trigger's condition dependant on more than on statements being true eg. word1 & word2 have to be true for the condition to be met
thanx
-
if word1 is not true then it's NOT true.
not word1
or
!word1
eg. word1 & word2
That's almost it.
if word1 and word2 need to be true then word1 AND word2 need to be true.
word1 and word2
or
word1 && word2
This is a bonus. If you need the other one to be true and the other to be false when a condition is met you put
word1 and (not word2)
or
word1 && (!word2)
-
I added this Q to the FAQ, so any nice person at the ed depot could accept it huh? ;D
:beat: *Gets Shot* :beat:
-
and what if i have two or three statements in the condition but only one of the three have to be true in order for the condition to be met?
-
cond1 || cond2 || cond3
|| means OR
-
You can mix
and
or
not
as much as you like. Use brackets if needs be
this or (var1 and not var2) or (var1 and (var3 or var4))
If the game meets a variable that has not been previously defined (=initialised) then it treats the whole expression as false. You may need to write stuff like this in your init.sqs
var1=false
var2=true
var5=198