The code action type executes a block of AI script code. This is the most flexible and powerful action type available in the NPC logic system. With the code action type, one can execute a block of AI script code, granting the ability to implement custom, complex behaviors for NPCs that go beyond the capabilities of the other action types.
The code to be executed is specified as a string parameter using the AI script language syntax and structure. For more information on the AI script language, see the AI Script page.
<ai_script_code>