Creating an event without using delegates

I currently have an event with the tag ‘BlueprintImplementableEvent’. If I open the level blueprint and right click on the blueprint, I do not have access to this event. I need to go to the Functions tab on the left, click on the override dropdown button and implement the function there.

I want my event to act like the “OnActorBeginOverlap” event. This seems to use a macro that defines a delegate. Is there a way to have an event show up on the blue print event graph without having to declare a delegate?

BlueprintImplementableEvent, defines an event you can implement in the blueprint graph that wraps the native CPP class.

Unless the BlueprintImplementableEvent was defined in ALevelScriptActor, then you wont be able to simply provide an implementation.

If you want other classes to get notified about something your class does then you will need to create a delegate they can bind to.

Hi tk,

I’m investigating this issue for you at the moment. I’ll get back to you as soon as I have an answer.

.Tom

Hi tk,

For your event to show up from other Blueprints you need another keyword (BlueprintCallable) next to the BlueprintImplementableEvent in your UFUNCTION macro, otherwise only other C++ classes are allowed to call the function.

Another thing to keep in mind is that for something to be treated as an event in Blueprint it needs to be a void function. If you return any value, it is treated as a function and won’t be implemented on your EventGraph, but in a separate function graph instead.

Hope that solves your issue!

.Tom

Hi tk,

The problem is within the “const” keyword you are passing into the function. Without that keyword, your functions should be treated as red Event nodes in Blueprint.

Copy from other answer:
“For your event to show up from other Blueprints you need another keyword (BlueprintCallable) next to the BlueprintImplementableEvent in your UFUNCTION macro, otherwise only other C++ classes are allowed to call the function.”

Hey, Tom! Thanks for the help. I tested it by adding the BlueprintCallable tag next to it. But it doesnt make my event a red node, but a blue node where I have to pass in a target.

Is there a way to make the node a red node like the OnActorBeginOverlap for the trigger volumes, or will I have to use a delegates for those?

It showed up as a red Event node for me in my sample. Can you show me your C++ snippet of the function and a screenshot of what your Blueprint looks like?

I can’t because it contains confidential info/assets. Would there be another way to show you instead of posting it here? Tried to edit my post to check the ‘contains confidential info/assets’ checkbox, but its not there.

Is your function a void function or does it return any kind of data?

I have both.
I have a function that returns a void and another that returns an int32

UFUNCTION(BlueprintImplementableEvent,BlueprintCallable, meta =(…))

void Func1() const; // this node is blue

UFUNCTION(BlueprintImplementableEvent,BlueprintCallable, meta =(…))

int32 Func2(int32 var) const; // this node is green

Thank you very much for the help Tom!! Really appreciate it!
(For some reason, I don’t see a arrow dropdown button on the right, so I cant convert your reply to an answer.)