NextBot
What Is A NextBot?
The NextBot system is mainly used for creating and controlling in-game entitles that behave similarly to a player (commonly referred to as bots). Unlike NPCs NextBots were designed for in-game dynamic thinking and movement.
How a NextBot works
A NextBot uses an overall structure, known as an "Actor", to run through more specific factors. When an event occurs, such as the example diagram's Oninjured, the Actor responds by changing these factors to reflect the event. Here is a summary of all the different factors a NextBot has:
Locomotion
Handles how a NextBot moves around in its environment.
Body
Handles the animations of a NextBot.
Vision
Handles how a NextBot sees certain entities in its environment.
- functions like field-of-view and line-of-sightare located here.
- Keep in mind that this factor is NOT required for NextBots to work.

Intention
The Intention factor manages the different behaviors a NextBot might have and is responsible for changing them.
Behaviour
A Behavior contains a series of Actions, which it will perform when the Intention factor chooses it.
Action
This features the code for a NextBot, which will run when its parent Behaviour is run by the Intention factor.
- Actions can have an additional child Action, which will run at the same time as its parent Action.
Game | Example |
---|---|
![]() ![]() |
Survivor bots & All Infected |
![]() |
Local Bots, Mann Vs Machine Robots, Halloween Event Characters |
![]() |
Hero Bots |
Although ![]() ![]() |
The differences between a nodegraph NPC and a NextBot
Although Source NPCs (such as those from Half-Life 2) and NextBots are both used for AI, it is important to know that the two systems are not one and the same. Here are a few key differences that set the systems apart:
Source NPCs use nodes to determine not only where to navigate, but also what to do when they reach a specific node. NextBots do not use these nodes to navigate; instead they use the navigation mesh to move around and, depending on what mark a specific area may have, perform different actions.
2. The NextBot system can be applied to both bots and non-playable entities.
The inner mechanics of the Source NPC system only apply to entities which are not players. With the NextBot system, both playable and non-playable characters can be fitted with AI if needed.
3. The NextBot system is almost entirely built with ground-based entities in mind.
Source NPCs can be defined to either navigate on the ground or use air nodes to fly around open spaces. Two NextBots (Monoculous and Merasmus) are capable of flight-based movement, but this is rather rudimentary, as the system currently doesn't have official support for "air navigation meshes" or any similar mechanic, with their only point of reference being the player(s).
Additional Resources
External links
- The AI Systems of Left 4 Dead - An official PDF regarding various mechanics of Left 4 Dead, including NextBots and the AI Director