How do I unable clicking for a short period of time?

0 favourites
  • 4 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • I've searched both google and this forum about this matter, but haven't found any info. If I simply have missed it, I apologize.

    I wonder how you unable clicking (more accurately on touch, tapping) for a short period of time? I can give you Candy Crush Saga as an example, where it's impossible to make the next move until all the combos are finished.

    I'm working on a puzzle game, although not a match-3 game, but with the same kind of view.

    I can't find any option about it under the Touch-actions, but is it possible to use a 0% opacity sprite as a "blocker" or anything like that until certain actions are fulfilled? Unfortunately it can not be time-based, since combos last for different amount of times.

    Perhaps there's another way of doing it?

    Hopefully anyone understands what I mean and that can help me!

  • put your touch events to a if event:

    if opacity 100% -> touch on tap blabla

    and while your game is doing something set opacity to 99% and when everything is finished you set opacity to 100% again.

    you dont need to use opacity if you dont want, a variable would do the job too.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes you can't prevent the touch or the mouse from clicking the sprite even if the collision disabled.

    You can add a variable and make this event with 2 conditions:

    Mouse click object ---- Do this

    Variable = 0

    Then you can change the variable to 1 for few seconds then turn it back to 0.

  • It worked perfectly!

    Thanks guys! Much appreciated!

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