How to play an animation when a widget is activated

Hi! I’m working on an “examine item” menu like the one in Resident Evil games (video by someone recreating this in UE4 for context at the end). In the RE games, when you open that menu the item does a little animation in which they rotate a full lap. I would like to do something like that, but using nodes like “RInterp To” don’t work, they place the actor in the end position but don’t play any sort of animation

A bit confused, since we can clearly see the item do a full rotation in your vid.


It can be made to work with that node. But It might be much easier to play a timeline instead. You get all the control in the world. The animation you’re talking about simply rotates the mesh in local space, right?

The video is by someone else! I want to achieve that.

I made a custom event that I can call from wherever, which works when linked to Begin Play, but doesn’t play when I call it from the widget. This widget can only be opened while the game is paused, from the inventory widget, so I assume it’s not playing because the game is paused. Is there any way to make a timeline work while the game is paused? Is there other ways to do this?

image

How do I get a reference to the timeline???

UPDATE
I got it, but it still doesn’t play…

Any component added to an actor is already referenced:

Use it to make the TL do other stuff that may not seem obvious at first:

Thank you for letting me know! But it still doesn’t work :confused:

What does not work, exactly? Because this does play the TL:

This is from the custom event. If I trigger the custom event from begin play it works, if I trigger it from the button that opens the widget, it doesn’t.

The TL should be made tickable on Begin Play. The button should just play the TL. Does the first Print String trigger?

Nope, none of them trigger, even if I place a print string at the beginning of the custom event

So the issue is elsewhere, where we currently cannot see.

But where? It’s point A to point B, I don’t understand :confused:

Since the print string does not trigger, you need to look for the issue earlier in the script.

You say it’s a button. What are we dealing with, exactly? What fires the custom event?

Hello again! I there was a name variable that was not getting set although it was set to, so I did it another way and now it works! Thank you so much for the help.

1 Like