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
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
Benjamin Carnall Benjamin Carnall
Author Profile Icon Benjamin Carnall
Benjamin Carnall
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Introduction to Unreal Engine 4 FREE CHAPTER 2. Blueprints and Barrels – Your First Game 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

Drawing the HUD and preparing the lobby


Ok, the last thing we need to do is provide each player with an accurate readout of their own score/deaths! We will then also set up a pseudo multiplayer lobby by showing who is connected to the game, and that we are waiting on the server to initiate travel to the main multiplayer map. This, however, is going to require that we have information from the GameMode replicated to all clients, namely when the game has started. We already have a static bool present in the game mode that we can use, but we now need to replicate the value of this bool to all clients. The only way we can do that is with a GameState.

Creating the GameState

In a very similar way to PlayerStates of the PlayerController, we have GameStates for game modes. They are replicated objects that are replicated on all connected clients. We can use this game state to store variables pertaining to the game world within this state. Game states, by default, contain information on all of the currently...

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