Range of Values

Get help using Construct 2

Post » Wed Apr 03, 2013 7:51 pm

How do you input a range of values as an expression?

For example, in the compare instance variable condition, I would like to check for a range of values between 20 and 30
B
2
Posts: 8
Reputation: 316

Post » Wed Apr 03, 2013 8:12 pm

Thought I could use the operators from https://www.scirra.com/manual/78/expressions, but I just tried it in compare instance variable and I couldn't.

There's a way to do it without using expression: right click the event (not condition, but the block of event) and "make OR block". That way you can make two OR conditions that are greater than 20 and less than 30.
B
19
S
6
G
1
Posts: 116
Reputation: 2,730

Post » Wed Apr 03, 2013 8:22 pm

From objects conditions, select 'compare instance variable'. Select <= 20 and then add another condition with >= 30
B
24
S
8
G
7
Posts: 756
Reputation: 7,192


Return to How do I....?

Who is online

Users browsing this forum: Colorfish, Waltuo and 4 guests