Book Image

Unreal Engine 4 Game Development Essentials

By : Satheesh PV, Satheesh P.V
Book Image

Unreal Engine 4 Game Development Essentials

By: Satheesh PV, Satheesh P.V

Overview of this book

Unreal Engine 4 is a complete suite of game development tools that gives you power to develop your game and seamlessly deploy it to iOS and Android devices. It can be used for the development of simple 2D games or even stunning high-end visuals. Unreal Engine features a high degree of portability and is a tool used by many game developers today. This book will introduce you to the most popular game development tool called Unreal Engine 4 with hands-on instructions for building stunning video games. You will begin by creating a new project or prototype by learning the essentials of Unreal Engine by getting familiar with the UI and Content Browser. Next, we'll import a sample asset from Autodesk 3ds max and learn more about Material Editor. After that we will learn more about Post Process. From there we will continue to learn more about Blueprints, Lights, UMG, C++ and more.
Table of Contents (19 chapters)
Unreal Engine 4 Game Development Essentials
Credits
About the Author
Acknowledgements
About the Reviewer
www.PacktPub.com
Preface
Index

C++ to Blueprint


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 call this function and it will execute inside Blueprint but we cannot add a definition for this in our character source file. Instead, we will just call it inside the source file whenever we want. In this example, we will call it inside our TakeDamage...