Is OR buggy?

New releases and general discussions.

Post » Sat Jun 19, 2010 12:39 am

Just a quick question.

I remember reading a while back about either OR or ELSE being buggy, but I can't remember which one it was.

I need to use OR for the first time in this project, and although I'll soon find out how reliable it is, I just wondered if anyone could remember whether it was the OR that was buggy, or the ELSE.

I have a sneaking suspicion that it was ELSE, but I can't find anything on the search engine because OR is too small a search term. :roll:

It's not a big deal, because I can always use Python if I have to.

Cheers,
Krush.
B
2
S
2
G
3
Posts: 406
Reputation: 2,062

Post » Sat Jun 19, 2010 2:01 am

Both OR and ELSE are buggy. I can't remember exactly what's buggy with OR, but I wouldn't count on it working in all situations. I also think it can cause crashes in certain situations. Try it; if it works well, then keep it. While loops are also buggy btw, but they work ok in some situations. Just try it and see if it causes any problems.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Sat Jun 19, 2010 9:38 am

Instead of creating a new thread: do Repeat-loops not have a working LoopIndex you can retrieve? I always seem to have to use a dummy variable for it, which is fine. Maybe it's a sub-event problem.
B
5
S
2
G
3
Posts: 234
Reputation: 1,818

Post » Sat Jun 19, 2010 1:05 pm

I've changed the way I've coded that particular part of the game now, so I no longer need to use the OR, but I am now using the ELSE, so I'll keep an eye out for any strange behaviour.

It seems to be working fine, although I am only using it in its simplest form, without the need to remember picked items, which is where I believe the problems lie.

Cheers,
Krush.
B
2
S
2
G
3
Posts: 406
Reputation: 2,062

Post » Sat Jun 19, 2010 3:57 pm

Ah yes, the OR bugged on my once, saying that i could not place the or in the beginning or something when I have it in between events.

What I did is I removed it and entered it again and it worked.

Having a bug in a command that is as common as "OR" is kinda annoying, but there are workarounds like using else.
B
3
S
1
G
2
Posts: 86
Reputation: 997

Post » Mon Jun 21, 2010 5:57 am

I'm hardly an expert at Construct, but it seems like the easiest workarounds for OR and ELSE would be:

For OR:
+ System: Always (every tick)
-> System: Set global variable 'Temp' to 0
+ System: Condition1 Equal to Condition2
-> System: Set global variable 'Temp' to 1
+ System: Condition1 Equal to Condition3
-> System: Set global variable 'Temp' to 1
+ System: Is global variable 'Temp' Equal to 1
-> (Do whatever)

For ELSE:
+ System: Condition1 Equal to Condition2
-> (Do whatever)
+ System: [negated] Condition1 Equal to Condition2
-> (Do whatever)

Not pretty, but workable. Note that this pseudo-ELSE doesn't work especially well if you change whatever you're testing against before you check against the negated bit. If that's the case, just set up a temporary variable and change it afterward.
B
2
G
2
Posts: 48
Reputation: 746


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 4 guests