I am having issues creating an event inside a function.
My function calls a “Bind Event to On Destroyed”. When dragging out the Event node, I call Create Event. After dragging the output of my bind event actor into the Create Event “Object” input, I select “Create a matching event” from the dropdown.
Afterwards, a new custom event appears inside my function, let’s call it “RespawnEvent”:
Now, when I search for the event in my “Create Event” dropdown, it just doesn’t appear:
The object on your CreateEvent is the object in which you want to look for the correct event. So if you spawn an actor and put this actor in the object input, this actor needs the function. If the function is inside the blueprint where you spawn the other actor and not in the other actor, use SELF as object.
Imho, it’s either a naming clash, an uncompiled blueprint or…
…are you doing this inside a function by any chance?! Probably not, seeing a latent node on display. I’d recompile both actors, get rid of the dodgy nodes and try again.
This has always worked in UE4. There is a chance this does not work in UE5 ofc, can’t help here.
Oooh, there we go. I was already confused since I wasn’t able to create a Custom Event randomly. Alright, I guess I’ll stick to my functional rework then for the moment and maybe think about an event-y function later on. Thanks a lot!
Let’s say you create the event in the event graph, and the bind within the function like the Op’s example, if the event in the event graph wanted an input, how do you add inputs on the “Create Event” green node in the function, only seems to have a single Object pin, and can’t seem to create new pins. Without a way to ensure you can pass inputs over to the event in the event graph, it seriously limits functionality.
That’s a signature. You create inputs on the function / event. Providing the dispatcher’s and the function’s / event’s signatures match, you will be able to choose it from the dropdown.
I was able to do that by creating a fake function in the BP that has the Event Dispatcher to pull the signature from for the given Event Dispatcher, so that is fine. Yet how can I add input pins to the Create Event node ( the green one ) doesn’t seem to be a way to send in any input?
In this example, I have no way of actually giving input to the CityChunkHandling event from within the function’s Create Event node. When the CityChunkHandling event is called by the Event Dispatcher Bind, the Caller Object is None as expected.
I was able to resolve my issue, in the case of wanting to send something in from the Call Event Dispatcher, because I had set the signature on the Event Dispatcher with my Fake Function, I was able to plug in the Caller Object in the Call Notify Collider Overlap. The allowed the Create Event node to just pass it along. While this means I can’t modify the Bind’s event input at all, I am ok with that for my use case.
In addition I didn’t have to use a fake function, the + sign up above but oddly placed allowed me to treat it as if I was using the standard Input +