# Slippery sliding on slope

0 favourites
• 13 posts
• Anyone have an idea for the best way to make a platformer slope that pulls you down the hill?

<img src="http://i.imgur.com/nkQK4.png" border="0" />

I've tried adding to the X velocity when on slope, I don't think it worked well.

I've tried just doing a +x +y to position when on slope, but it thinks you're always in the air so that doesn't work.

• You need to work with gravity.

This: scirra.com/tutorials/273/how-to-make-a-gravity-based-platformer should fix all your upcoming questions.

Ps: Dont forget to set the players angle like in the Tutorial or it looks like your Player goes stairs down :D

• I'm not sure if that tutorial is related? This problem is to do with making a slope that you can slide down, not make you walk around it like in sqiddster's gravity example/tutorial.

• Anything like this?

// Kinda stupid example, but meh, it's sliding:P

• Yeah thats what he want but he still need the gravitation to let it look real ;)

• Yeah that works, except I should clarify that I'm using the platform movement (not physics).

• Yeah, i get that, thought u can kinda mix those two ones- platform and physics:P Give it a try!) Or, manually&without physics, you can either add event that simulates gravity(Like every tick => x=x-dx, y=y-dy, depending on movement angle, and some additional conditions or something, may think on this one later), or you make a Slope family, and then if(player overlaps Slope){player.angle=slope.angle, move player at that angle, add some acceleration}. Huh, hard to figure that out without construct around:D i'll try to play with that ideas when i get back home:)

If that'd be still actual:)

• Bump

• I was trying some complicated ways to do this and then I thought of the most obvious way.

platformSlopes.capx (r114)

• ## Try Construct 3

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

Construct 3 users don't see these ads
• Seems like it's pretty well taken care of! Out of curiosity, does changing the acceleration have an effect on this? If the player is moving, maybe have the "slippy" surface remove deceleration or even increase acceleration?

• space Ape Good idea. Increasing the platform max speed while on the slope works well.

You could also disable jumping on the slope if you don't want the player hopping back up.

• Thanks peoples.

• 13 posts