# Why "Yes"..Why "No" ?

0 favourites
• 7 posts
• ....& also doubles as logical AND, and | is a logical OR operator

.These are useful combined with the comparison operators,

score < 0 | health < 0, which also return 1 if true and 0 if false...

https://www.scirra.com/tutorials/77/nat ... onstruct-2

see the capx..

is not supposed to be the opposite?

what's wrong with my logic? <img src="{SMILIES_PATH}/icon_e_confused.gif" alt=":?" title="Confused">

• The manual is just saying that 1 means true, so when considering the comparison:

A) if score<0 then this part would be true (1)

B) if health<0 then this part would be true (1)

C) by adding the OR (|) then if EITHER A=1 and/or B=1 then the overall outcome would be true(1)

• ## Try Construct 3

Develop games in your browser. Powerful, performant & highly capable.

Construct 3 users don't see these ads
• Thanks,hundredfold !

so.. there is no way to make something like ..

Var1 | Var2 | Var3 =100 then.... something

• If you mean that any one of Var1, Var2 OR Var3 needs to be 100 then just use this as your condition:

Var1=100 | Var2=100 | Var3=100

• ....I refuse to understand....

why this not work

• Because the following : "Variable1|Variable2|Variable3" will resolve as "0|50|100", which in turn resolve as "1". 1 is not equal to 100, so your event never fire.

The correct way to do it is as hundredfold said : (Variable1 = 100 | Variable2 = 100 | Variable3 = 100) = (1)

• Ok..Ok..

I know how to make "Or" blocks in C2...

I just think it would be much better if the character " | =Or " ... could use a similar like " &=And"

Thanks... hundredfold... Magistross!

. .. resolved

• 7 posts