Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ItzArranT on May 24, 2017, 08:55:22 AM

Title: Increase movement speed over time to max speed[SOLVED]
Post by: ItzArranT on May 24, 2017, 08:55:22 AM
Hi all!

Newbie Playmaker user here.  I've recently started making a 2D platformer and have run into my first question.

To make my character move, I use 'Get Axis' and 'Set Velocity'.  However, I'd like the character to increase in movement speed over time to a max speed.

Can anyone help with advising me on how to do this??

Many thanks
Title: Re: Increase movement speed over time to max speed
Post by: jeanfabre on January 14, 2019, 02:30:52 AM
Hi,

Just stumbled upon your post, sorry for the necro :)

You need to create a Speed variable that you add value too at a constant rate while the user is moving, and reset it back when the user stops moving.

if you have problem with this, I'll do a quick sample.

 Bye,

 Jean
Title: Re: Increase movement speed over time to max speed
Post by: ch1ky3n on January 14, 2019, 01:36:53 PM
I made an example, hope it helps

Title: Re: Increase movement speed over time to max speed
Post by: jeanfabre on January 15, 2019, 07:39:07 AM
Hi,

 Thanks for your contribution. I do think however that it may be too complex as a starter.

 I attached a variant, which decrease the complexity of dealing with such mechanism

(https://i.imgur.com/0ZKsZUX.gif)

the key to properly cut down each step of the speed computation, with dedicated variables.

Bye,

 Jean
Title: Re: Increase movement speed over time to max speed
Post by: ch1ky3n on January 15, 2019, 01:21:59 PM
Hey that was nice, i think yours is more efficient

thx for sharing