AI Actions

Overview

AI Action flowgraphs allow designers to script AI behaviors without having to creating new code.

These flowgraphs are kind of flowgraph macro-nodes used for common actions like drinking, observing the environment, or performing some other idle action.

Setup

To create such an AI Action, open the Flow Graph editor in Sandbox and follow these steps:

  1. Open the Flow Graph editor in Sandbox
  2. From the Flow Graph editor's menu select File -> New AI Action
  3. You will be prompted to save that AI Action under a new XML file. Name the file however you want (for example "sample1.xml") and make sure it's in the GameSDK\Libs\ActionGraphs\ directory (you may need to create the directory if it doesn't exist already)
  4. Your new AI Action sample1 should now show up in the tree view under "AI Actions"
  5. Create a new arbitrary flow graph for en entity - this flow graph will then house your AI Action
  6. In that flow graph, add the node AI:Execute, double-click the Action property and select your new sample1 action from the list of available AI Actions

AI Action flowgraphs use the following two entities as parameters:

  • User: Usually the AI who executes the action
  • Object: Can be any entity

Example