how to make player slide on Slippery floor

Get help using Construct 2

Post » Thu May 18, 2017 5:08 pm

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?
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367

Post » Thu May 18, 2017 6:58 pm

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.
Image Image Image
B
31
S
11
G
27
Posts: 748
Reputation: 17,093

Post » Thu May 18, 2017 7:55 pm

Message: imhotep22 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
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.

http://i65.tinypic.com/10fncy8.png
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367


Return to How do I....?

Who is online

Users browsing this forum: TRMG and 30 guests