How do I detect if my "touch" has a continuous hold *SOLVED*

0 favourites
  • 2 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • The iPad has a feature where if you "touch" anything such as text, it treats it as a single click. However, if you hold your "touch" it offers a new option to copy. I want to utilize this feature in a different way.

    Touch and release > Spawn ONLY one object

    Touch and hold > Spawn several objects until touch is released.

    Anyone now how to use this? Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For anyone interested or for future reference, I think I have found a solution.

    I needed to be able to do this:

    Touch and release > Spawn ONLY one object

    Touch and hold > Spawn several objects until touch is released

    -------------------------------------------------------------------------------------------------

    I solved it with a global variable. Here is the simplified version:

    Create Global variable: "Shoot"

    If "Shoot" = 0, "on any touch start" Spawn object

    System Wait 0.2 seconds set "Shoot" = 1

    If "Shoot" = 1, Is in touch Spawn object

    On any End touch, Set "Shoot" = 0

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