Animation on Button Press and hook it to other events

Hi! So, I made that when I press a button to aim down sights and I want to use an animation for that… the problem is that when I press the button, it will activate the iron sight camera but won’t change the animation until I press the button the second time.

Also the imgur link for the photo in case you can’t zoom on it here: https://i.imgur.com/8fWoFIH.png

My suggestion would be moving this setup to your animation blueprint. So you would set a boolean value in the charater blueprint rather than using a flip/flop. Something like this.

Then in the animation blueprint’s event graph you could get a reference to this boolean value.

and in the anim graph of the animation blueprint you could use this bool to drive a blend pose, like this.

I personally believe it’s good practice to keep any animation work in the animation blueprint so it’s easier to keep track of and it also becomes a lot quicker to iterate on, if you want to change the way it blends or use more complicated aiming animation like an aim offset or something.

Thanks but also, I’m using the flip flop to toggle my aim because I’m trying to make an android game and holding to aim is annoying in a game for a movile device. I can use the flip flop before the Aiming variables or there’s other methon to toggle the aim?

If you want to use the flip/flop you still can in lieu of the pressed and released, just put it after pressed as you had it and plug the aiming boolean in to A and B and the animation blueprint will still take care of the animation in the same fashion, but you’ll have the toggle you want rather than having to hold the button.