Why does the player resuscitates ?

Hi guys, I need your help.

I have some troubles with the AnimGraph. I’ve created a new slot named “Die”, to make the player dies. But the problem is that after the death animation, the player resuscitates ^^

Why does the player resuscitates ?

I think the problem is the AnimGraph, maybe after the death animation, he goes back to the default animation.

Thanks.

Do you mean he re-spawns? Most games re-spawn after death, unless you tell it to do something else. A computer is like a child you have to tell it every single step.

Make sure that the animation isn’t making a transition back to the idle state.

@kennyrosenyc : No, I mean the player goes back to the idle animation, he gets up after death animation.

@mercenaryer : Yeah I understand. But how to do that ? I think the transition between “Slot Die” and “Final Animation Pose” mean “back to the idle state”.

Thanks for your help.

I wasn’t talking about the anim graph but about the state machine, wich is probably that default node I guess, so double click it and inside the state machine there will be several states, running, idle, walk, check if the die state is connected to an animation, if It is then you just need to delete that transition and It should work just fine, that’s because your death animation can’t transition to any other state after you execute it, or the player will look like he/she ressucitated.That should solve your problem, btw i recommend you to check out the ue4’s youtube channel, they have several videos about animations and anim blueprints there are also some live streams on their channel.

Hope It worked, sorry for taking so long to answer i’ve ran into some problems with some animations i made in

Hi mercenaryer, I really appreciate your help. I hope you solved your problems.

Here is my state machine : Screenshot by Lightshot

To answer you, I don’t have a die state. I followed this serie of tutorials (A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums) and in these tutorials, they don’t have a state for “Punching”. My “Death” animation is an animation montage. That’s why I said the problem is the AnimGraph, particularly the transition between “Slot Die” and “Final Animation Pose”.

I don’t see why you would need anim montage for a death animation, the way i’d do it is setting up a variable that says if he’s dead or alive, and if he’s dead then there would be a transition from the idle/walk state to the death state, so I could easily set it not to loop and it would play just once, I don’t know if there’s a way of just playing it once by using montages in a way that it didn’t make a transition to the regular states.You could try to disable the player’s anim blueprint after the death montage and see if that worked and aditionally try to setup a ragdoll for your player so that when he dies and plays his montage you could set simulate physics on and your character wouldn’t go back to a t-pose, so I think that’s another solution, I’d recommend you to try to disable your anim blueprint after playing the montage, then go for the ragdoll and if it doesn’t work I suggest a death state.Hope this works! :smiley:

Thanks a lot mercenaryer !! “Set Anim Instance Class” node works !

There is no reason to not create a death state in my state machine ^^ I already do that and it works perfectly ! It’s just that I like understand what I do, and I wanted to know how to use anim montage without go back to default animation.

Thanks again!

You’re welcome I’d like to know how I could make anim montage not go back to the default state too, but I think it’s not possible, because what montages do is that they play an animation or an animation sequence and either loop the animation or just go back to the regular states,although i’m glad to know you solved your problem!