setstats
View Cart

UDK: Introduction to Kismet

Category: UDK
March 13, 2012

Following article was written and contributed by Pete Bottomley.
Pete is a co-founder of White Paper Games.

UDK Scripting Series by Pete Bottomley:

Intro to Kismet
Moving Doors
How to Pick Up and Place Item
How to Trigger Material Instances
How to Spawn Bots in Kismet - Part 1
How to Add Functionality to the Bot - Part 2
Bot Functionality Final Touches - Part 3
Bools - Puzzle Design and Interaction
Cinematics Introduction Part 1/2
Cinematics Introduction Part 2/2
Using Console Commands as Gameplay Elements
How to Prototype Quick Time Events in Kismet

INTRODUCTION

Kismet introduction covers what Kismet is and how you can apply it to your game designs. In this video we will cover what events, actions, conditions and variables are. We will also do a basic set up to allow you to change the camera from first person view to any view you wish through Kismet.

In this Kismet Introduction video you'll learn:

  • What Kismet is
  • How Kismet is used in your game environment
  • How to add actors from the actor classes tab into your scene
  • Alter the camera position from first person to whatever camera style you wish using Kismet

1. First we will add a trigger to the scene. We do this by right clicking in your perspective viewport and going to 'Add actor' - 'Add trigger'.

Change the trigger properties so that the 'Hidden' tab in the display properties of the trigger is unchecked. I also change the trigger height and radius collision but you don't have to do this if you don't wish to.

Next, we open our content browser and go to 'Actor classes' at the top of the browser and select 'Camera' from the actor list. We can add our camera to the scene by clicking and dragging or by selecting it and right clicking in your perspective viewport and going to 'Add camera actor here'.

With our camera in the scene we can click the eye icon (Lock Selected Actors to Camera) in the editor. We can then move our camera to where we want to position the camera in the scene. Make sure you uncheck the eye icon when you're finished adjusting the position of the camera.

2.With your trigger selected, we can open the Kismet window by pressing the green K icon in the editor. Right click in the blank space and go to 'New event using Trigger_0 - Touch. (Your trigger may have a different number)

We can then right click again and go to New Action - Camera - Set camera target. We also want an 'Attach to actor' node found in New Action - Actor - Attach to actor.
Hook the Touched event from the trigger event to the In of the Set Camera Target node and hook the out of the Set Camera Target to the In of the Attach to Actor node. (See image below)

click on image to view full size

Next we need to set the camera and attach to a target. The Target in this case is the player. Hold down 'P' and Left Mouse Click on the pink Target tab underneath the Set Camera Target node. This will attach your player variable to the target. Alternatively you can right click and go to New Variable - Player - Player. Left click on the Target tab and drag to connect to the player variable. Do the same for the Target of the Attach to Actor node (you can use the same target in this case).

The camera target will be the Camera actor you added to the scene. Select the Camera in your viewports of your level and then in Kismet right click on the Cam Target tab (pink tab) and go to 'New object Var Using Camera_0', this will attach the camera actor to your node. Alternatively again, you may add the variable in empty space and left mouse drag a connection. The Attachment tab for the Attach to Actor node will also be the same as Cam Target so you can connect that variable to your camera actor also.

3.With your Kismet set up you should be able to play the level in the editor and when you touch the trigger the camera with attach to the player and follow the player round creating a third person camera in this example.

Note: I have my game type changed to UTGame in World Properties so that I have the robot pawn with a weapon. You may also choose the event to be a 'Level Loaded' event or a 'Player Spawned', this would allow you to set the camera from the beginning of the game, but have a play around with what setup would work best for you.

You can also play around with the Attach to Actor properties using the 'Use Relative offset' box to tweak where your camera is positioned.

4. To organize our Kismet sequence we can select the entire sequence by holding down Ctrl + Alt and Left Mouse Dragging over our sequence. Alternatively we can hold Ctrl and select each node in the Kismet. Once all the nodes are selected we can press C and a comment box will appear. You can name this sequence whatever you wish, I named mine Set Camera Target for this example. There are also comment box properties if you click on the box which you can edit such as colour and border thickness.

click on image to view full size

click on image to view full size

For more information on Kismet check out the UDN pages:

UDK Kismet User Guide
UDN Kismet Reference

Following article was written and contributed by Pete Bottomley.
Pete is a co-founder of White Paper Games.

UDK© Bundle: UDK The Foundation & UDK Guide to Landscape Creation

© 2008-2017. All articles on World of Level Design™ are copyrighted.
Not to be reproduced without prior written consent.