Kismet

Kismet is the thing that Level Designers use to add logic to levels. They really like to use it.

Kismet basics

Open a map. Click the K up on the toolbar. You've now opened the Kismet editor, congratulations.

See UDN's Kismet Visual Scripting for more detail.

Types of Kismet nodes

  • Events are what start the Kismet ball rolling. These can be created and attached to an object by selecting the object in the editor, then right clicking in the Kismet editor and choosing an event from the object's supported events. They can also be attached to objects in variables with the Attach To Event action
  • Actions do something
  • Conditions test something

Making a Kismet Node that acts on Pawns or Controllers

With a handler

  • If you don't set the HandlerName property, the handler for SeqAct_DoSomething is automatically called OnDoSomething. A function by that name is automatically called on all actors being pointed to in the "Targets" variable link. There are a number of examples in the UE3 code of sequence actions with handlers, see SeqAct_SetPhysics / OnSetPhysics for one.

Without a handler

  • Take a look at AOCSeqAction_Inebriate. Notice the GetObjectVars function. This clever function searches linked object variables, as well as object lists and object volumes. We should be using this in every Kismet function that needs to apply something to all attached variables and that doesn't use handlers (see below). We don't because Epic didn't use it in any of their Kismet nodes in script land; I just stumbled across the function while looking through native code for something else.
  • For the most part, if you can use a handler, you should use a handler. If you're trying to act on a class you can't edit, then you'll want to do something without a handler.

Kismet-related pages

  • Client-side Kismet – explains client-side Kismet from a level designer's point-of-view. Client-side Kismet is Kismet that starts and runs on the client instead of the server, and should be restricted to cosmetic things.