How do I slow down slowly

0 favourites
  • 2 posts
From the Asset Store
Set of tiles to create a map for top-down games with island theme
  • so i have a boat that has custom movement.

    somewhere on press W i set it's custom movement speed to 50 - and it works good. then i release the key

    and i want it to slowly get down to 0 speed.

    i've tried:

    system every 1.0 sec && boat.custommovement.speed >0 set boat.custommovement.speed-10 - doesn't work

    tried the same invoking a function - doesn't work

    tried the same with every tick - doesn't work

    tried recursion in function - breaks the javascript

    so how exactly do i do it correctly?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm not sure how custom movement works, but try

    W is down -> Set speed to 50

    Else -> Set speed to max(boat.custommovement.speed - (60 * dt), 0)

    (to make an Else event, select the "W is down" event and press X). Change the 60 to a lower value so it slows down slower

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)