Touch Swipe

Get help using Construct 2

Post » Thu Jan 30, 2014 3:50 am

Hi guys,
Im playing with a platform idea and am wanting to do a simple touch swipe. If i swipe up, i want the character to jump and play the jump animation.
What is the best way to do something like this ?
A simple explanation or capx would be very much appreciated.
Thank you
B
5
Posts: 12
Reputation: 299

Post » Thu Jan 30, 2014 6:58 am

Here is how I do it.



Replace the function calls with your events.
B
101
S
32
G
11
Posts: 1,546
Reputation: 21,667

Post » Thu Jan 30, 2014 7:32 am

You might want to add a distance check so that the smallest 1pixel movement won't cause a function. Also I would suggest comparing against the X values to see which is greater. If you want to say move right, but because you have 1 px difference for Y you will jump anyways.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,028

Post » Fri Jan 31, 2014 3:58 am

ArcadEd, thank you so much for showing me an example its great and helped me to understand the process.

Jayderyu, thats a really great idea, I will implement the distance check so I dont have any problems.

Both of you have been really helpful, thanks again guys
B
5
Posts: 12
Reputation: 299


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests