How do I double tap to run, increasing the speed

Get help using Construct 2

Post » Thu Jun 04, 2015 6:19 pm

Hi,

I need to simulate the character to run when the player double tap or double click.
The hardest part for me is to increase the speed as the player keep tapping/clicking and to decrease when the player stop tapping/clicking until the character stops.

Also, I need to take in consideration the FPS.

Can someone help with me this?

Thanks,
B
124
S
51
G
24
Posts: 401
Reputation: 22,617

Post » Thu Jun 04, 2015 6:25 pm

There is a function on construct 2 that reads double taps or double clicks and also there's functions that capture the moment the player releases the button. Just set the speed of the character according to this events.
B
17
S
7
Posts: 280
Reputation: 2,522

Post » Thu Jun 04, 2015 6:38 pm

You theory is good but it is more complicated than that. Especially because of the increase and decrease of speed.
B
124
S
51
G
24
Posts: 401
Reputation: 22,617

Post » Thu Jun 04, 2015 7:56 pm

Do you want the speed to increase more and more as the player keeps tapping?
B
17
S
7
Posts: 280
Reputation: 2,522

Post » Thu Jun 04, 2015 8:15 pm

Yes. Until it reaches a point.
It would be like track and field. If you keep tapping, the player would run faster.
if you stop, the player would start losing the speed.
B
124
S
51
G
24
Posts: 401
Reputation: 22,617

Post » Fri Jun 05, 2015 1:58 am

u should use system every tick touch player on tap increase speed by x seconds i guess.
B
4
Posts: 27
Reputation: 254

Post » Sat Nov 05, 2016 5:49 pm

I'm going to reply here instead of making a new thread:

RayKi wrote:There is a function on construct 2 that reads double taps or double clicks and also there's functions that capture the moment the player releases the button. Just set the speed of the character according to this events.


I can't seem to get this right, when I press right arrow to move my character forward, it will automatically act on running speed.

Here's my EventSheet:
https://www.dropbox.com/s/pnhfmg8qxza7s ... 2.png?dl=0

My goal is to double tap and hold on the second tap to run. What am I doing wrong?
B
25
S
3
G
2
Posts: 9
Reputation: 2,689

Post » Sun Nov 06, 2016 1:50 pm

Bro, one way I use to this is controlling this with the animations.
If the player press the move button with the idle animation playing, then the char walks. If the key is pressed and the moving animation is playing, then the char starts to run.

Give it a try :D
B
17
S
7
Posts: 280
Reputation: 2,522


Return to How do I....?

Who is online

Users browsing this forum: draiza and 11 guests