From Tripwire Interactive Wiki
Jump to navigation Jump to search
Killing Floor class Controller (source)
Object >> Actor >> Controller

A controller handles a pawn. It can be considered the mind of the character, while the pawn can be considered the body. It receives input and dispatches actions for the pawn to perform. It provides the fundamentals such as notifications, functions to control the pawn, and variables to control certain aspects of the character. Much functionality is implemented in further-derived classes, such as KFHumanPawn and KFMonster, and classes in-between.

Pathfinding is handled in this class, with functions provided to calculate a route from one point to another, taking into account obstacles.

Functions of interest

  • final function Actor FindPathTo(vector aPoint)

Finds a path to a point, from the current pawn's position.

  • final function Actor FindPathToward(actor anActor, optional bool bWeightDetours)

Find a path to an actor, from the current pawn's position.

  • final function NavigationPoint FindRandomDest()

Finds a random destination to roam to.

External links