Starcraft has several types of Artificial Intelligence (AI) that can be assigned to computer controlled players. If a map is intended to be played using the “Use Map Settings” game type, it is important that you run AI scripts for any computer opponents in the map. In this game type, if an AI Script has not been specified, the computer-controlled players with do nothing. In all other game types, computer controlled players will automatically use the Custom Level AI scripts. For more information on game types, see the Game Types section.
Several elements must be coordinated to run an AI script for a computer player: player settings, locations and triggers.
The first step is to make sure that there are computer players on the map. In the Player menu, select Settings to open the Player Settings dialog. Use the Control pull-down to set one of the players to Computer control.
Note: Human and computer players cannot exist on the same force. In the Scenario menu, select Forces. Drag the computer players out of any force containing human players. For more information, see Forces.
The next step is to mark the computer base with a location. In the Layer menu, select Location. Create a Location called “Computer Player” somewhere in the middle of the computer’s starting town. It is important that the Location be within a screen of a source of minerals and a source of Vespene gas. For information on locations, see the Creating Locations section.
The final step is to run an AI script for the computer player. In the Scenario menu, select Triggers to open the Triggers dialog. Create a new Trigger with owner set to the computer player, with the condition “Always” and the action “Run AI Script at Location”. Click on the “script” field and select an appropriate AI script from the List of AI Scripts. Click on the “location” field and select the location called “Computer Player”. The computer player will build up and attack according to the script you have selected. (For a more detailed discussion of Triggers, see the Trigger Overview.)