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
Building an RPG  with Unreal 4.x

You're reading from   Building an RPG with Unreal 4.x Get to grips with building the foundations of an RPG using Unreal Engine 4.x

Arrow left icon
Product type Paperback
Published in Jan 2016
Publisher
ISBN-13 9781782175636
Length 360 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Alan R. Stagner Alan R. Stagner
Author Profile Icon Alan R. Stagner
Alan R. Stagner
Steve Santello Steve Santello
Author Profile Icon Steve Santello
Steve Santello
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Getting Started with RPG Design in Unreal FREE CHAPTER 2. Scripting and Data in Unreal 3. Exploration and Combat 4. Pause Menu Framework 5. Bridging Character Statistics 6. NPCs and Dialog 7. Gold, Items, and a Shop 8. Inventory Population and Item Use 9. Equipment 10. Leveling, Abilities, and Saving Progress Index

Creating a new C++ class

We're now going to create a new C++ class with the following steps:

  1. To do this, from the Unreal editor, click on File | New C++ Class. We'll be creating an Actor class, so select Actor as the base class. Actors are the objects that are placed in the scene (anything from meshes, to lights, to sounds, and more).
  2. Next, enter a name for your new class, such as MyNewActor. Hit Create Class. After it adds the files to the project, open MyNewActor.h in Visual Studio. When you create a new class using this interface, it will generate both a header file and a source file for your class.
  3. Let's just make our actor print a message to the output log when we start our game. To do this, we'll use the BeginPlay event. BeginPlay is called once the game has started (in a multiplayer game, this might be called after an initial countdown, but in our case, it will be called immediately).
  4. The MyNewActor.h file (which should already be open at this point) should contain...
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