Touchscreen analog stick not working correctly

Get help using Construct 2

Post » Mon Feb 11, 2013 7:26 pm

So, I've been trying to make an analog stick based around https://www.scirra.com/tutorials/398/touch-stick-controllers/page-3 so that people who play my game on a touchscreen have a half decent control method.

The implementation I have works perfectly in a modified version of the demo capx from page 5 of that link. I can move the player around (a spacehsip) in full 360 degrees and it moves.
However when I copied and pasted it over to the main game, I encountered a problem. The analog stick works fine on the game layer, however the problem with that is that then when I move the ship, the analog stick moves away. The problem is that when the analog stick is on the game UI layer, which is always onscreen, the Drag and Drop behavior used by the analog stick ceases to work. This is the case on IE10, and Safari on my iPad.

I am using Constuct 2 r118.

Here are some links that might help out:
- CAPX file of game: http://sdrv.ms/U6IadN
- Game in Browser, with the analog stick set to visible on all devices: http://rymate.co.uk/space

Any help would be appreciated.
B
5
G
1
Posts: 23
Reputation: 778

Post » Mon Feb 11, 2013 9:23 pm

Well a couple of things I should note.

The tutorial was created before ForID. The D&D behaviour was a requirement at the time. You can phase out the D&D behaviour and instead rely using ForID. The tutorial will be updated to reflect this when I have more time.

Here is the fix.
https://dl.dropbox.com/u/14087254/spaaaaaaaaaaace.capx

oh. I did some fidly for testing. If I missed anything I'm sure you can fix it for mobile :)
jayderyu2013-02-11 21:23:52
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Tue Feb 12, 2013 6:58 am

Thanks!

Just gotta figure out why it only goes diagonally now :) (Unless thats's an IE issue)

Edit: Nvm fixed it. Thanks again :Drymate12342013-02-12 07:06:06
B
5
G
1
Posts: 23
Reputation: 778


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 18 guests