'System - Object Overlaps Point' command bug

This forum is currently in read-only mode.
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • I just encountered an issue using the 'Object Overlaps Point' command where it seems to only detect an overlap with only one instance of a sprite instead of all. I replicated the bug and posted the cap where I explain it in more detail. I'm pretty adamant the command isn't working as intended, but I may be overlooking something very simple and approaching it incorrectly.

    I'll also upload it to the bug tracker shortly.

  • It's not a bug... at least not the bug you think it is. The system command doesn't pick individual instances. Look up the "expression rule" here:

    http://sourceforge.net/apps/mediawiki/c ... ct_picking

    Since you're not picking a specific instance, Construct picks the first instance in the layout, that's why it's only reacting to one of them. You can guarantee that it will check each in turn with a loop, like so:

    <img src="http://i48.tinypic.com/24uzrep.png">

    A For Each loop here will cycle through each instance one at a time so they can be picked by the system condition.

    But... there does seem to be a seems to be a minor bug with how the condition is displayed. Instead of showing pointx and pointy, it's showing object and pointx.

    As for the Else, it's working properly, but since the order of events in your example allows for changing the text to "no collision" after it's already been changed to "yes collision" then if you're overlapping one the next For Each loop can say "this one's not colliding, change the text to blue and say it's not colliding." You can confirm that by the fact that if you leave the Else in then it works properly only if you are overlapping the point of the last instance instead of the first. This fixes the issue:

    <img src="http://i48.tinypic.com/205fale.png">

    Order of events! It's important! It might seem confusing at first but you'll get the hang of it.

    Hope this helps

  • Added a comment to your bug report...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you! It worked wonderfully

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