Locker Opening Animation When Key pressed

Hello. I have a small problem. I created a 3d model of locker and I animated it. After I imported it to Unreal with animations, I wanted to make possible for the player to open it by triggering the animation by pressing a specified key. This is how I tried to do this. I used the same way for my other object, but I didin’ play animations with specified key, only sound and it worked. In this case, none of it works. Sound and animations. I also want to make door animation to play reversed when a player presses specified key to open/close doors. Is there a better way to do this? Thank in advance for any help.

If the Trigger box is not enabled to receive input it will never trigger the event for the E key and therefore there will be no animation. Did you check if the trigger box receives the E key input? You can place a Print String after it just to make sure.

Okay, problem solved, thanks for the advice. Now I have to figure out how to play reversed animation with the same key. For example, if I open locker with E key, animation plays, and when I press E key again, I want the animation to play in reverse. Do you know any way how to do this? I should probably make another post with this question. If so, I will post it as seperate question.

You can use a flip flop node with the E key. The first time it will play the direct animation, the second time the reverse animation. As an alternative, create a boolean variable bLockerOpen, set it to false. Then use a Branch on the E key, if bLockerOpen is false you play the direct animation and set it to true. If it is true, you play the inverse animation and set it to false. This is what the flip flop node does internally.

Okay, everything works the way I wanted. Thank you for your help and quick response.

Good to hear. If you are satisfied, please accept my answer above so others can use it as a future reference.