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

Setting up a project


To get started, start Unreal Engine 4 and create a new project based on Third Person Template.

Since we are going to have a HUD with a health bar, let's add a new health variable to our Third Person Character Blueprint. Open up the ThirdPersonCharacter Blueprint in the ThirdPersonBP/Blueprints folder:

Inside our character Blueprint, create a new variable called Health and follow these steps:

  • Set the variable type to float and give it a default value of 100. The next step is to create a Pure function that shows the percentage of the total health of the player.

  • Inside your Character Blueprint, create a new function (for example, GetHealthPercentage) and open it.

  • In the function graph, get your health variable and divide it by the default value of health. By doing so, we will get the percentage of our player health. To get the default value of any variable in your class, just right-click in graph and search for Get Class Defaults. This node will return all the default values...