[r151] Overlap condition in subevent does not pick

Bugs will be moved here once resolved.

Post » Wed Nov 20, 2013 10:37 pm

Link to .capx file (required!):
https://www.dropbox.com/s/ce8lyg2ljqkhgh6/r151_overlap_bug.capx

Steps to reproduce:
1. Make an event with a condition involving an object.
2. Make a subevent testing overlap with that object and another.


Observed result:
The subevent testing overlap does not run only on the overlap, but instead runs on the SOL from the parent event.

Expected result:
The subevent picks only the overlapping sprite.

If you change the parent event to not involve the object, it works fine. For example:


Browsers affected:
Chrome: yes
Firefox: yes
Internet Explorer: yes

Operating system & service pack:
Win7x64sp1

Construct 2 version:
151
B
7
S
1
Posts: 20
Reputation: 388

Post » Thu Nov 21, 2013 4:04 pm

Try replacing it with : Sprite is overlapping player, and see if that works
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
91
S
30
G
22
Posts: 1,985
Reputation: 20,149

Post » Thu Nov 21, 2013 4:22 pm

Nice, good idea! Works just fine. Still a bug, I think, but this helps me continue forward with my project. Thank you, @megatronx !
B
7
S
1
Posts: 20
Reputation: 388

Post » Thu Nov 21, 2013 4:41 pm

I don't think it's a bug. I think that's how logic in construct works. You first checking for object condition which becomes a subject of the tree of the events. If in that tree as a subject you put another type of object it wont work cause you're confusing the program. At least that's how i see it. megatronx2013-11-21 16:42:57
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
91
S
30
G
22
Posts: 1,985
Reputation: 20,149

Post » Thu Nov 21, 2013 4:49 pm

hmm, I see what you mean. I was reading the first example like this:

Pick all <visible> red sprites (SOL: 4 red sprites)
---> Pick all <overlapping> red sprites, pick all <overlapping> black sprites. (SOL: 1 red sprite, 1 black sprite)
But the actual effect was (SOL: 4 red sprites, 1 black sprite).

The reason that's strange to me is that when the subevent does not have a SOL to pick from already, it DOES narrow it. Which seems like it has to be a bug. Why would more be chosen from less? If that makes sense.
B
7
S
1
Posts: 20
Reputation: 388

Post » Thu Nov 21, 2013 6:45 pm

Try this

-- Player overlapping Sprite
   -- Sprite visible : do somehting
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
91
S
30
G
22
Posts: 1,985
Reputation: 20,149

Post » Mon Nov 25, 2013 5:31 pm

Oops, not sure how that one slipped through the net! Should be fixed in the next build - hope it doesn't break existing projects though...
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest