How do I get my touch character movement working?

Just started using Construct 2? Post your questions here

Post » Mon Apr 27, 2015 8:24 am

Hi Guys,

I am making an android version of my game Super Bounce Bounce.

http://gamejolt.com/games/puzzle/super- ... nce/63124/

I have a problem to get smooth touch controls, it will basically be split in half the screen on side to move right and one left, I cannot get the character to move smoothly like it does on the PC version and I cannot make the character go left using the left movement button with touch.

I have searched for a tutorial on touch character movement, I have the 8 directional movement but when clicked it does not do anything unless I add a speed of 300 etc but then it will jolt forward fast :(

Thanks
B
4
S
1
Posts: 56
Reputation: 464

Post » Mon Apr 27, 2015 12:30 pm

Having played your 'Super Bounce Bounce', I assume that what you want is the player to move while the touch is 'down'. In that case I think the way to go is something like:

-Touch 'Is In Touch'
--Touch.X < (Window.Width / 2)
---Player Simulate Control 'Left'
--Touch.X => (Window.Width / 2)
---Player Simulate Control 'Right'

I hope that made sense but it should work I think.

**Edit** You might be able/want to change 'Is in Touch' with 'Touch on Hold'. You'll have to try both.
B
5
Posts: 19
Reputation: 263

Post » Mon Apr 27, 2015 9:53 pm

Thanks Eklo I will try this tomorrow.

Thank You for you help and I will let you know if it will work :D
B
4
S
1
Posts: 56
Reputation: 464

Post » Tue Apr 28, 2015 7:44 am

@eklofakka Thanks for the help it worked :)
B
4
S
1
Posts: 56
Reputation: 464

Post » Tue Apr 28, 2015 1:19 pm

Happy to help. :)
B
5
Posts: 19
Reputation: 263

Post » Tue Apr 28, 2015 1:37 pm

Only problem is the bounce on the character now :(
B
4
S
1
Posts: 56
Reputation: 464

Post » Tue Apr 28, 2015 6:24 pm

What is wrong with the bouncing?
B
5
Posts: 19
Reputation: 263

Post » Tue Apr 28, 2015 6:50 pm

When you bounce on a corner it will push off and you cannot move atall.
B
4
S
1
Posts: 56
Reputation: 464


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests