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

Creating an explosive barrel

Guns aren't the only weapons we can make use of in UDK. It's time to think outside the box for a bit and come up with some other creative weapons. For this next recipe, we'll create a weapon that makes use of our environment, an explosive barrel.

Since the early days of gaming, the explosive barrel has been a primary tool in every level designer's tool belt. Granted, I've never seen an explosive barrel in my life, but games would lead you to believe otherwise.

With that in mind, let's create our barrel.

Getting ready

Open your IDE and start by creating a new class called ExplosiveBarrel and have it extend from DynamicSMActor.

Because our barrel is an item that will probably be heavily used by a level designer, let's hide ...

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