How do I control touches?

Get help using Construct 2

Post » Fri Jan 23, 2015 8:30 pm

Thanks for viewing!
I have a touch menu system, and when I am testing on my device, sometimes it clicks a few times. For example: I touch my "play" button, it moves the menu and brings up another menu that allows you to pick a game mode. My issue is, when I touch the play button, it sometimes clicks the game modes that will appear under my play button.
So is there a way I can turn TOUCH off for a bit, or is there a way I can make it to where it WAITS X seconds before allowing touch to work again?
Thanks in advance :D
B
35
S
10
G
4
Posts: 94
Reputation: 4,083

Post » Fri Jan 23, 2015 8:32 pm

Or is there a way for ON TOUCH END to work on a sprite, and not just touch in general?
B
35
S
10
G
4
Posts: 94
Reputation: 4,083

Post » Fri Jan 23, 2015 8:52 pm

Why not using 'on touched object'? It only check if a sprite already touched by user
ImageImage
B
105
S
46
G
23
Posts: 778
Reputation: 22,226

Post » Fri Jan 23, 2015 8:55 pm

It seams that your problem is not actually the touch condition. but two objects in the same place at the moment you are touching it. Make sure that any button is underneath your play button or just put in the event that, on touched Play button and if you are not touching anything else....

Also I would recommend the tap gesture. Sometimes It's better when you want things to trigger only once.
B
56
S
21
G
3
Posts: 602
Reputation: 6,612

Post » Fri Jan 23, 2015 9:16 pm

alextro wrote:Why not using 'on touched object'? It only check if a sprite already touched by user

Sorry for not being clear, I was already using the "On touched object". What was happening is on that, it still touches what replaces the button on the layout. I think the gestures will be what I need, going to try that. Thanks for answering! :D

kossglobal wrote:It seams that your problem is not actually the touch condition. but two objects in the same place at the moment you are touching it. Make sure that any button is underneath your play button or just put in the event that, on touched Play button and if you are not touching anything else....
Also I would recommend the tap gesture. Sometimes It's better when you want things to trigger only once.


Thanks for the tip. Going to give the tap gesture a spin. Thanks for the info! :D

I will let you guys know how it goes, and if I have any more problems with it, I will put up a capx to show what is happening :D
B
35
S
10
G
4
Posts: 94
Reputation: 4,083

Post » Sun Jan 25, 2015 8:18 pm

Use the Tap Gesture instead of "On Touched Object" seems to have done the trick! Thanks guys for the information and feedback!
B
35
S
10
G
4
Posts: 94
Reputation: 4,083


Return to How do I....?

Who is online

Users browsing this forum: Construct Monkey, David181, luckyrawatlucky and 1 guest