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 The faster way to build games using UE4 Blueprints

Arrow left icon
Product type Paperback
Published in Aug 2019
Publisher Packt
ISBN-13 9781789347067
Length 380 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Marcos Romero Marcos Romero
Author Profile Icon Marcos Romero
Marcos Romero
Brenden Sewell Brenden Sewell
Author Profile Icon Brenden Sewell
Brenden Sewell
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

Preface 1. Section 1: Blueprint Fundamentals
2. Exploring the Blueprint Editor FREE CHAPTER 3. Programming with Blueprints 4. Actors and the Gameplay Framework 5. Understanding Blueprint Communication 6. Section 2: Developing a Game
7. Object Interaction with Blueprints 8. Enhancing Player Abilities 9. Creating Screen UI Elements 10. Creating Constraints and Gameplay Objectives 11. Section 3: Enhancing the Game
12. Building Smart Enemies with Artificial Intelligence 13. Upgrading the AI Enemies 14. Game States and Applying the Finishing Touches 15. Building and Publishing 16. Section 4: Advanced Blueprints
17. Data Structures and Flow Control 18. Math and Trace Nodes 19. Blueprints Tips 20. Introduction to VR Development 21. Other Books You May Enjoy

Casting in Blueprints

There is a node named Cast To that tries to convert reference variable types to new specified types. To understand casting, it is necessary to remember the concept of inheritance between classes, as we covered in Chapter 3, Actors and the Gameplay Framework.

The following diagram represents a Blueprint called BP_GameModeWithScore. Game Mode Base is the parent class of this Blueprint. Based on the inheritance concept, we can use a variable of the Game Mode Base object reference type to reference an instance of BP_GameModeWithScore. However, this variable is unable to access the variables and Functions that were defined in the BP_GameModeWithScore Blueprint:

Therefore, if we have a Game Mode Base object reference, we can try to cast this reference using the Function Cast To BP_GameModeWithScore. If the instance is of the BP_GameModeWithScore type, then Cast...

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