Using AI Scripts
To set a computer to attack/mine/build, you must set an "AI Script". These scripts are run with triggers, and are very easy to set up. In StarEdit, drag a location over the computer's main building (Command Center, Hatchery, or Nexus) create a new trigger, set your conditions and use the action RUN AI SCRIPT AT LOCATION. Here's an example:
PLAYER(S):
Player 1
CONDITION(S):
ALWAYS
Always
ACTION(S):
RUN AI SCRIPT AT LOCATION
Execute AI script 'x' at 'y'
Where 'x' is the script you wish to use and 'y' being the location you created over the computer's main building. Obviously, you must set this trigger for the computer player.
When choosing an AI script, make sure that the script states the corresponding race that the computer actually is, and set it to a desirable difficulty level.
Here are some important notes to take in mind, they were written by .:AzraeL:. and posted with permission:
You have to give the Comp the correct starting units & resources if you want
it to run correctly. The basics are :
Place the comps starting units & men. Campaign AI expects a
fully prepared base and defensive units in place. Custom AI
expects bare minimum and will build its own base.
Give the comp some starting resources. Campaign AI does not
harvest efficiently and expects 5000+ Ore and Gas. Custom AI
only requires enough to build its first worker or Command Center
(if you have not given it one).
Place a Location over the computers main Command Center. Run the
AI Script you want to use at that location.
Common errors include :
- You must run the Script for the correct race. Terran AI script
cannot use Zerg units etc.
- You can only run ONE AI Script per computer player. Two (or
more) will conflict and neither will work properly.
- You must disable ALL the Random Start Location boxes in the
Forces menu. RSL mixes up the players and you may run the wrong
AI Script for the wrong player at the wrong location.
Here's a summary of how the "Value Area Higher" AI works.
When VAH is run, the comp will send a small scouting force to the
location (say a couple of Hydralisks and a few Overlords). If an
enemy moves into the location, the comp will immediately launch
an strong attack to reclaim the area. Use this script outside
the entrance to a human players base to lock him in, or on
resource expansion sites to prevent the human player expanding.
Note : VAH will not function if an enemy player already has units
at that location. So you cannot run it on an opponents base to
try to spark an attack
|
|
|
| |