O'Reilly logo

Learning Game AI Programming with Lua by David Young

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

Running the obstacle course

Now that we've implemented both approaches to animation control, it's time to create both of these agent types within the obstacle course. As there's no actual agent decision-making logic, we'll be binding each different state to a keyboard hotkey so that we can influence what actions the agents perform. Here, we can see a few agents running the obstacle course:

Running the obstacle course

Creating a direct control agent

As all the animation control for our direct control agents exists within the agent Lua script, all that remains is setting the soldier's state based on hotkeys. Note that as we have no direct change state, we handle this completely ...

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