Where do I get the Event input BindToOnClicked wants?

So this is a really silly question, but I’m having a heck of a time hooking events to UMG buttons within blueprint. Case in point, I have a UMG widget named CharacterButton that only consists of a button and text label. Whenever the player opens the main CharacterScreen widget, its constructor creates one CharacterButton for each person in the party.

From there, I’m trying to configure it so that clicking on a CharacterButton displays that particular character’s details (HP/MP/whatever else) in the main CharacterScreen. Since the button itself can’t see CharacterScreen, the seemingly obvious way to accomplish this is to make some PopulateUI function in CharacterScreen, and hook that function to each CharacterButton’s OnClicked event. This is where I get confused; for every CharacterButton created, I can easily locate the button itself and invoke its bind event:

I see the red Event pin on the bottom-left corner of the bind event node, and assume that the function I want to execute every time the button is clicked should be wired into that. If I look at the event graph, I can see that the desired event’s node has a compatible wire in the top-right corner (in this case, of ButtonHasBeenPressed):

However, if I try to drag & drop that very same event from my event graph into the function from the first screenshot, where the button was created, I get a completely different type of node, one that doesn’t have a compatible pin:

So what am I doing wrong? This seems like such a simple thing to be struggling with, but for the life of me I can’t see where my error is.

You don’t need that function call pulled out, just drag the Orange square from Event ButtonHasBeenPressed to the Event input on Bind Event to OnClicked. If you want to pass a value you need to add it in the inputs of the event dispatcher

The problem there is that they aren’t in the same blueprint; the red Event ButtonHasBeenPressed (with the orange square) is on the main event graph of the CharacterSheet blueprint, and the screenshot where I’m creating the button and trying to bind it is in a function of CharacterSheet… I can’t wire directly from the main graph to a child function, right?

Edit: editing to add that I tried simply cutting and pasting the function into the main event graph, and it still won’t work- the orange square on the top-right corner of my ButtonHasBeenPressed event, when I try to wire it into onclicked, says “Delegate (by ref) is not compatible with delegate,” wouldn’t that imply I’m trying to connect the completely wrong thing to begin with?

Is it possible that binding something to OnClick isn’t how you’re intended to execute a function from the main menu based when a childed button is clicked? I’ve poured 5+ hours into trying to figure this out, and it’s incredibly frustrating that I can’t figure something this simple out.

I think this is what you are after, and here is an example:

This first image is from my custom button widget, created with blueprints (I needed data about my button to also be passed on clicked): http://puu.sh/n0hDn/49196c3b08.png

This second image is how I am handling it from the parent widget (In your case, the character): http://puu.sh/n0hHy/fd3595b54a.jpg

In the second picture, pretend that the ‘Create U Color Widget’ is a create widget node :wink: - I’m doing some extra sepcial stuff in that function

Oh hey, thank you for the screenshots! That clears up a lot… are you doing anything specific to allow yourself to wire OnClicked? I tried to replicate your implementation with the simplest possible setup, a button and event that belong to the same widget, but it gives me the same “Delegate is not compatible with Delegate” error that was getting me earlier:

The reason that it is not compatible is because your event inputs and the standard OnClicked are not the same.

I admit that my event dispatcher’s name is named too similar, but in my first picture I have a dispatcher called ‘OnClicked’ that has custom inputs (Inputs are: U Color Button ‘Button’ and a Linear Color ‘Color’).
I ignore the standard engine Onclicked bind event triggered by buttons (I only use it in it’s own graph to call my custom OnClicked as you can see in that first picture).

Hope that helps clear up some confusion!

Oooh I see what my problem was- I wasn’t using a dispatcher at all, I was trying to directly tie two events with different inputs together; everything works now, thank you!! :slight_smile: