how to make player slide on Slippery floor

0 favourites
  • 3 posts
From the Asset Store
3 different games for kids, easy to edit, mobile ready
  • I am making a top down game, where the player moves the character using the mouse, the movement is calculated using the patch finding behavior. I want to implement a slippery floor (tiled background), when the player is on this floor, he is suppose to slide a bit before coming to a full stop in the direction he is moving, to make the game move difficult.

    I tried many ways to implement this using the path finding behavior, but I can't seem to get it right so far, can any one help me or give me an idea how to implement this slippery effect?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well since you're using pathfinding it would be a little challenging to implement.

    I would suggest using BULLET function for the 'slipping' part. (In fact, I suggest to use bullet motion for your movement as well. It would depend of course on what type of game you're making)

    I'm going to assume with sprite's angle is set to his angle of motion.

    On SPRITE collides with Tilemap | Stop SPRITE.Pathfinding

    add [Your Choice Slip speed] to SPRITE.Bullet.Speed

    every tick | SPRITE.Bullet.Speed to SPRITE.Bullet.Speed/1.1

    ^This is to slow down the sprite over time. experiment using 1.02 to 1.5 or something. See what works for you.

  • The bullet behavior did the trick, the implementation got a bit tricky, but I got it right in the end, here's how it looks like. Thank you for the help.

    i65.tinypic.com/10fncy8.png

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