How do I make event like "if value equals 1 or 2"

Get help using Construct 2

Post » Fri Feb 24, 2017 9:46 pm

In topic "Native Expressions in Construct 2" i saw this info:

& also doubles as logical AND, and | is a logical OR operator. These are useful combined with the comparison operators, e.g. score < 0 | health < 0, which also return 1 if true and 0 if false.

so, if i understood correctly, i can use "|" and make event like "if value equals 1 | 2" if i mean 1 or 2.
but the problem in following, it doesnt work. or i do something wrong. i just want to do action if my varieble equals to not only one figure, but more

help please.
B
4
Posts: 19
Reputation: 232

Post » Fri Feb 24, 2017 9:49 pm

You must use "compare two values" and compare "value = 1 | value = 2" with 1 (true).
B
76
S
31
G
27
Posts: 1,015
Reputation: 20,790

Post » Fri Feb 24, 2017 9:55 pm

yea, compare two values, right.

thank you=)
B
4
Posts: 19
Reputation: 232


Return to How do I....?

Who is online

Users browsing this forum: pegasus6464 and 28 guests