click event on mobile devices

Get help using Construct 2

Post » Tue Nov 01, 2016 2:17 pm

I use click events on an intro screen and a help screen at the beginning of a game. The click event triggers a liteTween event that moves out intro and moves help in and then help is moved out on another click even.
All works wonderful on the web but when the web page is seen on a mobile device, the click event do not respond.
I added touch events and select use mouse input Yes. still no joy.
Any one could tell me what I am doing wrong?
B
8
S
1
Posts: 86
Reputation: 618

Post » Wed Nov 02, 2016 4:37 am

replace all your mouse inputs for touch inputs.
Image

Image
B
38
S
14
G
7
Posts: 408
Reputation: 8,338

Post » Wed Nov 02, 2016 12:31 pm

Will this mess up the event on a PC?
Basically I am not making a game for mobiles specifically, I am making games that are part of a webpage. Since people surf the web on they iPads and other devices, I want them to work on PC and mobiles as web page elements.
I am very surprised that a click event would not work on an iPad since in HTML5 they do and I publish as HTML5.
B
8
S
1
Posts: 86
Reputation: 618

Post » Wed Nov 02, 2016 1:06 pm

"I added touch events and select use mouse input Yes. still no joy."

that means that touch inputs will also work with the mouse, not that the mouse will trigger touch inputs.

I'll admit it is tricky to understand at first.

basically, you need to have touch events with this setting "use mouse input" set to yes for it to work on touchscreens and on mouse clicks.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Wed Nov 02, 2016 3:21 pm

Thanks Aphrodite. I am trying something right now and if it does not work I will try and make a sample to reproduce the problem.

BTW I did not consider this being a bug but rather a mistake I am making somewhere. Thus I did not submit a bug.
Last edited by resdesign on Wed Nov 02, 2016 3:44 pm, edited 1 time in total.
B
8
S
1
Posts: 86
Reputation: 618

Post » Wed Nov 02, 2016 3:43 pm

OK. I made a sample with just my start screens and it is working. So there must be something in the game that is interfering. So I am working on it changing some settings to see if the problem is corrected.
B
8
S
1
Posts: 86
Reputation: 618

Post » Wed Nov 02, 2016 4:01 pm

Update:
It is working now. My take.
As suggested by Chris Dmm on FB:
Separate the layout for the intro screen from the game layout
Add the screens on the layer and make it global.
Voila.

Not sure why it does not work when the screen are on the same layout though because the code is exactly the same.
B
8
S
1
Posts: 86
Reputation: 618


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 44 guests