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

Making a pawn randomly patrol PathNodes on a map

PathNodes are designed so that we can have complete control over how our bots progress through a map. The problem with having a bot patrol PathNodes in a set path is that it doesn't look very realistic, unless your bot is a guard patrolling a prison.

For that reason we want to create a bot that can patrol our PathNodes at random.

Getting ready

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

How to do it...

Our goal here is similar to what we did with our first recipe in the chapter. We want to create a bot that wanders again, but this time we want it to take advantage of the PathNodes we've laid throughout the map. This gives us far more control over the landscapes the bot can traverse, as opposed ...

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