Hints & Tips



Steps To Complete AI System

Step 1:
Build an environment for your character. See above for tips.

Step 2:
Add the following AI BBs:
AU Level Settings - Level script
Create AI Entity -> Set Personal Parameters -> Test Agent - Character script

Set the Create AI Entity to an AI Bot. Review Person Param, should be fine though (they need to be relative to the character model). Might need to play with settings. Take note of originals incase you set them back. Most of these are for later.

Step 3:
Replace the following AI BBs:
Replace Test Agent with Create Graph Data - Character Script

Add the following general BBs:
Cloning Factory - level settings

Create Graph Data - set up the initial position, in the middle of the area works best. Set the referential to your character, and average number of nodes (will vary on size of room). The most important thing to set is the Graph Path. Set this in a directory without any extensions.
E.G. C:\VR\AI\graph_data
The result will be files named C:\VR\AI\graph_data*
Note: Initial position is based off of the charaters' starting position, so 0,0,0 means start where his default position is.
The value of the Personal Parameters will determine if your characters will wander correctly or not. Also, spawn like, 70 of them, it goes lots faster.

Let this run, it might take some time. During this time, the neon-green dots created are a mapping of the available nodes in the room, all of your character copies are exploring the room, trying to find all available nodes. When the graph goes blue, you've stopped exploring, and should see a huge complicated web of blue lines and green points. The character clones will run around the lines, removing some. This is currently doing an optimization process, to determine the most efficient graph from point A to B. This process is complete when the line is no longer changing, and the notification box says The GraphData generation is finished. This *should* write everything out to the path specified.

Pause the execution, then save to output files to the path, just in case.

Step 4: testing the graph data
Add the following BBs:
Edit Graph, Import Data - level script

Replace the following BBs:
Create Graph Data with Wander - character script

In Edit Graph, set the path to the graph data. Once you click OK, the graph data should load in as red lines attached to grey nodes. Set Import Data to Current AI Data. Go to Array Setup, and add a row, specifiy Graph Data (give it a name and the right path). This allows you to talk about the Graph Data. Check the Wander & Set Personal Parameters to see if it has the right graph data.

Click play and watch your character wander around.

Step 5: making a path
Add:
Edit PathWay - level script

In Edit Pathway, set the path to store the pathway and make sure the Loop box is X'd. Hit play and generate a pathway using 'A' to add points and 'D' to remove. Save CMO to write pathway to disk.

Make an entry in the Current AI data array so that you can talk about the path.

At this point, make sure all thigns are set, save and RELOAD, otherwise path isn't loaded correctly and will not be followed. Ensure Follow a pathway is set to the correct pathway. Run and see if it works right.