Creating your own Kismet node for speed
In an earlier recipe in this chapter we discussed changing the player speed with a shortcut key. Being a designer, there will be times when you want the game to influence the player's speed. For this, the handiest way is probably by scripting a custom node we can hook up to events.
How to do it...
Turn off UDK, open ConTEXT, and begin a new file. Choose from the drop-down menu list which says Text Files, the item UnrealEd, so that the text we'll type is format friendly for UnrealScript.
The code starts:
class PawnGroundSpeed extends SequenceAction;
This is because the class which drives all Kismet action nodes is
C:\UDK\~\Development\Src\Engine\Classes\SequenceAction.UC
, and our changes will extend from that, adding to it or changing values it already sets up.Groundspeed is the property that we're changing and it will only work on a pawn, be it player or NPC, hence the class name PawnGroundSpeed.
Type:
var() float PawnSpeed;
in order to add a channel in...