Slope problem

N

NeosDany

Guest
I've followed the steps for the movement tutorial Shaun Spalding and the movement is perfect, but I have a slope problem and I can't figure out what to do to make my character go through slopes. Who can help me?

I am working on Game Maker 8.1 lite.

Code:


//Horizontal Collision
if (place_meeting(x+hsp_final,y,obj_suelo))
{
while(!place_meeting(x+sign(hsp_final),y,obj_suelo))
{
x += sign (hsp_final);
}
hsp_final = 0;
hsp = 0;
}
x += hsp_final;
 

TheouAegis

Member
To go through slopes or to actually use slopes?


That's his slope platforming tutorial.

To go through slopes, you either need to not make your slopes actual terrain, like in early Castlevania games, or you need to check if the up-or-down direction is pressed at the time of the collision. And if you want to be able to jump from the ground up and then land on a slope, you also need to understand how to do jump-through platforms.
 
Top