Home   Help Search Login Register  

Author Topic: defining a false statement in condition fields  (Read 559 times)

0 Members and 1 Guest are viewing this topic.

bobthedinosaur

  • Guest
defining a false statement in condition fields
« 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

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:defining a false statement in condition fields
« Reply #1 on: 16 Jan 2004, 20:08:01 »
if word1 is not true then it's NOT true.
not word1
or
!word1



Quote
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)
Not all is lost.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:defining a false statement in condition fields
« Reply #2 on: 16 Jan 2004, 21:08:54 »
I added this Q to the FAQ, so any nice person at the ed depot could accept it huh? ;D

:beat: *Gets Shot* :beat:

bobthedinosaur

  • Guest
Re:defining a false statement in condition fields
« Reply #3 on: 16 Jan 2004, 23:40:01 »
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?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:defining a false statement in condition fields
« Reply #4 on: 16 Jan 2004, 23:42:54 »
cond1 || cond2 || cond3


|| means OR
I know a little about a lot, and a lot about a little.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:defining a false statement in condition fields
« Reply #5 on: 17 Jan 2004, 03:53:08 »
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
Plenty of reviewed ArmA missions for you to play