Animation Question

Hi, I need some help with 2 things. I’m trying to get an object to move slightly then hold position on button down, and return after said held time on button up. From a code perspective I think I’m ok, but there are some issues.

The first is that I’m not sure how to tell the animator to NOT go back and restart, and instead hold position at the end of itself.

If I’m able to do that, I run into the next issue. Animations using the bool parameter function such that when the animation is done, the code is run through only once the animation finishes. This means that I can’t actually “interrupt” my idle animation (which is just the object bobbing up and down) with a button press. Now the reason why I need the object to move right when I press the button and not when the idle animation is done is because the game is supposed to be somewhat fast paced, and the object we’re moving is meant to be a defensive weapon. Therefore waiting for an idle animation to finish before being able to defend oneself might not be great for enjoyment.

I hope you understand what I mean. Thanks.

Figured it out. Looks like this:

So basically the idle animation is a slight bob up and down. testBlockLeft should be renamed but whatever, basically it moves the object off to the left and it now holds it there. testBlockLeftReturn returns the object to the idle stance when the LMB is released. I plan to do the same with the other side, if you have any questions lmk. The trick was to delete some transitions and make the actual animations not loop.