AI Character animation with key press?

Hello , i want to make the girl charcter do a animation , when i press “E” ( When i’m in the box trigger) , how i can do it?
That animation will be do just one time , because after that animation i will do a effect and the loading for the second level , that level it’s just like a “Dream” , but for the loading level and the “effect” i will make a new answer after , now i really need that animation when press “E” , someone can you help me? Sorry for my english.

Hey there, if on the box collision’s begin play you do Player Controller - Enable input and connect the self to the actor you should be able to issue input commands to the box. Just create an input event for the E key and do your logic.

Hi , thanks for respond … i’m trying to do that but i don’t know how to continue ( i’m new in UE and blueprint ecc) …“Bambin” is the girl charcter

I create the input action “Interaction” when i press E but i really don’t understand what to do now!

Delete the begin play node and the enable input on the inputaction. Right click on CollisionComponent and pick on component begin overlap on the add event. When the player overlaps with the box do the Enable Input (connect the get player cdntroller to the player controller, not the target). Create also an On component end overlap to disable the input.

also for the object in on your cast node connect a get player character node. right now you are effectively comparing the bench to the character which would always fail.

Okey i do that (The beginoverlap not the END), but it’s not working …

Okeyy , thanks!

the way you have it setup currently it will trigger the script if you begin overlap or if you press a button. what you should do is on begin overlap set a bool variable of “can interact”. then off your input action event have a branch with the bool its testing set to the variable.

On the begin overlap you only want the Enable Input connected, nothing more. On the InputAction Interaction connect to the cast, not the enable input.

really thanks for do that , i understand really better all… but it’s not working! Maybe because the girl character have a animation blue print? I add a “Idle” state for be sitting , maybe i have to add a animation for when i press E! I’m tryng to do it

really thanks for do that , i understand really better all… but it’s not working! Maybe because the girl character have a animation blue print? I add a “Idle” state for be sitting , maybe i have to add a animation state for when i press E! I’m tryng to do it

Just do an animation montage for it and use Play AnimMontage and you should be good to go.

Not working :(( , really sorry if i make you all lost your time , if i get another help and i didn’t make this working i will simply give up and do something more easy… Now i do the girl animation in the animation blueprint , but i don’t know what to inser in the “Arrow” for make the character do that animation …

What is the transition rule from Idle to Girl Animation?

I inser a set boolean “Can interact” to true when go , and when the arrow return to false. Anyway i don’t have anything in the event graph of animation blueprint who refer to that boolean ,i don’t know what inser

Send screenshot of the transition rules Idle to Girl Animation and Girl Animation to Idle. It’s easier that way.

You need to see more tutorials about blueprints and animation blueprints to understand how they work. You are doing a set, instead of a get on the transition rule. Go to your content browser and find the asset for the animation. Right Click on it and create an anim montage out of it. Where you have the Play Animation on the 9 Input Action replace it with a Play Anim Montage (pick the one you just created from the dropdown) from the Third Person Character 1 reference in the cast. Send me a screenshot once it’s done.