1
Coding / GML Problem
« on: August 02, 2010, 01:27:20 am »
Normally I'd just figure out this simple problem myself, but I'm feeling very lazy.
objSolid is my solid parent object
This code is supposed to cause link to walk along sloped solid objects. Instead of checking if he should flat out stop moving as if there was solid on the left AND right side of him, it checks if there is solid on the right side of him, but no the left, thus implying the left facing slope. Yet for some reason just treats it like he is running into a normal solid on both sides. I'm sure it's something simple, but I'm lazy...
Code: [Select]
if up=1 and !place_meeting(x+2,y-2,objSolid) and place_meeting(x+sprite_width-2,y-3,objSolid)
{
y-=2
x-=2
moving=1
exit;
}
up is a variable that checks if up is pressed.objSolid is my solid parent object
This code is supposed to cause link to walk along sloped solid objects. Instead of checking if he should flat out stop moving as if there was solid on the left AND right side of him, it checks if there is solid on the right side of him, but no the left, thus implying the left facing slope. Yet for some reason just treats it like he is running into a normal solid on both sides. I'm sure it's something simple, but I'm lazy...