Hello,
I have a problem that I don’t manage to solve in my game… I am doing a multiplayer game, and my issue is with the replication of death animation. I am using a netcull distance, so, when Player 1 is dead, if player 2 appear in the area of player 1 later (after the death event) I want that he see the player 1 correctly (dead, lying on the floor).
What I have done is :
- In the “Apply damage” event, the server set the variable repnotify (Boolean) “is dead” to true.
- Server then call a multicast event that replicate the death animation montage (and that is working fine)
- In the repnotify function of “is dead”, I have a branch on the variable “is dead”. If it is true, I play an animation montage that is looping on the player lying on the ground.
Here is a screen of the apply damage (I just move the two interesting nodes for death because my apply damage is quite big) :
Here is a screen of the repnotify (nodes that are not linked are here due to tests I have done) :
The fact is :
- When player 1 die, all player in the area see that correctly (the multicast display well the animation). But if player 2 come in the area of player 1 after that, the player 1 is not lying on the floor for him. I add a breakpoint and yes the repnotify is working, but the event of playing animation montage is not doing anything.
What I tried : - I tried to change the play animation montage and replace it by a custom event run on server that will then call a multicast that then play the animation montage.
- I tried to replace the play animation montage by a play anim asset (and use the anim asset instead).
- I also tried to delete the multicast that is called in the apply damage event but it doesn’t do anything else. If I do that, the player that is dying see well is own death (the play animation montage in repnotify seems to be working for him.
What I have verified : - The section name for the montage is correct
How is my montage :
- It is an animation where I add a loop section at the end.
- The animasset I created when I tried to replace the play animation montage by a play animasset was a looping animation of a character directly on the floor.
Another question :
- It is a problem that my montage is not working into the repnotify function, but another problem for me is that if I delete the multicast event of the apply damage (that might not be necessary since I have the repnotify now), if in the repnotify function I decide to play only the looping section of the death animation, then the player that is dying will not see himself falling, he will directly see himself from idle to lying on the floor. But if I decide to play the whole animation of death, then other player when they enter in the area will see all the animation, event if I am dead a long time ago…
Have you any idea how to solve all of this ?
Thank you a lot for your time and your help, and sorry for my bad English.
All the best,