How do you send a signal from an actor to a widget

I have an issue with sending a signal from an actor blueprint to a widget blueprint, When I run the code the cast fails instead of sending the signal to the fading event. I think it’s an issue with the cast as it allways fails but I could also be using event dispatchers wrong.

Actor

Widget

Hello oooVeeooo,

have you checked that your User Widget within your Actor is set or initialized correctly?

If the cast failes i think that your User Widget is not from Point, maybe you can Check which class is behind your User Widget

If the class is correct, then try to call a function within your Widget and from the function you can call the Event to trigger

Thank you for your response GryphusT

I changed the user widget to be in the points blueprint and then used “get user widget” from the object section on cast to points, for some reason the component is now showing a target feature which didn’t appear originally when getting the widget, I tried a few ideas but I don’t know what needs to go into the target.

On the widget blueprint I made the component and clicked user widget for the varieable type as it also says for the parent type but I don’t know if theres any more info that is needed for the user widget.


(Also please excuse me not using multiple images, unfortunatly there’s a restriction for new users that prevents more than one image for each post).

Hello oooVeeoo,

i have tested it in a new project. Maybe this will help you?

In my new HUD i created first the widget and took the reference from it inside the hud and added it to my viewport

Then i created another Widget with a simple textblock and added one test event

After thath in my Character BP i Casted to my “NewHUD” and got my reference Variable “UI_REF”. Object i got directly from the PlayerController

Now if i start my game the new Text will appear via Event call. I hope this will help you :slight_smile:

1 Like

Great news, the signal is being sent and is activating the print string on the custom event, bad news for some unknown reason the animation isn’t being played despite receiving the signal. When I use any event that originates from points such as “event construct” the fade in animation plays alongside the string. My assumption is that there’s some varieable that is being lost when the signal doesn’t directly come from points but after trying multiple ideas i’ve unfortunatly haven’t found the varieable needed to fix the animation.

I’m very sorry if i’m missing something obvious, I highly apreciate your help and think that this should be the last issue before the code is complete.

your event names look different, i’d check that an always use meaningful names :wink:

Double checked the events, The events were sending a signal but changed the name anyway to double check, unfortunatly did not change the outcome. To reiterate the issue now isn’t the event activating as the print string is activating but the animation not activating. The animation does funtion if connected to event construct but doesn’t for the custom event, i’m assuming there’s a varieable issue but i’m not sure.