O'Reilly logo

UnrealScript Game Programming Cookbook by Dave Voyles

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Altering what our pickup does

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.

Getting ready

Open up IDE and create a new class called Tut_HealthPickup. Have it extend from UTHealthPickupFactory.

class Tut_HealthPickup extends UTHealthPickupFactory

How to do it...

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.

  1. Firstly, we want to have a sleek interface ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required