Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.
  • AOCSeqAction_Inebriate doesn't use handlers, nor do most/any of our custom Kismet nodes. This is almost always wrong, probably including this case. This is one of those "do as we say, not as we do" things.

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. Many of our nodes are also manually setting the output even when they don't need to for no apparent reason (setting bAutoActivateOutputLinks=false and then manually calling ForceActivateOutput)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.