How do I make my character move by dragging and dropping

Get help using Construct 2

Post » Sat Jul 25, 2015 1:11 pm

Hi there!

I have a question that I hope some of you can help me answer, unfortunately I do not think it is as simple as I would like it to be.

So, I'll try to explain it to the best of my abilities.
I have a player character at the bottom of the screen which needs to run whenever the player uses his finger to drag and drop. The character should only be able to run left and right horizontally. I would like for the player to have the ability to touch the character sprite, drag his finger to where he want the character to move, and when he lifts his finger the character should run to the point where he let go.

The only important thing is that the character doesn't move instantly but runs to where the player dragged his finger to.

Unfortunately I can not seem to figure out how to do this myself as I am quite new to the Construct environment.
I hope that you can make sense out of my ramblings, thank you for your time!
B
4
Posts: 5
Reputation: 687

Post » Sat Jul 25, 2015 2:41 pm

Here it is, hope it helps :) (I made it super simple though)
https://www.dropbox.com/s/oohetp2ytfy8d ... .capx?dl=0
B
9
S
3
Posts: 150
Reputation: 1,264

Post » Sat Jul 25, 2015 3:27 pm

Image
B
63
S
23
G
7
Posts: 1,480
Reputation: 10,796

Post » Sat Jul 25, 2015 3:44 pm

Just curious... Is moveto better than lerp, @korbaach ? I´ve always loved the simplicity of anglelerp/unlerp/lerp
B
9
S
3
Posts: 150
Reputation: 1,264

Post » Sun Jul 26, 2015 11:22 am

Thanks guys for taking the time to help! That was exactly what I needed and I think I get how it's done now :-)
B
4
Posts: 5
Reputation: 687


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests