Swapping control of a Bot using Possess Pawn
In this recipe we'll allow the player to take control of an AI pawn, or Bot. This allows the player to jump to a different area of a level while their character remains where they left it. We'll then swap control back again. This is a fairly simple operation, but will lead in to the following recipe, on cinematic staging using camera director groups in Matinee.
Getting ready
Open the map Packt_04_Possess_Start.UDK. The scene consists of a cave mouth, looking out into a landscape the player cannot reach during gameplay. The player starts in a small compound outside the cave, and a Bot is spawned on the other side of a sliding gate. The scene is a continuation of the previous recipe's scene and we'll just be adding functionality in Kismet.
How to do it...
- For this scene, let's view the action in third person. Open Kismet [ ] and right-click and add a New Action | Misc | Console Command to the existing Player Spawned event. In the Commands | [0] property...