OR statement : what do I miss ?

Discussion and feedback on Construct 2

Post » Sun Oct 06, 2013 5:50 pm

Hello !
I'm progressively discovering Construct and I'm enjoying the new debugger feature (although I wish it were more powerful, of course...). But that is not why I'm writing.
For the first time I'm trying to use the "OR" statement. It's in a "While" condition and I seem to be missing something important because I get an endless loop in a condition that should not even be triggered.
I just tried :
While
or
3=4
or
5=6
And I get this endless loop. Could someone help me, please ?
B
5
S
2
G
1
Posts: 6
Reputation: 1,144

Post » Sun Oct 06, 2013 7:08 pm

While + or = infinite loop.

Its like you had While alone, without condition.
B
39
S
15
G
5
Posts: 295
Reputation: 6,089

Post » Sun Oct 06, 2013 7:19 pm

I would call this a bug. While should only loop until its condition(s) become false, which they are in this case.
ImageImageImage
B
71
S
22
G
240
Posts: 3,734
Reputation: 133,994

Post » Sun Oct 06, 2013 7:54 pm

You'd have to set it up kinda like this:

B
55
S
29
G
19
Posts: 1,520
Reputation: 25,650

Post » Mon Oct 07, 2013 7:35 pm

Thank you, all of you. Yes, I shall use the "Condition=true" work-around. It's easy to create and it's a good idea. Perhaps a little warning could help when one tries to use "OR" in a While condition (something like the warning that appears when one tries to set a breakpoint in a triggered event) : obviously "While" doesn't like "OR" in Construct.
B
5
S
2
G
1
Posts: 6
Reputation: 1,144


Return to Construct 2 General

Who is online

Users browsing this forum: boybacteria, disneycom2 and 11 guests