Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In this tutorial we will be adding a weapon to the pawn from the last tutorial. The weapon will be a custom class derived from the Weapon class and fire a custom projectile that is derived from the Projectile class. We will also be creating a new InventoryManager class to manage this new weapon. Finally, in order to use this weapon we will need to modify the player controller and add code that will actually fire the weapon.
Create a new file called “JazzWeapon1.uc” with the following code. The new class JazzWeapon1 is our custom weapon.
We are going to add to the code from the previous example so all code for this example will go to the Classes directory at:
C:\UDK\UDK-2011-06\Development\Src\ExampleCh31