Is value X to Y

For questions about using Classic.

Post » Wed Oct 29, 2008 9:18 pm

Is there an expression checking if a value is somewhere in between two values. For example, if you write something like "between(2-5)" it would mean 2,3,4 or 5. The way i do it now is by writing "value is less then X" and "value is greater then Y", but i notice i have to do this quite often, so an alternative would be good. If theres no expression for it yet, can it be created with the function object?

Eagerly awaiting replies!
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Wed Oct 29, 2008 9:36 pm

If you want to check if X is between Y and Z you could use the 'Evaluate' system condition, and use:

(X >= Y) AND (X <= Z)

It'd make a good system condition though, so I'll throw it in the next build.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Wed Oct 29, 2008 10:01 pm

Sweet! The best two answers you can get to a question like this is
1: I'll add it!
2: It's already in there!

I got BOTH!
B
8
S
2
G
5
Posts: 744
Reputation: 3,288


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests