[r151] Overlap condition in subevent does not pick

  • Link to .capx file (required!):

    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.

    <img src="http://i.imgur.com/qf3EWDh.png" border="0" />

    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:

    <img src="http://i.imgur.com/NPgMrJp.png" border="0" />

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Internet Explorer: yes

    Operating system & service pack:

    Win7x64sp1

    Construct 2 version:

    151

  • Try replacing it with : Sprite is overlapping player, and see if that works

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nice, good idea! Works just fine. Still a bug, I think, but this helps me continue forward with my project. Thank you, megatronx !

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

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

  • Try this

    -- Player overlapping Sprite

       -- Sprite visible : do somehting

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

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