Stat machines problem or maybe blueprints

i was trying to connect death animation to my character and i almost did but the thing is the death animation work immediately after the idle animation i tried but it still same the transition goes from idle to death can anyone inlight me and show me where is the mistake that i did
The second pic is the transition from idle to death
the third pic is the transition from death to idle.

Hey there, why are you using speed on the idle to death transition and direction on the death to idle transition? Usually you want to use Get Relevant Time Remainint (Death) is less than 0.1 on the Death to idle transition.

such a noob mistake i thought it will work on that transition too haha
Okay and idle to death should break the transition between them or use Get Relevant Time Remainint (Death) more than 0.1?

The thing is, do you want to go back to idle after you die? Why do you die when your speed is less than a certain value? Are you doing an endless runner?

No, i just deleted the speed and i replace it with the GRTR (Death) on both transitions with one less than 0.1 and one more than 0.1 and it works as i want,so the AI start idle then it see player AI starts running then player hit the enemy, enemy die but sometimes the ai walk on idle animation which is annoying.
no after dying he should be dead not back to idle again

So there should be no transition between Death and idle if you dont him to go back to idle after dying. The thing is what is your main condition for dying? Because that is what should be in the transition rule between Idle and Death.

when i say walk on idle i mean that he is idling but moving

Then you should name the state as Idle / Walk or Idle / Move, because the idle means not doing anything, but that is not important for the issue.

I understood your question right, My condition is a melee attack from the player are going to kill the AI. So one hit from player must kill the enemy

i want to show you a clip but i think i cant attach it here due to a file type :frowning:

Upload it to youtube and send the link.

make the clip mute because the sound is annoying haha anyway i made it in slow motion so u can see that the enemy isn’t making a transition between running and idle.

the dancing is the idle for him

From what I see here, I think you want to have a bool variable called IsDead. Make your Idle-to-Dead transition check IsDead and your Dead-to-Idle transition check Not-IsDead. Then you can set that value from your character (i.e. when health reaches zero).

Kind of funny, in your Idle-to-Dead transition you basically set up the theme of the movie “Speed” – drop below 10 and you die. :slight_smile:

The other option is to go ragdoll on death, which doesn’t require a “Dead” state at all.

Is that a problem for you? That it doesn’t transition between running and idle? Either way for the dying issue. When you apply damage to your enemy you should run an event Any Damage or something like that. When that happens you can set a boolean variable Is Dead to true, and that will be the transition rule from Idle To Death.

Thaaaank yooou :smiley: i really appreciated i deleted the speed node and i used the GRTR (death) node and boom it worked. i only missed this node i wasn’t sure if speed was the right solution…

yeh you guys helped me with the dying issue :smiley: but i am trying to figure out why the transition between idle - walk is not working sometimes

Can you show what you do for it?

Put it in a new question.

yeh sure but i think i will put it as a new question other ways would get so ■■■■■■ at me haha joking