Help me with calling a Widget animation

Hello everyone,

I’m completely new to Unreal, and am trying to learn by bits.

I’m trying to make a Widget Animation to work on Another blueprint, but it won’t work.

Can someone enlighten me?


This is the looping animation, the custom event created is an interface created that I use in both scripts to start.


This is the interface created


This is the blueprint using left mouse to make the animation starts.


But this won’t move at all.

Thanks for everything :smiley:

On your second screenshot is this print string showing up after pressing left mouse button ?

And is your animation awso moving in the widget itself where it was created? (on the animation tab not that it isn’t moving there and all that follows will be pointless if this is the case)

Btw you are missing to put a target in the very first screenshot. Put your widget in there if this bp is outside of the target widget.

And “timer by event” connected to a line trace is not a good idea. I would just connect the left mouse button directly to the line trace. So everytime you press it then it should line trace for 1 frame and if the line trace hits your actor aka aiming at it then it should acctually work and then do the rest of the code… And lastly this interface i don’t think this can work like this at all… You could just create a custom event in the widget with the animation. Can be called something like “play animation” (hook up the same code to it like on your first screenshot) then where ever this line trace blueprint is after it you can “get all widgets of class” select your widget and then get a “GET” node and from it you can get your “play animation” custom event to play the anim…
bandicam 2024-05-03 02-09-45-145

Okay, I’ll do all these changes to see if that works, thanks, I’ll reaply here with my changes if they worked

do I need to put my widget in the “target” output? cause that blueprint is inside the widget so i thought the word “self” would relate to the widget

Yes if this “Play Animation” nodes are outside of your widget with the animation but in the widget itself true no need to do that then…

1 Like

Okay, so I made in the exact way you said.

but the GET node returns an object not an event, I don’t even have the option to call the event.

Is there a way to “transform” the event as an object or to change the object output form “GET” to an event?

(I’ll have another image added in the other reply, cause the forum isnt letting me put here)

Thanks again and sorry for taking your time


Here’s the other image

Does it Print?

yes it does

1 Like
  • when you play the animation in the editor, does it play OK?
  • do those nodes trigger:

A print string would do.

Yep.

All fine if I create the “left mouse buton clicked” event inside the Widget, but I can’t seen to get the animation called in another blueprint

I made this rn since I want a sound to play as well
image

print is returning

You do not not need Get All Widget of Class - avoid that kind of advice. Your setup is correct at a glance. Could you confirm this triggers please:

Gimme 1 sec, will try this now

Nope
it doesn’t return
image

Your setup is correct at a glance.

I take it back. This bit does not seem right, though:

Which BP is this in? You’re actually not using the interface at all.

Could you explain the radio setup?

  • radio actor
  • widget component

Correct? Safe to assume this in the character we’re possessing?

image


And we want to click the radio, play the anim in the widget component’s widget?

So here’s the situation:

I want to click on the Radio and 2 things should happen:

Music plays - notworking yet
Animation plays - This is were we are now.

The blueprint with the “line tracer” is in BP_FirstPerson (which i’m also using to create crosshairs)

The other blueprint is a widget with the animation in it.

I have a Radio Actor - Widget Blueprint - BP_Fisrperson

Could you clarify whether the radio is using a widget or a widget component?

image
I think it is, right?

I created it inside the actor

1 Like

Widget Comic Sounds is the component you want to communicate with?

Correct

1 Like