BBGaming that's absolutely, undoubtedly the most idiotic way of accomplishing this I have ever seen.
Here, I wrote your code for you.
Step event:
if(collision_circle(x + lengthdir_x(6, direction) + hspeed, y + lengthdir_y(6, direction) - vspeed, 16, obj_block, 1, 1)) { // Horizontal collision
hspeed = 0; // Stop horizontal movement
}
if(collision_circle(x + lengthdir_x(6, direction) - hspeed, y + lengthdir_y(6, direction) + vspeed, 16, obj_block, 1, 1)) { // Vertical collision
vspeed = 0; // Stop vertical movement
}Now, this may be choppy if you have to speed set under
keyboard_check_pressed(); so I suggest setting speed under
keyboard_check(); (This way it instantly restores horizontal/vertical movement when there no longer is a collision)
And here's the description of what you don't understand:
collision_circle(x, y, radius, object, precise, not this object);
Downloadable example of this:
http://www.mediafire...9r1odr99uamtq45(Proof that it works, you have no excuse now)
I know this helped you, and I know this works, so have fun.
Edited by Jobo, 06 May 2012 - 07:40 PM.