Setting Up Non-Player Characters
This tutorial will teach you how to add Non-Player Characters and get them to do anything you want. Note that if you just add an xPawn in your map without an attached UnrealScriptedSequence, it will move around randomly and shoot at anyone it sees (including other NPCs). NPCs do NOT include bots, but they act similarly. NPCs do not respawn.
- Add an Actor>>Keypoint>>AIScript>>ScriptedSequence>>UnrealScriptedSequence in your map.
- Add a Pawn (Actor>>Pawn>>UnrealPawn) nearby.
- Select the character you want in the Animation browser. It doesn't matter which specific animation you choose.
- Open your pawn's properties, expand Display, click Mesh, then click Use.
- Still in the Pawn's properties, expand AI and type something relevant in the AIScriptTag field.
- Open the ScriptedTrigger's properties, and type the same thing in Events>>Tag.
- Still in the ScriptedTrigger's properties, expand AIScript and towards the bottom choose ScriptedController from the drop-down list. Above it, click Add.
- In the cell that appears, choose anything you want from the drop-down list. Most of the actions are self-explanatory by name, and most also require other settings to be specified once they've been created (by clicking New next to the cell). You can find a description of what each setting does here.