> to add timers like this to things i usually use a variable and then have an event that sets to variable to the time you want and an event that continuously removes time from that variable.
>
> for example: You make an instance variable on you player called "boosting"
>
> then for example
>
> When shift key pressed - set "boosting" to 0.5 (this gives you the amount of time you are after)
>
> then you link the action you are seeking to that variable being greater than 0. e.g.
>
> If player.boosting > 0 - set max speed to 100(or whatever u want)
>
> Inside this event you have a sub event that handles the countdown of the variable
>
> so sub event: -- every 0.1sec subtract 0.1 from player.boosting
>
> then finally you have an event that resets the action to normal when the counter has run down
>
> If player.boosting =<0 - set max speed to 50(or standard speed)
>
> Here is an example that i did for someone else of the same technique, that means that for 5 seconds after a player has overlapped the blood pool, they will produce bloody footsteps while moving. Same method.
>
> 1drv.ms/u/s!AkmrWgxeuxlKhIcKKuFgyNMlgcROYw
And also to add to this, you can also use the Timer behavior. When you dash, set timer with the tag "dash" and duration of the dash.
If "dash" timer is running, set speed to dash speed.
if "dash" timer NOT running, set speed to lerp() back to normal speed.
You can also add that only if the "dash" timer is NOT running, you can hit "shift" to dash.
I have this working but I'm wondering if there is a way to slow the deceleration by the lerp down.