MaxLos
Member
Hihi,
Pretty much what the title says. When my player moves in the opposite direction a moving platform is, they reach the end of the platform way faster than when they are moving in the same direction of the platform. Just wondering what I should do to make the player move the same speed as they do in the direction the platform is moving, in the opposite direction. Thanks!
Pretty much what the title says. When my player moves in the opposite direction a moving platform is, they reach the end of the platform way faster than when they are moving in the same direction of the platform. Just wondering what I should do to make the player move the same speed as they do in the direction the platform is moving, in the opposite direction. Thanks!
Code:
//Horizontal Platforms
if place_meeting(x,y+1,par_horizontal_platform) //If there's a moving platform beneath us
{
var platform = instance_place(x,y+1,par_horizontal_platform) //Store id of that platform
with platform
{
if !place_meeting(x+hsp,y,par_solid)
{
if (other.hsp = 0) or (other.hsp > 0 and hsp > 0) or (other.hsp < 0 and hsp < 0)//Check if player isn't moving at all or moving the same direction the platform is
{
other.hsp_carry = hsp; //Add the platform's momentum to the player
}
}
}
}