Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: unearthly on January 08, 2019, 10:43:07 PM

Title: Fight game - simultaneous knockout
Post by: unearthly on January 08, 2019, 10:43:07 PM
Hi,

I have a fighting game. The player controls one character, the PC another. Very occasionally when both characters are at minimum health, the player through their character can strike the AI opponent exactly as that AI (using Send Random Event triggered by a collider on the players character) also strikes, causing both to be 'knocked out' at the same moment.

Does anyone have any suggestions to avoid this happening?

Regards Charles
Title: Re: Fight game - simultaneous knockout
Post by: tcmeric on January 09, 2019, 12:57:44 AM
What is your desired outcome? That the player always wins in this situation? That both characters dont get hurt and then can live a little longer?

It seems when a death occurs, you need to do check to see if the other player is also dying/dead.
Title: Re: Fight game - simultaneous knockout
Post by: unearthly on January 11, 2019, 01:17:54 AM
Hi tcmeric,

I want the player to win.

So I need an action on a state when the AI is dying (health at zero) to check if the player is dying and prevent it's death animation?

I have an FSM that attempted to do this before, but I had it wired wrong. It tries to disable the health manager FSM on the player (damage manager as I called it) but after it went to it's death animation, rather than before.

I'm sure this is a bit of clumsy FSM design, but how does the attached look to you. Should it work now?

Regards Charles