Hi guys,
If I have a following function, which I want to basically be a custom event:
UFUNCTION(BlueprintNativeEvent, Category = "Inner events")
void OnCall();
void AWolfdaleHUD::OnCall_Implementation()
{
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("HUD OnCall!"));
}
I can receive a On Call event in the Blueprint. However, I would like to be able to invoke the event myself from the blueprint and Cpp code (as this is a custom event - if I don’t invoke it, no one will
). What should I change in the code to make it possible? And do delegates play any role here?
I’m late to responding to your question, but I was attempting to do the same thing myself and came across this open answer. After playing around a bit more I have a solution which appears to work (although confirmation from an official source would be appreciated).
I created a custom event in my object to be fired from blueprints, and added it like normal to get something like this:

To change this one-directional event, I selected the event with left-click, right-clicked on it to bring up the context menu, selected “Add call to parent function”. This created a new, bi-directional event node:
This appears to work - as in I hit play and my C++ implementation method is called as well as blueprint “Print String” node. Hopefully it helps!
Thanks, man, I’ll check that out.