The Terminate method turns off the steering behaviors and resets the bot’s
maximum speed back to normal.
//turn off steering behaviors
//return max speed back to normal
Let’s now move on to examine some composite goals.
This directs a bot along a path by repeatedly popping edges from the front
of the path and pushing traverse edge type goals onto the front of its
Here’s its declaration:
class Goal_FollowPath : public Goal_Composite<Raven_Bot>
//a local copy of the path returned by the path planner
Goal_FollowPath(Raven_Bot* pBot, std::list<PathEdge> path);
//the usual suspects
In addition to having specific terrain types associated with them, graph
edges may also require a bot to use a specific action to move along them.
For example, an edge may require that an agent fly, jump, or even use a
grappling hook to move along it. This type of movement constraint cannot
be handled by simply adjusting the maximum speed and animation cycle of
the agent. Instead, a unique traverse edge type goal must be created for
each action. The follow path goal can then query the edge flags within its
Activate method and add the correct type of traverse edge goal to its
subgoal list as it pops edges from the path. To clarify, here’s the listing for
m_iStatus = active;
Goal-Driven Agent Behavior
Examples of Goals Used by Raven Bots