Speed increases as you move?

Get help using Construct 2

Post » Tue Aug 27, 2013 10:26 pm

I'm going to try to make a mario game. And I was wondering if there was a way to make the speed slowly rise from walking speed to running speed. And when he hits the running speed, the animation changes to his running animation.
B
10
S
4
G
1
Posts: 159
Reputation: 1,933

Post » Tue Aug 27, 2013 11:19 pm

When using the "Platform" behavior on your player, you can set the acceleration as a parameter on the player object, with which you can make your slow rise from walk to run.

Then you can on the object compare the speed and set it to your running animation when it has reached a certain point.

something like this: .capx
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Tue Aug 27, 2013 11:23 pm

Your speed needs to be a variable lets call it SpeedA
Youd also want a base speed variable lets call it SpeedB

--                                                --
IF speed A <= speed limit
Every 0.1 Seconds (could also use tick, etc)
Key is down           set speedA too speedA + 10
--                                                --
On key Released       set speedA to speedBJWstudios2013-08-27 23:25:49
B
10
S
2
G
1
Posts: 77
Reputation: 1,278

Post » Tue Aug 27, 2013 11:44 pm

How would I do a Brake animation? Like when I'm running and I hold the opposite key down. I'm running right, I press the left key, and the brake animation plays until he stops.
B
10
S
4
G
1
Posts: 159
Reputation: 1,933


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, JackTYGA, jobel, MeteoorSC and 28 guests