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 now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
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 5

You're reading from   Blueprints Visual Scripting for Unreal Engine 5 Unleash the true power of Blueprints to create impressive games and applications in UE5

Arrow left icon
Product type Paperback
Published in May 2022
Publisher Packt
ISBN-13 9781801811583
Length 568 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Brenden Sewell Brenden Sewell
Author Profile Icon Brenden Sewell
Brenden Sewell
Marcos Romero Marcos Romero
Author Profile Icon Marcos Romero
Marcos Romero
Arrow right icon
View More author details
Toc

Table of Contents (28) Chapters Close

Preface 1. Part 1: Blueprint Fundamentals FREE CHAPTER
2. Chapter 1: Exploring the Blueprint Editor 3. Chapter 2: Programming with Blueprints 4. Chapter 3: Object-Oriented Programming and the Gameplay Framework 5. Chapter 4: Understanding Blueprint Communication 6. Part 2: Developing a Game
7. Chapter 5: Object Interaction with Blueprints 8. Chapter 6: Enhancing Player Abilities 9. Chapter 7: Creating Screen UI Elements 10. Chapter 8: Creating Constraints and Gameplay Objectives 11. Part 3: Enhancing the Game
12. Chapter 9: Building Smart Enemies with Artificial Intelligence 13. Chapter 10: Upgrading the AI Enemies 14. Chapter 11: Game States and Applying the Finishing Touches 15. Chapter 12: Building and Publishing 16. Part 4: Advanced Blueprints
17. Chapter 13: Data Structures and Flow Control 18. Chapter 14: Math and Trace Nodes 19. Chapter 15: Blueprints Tips 20. Chapter 16: Introduction to VR Development 21. Part 5: Extra Tools
22. Chapter 17: Animation Blueprints 23. Chapter 18: Creating Blueprint Libraries and Components 24. Chapter 19: Procedural Generation 25. Chapter 20: Creating a Product Configurator Using the Variant Manager 26. Other Books You May Enjoy Appendix

Organizing the script with macros and functions

When we are creating Blueprint scripts, sometimes, a group of actions is used in more than one place in Blueprint. These actions can be converted into macros or functions, simplifying the initial script because this group of actions will be replaced by only one node. Also, if you need to change something in this group of actions, this change will only be implemented in the macro or function rather than having to search every location where this group of actions was used. This is a good programming practice to use as it simplifies code and debugging.

Creating macros

To create macros, use the My Blueprint panel and click the + button in the MACROS category. The following screenshot shows the My Blueprint panel with a macro named SetupNewWave:

Figure 2.14 – Creating a macro

When a macro is created, a new tab is opened in the same place as the Event Graph. This tab looks like the Event Graph but contains...

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 AU $24.99/month. Cancel anytime