AI base definition breakdown
Previously in the chapter, we created our own AI definition that relied on the Scripts/Entities/AI/AISample_x.lua
base definition. This section will describe what the base definition does, in order to allow for a better understanding of the definition setup.
To start, open the definition with the text editor of your choice, for example, Notepad++.
The AISample_x table
The first lines of code we'll see when opening AISample_x.lua
are its table definition, which defines each characters' default properties.
Note
Each AI definition can override properties set in the base definition.
The Properties table
The Properties table works as it does with the standard Lua entities, to define properties that appear when the entity is selected in the Editor.
Note
The default properties in our base AI definition are read from CryAISystem.dll
. Removal of these properties is not supported, and will result in AI initialization failure.
The AIMovementAbility table
The AIMovementAbility
subtable...