How to fix game issue

Hello. I am trying to make a relaxed, cool game were you fight some easy enemies. I made it so that when you jump on top of them, they play an animation and die. however, when you touch them on the sides, you die. but whenever I jump on top of them, I still die, when, in theory, I should just destroy them. HELP!

2 Likes

Check the collision behavior. There should be stuff like Top, Bottom, Left, Right, etc.

I did, and i disabled top collisions for death

2 Likes

Then you might need to reverse the bottom and top because of the object the collision code is in

okay,. i will try that

1 Like

here is a link to the game as i am not having success.

1 Like

Ghost collision:
image
Player collision with ghost:
image
I also changed the ghost’s collision shape to Polygon.

2 Likes

Also be sure to use a square or polygon shape. If you want extra consistency, consider using a raycast.

1 Like

Thank you all! it is fixed now!

2 Likes

The collision behavior represents the object that’s in it. So for the player, you want the ghost to not kill you if it touches the bottom collision IN the player. The images John_Shrekinson posted should be correct.

Also you can still get hurt while the ghost is in its death animation.
What you want to do is use the disable block while its doing the animation, this will remove any collision the ghost has and lets it to finish its animation before deleting.

image

2 Likes

You’re welcome! Glad we could help.

1 Like