0 Favourites

Is OR buggy?

This forum is currently in read-only mode.
  • 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.

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



  • 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.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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.

  • 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.



  • 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.

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)