PlayerOne
Member
Finishing off my moving platforms for my project and this one is really giving me a headache.
I have a vsp platform but my player object keeps cliping/falling through it when the platform goes up after hitting a wall. On top of that the game freezes, not crashes, no doubt due to the while statement in the code.
Any help is appreciated.
Note that the vsp platform contains collision to reverse its speed and that works fine.
I have a vsp platform but my player object keeps cliping/falling through it when the platform goes up after hitting a wall. On top of that the game freezes, not crashes, no doubt due to the while statement in the code.
Any help is appreciated.
Code:
//PLAYER END STEP
else if (vsp_final != 0 && place_meeting(round(x),round(y+vsp_final),_wall_vsp))
{
if (place_meeting(round(x),round(y+vsp_final),_wall_vsp))
{
vsp_carry=_wall_vsp.vsp;
while(!place_meeting(x,y+sign(vsp_final),_wall_vsp))
{
y += sign(vsp);
}
vsp_final=0;
vsp = 0;
}
}