USING THE "NEW AI SCRIPTS"
This article was created because of demand, not because it takes a rocket scientist to figure out how to use the internal Blizzard AI scripts. (If you don't know what I'm talking about, download the Blizzard Internal AI Scripts from the Programs section) They are actually pretty easy to understand and should be self-explanatory. However, after receiving at least an e-mail every day concerning these scripts, it seems many people have trouble working with them. So, here is what you have to do to get them working properly:
AI Nuke Here
There are two steps required to "get a ghost to nuke." First, you have to load the computer player's nuclear silo(s), and second, you have to point the ghost in the direction of where you wish him to paint the target.
Loading the Silo(s)
There are two AI scripts that successfully "force" the computer player to load
their nuclear silos. They are "Nuke Train 1 (Broodwar Terran 2 - Town A)" and
"Nuke Train 2 (Broodwar Terran 2 - Town B)." The Train 2 script makes the
computer player load the silos manually; i.e., they actually take the time and resources
to build the nuke. The Train 1script automatically loads the nukes in the silos;
i.e., they just "instantly" load. However, the Train 1 script was specifically
tailored to the Terran 5 [Ground Zero] level of the Broodwar campaign and will do many other
undesirable things you might not want. For example, it will only load 3 silos at first and
will only recognize the first 3 ghosts you send on "nuke runs." After about 45
seconds, it will create more ghosts somewhere in the lower left-hand corner of a 196x128
map (if that location is inappropriate for unit creation or the map is smaller than
196x128, the player will receive a couple "Unit not placeable" errors). Thus, it
is probably more appropriate in most cases to use the Train 2 script. If you wish for the
nukes to be built instantaneously, you can just decrease the build time of a nuclear
missile to 0.
Now, first make sure the computer player that will initiate the script has enough supply and enough resources to build all the nukes (it will attempt to load as many of it's silos as possible). Then base your "loading" trigger off the following:
Owner:
- Player 2
Conditions:
- Elapsed scenario time is at
least 100 game seconds.
Actions:
- Execute AI script 'Nuke
Train 2 (Broodwar Terran 2 - Town B)' at 'nukesilos'.
The owner of the trigger is whichever player the computer is and the conditions are whenever you want the silos to start building. "nukesilos" should be a location that covers the nuclear silos.
Directing the Ghosts
When you are certain the silos are loaded (if you don't change the build time, it takes
about 100 seconds), you are ready to direct the ghosts to nuke. First, make sure the
computer has at least one ghost per nuke you want to launch (as a ghost can only launch
one at a time). Then, follow the following model:
Owner:
- Player 2
Conditions:
- Elapsed scenario time is at
least 300 game seconds.
Actions:
- Execute AI script 'AI Nuke
Here' at 'nukeloc'.
Make sure the Owner of this trigger is the same computer player and that the Conditions allow for enough loading time. If executed correctly, the computer should send one ghost to paint the target at 'nukeloc'. If you have multiple loaded silos and multiple ghosts, you can execute the script multiple times simultaneously to have all the ghosts nuke at the same time (each to the same location, or each to different locations). If the ghost survives the flight time of the nuke, it should be falling shortly. =) You can order ghosts to nuke whenever and as many times as you wish during a level, so long as the computer player commands the loaded silos.
AI Recall Here
This script is incredibly simple to use, as long as you keep the following in mind before executing it:
- The computer player must have an arbiter. (Duh?)
- The arbiter(s) must have enough energy to cast Recall
If all these things are true, then it is a simple matter of executing the AI:
Owner:
- Player 2
Conditions:
- Elapsed scenario time is at
least 100 game seconds.
Actions:
- Execute AI script 'AI
Recall Here' at 'recallloc'.
The Owner of the trigger is the computer play with the required arbiters and the Conditions are whenever you want the Arbiters to cast the spell. 'recallloc' is the location where you want the Recall warp hole to appear. If you have multiple Arbiters with the required energy, you can execute the AI multiple times simultaneously to have multiple Recall warp holes created at the same time.
AI Disruption Web Here
This script works exactly the same way as the Arbiter Recall script, only you need Corsairs instead. =)
- The computer must have a corsair.
- The corsair(s) must have enough energy to cast Disruption Web.
Hopefully, I don't need a full trigger to demonstrate. Just execute the 'AI Disruption Web Here' script at 'd-webloc', where 'd-webloc' is the location where you want the corsair to place a disruption web. Again, you can run the script multiple times with multiple Corsairs.
Set unit order to: Junkyard Dog
This is a fun little AI that is simple to use.
Owner:
- Player 2
Conditions:
- Elapsed scenario time is at
least 100 game seconds.
Actions:
- Execute AI script 'Set unit
order to: Junkyard Dog' at 'unitsloc'.
This will make all Player 2's units at 'unitloc' to start wandering around the map randomly. "Junkyard Dog" units will not respond unless attacked. This script can also be run multiple times at differing locations.
Turn ON/OFF shared vision for Player X
These AI scripts may be run for human players as well as computer players. Basically, they tell the player to "share vision" with Player X. For example:
Owner:
- Player 1
Conditions:
- Elapsed scenario time is at
least 0 game seconds.
Actions:
- Execute AI script 'Turn ON
shared vision for Player 2'.
This trigger will allow Player 1 to see what Player 2 sees; in other words, it has Player 2 share vision with Player 1. It does not, however, have Player 1 share vision with Player 2. The owner of the trigger is always the player that "receives" the vision, not the one that "gives" it. You can run these scripts as many times as you wish for any player(s). Keep in mind that shared vision takes a few seconds to take effect.
Well, that's it. Hopefully that helps you understand your problems regarding these scripts. If I have excluded a script from this list it is probably because the script is not very useful (like 'Set Generic Command Target', 'Make these units Patrol', 'Move Dark Templars to region', etc.).
DI
March 7, 1999


