C++ create event for Blueprint

As i said, a BlueprintImplementableEvent does NOT have a C++ Implementation.

You don’t need the

void OnDeath_Implementation(); 

nor do you need 

void ABaseCharacter_C::OnDeath_Implementation(){} or 
void ABaseCharacter_C::OnDeath(){}

You only need the header file part

// Create Event
UFUNCTION(BlueprintImplementableEvent, Category = "BaseCharacter")
void OnDeath();

All logic will be added in the Blueprint Child Class. And the function, in C++, will be called via “OnDeath();”.

ALSO: Your Code is not compiling. It’s still failing!

Remove the things i mentioned and recompile. Then check if there are still errors.

NOTE

Recompiling while the Editor is opened is called “Hot Reloading”. This is not working well if you add new declarations to the Header File. You can use it if you make smaller changes to the implementation of functions, but if you change the declaration in the header file, you need to restart the Editor. Otherwise changes could not get through.

You should also set VS to “Development Editor” and compile the Game by right-clicking your Project in the Solution Browser of VS and hitting “Build”.

For debugging C++ code, set VS to “DebugGame Editor” and hit the Player Button at the top.

1 Like