Death functional for multilayer

Hello all, I have some problem with death functional. I try different variant, but all doesn’t give me good result. In case I have AI enemy and multilayer characters.
Death functional very simple, when player get health = 0, I check “isPlayerDeath” bool variable and play animation and disable all controls. But my AI continues play attack animation.
For AI I have reset event, I try create variable with player ref and get bool “isPlayerDeath”, how I make for SkillActor (I check when player is death he doesn’t have change for cast)
but my AI does have access for player ref, I try create interface and send for AI status my “isPlayerDeath” variable, but in this case i have two problems, it is multilayer game
and I can send this message for all AI or only one, if a send this status for all when one player death all AI have reset event it very bad, and also if players have fight with three or more mob,
I should have good solutions for this situations. Can someone give me idea how create this functional (please remember it is multilayer game). Sorry for my English.

Is IsPlayerDeath replicating?

Sure, but problem is not with replicating.

Today I find work function, but I see error in console about access problems, someone know how it fix?

Hi try this :slight_smile:

or if you want to avoid the function to be triggered you can use a branch with the IsPlayerDeath. This way if the player is dead the AI will just ignore the player.

Thank work well!))

Denis, maybe you can help with second problem?) I try reset mob attack when player death, but in one case this solutions doesn’t work, and second variant get me well functional, but I see error in console.