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

Get help using Construct 2

Post » Tue Jan 20, 2015 9:51 pm

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! :)
Posts: 2
Reputation: 179

Post » Tue Jan 20, 2015 10:15 pm

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.
Read this:
yeah, i really like to say that you should "Read this:"
Posts: 140
Reputation: 1,894

Post » Wed Jan 21, 2015 1:57 am

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.
Posts: 1,013
Reputation: 9,165

Post » Wed Jan 21, 2015 8:07 pm

It worked perfectly!
Thanks guys! Much appreciated! :)
Posts: 2
Reputation: 179

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 17 guests