Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Unreal Engine 4.X By Example

You're reading from   Unreal Engine 4.X By Example An example-based practical guide to get you up and running with Unreal Engine 4.X

Arrow left icon
Product type Paperback
Published in Jul 2016
Publisher Packt
ISBN-13 9781785885532
Length 506 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
 Carnall Carnall
Author Profile Icon Carnall
Carnall
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Unreal Engine 4.X By Example
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
1. Introduction to Unreal Engine 4 2. Blueprints and Barrels – Your First Game FREE CHAPTER 3. Advanced Blueprint, Animation, and Sound 4. Unreal Engine, C++, and You 5. Upgrade Activated – Making Bounty Dash with C++ 6. Power Ups for Your Character, Power Ups for the User 7. Boss Mode Activated – Unreal Robots 8. Advanced AI and Unreal Rendering 9. Creating a Networked Shooter 10. Goodbyes and Thank yous Index

Respawning the player


One of the key elements of BarrelHopper is punishing the player for unsuccessfully jumping over a barrel. What we need to do is reset the player to the default starting position every time it is hit a by a barrel. The goal is for the player to reach the top of the level in the shortest amount of time possible. In this chapter, we are going to create a rudimentary respawn system that utilizes Event Delegate. What we want to do is have our game mode respawn our player after a certain amount of time when the OnDestroyed event is fired from within our BH_Character. We are going to have to detect collisions with our barrels, destroy our actor, and then ensure that the desired respawning functionality takes place. We will do this via a delegate.

To begin, open the BH_Gamemode blueprint we created earlier in the chapter and navigate to the event graph. We need to graph some functionality that will get the Player Character reference, cast the Player Character to the BH_Character...

You have been reading a chapter from
Unreal Engine 4.X By Example
Published in: Jul 2016
Publisher: Packt
ISBN-13: 9781785885532
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images