Animation, Lives and Collision help

devmattdevmatt Member Posts: 38

We have a game where there are falling actors and the goal of the game is to catch them. When the falling actor collides with the catching actor, the catching actor then displays an animation, 30 fps. Whenever it hits the ground actor, about half the size of the catching actor, then the player loses a life. So there are two issues. The first is that when the falling actor collides with the catching actor, it is destroyed and the catching actors displays its animation. That is the way it is supposed to work anyway. The actor was successfully destroyed but unfortunately the animation was not displayed. To fix this, we made it so it was destroyed 0.1 seconds after colliding with the catching actor, and this worked. But in doing so, another problem is created. That is, if done at the right time, even when successfully catching the falling actor and earning a point, the player will still lose a life because of that 0.01 seconds allowing the falling actor to hit the ground actor. Meaning that the player earns a point but loses a life at the same time, which we do not want at all. The most obvious way to fix this is to just eliminate the "destroy after 0.1 seconds" part, but in doing so we also eliminate the animation which we would very much like to keep.

Is there anyway to make it so when the falling actor collides with the ground actor, -1 life, UNLESS it collies with the catching actor?

Comments

Sign In or Register to comment.