Hi,
I am having some difficulties on the collision setting for the limits in my game. When the hero jumps onto the ground, he either lands perfectly on it, or just above it. My ActionScript for the limits is the following:
function collision() {
with (hero) {
if (limits.hitTest(_x, _y, true)) {
_x -= 3;
}
if (limits.hitTest(_x, _y, true)) {
_x += 3;
}
if (limits.hitTest(_x, _y, true)) {
_y -= 10;
jumping = false;
}
if (limits.hitTest(_x, _y, true)) {
_y += 5;
}
}
}
If anyone has any help or suggestions, it would be greatly appreciated. Thanks.
Sincerely,
JoMan