G
Guest User 1
Guest
I have some collision code:
How do I have that last line affect ONLY the instance that would trigger the if statement? Will "other" work?
Code:
if( x + 16 >= obj_platform.x - 16
&& x - 16 <= obj_platform.x + 16
&& y + 16 >= obj_platform.y - 8
&& y - 16 <= obj_platform.y + 8 ) {
y = obj_platform.y - 24 ;
vel_y *= -1 ;
vel_y -= 1 ;
obj_platform.vel_y -= vel_y ;
};