Wednesday, 10 February 2010

10 Feb 2010 - Get to the Vehicle!

Kismet doesn't seem too bad. A method of implementation can't be user-unfriendly when you accidentally accomplish what you set out to do.

Well okay, it was more me experimenting with certain nodes (if that's what they're actually called) and using a little logic and common sense, but I didn't expect a result. Still, i'm certainly not complaining as it means one more thing can be ticked off the 'to do' list. Which makes me very happy.

Today I managed to get the player to appear in a vehicle when the level starts up (as opposed to spawining nearby and having to get in manually). As this is supposed to be a racing game, being IN the car to begin with is kinda important - not just for presentation purposes, but also because you'll always get at least one player running off and deliberately not doing what you want them to do.

So, this is how starting a UDK level inside a vehicle looks in Kismet (Click on the image for a larger view):

New nodes are created by right-clicking in the empty workspace and selecting from a list of options. 'Level Loaded' is an event (New event>Level Loaded). 'Enter Vehicle' is an action (New Action>Pawn>Enter Vehicle) and the Player Variable and Object Variables are the inputs to the action (variables) - the things that are affected by the event/action.

The Player is the target, and the Object Variable is the vehicle the player will appear inside. (this is placed by selecting the Vehicle Factory in the Editor, right clicking, and then selecting 'New Object Var Using [name of whatever is selected here]'. I'm not providing a tutorial here, but thought i'd give a brief explaination. I'll only forget how to do it myself if I don't leave a note like this on the blog.

Kismet itself is not difficult to use - it's understanding the different nodes within it, what they do and how to set them up to work in game. I'm still new to this (I've been using it for under 24 hours at the time of writing) but i'm hoping the guys in the UDK community will be as helpful as they usually are. Kismet will also be used for other aspects of this game and they're a little more complex than this one. It's ironic really, I thought it would be the other way around.

* * * * * *

In other news on the project, I attempted to create a title screen for my Mod/game, but it crashes UDK on startup. Interestingly, it only does this when a custom vehicle is included in the level (but trying the same level with the UDK 'Scorpion' vehicle causes no problems).

This means the Mod files are set up correctly, but there is an issue with the custom vehicle script. Something I hoped would have been sorted by now, but that's the way it is sometimes, I suppose.