How do I move the player like this?

Get help using Construct 2

Post » Sun Aug 16, 2015 10:28 am

Message: kisstranger can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hi, how to achieve this control of character?
Drag to move, Tap to slide and attack to the direction.
Example:
https://www.youtube.com/watch?v=5lo3WpOObd8

Any tutorial is similar?
Thanks for help! :D
B
3
S
1
Posts: 4
Reputation: 533

Post » Mon Aug 17, 2015 1:31 am

You could easily do it using the excellent behavior MoveTo from rexrainbow : https://www.scirra.com/forum/behavior-moveto_t63156

Image

CAPX
B
15
S
6
Posts: 105
Reputation: 1,356

Post » Mon Aug 17, 2015 3:45 am

No need for extra plugins. You simply use the Lerp function to get the desired result.
https://www.dropbox.com/s/8900iyq0taheg6u/moveANDslash.capx?dl=0
B
47
S
12
G
5
Posts: 124
Reputation: 6,851

Post » Mon Aug 17, 2015 5:43 am

Thank you guys for help!!!
B
3
S
1
Posts: 4
Reputation: 533

Post » Thu Aug 20, 2015 4:49 pm

@Wenaptic how do i make the character go 1 steady speed. and how would i increase or decrease the speed ?

Thanks for the example!
B
22
S
7
G
1
Posts: 90
Reputation: 2,045

Post » Thu Aug 20, 2015 10:39 pm

@IanHarlow: Sorry, I do not understand your question. Could you explain better?
B
47
S
12
G
5
Posts: 124
Reputation: 6,851

Post » Fri Aug 21, 2015 12:44 am

@Wenaptic: On the code you sent over the dropbox, could you please tell me how i would alter the speed the character comes to the touch point? I was also asking how to i make the player go 1 steady speed. when i touch the screen, the farther away i touch, the faster he moves, and when i touch close to the character he barely moves. I want him to go like a steady speed of 7 pixels whether the touch is close to him, or far away.

Thanks for the help so far!
B
22
S
7
G
1
Posts: 90
Reputation: 2,045

Post » Wed Aug 26, 2015 11:19 pm

Excuse the delay. I was busy these days. Here I leave the modified version (which you can change) at a constant speed. This varies with the previous example, because it uses the bullet behavior.

https://www.dropbox.com/s/gbtc6pfcd3tv3ju/moveANDslashBullet.capx?dl=0
B
47
S
12
G
5
Posts: 124
Reputation: 6,851

Post » Sun Sep 13, 2015 1:28 pm

ok thanks
B
22
S
7
G
1
Posts: 90
Reputation: 2,045


Return to How do I....?

Who is online

Users browsing this forum: jorgmaquoi and 18 guests