Is it possible to convert a blueprint custom event into C++ then call it using the blueprint?

I have no experience with C++, so I was wondering how hard it would be (or if it’s possible at all) to convert a couple custom events I have made in my characters blueprint to C++. Ideally I would like to call on the custom events In my blueprint as if it were still made in the blueprint but just have a C++ script do the grunt work?

For example:

Blueprint calls “Player Takes Damage” then the C++ script would deal the damage.
or
Player starts running and the C++ script would deal with a stamina system.

That is good to know. I’ll try and wrap my head around C++ then.

Anything you can do in Blueprint you can do in C++. You need to make a BlueprintCallable event in C++.

Just to get you started you need to create a new C++ class (in this example i named the class SuperHeroCharacter) with the parent of Character. Then in the SuperHeroCharacter.h file you need to add

public:
	UFUNCTION(BlueprintCallable)
	void PlayerTakesDamage();

And in the SuperHeroCharacter.cpp file you need to add

void ASuperHeroCharacter::PlayerTakesDamage()
{
	// Do the damage to the player here
}

Remember to parent your character Blueprint to SuperHeroCharacter or whatever you named your new class.