User Guide
71
HOW TO SCRIPT ACTIONS FOR AI TEAMS
When you create a new player, whether it is human- or CPU-controlled, a default team for the player is
created. The team name is “team” followed by the name of the Player. This team contains all units for the
player. You can script actions to apply to this team, which apply to all units for that player.
INITIAL ACTIONS
When a team is created for the AI, it’s a good idea to have a set of scripted actions for the team to follow.
Otherwise, it sits in the base area, doing nothing. A good structure for a team’s initial action is to send it
along a waypoint path to get it closer to combat. When the team reaches the end of the waypoint path, you
can assign it to move towards the nearest enemy vehicle, guard, or hunt through scripts. If the team is
scripted to attack a specific target and succeeds, its final action should be to hunt enemy units. Otherwise,
the team sits, doing nothing. For more information on sequential scripts,
➤
How to Create Sequential Scripts on
p. 68.
✯
You can create basic responsiveness of the AI by setting the Aggressiveness of each team in the Behavior
tab of the Edit Team window.
AI ATTACK TEAMS
An attack team for an AI player should consist of two or so attack teams. For easier difficulty settings, you
may consider sending only one attack team. A high number of teams in an attack is hard to defend and
hard for the designer to manage. Keep it simple, if possible.
You can establish priorities for your attack teams by setting attack priorities (
➤
How to Configure and Execute
Attack Priorities for the AI on p. 72) for object lists (
➤
How to Create Object Lists below), or by sequential
scripting (
➤
How to Create Sequential Scripts on p. 68) for specific targets.
AI DEFENSIVE TEAMS
Following the principle of having three entrances to each base, an AI army should have three defensive teams
or one for each entrance to its base.
Defensive teams for the AI can be set to varying levels of responsiveness. You can tell a unit to simply guard
an area, changing the Aggressiveness setting to a low level. Or, you can have one fast defensive team that is
responsible for attacking anything that breaches perimeters that you define with the Polygon Tool (
➤
p. 26).
✯
The condition, [Skirmish] Player has discovered another player, can be used to switch the AI into a
different defensive posture.
NOTE: Be sure to create a subroutine to be called when the situation is all clear for a defensive
team. This script should tell the units to resume their original behaviors. You select the On All
Clear subroutine in the Edit Teams window. For more information,
➤ Edit Teams on p. 17.
HOW TO CREATE OBJECT LISTS
Object lists are sets of multiple choices of objects that the AI can use to establish a valid target. Anywhere in
the Script Builder that you can specify a type of object, you can use an object list. When you do so, the
available object lists are listed below the types of objects.
✯
[Scripting] Object Type List – Add Object Type: Use this action to create new object lists and add
objects to existing ones. To create a new object list, enter a name in the drop-down. Then, select an
object to add.
✯
[Scripting] Object Type List – Remove Object Type: Use this action to remove object types from an
object list. This action is useful for re-assigning priorities if an enemy’s capabilities have been destroyed.










