bug?

This forum is currently in read-only mode.
From the Asset Store
Match same tiles with each other as fast as you can and earn more score during a limited time!
  • I don't know what I'm doing wrong, if that. I even tried using my own UIDs, instead of Construct's. I think this is a bug.

    http://www.freewebs.com/jonnymataza/arrow.cap

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I got it to work, without using UIDs though.

    I'm unsure whether this solution is helpful to you at all (not sure where exactly you intend to take this), but regardless.

    ***File Removed***

    EDIT: I had another look. Try this one, it uses UIDs and should be what you're after. <img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile">

    http://www.fileshack.us/get_file.php?id ... arrow2.cap

  • Just in regards to whether it is a bug or not. It seems as though, whether by design or not, using the 'Compare' condition under the system object to compare two values doesn't allow for an action relative to a specific object.

    In other words, if there are multiple instances of an object, and you wish to compare say, their UID, or their X position, using the 'Compare' condition will only ever return said values for the first instance of that object. (Or at least, my testing leads me to believe this is true)

  • Thank you Glamthaus, this is exactly what I was trying to accomplish <img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /> . I think it is more inconvenient, than anything else, that you can't select object instances after using a compare value condition. It might just me still try to move on up from MMF though <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /> .

  • The first file you posted works correctly so long as you use the 'Compare unique ID' condition in the sprite object itself, not just compare values. This will test every sprite instance, which is what you want.

    'Compare values' has one simple job: to compare two numbers. That's it. It doesn't care what the numbers are or mean, it just compares them. In this case in order to work out each value, it doesn't know which object you want, so yes, it uses the first object. This is by design.

    A second workaround is to explicitly tell Construct you want to do a 'Compare values' for every sprite instance. You can add a 'For Each object' condition above it to do this, eg:

    + For Each 'Sprite'

    + (Compare values) Sprite.UID equal to Arrow('parent')

    However, this basically is a long way of writing what the Sprite's built-in 'Compare UID' condition does, so you may as well use that.

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