How do I ... "is touching object"

0 favourites
  • 4 posts
  • So, I've run into a situation.

    If you've ever played a kairosoft game you'll see they made their buttons more touch friendly by only activating on double tap, and highlighting on normal tap.

    I would like to do something very similar. I only want buttons to activate on a full tap event (this works) but I want them to highlight while being touched

    I would think that

    Is touching object (my sprite)

    would work, but it does not, that seems to only work with the compound condition:

    on any touch start

    is touching objecting (mysprite)

    The problem with this is it only snags the object you poke. I'd like to activate a hi-lite effect on everything in a family while a finger is being dragged around on it.

    The game also supports mouse, but it doesn't look like anything I'm doing with the mouse effects this particular issue as objects under the mouse are lit up regardless if it's a click or a hover.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could cheat it so that when you touch, you move an invisible sprite object to that location, and use a "sprite 1 is overlapping sprite 2" condition.

    thus, it will remain highlighted while those objects are overlapping until the user presses somewhere else.

    just make it a small object whatever you end up using

  • Or another idea, is to make a counter for the button. on the first tap, it remains highlighted, but if the counter = 2 then activate whatever the button is supposed to do.

  • question about sprite1 overlapping sprite 2... could I just check for the current mouse position instead? Would it be less resource intensive to only check on point ? Prolly doesn't matter lol. Thank you for the idea!

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