Now that we have a pickup which offers ammo to the player, and know how to alter a variety of the pickup variables and aesthetics, let's take a moment to create a pickup that now offers health.
Open up IDE and create a new class called Tut_HealthPickup
. Have it extend from UTHealthPickupFactory
.
class Tut_HealthPickup extends UTHealthPickupFactory
This is a bit more complicated than our previous recipes. We'll have to create a new pickup class in our IDE, as well as an archetype in the editor, so that we're able to access the class and its variables within the editor. This is essential when working with level designers who are not familiar with code.
Firstly, we want to have a sleek interface when we play with our pickup in the editor, so add the following code, beneath your class declaration:
class Tut_HealthPickup extends UTHealthPickupFactory /** Hides categories that we won't be needing from the archetype */ HideCategories(Object,...