# Play hit or death animation montage

**URL:** <https://forums.unrealengine.com/t/play-hit-or-death-animation-montage/475808>\
**Category:** Character & Animation\
**Tags:** death, unreal-engine, question\
**Created:** [December 12, 2020, 3:49pm UTC](https://forums.unrealengine.com/t/play-hit-or-death-animation-montage/475808 "2020-12-12T15:49:03Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![1984-Boo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@1984-Boo](https://forums.unrealengine.com/u/1984-Boo)\
**Post date:** [December 12, 2020, 3:49pm UTC](https://forums.unrealengine.com/t/play-hit-or-death-animation-montage/475808/1 "2020-12-12T15:49:03Z")

</div>

Hello I tried to script an enemy death trigger.  
When enemy is hitten, if health is \> than 0, then play hit montage, if health is \>= 0 then play death montage. But it’s not working. What I’m doing wrong ?

 ![324607-nouv.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/0/7/c07aec200b2a90d94fd440d99188d5d3aa2ac513.jpeg)

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [December 12, 2020, 5:56pm UTC](https://forums.unrealengine.com/t/play-hit-or-death-animation-montage/475808/2 "2020-12-12T17:56:05Z")

</div>

Hello! Such logic is often placed in Animation blueprint and not in Pawn Blueprint itself. You can add montage to animation state machine and configure transitions there. You can take a look at docs [Animation Blueprints | Unreal Engine Documentation](https://docs.unrealengine.com/en-US/AnimatingObjects/SkeletalMeshAnimation/AnimBlueprints/index.html)

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [December 13, 2020, 4:44am UTC](https://forums.unrealengine.com/t/play-hit-or-death-animation-montage/475808/3 "2020-12-13T04:44:26Z")

</div>

You are free to use either SetLifeSpan(Destroying after some time period) or DestroyActor.

---

<div class="post-metadata">

**Author:** ![1984-Boo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@1984-Boo](https://forums.unrealengine.com/u/1984-Boo)\
**Post date:** [December 13, 2020, 12:30pm UTC](https://forums.unrealengine.com/t/play-hit-or-death-animation-montage/475808/4 "2020-12-13T12:30:46Z")

</div>

Thanks for the ansers! I find out. Destroy actor will simply delete enemyBP of the scene ?

How can I set simulate physic on the enemy mesh before destroy actor ?

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [December 13, 2020, 1:29pm UTC](https://forums.unrealengine.com/t/play-hit-or-death-animation-montage/475808/5 "2020-12-13T13:29:50Z")

</div>

Do you want to simulate ragdoll and wait untill it is done before Destroying actor?

---

<div class="post-metadata">

**Author:** ![1984-Boo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@1984-Boo](https://forums.unrealengine.com/u/1984-Boo)\
**Post date:** [December 13, 2020, 2:26pm UTC](https://forums.unrealengine.com/t/play-hit-or-death-animation-montage/475808/6 "2020-12-13T14:26:03Z")

</div>

Yes I do

Death Animation then ragdoll, then destroy actor

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [December 13, 2020, 3:08pm UTC](https://forums.unrealengine.com/t/play-hit-or-death-animation-montage/475808/7 "2020-12-13T15:08:41Z")

</div>

Simple approach - to just set **SetSimulatePhysics** , then put **Delay** node and after that call **DestroyActor** node. **Delay** node just wait for some time and then continue execution flow.

---

<div class="post-metadata">

**Author:** ![1984-Boo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@1984-Boo](https://forums.unrealengine.com/u/1984-Boo)\
**Post date:** [December 13, 2020, 3:15pm UTC](https://forums.unrealengine.com/t/play-hit-or-death-animation-montage/475808/8 "2020-12-13T15:15:26Z")

</div>

I tried but i dont find what input into target of SetSimulatePhysics box

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [December 13, 2020, 3:17pm UTC](https://forums.unrealengine.com/t/play-hit-or-death-animation-montage/475808/9 "2020-12-13T15:17:04Z")

</div>

It just on your screenshot - use Mesh for that =)

---

<div class="post-metadata">

**Author:** ![1984-Boo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@1984-Boo](https://forums.unrealengine.com/u/1984-Boo)\
**Post date:** [December 13, 2020, 3:33pm UTC](https://forums.unrealengine.com/t/play-hit-or-death-animation-montage/475808/10 "2020-12-13T15:33:17Z")

</div>

I’ve created an animnotifyBP. Into this animnotifyBP i use Received\_Notify function

 ![324646-2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/a/6/4a69b7614d8a60e9172131f3d33b802fc23d15c4.jpeg)

Inside I cannot put delay node

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [December 13, 2020, 3:37pm UTC](https://forums.unrealengine.com/t/play-hit-or-death-animation-montage/475808/11 "2020-12-13T15:37:55Z")

</div>

Use MeshComp as already was said.

---

<div class="post-metadata">

**Author:** ![1984-Boo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@1984-Boo](https://forums.unrealengine.com/u/1984-Boo)\
**Post date:** [December 13, 2020, 3:48pm UTC](https://forums.unrealengine.com/t/play-hit-or-death-animation-montage/475808/12 "2020-12-13T15:48:54Z")

</div>

In the pawn its working with event tick. how make its work with the animation notify?

 ![324659-3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/7/a/77a76ecc1f6e9975f1f9141f0dd31ab526c6dbc9.png)

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [December 13, 2020, 3:53pm UTC](https://forums.unrealengine.com/t/play-hit-or-death-animation-montage/475808/13 "2020-12-13T15:53:02Z")

</div>

But why are you planning to use animnotifyBP? Is there some special case?
