February 2016
Beginner
266 pages
5h 11m
English
We now have a health and health regeneration system in our character class. One problem with our current system is that we have not yet defined what happens to our character after the health reaches 0. In this section, we will create an event that we will implement in Blueprint. This event will be called when the player's health reaches 0.0. To create this Blueprint event, open our character header file and add the following code:
UFUNCTION(BlueprintImplementableEvent, Category = "My Character") void PlayerHealthIsZero();
As you can see, we added a normal function called PlayerHealthIsZero(). To make this available in Blueprint, we added a UFUNCTION specifier and inside that we added BlueprintImplementableEvent. This means C++ can ...
Read now
Unlock full access