[Touch] It works on PC but not in tablet

Get help using Construct 2

Post » Mon Jun 17, 2013 8:16 pm

Hello everyone!

I am developing a game with touch controls. The engine works fine on my PC but not on my tablet (works crazy).
That may be happening?

Link:
TEST

The system I'm using is from this post:
Grid Movement

Here is the capx:
http://db.tt/tEXo5Xe2
B
47
S
12
G
5
Posts: 124
Reputation: 6,851

Post » Mon Jun 17, 2013 8:31 pm

I didn't have time to check your .capx, but it could be the fact that the touch object doesn't set a position unless you are currently touching the screen, whereas the mouse will stay on screen even if you're not clicking anything. To work around this you could try and make two variables, say "TouchX" and "TouchY" and add an event:

[code]+Touch: Is in touch
-> Set variable TouchX to Touch.X
-> Set variable TouchY to Touch.Y[/code]
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Mon Jun 17, 2013 9:04 pm

Nimtrix added the code you mentioned. The errors not corrected.
Here some videos:

Test 1

Test 2
B
47
S
12
G
5
Posts: 124
Reputation: 6,851

Post » Mon Jun 17, 2013 10:12 pm

I exported it with cocoonjs and tested it on my phone and it seems to run just fine, so I'm afraid I don't know what's causing it.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Mon Jun 17, 2013 10:25 pm

Ok! It might not work on my tablet or a bug in the construct. I'm using the beta 134.

Nimtrix thank you very much!

The engine is available for those who want to use it in their games. :)

If anyone else has a solution please post it.
B
47
S
12
G
5
Posts: 124
Reputation: 6,851


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, eleanorawesome, RODInteractive, Yahoo [Bot] and 33 guests