• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows Platformer Block Pushing

  • Thread starter Uneven Pixel Studios
  • Start date
U

Uneven Pixel Studios

Guest
So there is some issues with my platformer in terms of pushing blocks. When moving to the left, it appears jumpy. Any ideas?
's' is the speed of the player.

Code:
if place_free(x+s,y){
    x += s
}
else{
    if instance_place(x+s,y,obj_red_block) && !place_free(x,y+1){
        with(instance_place(x+s,y,obj_red_block)){
            if place_free(x+other.s,y){
                x += other.s
            }
            else{
                other.s = 0
            }
        }
        x += s
    }
    else{
        s = 0
    }
}
 
Top