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

Allowing vehicles to use a pickup

By default, vehicles in UDK cannot make use of pickups. If you had a game that relied heavily on vehicle use however, I'm sure you'd love to find a way to repair your vehicle's health, or increase its dwindling ammunition reserves.

Getting ready

Vehicles in UDK cannot pickup items and add them to their inventory by default. The process of allowing vehicles to make use of the pickup inventory is incredibly simple, and we'll start by creating our own vehicle class, along with its content class.

Make the first class, Tut_Vehicle_Scorpion_Content, and have it extend from UTVehicle_Scorpion_Content.

class Tut_Vehicle_Scorpion_Content extends UTVehicle_Scorpion_Content;

The only information in this class is found within ...

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