Add a Vehicle to Unreal Tournament 2004
Add a new object type to an existing game, for standalone play or as part of new content.
Earlier, we created and imported a car model into UnrealEd to use in
Unreal
Tournament 2004 (
[Hack #82]
). Now
it’s time to take that model (the 1969 Plymouth
Barracuda from Clone Bandits, http://www.demiurgestudios.com/CloneBandits/)
and turn it into an Actor
that can be placed in a
map, driven around, and used in game types such as Onslaught. The
obvious next step is to enhance the ‘Cuda by adding
nitrous-style speed boosts (
[Hack #84]
).
Tip
You can download the source code mentioned in this hack as well as the art packages necessary to use this example from http://www.demiurgestudios.com/CudaExample/.
Creating a Class for the ‘Cuda
To make the ‘Cuda its own object or
Actor
in the world of Unreal, you need to create a
class for it in UnrealScript. UnrealScript is a full-featured
programming language “created to provide the
development team and the third-party Unreal developers with a
powerful, built-in programming language that maps naturally onto the
needs and nuances of game programming.”[18] You can find many UnrealScript references on the Web. Two
good ones are http://udn.epicgames.com/Two/UnrealScriptReference
and http://udn.epicgames.com/Two/MyFirstCode.
To create a new class, you first need to create a new UnrealScript
package. From your Unreal Tournament 2004 directory (generally
C:\UT2004
), create a new directory. The name of this directory ...
Get Gaming Hacks now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.