AI Programming Overview

From Valve Developer Community
Revision as of 01:31, 4 August 2005 by Fluxtah (talk | contribs) (small summary describing RunAI())
Jump to navigation Jump to search


Each time the NPC think's with NPCThink() a core method is run RunAI().

RunAI() gathers the NPC's current Conditions according to it's environment and determines the best State it should be in, any kind of logic can influence the NPC's conditions and state including the things it sees or the sounds it hears.

The NPC will then determine the best Schedule to run for the given conditions and state, it will maintain any current schedules or interrupt them and run more appropriate schedules to those given conditions and state.

The following links describe states, conditions, schedules and tasks in more detail.

States

Conditions

Schedules

Tasks

Stub

This article or section is a stub. You can help by expanding it.