Is there an 'or' expression?

Get help using Construct 2

Post » Fri Oct 19, 2012 12:23 pm

I'm making a small matching game on the side and I am wondering if there is a way that I could write an expression like this:

System > Compare two values > 'Global Variable' = Equal to '1' or '2' or '5'

(then the actions follow)

because right now I'm coding it to where I have to make a system > compare for each outcome which is getting pretty tedious and it's really making my code hard to read through.

I hope this was understandable. If not, I apologize.

Thanks in advance!
Image
B
57
S
14
G
6
Posts: 493
Reputation: 11,253

Post » Fri Oct 19, 2012 1:05 pm

If you right click on the area of an event containing the conditions (but not the conditions themselves) you have the option to make it an "OR" block.
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Fri Oct 19, 2012 1:25 pm

Thanks Keepee!
Image
B
57
S
14
G
6
Posts: 493
Reputation: 11,253

Post » Fri Oct 19, 2012 3:22 pm

Apparently the "|" is set up already to act as an in line or for expressions.

Deleted incorrect example newt2012-10-19 20:41:20
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Fri Oct 19, 2012 6:17 pm

@Newt no. Way. Wow! That makes my life that much easier!
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,390

Post » Fri Oct 19, 2012 8:40 pm

Ehh never mind. I checked again, and its just taking the first part.
Anyway thats how it worked in CC.
Perhaps @Ashley will implement it here at some point.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 12 guests