Game Development Reference
In-Depth Information
Internal and external actions
The actions of a finite state machine can be broken up into internal and external ac-
tions. Separating the actions into the two categories makes it easier to define what
our AI does in any given situation. The separation is helpful in the planning phase of
creating AI, but it can also help in the scripting part as well, since you will know what
will and will not be called by other classes and GameObjects. Another way this sep-
aration is beneficial is that it eases the work of multiple programmers working on the
same AI; each programmer could work on separate parts of the AI without as many
conflicts.
External actions
External actions are functions and activities that are activated when objects outside of
the AI object act upon the AI object. Some examples of external actions include being
hit by a player, having a spell being cast upon the player, falling from heights, losing
the game by an external condition, communicating with external objects, and so on.
The external actions that we will be using for our AI are:
• Changing its health
• Raising a stat
• Lowering a stat
• Killing the AI
Internal actions
Internal actions are the functions and activities that the AI runs within itself. Examples
of these are patrolling a set path, attacking a player, running away from the player,
using items, and so on. These are all actions that the AI will choose to do depending
on a number of conditions.
The internal actions that we will be using for our AI are:
• Patrolling a path
• Attacking a player
• Fleeing from a player
• Searching for a player
Search WWH ::




Custom Search