Another OR block bug...

Bugs will be moved here once resolved.

Post » Sat Aug 03, 2013 6:51 am

Link to .capx file (required!):
https://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:



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
B
11
S
2
Posts: 55
Reputation: 807

Post » Thu Aug 22, 2013 3:55 pm

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.
B
18
S
5
G
3
Posts: 298
Reputation: 5,332

Post » Thu Aug 22, 2013 4:37 pm

@naelian
Darn you, I was going for a record number of views with no replies! lol
B
11
S
2
Posts: 55
Reputation: 807

Post » Thu Aug 22, 2013 7:37 pm

Don't expect to get it, i want this record ! ;p
B
18
S
5
G
3
Posts: 298
Reputation: 5,332

Post » Wed Aug 28, 2013 3:34 pm

OK, hopefully fixed for next build (r143). Let me know when it comes out if it works for you.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Wed Aug 28, 2013 3:46 pm

@Ashley

Ah, cool. Thanks!

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

http://www.scirra.com/forum/system-pick-objects-in-or-block-unexpectedbehavior_topic72706.html?KW=
B
11
S
2
Posts: 55
Reputation: 807

Post » Wed Aug 28, 2013 4:40 pm

I don't think so.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests