playMaker

Author Topic: Fight game - simultaneous knockout  (Read 248 times)

unearthly

  • Junior Playmaker
  • **
  • Posts: 57
    • View Profile
Fight game - simultaneous knockout
« on: January 08, 2019, 08: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

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 699
    • View Profile
Re: Fight game - simultaneous knockout
« Reply #1 on: January 08, 2019, 10:57:44 PM »
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.

unearthly

  • Junior Playmaker
  • **
  • Posts: 57
    • View Profile
Re: Fight game - simultaneous knockout
« Reply #2 on: January 10, 2019, 11:17:54 PM »
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