i am working on a game where i want to stop the other animations and just play the single animation

Hello I am a beginner,
I have created the animation blueprint .Here in the drinking water code i want that the walk shouldn’t be done or is done after the animation ends.
for e.g.- if i am pressing R for drinking water and animation is playing and the animation is still going on if i press W key for walking then the walking is happening but the drinking animation is going on and not walking animation but moving


You can switch between animations by plugging in desired conditions into the transition which is in between your states. You can have whatever condition that triggers that drinking state of yours get casted to your animation blueprint by using “Cast To” node in the evet graph, so that you can access them from your anim graph.

I must add a note though, I think what you’re trying to do is switching between a normal walking animation to a walking while drinking animation. If that’s the case, I recommend you splitting the body into upper and a lower halves, keep the walking animation in the lower half and play the drinking animation in the upper. Hope this helps!

i have tried spliting the body but it is not working

There is no way I can help you like this. Can you clarify if my guess on your objective is true or not, and if not, explain what exactly it is? Also some screenshots of your blueprints and a video showing the current result would be helpful

ok , Let me explain you with an example so that my question can be clarifies to you

for e.g. i am pressing ‘R’ in the game and if i press ‘W’ it will starting to walk but the drinking animation is still going on i want that if the drinking animation is going on then there shouldn’t be any animation working like walking


it is the animation blueprint

in game the lower body is standing and the hands are doing drinking animation

code for the drinking water

i had tried to add montage but the animation stoped working .

i had tried to use montag but the animation is not there like it is standing still in idle position

If you want the player to not be able to move while drinking, you can use the “Disable Movement” and “Set Movement Mode” (then set it’s mode to walking) nodes to disable it’s movement for that duration.

You should plug in a default slot into the out pose in your anim graph inside the animation blueprint for anim montages to work.

i had put the default slot but still it is not working

Is that default slot plugged into the main out pose and not inside a state or something? And can you try using the “Play Anim Montage” node?

@AiBoleche
Hi. Had you tried with blendspace? It’s used to create smooth transitions between two or more different animations.

Check this out

Blendspace calls an animation based on char movement speed. So you could add in your char bp a key event and say " when I press this key, set char movement speed". In this way, pressing the key will change the speed and the animation will change smoothly. For Example.
@AiBoleche

i had use this but for walking and running the thing is that I don’t want to have any other thing to play when this (Drinking) animation is working

like for e.g.-if we are adding bool value if it is true then it is working the second we make it untick/false it will stop doing that just like that if i am pressing any other key other than “R” then the animation should be stop or the other keys shouldn’t response while the animation is woking

it is connected with the main output node not in the state

i had tried using the set movement node it worked but still it is rotating when i press “W” key the way my camera is moving

Did you tried using “disable movement” (char movement as target) within a delay (set duration equal to anim’s duration)? So when you press a key and your char starts drinking, can’t move only for the entire anim’s duration. Let me know.

You can also get the “orient rotation to movement” node and uncheck it when your conditions are met and enable it back once it’s done

thankyou it worked

1 Like

I have tried but the movement was still going on

@AiBoleche I’m happy to have been helpfull! :smiley: :muscle:

1 Like