O'Reilly logo

UnrealScript Game Programming Cookbook by Dave Voyles

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Allowing a pawn to wander randomly around a map

With our PathNodes laid throughout our map and our bot now having the ability to spawn on the map, we're ready to start adding functionality to the bot so that it has artificial intelligence.

Getting ready

Load up your IDE and prepare to create a new class.

How to do it...

This recipe will be the starting point for our topic on AI. We'll start by simply creating a bot that randomly wanders around a map before moving onto more advanced things, such as creating a bot which takes advantage of our pathfinding system.

  1. We're going to start by creating a new class for our bot, called simply, WanderBot. We don't need all of the complicated functionality behind the UDK and UT bot, so we'll be extending from ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required