N
Noba
Guest
So, no idea why this isn't working, it was working before and I'm not sure what has changed.
When you move left, the code checks if another box is right next to the object, and if not then it won't move, same for right, and so on.
The object just moves right, completely ignoring the box, and won't move left at all.
When you move left, the code checks if another box is right next to the object, and if not then it won't move, same for right, and so on.
Code:
if(left && !place_meeting(x-300,y,oExit or oBoxRightUp or oBoxRightDown or oBoxLeftUp or oBoxLeftDown or oUp or oDown or oLeft or oRight or o4ways))
{
x -= 5;
}
if(right && !place_meeting(x+300,y,oExit or oBoxRightUp or oBoxRightDown or oBoxLeftUp or oBoxLeftDown or oUp or oDown or oLeft or oRight or o4ways))
{
x += 5;
}