UT3 Tuto Vehicle - part 5 Coding a Basic Vehicle

Ok where to start, first we need the correct type of vehicle code, in my case (jetbike) I'll use the manta code, try to pick a vehicle which fits yours eg:- if you have a jeep then use the Scorpian code. So what files did i use

UTVehicle_Manta.uc,UTVehicle_Manta_Content,UTVWeap_MantaGun,UTVehicleFactory_Manta.uc.

The first file is in the UTGame/classes folder the others in the UTGameContent/classes.

First we need to rename the class

#

do this with all 4 files, the reason I rename the original file where most people extend them is so that i can cut out the parts of code that i don't need. Be careful when editing the files if you see this line native(Vehicle) under the class....extends delete it otherwise the game will crash.

So what do we need to change, well most of it is just connecting the code to our meshes in the default properties like so

-

and here the materials

s

next we change the vehcile weapon code to link with our VehicleClass

q

Next we do the Vehiclefactory

w

Now that all 4 files have been modified to suit our mesh names we can compile them and then play in game :)

Thought you where finished well no, atm i don't have a vehicle replacement Mutator so to test my jetbike I made myself a small test map and added my vehicle factory, to do this in Ued swtich to the generic browser/actor classes, load your .u file then in NavigationPoint/UTVehicleFactory select your VehicleFactory and place it into your map then do a full build then save the map. Now if every thing has gone right you can play your vehicle in-game

a

Please remember this is only a very basic set up, to get every thing working properly you may have to tweak a lot of the default properties