# How to play different animations depending on conditions?

**URL:** <https://forums.unrealengine.com/t/how-to-play-different-animations-depending-on-conditions/746690>\
**Category:** International\
**Tags:** event-graph, unreal-engine, state-machines, question, Blueprint\
**Created:** [January 11, 2023, 1:42am UTC](https://forums.unrealengine.com/t/how-to-play-different-animations-depending-on-conditions/746690 "2023-01-11T01:42:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kianl95](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kianl95](https://forums.unrealengine.com/u/Kianl95)\
**Post date:** [January 11, 2023, 1:42am UTC](https://forums.unrealengine.com/t/how-to-play-different-animations-depending-on-conditions/746690/1 "2023-01-11T01:42:16Z")

</div>

Hello, guys! Sorry for the stupid question… I’ve searched through all of the internet but can’t find a solution.

I try to play different jump animations depending on certain conditions. If a flip is possible, I want to play flip. If it isn’t possible, I want to play a simple jump up animation. I’ve already built all the necessary conditions, but I completely don’t know what to do next.

 ![Screenshot_17](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/0/9/c098ec8fd6426269bf78235d809557d1b1203080.jpeg)

I know that I can use just “play animation” there, but how can I join it with the state machine? It even doesn’t trigger anim notifications. Is there some way to control state machine anims from the player blueprint?

 ![Screenshot_19](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/a/0/2a09a5f132dd82b75dc70c35da6ffde7e420a36a.jpeg)

---

<div class="post-metadata">

**Author:** ![rokenrock](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rokenrock/32/1040844_2.png) [@rokenrock](https://forums.unrealengine.com/u/rokenrock)\
**Post date:** [January 11, 2023, 3:01am UTC](https://forums.unrealengine.com/t/how-to-play-different-animations-depending-on-conditions/746690/2 "2023-01-11T03:01:38Z")

</div>

I may be missing something, but can’t you just set a isFlipping boolean in your anim graph, and handle it in there? That’s the entire purpose of a state machine- playing different animations based on boolean conditions.

---

<div class="post-metadata">

**Author:** ![Kianl95](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kianl95](https://forums.unrealengine.com/u/Kianl95)\
**Post date:** [January 11, 2023, 3:12am UTC](https://forums.unrealengine.com/t/how-to-play-different-animations-depending-on-conditions/746690/3 "2023-01-11T03:12:43Z")

</div>

Unfortunately, it doesn’t work in my case. My conditions are in the PLAYER blueprint, and I can’t get any variables from there in the anim graph… ☹

 ![Screenshot_20](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/5/7/a574c4782927c6fb8f8d0d02bebfe24e923e0fe7.jpeg)

---

<div class="post-metadata">

**Author:** ![rokenrock](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rokenrock/32/1040844_2.png) [@rokenrock](https://forums.unrealengine.com/u/rokenrock)\
**Post date:** [January 11, 2023, 3:25am UTC](https://forums.unrealengine.com/t/how-to-play-different-animations-depending-on-conditions/746690/4 "2023-01-11T03:25:49Z")

</div>

> You very much can:
> 
> ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/2/8/228c431643b01dd4a9c1dd6c8ac1e9438e1d88e3.png)  
> This is how you can get the owner of the animbp from inside said anim bp.

> You can also just use Get Player Pawn since that animbp is exclusively for the player.  
> ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/5/d/65d5c3ef8a4715bbb3762ce8dc036e580f60e920.png)

> To get a reference to the anim bp from your player, you can use the GetAnimInstance node:  
> ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/8/4/684befa7a12eba2df7e92c2c8a1a94046488959b.png)

---

<div class="post-metadata">

**Author:** ![Kianl95](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kianl95](https://forums.unrealengine.com/u/Kianl95)\
**Post date:** [January 11, 2023, 3:49am UTC](https://forums.unrealengine.com/t/how-to-play-different-animations-depending-on-conditions/746690/5 "2023-01-11T03:49:33Z")

</div>

Oh, really, I can. Thanks! What can I say? The second night with unreal engine 😉 …

 ![Screenshot_21](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/4/e/c4e0811ea7f107b9a51668ca15b2bd066fc34230.jpeg)
