Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Building an FPS Game with Unity

You're reading from  Building an FPS Game with Unity

Product type Book
Published in Oct 2015
Publisher
ISBN-13 9781782174806
Pages 326 pages
Edition 1st Edition
Languages

Table of Contents (18) Chapters

Building an FPS Game with Unity
Credits
Foreword
About the Author
Acknowledgment
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started on an FPS 2. Building Custom Weapons 3. Prototyping Levels with Prototype 4. Creating Exterior Environments 5. Building Encounters 6. Breathing Life into Levels 7. Adding Polish with ProBuilder 8. Creating a Custom GUI 9. Finalizing Our Project Index

Creating a UnitBank


The next thing we need to do is to create a weapon that will associate with the mesh we just created. In UFPS, any kind of weapon that uses some kind of resource is referred to as a UnitBank. These UnitBanks use Units to fire. To create a UnitBank perform the following steps:

  1. Let's create a UnitBank for our weapon by going to the top menu and selecting UFPS | Wizards | Create Item Type | UnitBank.

  2. Once created, go over to the Project tab and change the name of the New UnitBank Type file to CQAssaultRifle by clicking on the file and renaming it (or by pressing F2).

  3. From the Inspector tab, under Display Name, change the value to CQ Assault Rifle and, under Unit, select the type of bullet you want to use. In this case, I will use MachinegunBullet.

  4. Next, select the Capacity value to 32. This means that the weapon can fire 32 shots before it needs to be reloaded.

  5. Finally, we will drag and drop the file into the Weapons folder.

Note

More information on UnitBanks can be found in the...

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 $15.99/month. Cancel anytime}