Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Blueprints Visual Scripting for Unreal engine

You're reading from   Blueprints Visual Scripting for Unreal engine Build professional 3D games with Unreal Engine 4's Visual Scripting system

Arrow left icon
Product type Paperback
Published in Jul 2015
Publisher Packt
ISBN-13 9781785286018
Length 188 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Brenden Sewell Brenden Sewell
Author Profile Icon Brenden Sewell
Brenden Sewell
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Setting a gameplay win condition

One of the final steps we need to establish a full game loop is to create a condition for the player to win. To do so, we will modify our HUD and controller Blueprints to account for a target goal that the player must strive to hit.

Displaying a target goal in the HUD

First, we need to create a variable that will establish how many targets we are asking the player to destroy in order to achieve a win. Open up the FirstPersonCharacter Blueprint and create a new variable called TargetGoal. Make it an Integer variable type, ensure Editable is checked, and then set its default value to 2 for now.

Now that we have created a target goal, we should display this information to the player. Open the HUD Blueprint widget we created under our UI folder. From the Designer view, find the Hierarchy panel. Drag two more Text objects from the Palette panel onto the Goal Tracker object in the Hierarchy. For the first text object, change the Text field to / , including the space...

lock icon The rest of the chapter is locked
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 $19.99/month. Cancel anytime