Wednesday, 22 October 2008

a Friend in Need...

Needs a tank indeed.

Welcome to my "add a tank to your generic room" tutorial.

now, im using my generic rooms as an example of how this is done, this is also the reason that my generic rooms have not been included in my "famous five" preliminary package, something i will talk about in more detail shortly.

This post will also include information on the creation of jump pads (something that, much like editing a tank into your level, would seem pointless, however, being able to edit a vehicle into a level then allows you to add in custom vehicles, allowing for, say, a boat whose basics are a modified manta, for example, but is slower and whose model rides lower, while also not being damaged by water volumes. in the same aspect a jump pad may seem entirely useless, as a jump pad at least, but in practice it can be used for more mundane elements.)

Now then, before any vehicles can be added to your map, you must redefine your map as a vehicle gametype map (for instance vehicle capture the flag. and as a note to those who are attempting to add vehicles into their famous five maps, the current framework for our mods will not support a vehicle map.) To do this, select "view" from the menu at the top, then select level properties, this should bring up a window similar to that which becomes active when you change properties for lights, emitters, and the like.

within this window is a section entitles "levelinfo" (as you should be able to see above.). In the above image i have already changed the defaultgametype to the vehicle capture the flag gametype (you will also notice that just calling it vehicle capture the flag won't work.). in case its too difficult to see on the image, the correct information to put into the DefaultGameType box is:

xGame.xVehicleCTFGame

(not this may also need to be entered into the PreCacheGame box, but i am unsure of that, try it without to begin with) Now, you can begin slapping vehicles into the game, first off, the tank!

Bring up the actor browser, you should be able to find the "pawn" actor class, open this, and then open the vehicle actor class. from here open up the sVehicle class(the ASvehicles are turrets, and the kvehicle (if you have such a thing) is the bulldog.), and then the onsVehicle dropdown. From here, you should be able to see a window like the one below.

Now, as you can probably see, ive opened up a few more classes. ONSTreadcraft is the parent class for the Tank-style vehicles, much like ONSChopper class is the parent for the Raptor, and other such vehicles. It is important to note that the vehicles in UT2004 ONLY get called by their propper names (goliath, raptor, cicada, SPMA, Hellbender, Manta, Scorpion, Paladin, Leviathan, Ion Tank) in the main game. in these actor classes they are given generic nmes, eg the Goliath Tank is called "ONSHoverTank" (and the ion tank is ONSHoverTank_IonPlasma).

Putting a Tank (or Ion Tank) into your level (after you've changed the levelinfo) is exactly the same as putting in a static mesh, weapon pickup, etc. just select ONSHoverTank(_IonPlasma if you really want to)from the actor window, right click on your terrain, and select "add ONSHoverTank here". when adding vehicles, typically a model for that vehicle will be shown in the editor, complete with skin, however in the case of the Goliath Tank, the skin is missing, and so is the upper turret section of the tank. (typically vehicles that have a "turret" section do not have the turret while in the editor, but the Goliath tank is the only case where it appears to have a null texture.) do not be alarmed by the null texture of your tank, in the main game, the texture will be there, as will the turret.

Now, ive moved ahead and cut a large hole out of the wall in one of my "generic" rooms, which now opens up into a large arena, as shown below.




as you can see by the top screen, ive already prepared this area to have a selection of vehicles in it (just for fun mainly), but, where are they? they are up...waaay up.

hmm, how can we get up there?

Jump pads, Thats how!

Jump Pads are Actors, but before we go into detail about setting them up, we want to make sure we can see the jump pads. (NOTE: you don' have to make a marker for them beforehand, but when you are testing your jump pads it does help, as jump pad actors are invisible in-game).

select any simple, flat(ish) static mesh you like, im not making you create a coherent level right now, just giving pointers. personally i went for the teleporter base (used in a variety of places, including onslaught).

now that the jump pad cues are in place (did you put one where you want to start AND where you want to finish? again you don't have to, but i did), open up the actor class browser. you should be able to see the Navigation Point class, open this up.

From here, it is important to note that Jump Pads have two parts, the pad itself, and where the pad sends you. Open up the jump pad and jumpdest dropdowns one level, to reveal UTJumpPad and JumpSpot (JumpSpot can be opened further, but thats not neccesary) same way as usual, add a UTJumpPad actor to where you want to the jump pad to start, and a JumpSpot actor to where you want the jump pad to send you.

(NOTE: this will not always be where you land, jump pads are a useful means of getting around the Z axis, but can also be used as catapaults to give you momentum, as UT characters can move in the sky, they can move out of the projected path, meaning that a jump pad could be meant to send you in one direction, but you end up somewhere entirely different.)

go to your Jump Spot actor, and open its properties. under the object heading, you should see a read only box called name, remember the contents of this box (typically JumpSpot0 for your first spot), open up the properties for your UTJumpPad, and in the Forced Paths box (found under the Navigation Point heading) enter the name of your jump spot into field 0, like so:





you can see a little purple line coming out of my jump pad actor, this is the jump path (which you will need to rebuild before you can see it.) to see it either rebuild all, or click on one of the build paths buttons just to the left of the rebuild all button.

and there you have it, you should now be ble to leap high into the sky and get to great heights.

No comments: