Another OR block bug...

0 favourites
  • 7 posts
From the Asset Store
Match same tiles with each other as fast as you can and earn more score during a limited time!
  • Link to .capx file (required!):

    iu.box.com/s/dxkwpmokj7fiz163lgen

    Steps to reproduce:

    1. Create any Object: Pick condition (for example, Sprite: Is on-screen, or Sprite: X > 0)

    2. Nest within the above event an OR block that picks the same kind of object that the parent condition picks (for example, Sprite: Y > 300).

    3. Make some kind of action that verifies that picking was correct.

    Observed result:

    When a nested condition triggers, it picks whatever the parent picks, regardless of the nested condition that fires.

    Expected result:

    The nested condition picks the objects, narrowing down what the parent picks.

    More info:

    For those of you who can't go into the simple CAPX file provided, here's a quick screenshot of the issue:

    <img src="http://cannedessence.com/construct2screens/orBlockBug.png" border="0" />

    There are three root-level events, two of which are disabled. The two that are disabled work as expected, but the one that is not disabled is where the bug lies.

    In the first root-level event, all Sprites on-screen should be picked, then only the ones that are less than 200 or greater than 400 should be picked. However, all of the Sprites on-screen are picked, as can be verified by the Debug text object.

    The second root-level event is exactly the same as the first, except that it isn't nested within the arbitrary Sprite: is on-screen event, but for some reason it works as expected.

    The third root-level event is exactly the same as the first, except that the parent event does System: Pick all Sprite instead of functionally the same condition in this case Sprite: Is on-screen. This one works as expected.

    What truly verifies this as an OR block bug is that if you delete one of the conditions in the OR in the broken 1st root-level event, thus ridding the OR block, it works as expected.

    Most revealing is that strangely, if you disable one of the OR block conditions, thus effectively nullifying the OR block, it is still broken.

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Internet Explorer: yes

    Operating system & service pack:

    Windows 8 Pro 64-bit

    Construct 2 version:

    r139

  • Yes it's really strange, using your "or" first and "is on screen" in sub-event seems working fine but i can't explain why it's different for C2.

  • naelian

    Darn you, I was going for a record number of views with no replies! lol

  • Don't expect to get it, i want this record ! ;p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OK, hopefully fixed for next build (r143). Let me know when it comes out if it works for you.

  • Ashley

    Ah, cool. Thanks!

    PS: Was the issue related to the one posted here? :

    scirra.com/forum/system-pick-objects-in-or-block-unexpectedbehavior_topic72706.html

  • I don't think so.

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