How do I move an object with swipe?

Get help using Construct 2

Post » Tue Jan 27, 2015 1:14 am

How do I move an object (like a car), around in any direction, with touch swipe? Can someone post a capx, showing how to do it?
B
28
S
5
G
1
Posts: 594
Reputation: 3,286

Post » Tue Jan 27, 2015 10:05 am

Current Mission: improve design skills
B
8
S
1
Posts: 57
Reputation: 1,003

Post » Tue Jan 27, 2015 6:48 pm

Hey @Cybersurfer5000, the "on-object" tutorial seems to be the right fit for my game, but when I tested the capx, instead of the blue box moving around in the direction that I swipe, a message just pops up saying "swipe left", or "swipe right", etc. How do I make the blue box actually move around in the direction I swipe?
Last edited by guannstar on Tue Jan 27, 2015 7:02 pm, edited 1 time in total.
B
28
S
5
G
1
Posts: 594
Reputation: 3,286

Post » Tue Jan 27, 2015 6:53 pm

Or rather, this capx seems to work a little better, https://dl.dropboxusercontent.com/u/541 ... swipe.capx Although, the problem with this capx is that it moves the background (stars) around, instead of the car. In this capx, how do I change it so that the cars to move around in the direction I want, instead of the stars/background?
B
28
S
5
G
1
Posts: 594
Reputation: 3,286

Post » Tue Jan 27, 2015 8:14 pm

Bump...
B
28
S
5
G
1
Posts: 594
Reputation: 3,286

Post » Sun Feb 14, 2016 7:52 pm

Hello I am having same question so bumb after a long time :) please I will be really glad for any help how to move object by swiping thank you!
B
11
S
3
Posts: 37
Reputation: 999

Post » Sun Feb 14, 2016 11:03 pm

It seems the above links show you how to detect the swipe, so all youd have to do is attach the movement action to the detection..

You could easily set a global variable to "left" for example..

Check the value of the global variable and attach the movement action you'd like when the direction of the swipe is "left"
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go and 9 guests