ONE of my sprite buttons doesn't always work... why?

0 favourites
  • 4 posts
From the Asset Store
This Girls Game allows young fashionistas to develop their taste and skills as a fashion designer.
  • I am making a web app and I have several rectangular sprites that I use as buttons. ALL of my buttons work great... except one. At first it seemed to fire off randomly when I tapped it, but there are certain places -- near the middle of the button -- that will never register a tap or click. But there are other spots on the sprite that will register a Touch event every single time. The buttons are all the same so I can't figure out why one of them only works part of the time...

    I'm sure this is an issue with my code but I don't know even know where to begin to start looking. Any suggestions? I have some invisible text objects in the same area, but they are all on the same layer so clicks should pass through, right? I made my button opaque in case it was a transparency problem, but that didn't help either...

  • I have some invisible text objects in the same area, but they are all on the same layer so clicks should pass through, right?

    Why would you think that?

    Using invisible sprites as triggers is a fundamental part of programming. In your case it might be OK but impossible to say.

    Without seeing your Events, .capx etc it is not really possible to offer any meaningful guidance.

    Just in case, check you collision polygons are correct and not overlapping.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's definitely your collision path by your description.

    That bottom icon on the left toolbar. Click it and the polygon will show.

    The Manual:

    https://www.scirra.com/manual/48/image-and-animations-editor

    Yes, a click on a spot on screen will touch each sprite (if in it's polygon) under the cursor. Even if invisible.

  • Thank you, thank you, thank you! My sprite is a simple rectangle so I assumed the collision polygon would automatically match the shape. Nope, my poly looked like a Picasso painting. Appreciate the help, guys!

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