D
Dropsuitcaptain
Guest
My horizontal collision isn't working properly but my vertical is, could someone help please
my horizontal code:
my vertical code:
hspd is my variable for moving left & right.
I've also tried this on different objects and it gives me the same result.
Doesn't stop me like it's supposed to.
Any help is appreciated!
my horizontal code:
Code:
if place_meeting(x+hspd,y,oHouse1){
while !place_meeting(x+sign(hspd),y,oHouse1){
x += sign(hspd);
}
hspd = 0;
}
Code:
if place_meeting(x,y+vspd,oHouse1){
while !place_meeting(x,y+sign(vspd),oHouse1){
y += sign(vspd);
}
vspd = 0;
}
I've also tried this on different objects and it gives me the same result.
Doesn't stop me like it's supposed to.
Any help is appreciated!