Call a function that is in a widget blueprint from a different blueprint

I just need to know how to do it!

This is what I have but it appears I can’t call any functions from the widget blueprint

Hey @ThePlayer1233! Welcome to the forums!

If you want this widget to act as the casted class, make sure you run a printstring node off of the cast failed execution pin for testing purposes- then to access the functions of that class you pull off of the “As UI Money…” pin and call that function.

Make sure the other class is saved and up to date- if that doesn’t work (and sometimes widgets get a little weird in this respect) try opening that other widget’s code up to load it into memory and trying again here. If that doesn’t work, restart the entire engine, open the UI_Money+Other_Bar, then open THIS widget and try from there! :slight_smile:

:confused:
I followed every step and tried the restarting and things, but I still get this

@Mind-Brain

Ah. That’s because you’re casting to class. You need to just use “Cast to UI_Money+Other_Bar”. It should be blue, you don’t want the class.

You will need a target that you are casting, however. You might be able to use “Self”.

Because when you run the Event it will be asking “OK, we’re going to do this function… but on what specific existing widget?”

Thank you, :sunglasses:

I was able to get it out of the game mode configurations

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.