Touch Controls - Multiple simultaneous touches.

Get help using Construct 2

Post » Mon Feb 02, 2015 8:50 pm

Hello! I've been trying to figure this out for a couple of hours, hunted around the forums a bit. I'm trying to make a game in which you're moving with a D-pad and shooting with the tap of a button. I'm testing on a Android phone running 4.3 through the Intel XDK app.

The problem I'm having is whenever I'm touching a direction on the d-pad and then hit the fire button, the character stops. He'll resume if the fire button is hit again while the d-pad is still being touched, but a bullet will not fire. He'll stop again when the fire button is released. Everything seems to reset to normal when all the controls are released.

Here's the .capx that I've been working on: <Edit: It won't allow me to post the dropbox URL.>
Any ideas on how to fix this would be greatly appreciated,
- Zenny
B
3
Posts: 3
Reputation: 183

Post » Mon Feb 02, 2015 9:09 pm

Read this:
https://www.scirra.com/tutorials/398/to ... ers/page-3

the trick is the "on touched" - "is in touch"-"on touch ended" combination with using the TouchID
Read this:
yeah, i really like to say that you should "Read this:"
B
12
S
5
Posts: 138
Reputation: 1,490

Post » Mon Feb 02, 2015 9:35 pm

I'm looking at this tutorial and I'm not quite sure how it applies. I've got 6 objects set-up on my project. Four of those are the up, down, left, and right buttons for the d-pad and two are buttons to fire weapons. Currently if a fire button and a button on the d-pad are hit together then it glitches out. Though I'm only able to produce this glitch when testing through Intel XDK. I did a preview over WIFI and it seemed fine.

Should I try building the project and seeing if that helps? I'm really not sure what's going wrong.

I'm using "Is Touching" events for the d-pad and "On Touched" events for the firing buttons.
B
3
Posts: 3
Reputation: 183

Post » Mon Feb 02, 2015 9:48 pm

do you just use the "is touching" event or the <<<< "on touched" - "is in touch"-"on touch ended" >>>> combination?
and do you use Touchid? Touch id is very important for multitouch, your touch controls can glitch around if you are not using it

Or you really have a bug after building the game
Read this:
yeah, i really like to say that you should "Read this:"
B
12
S
5
Posts: 138
Reputation: 1,490

Post » Mon Feb 02, 2015 10:11 pm

Yeah, I ran through some more testing and there seems to be a problem with the test function in the Intel XDK. Built via crosswalk and everything worked wonderfully!

Thanks for the help.
B
3
Posts: 3
Reputation: 183

Post » Mon Feb 02, 2015 10:19 pm

your welcome

I got a question: How do you build your game for android if you dont have buyed a C2 license?
Read this:
yeah, i really like to say that you should "Read this:"
B
12
S
5
Posts: 138
Reputation: 1,490

Post » Tue Feb 03, 2015 1:33 pm

@Zenny - It's always best to build an app and test it, versus just using App Preview. It sounds like you may have been testing the Android WebView and not Crosswalk. Crosswalk has better support for touches (including multi-touch).
Intel Corporation
B
5
S
2
Posts: 133
Reputation: 871

Post » Tue Feb 03, 2015 3:10 pm

@EyeForcz, users that have an educational license or Steam license do not always have the medal that shows by your avatar. The medal only appears automatically when you have purchased using your account through the Scirra store.

That is all.

@Zenny good work getting everything to work correctly, and good luck on your endeavors!
ImageImageImageImage
B
57
S
19
G
51
Posts: 633
Reputation: 30,681


Return to How do I....?

Who is online

Users browsing this forum: plinkie, Yahoo [Bot] and 2 guests