User Guide
67
PLAYERS AND TRIGGER AREAS
You can also perform checks for the presence of a player’s army in a trigger area.
✯
[Skirmish] Player Has Units in an Area: The player has any number of units in an area.
✯
[Skirmish] Player Doesn’t Have Units in an Area: The player is completely outside of an area.
✯
[Player] Player Has Comparison Unit Type in an Area: The player has more than, less than, or equal to
the entered number of selected units in an area.
✯
[Player] Player Has Total Value in an Area: If the player has units and structures of value greater than
the value you define, action is taken. This condition is useful for timing attacks.
✯
[Player] Player Has Unit Type in an Area: This condition tests for the presence of a minimum number
of units of a selected type in an area. For example, you can script an AI attack on a player when 10
crusader tanks have been created. Use this condition to test for initial or large-scale attacks from the AI;
you don’t want the AI to overreact to small changes in a player’s army.
✯
[Player] Player Has Kind of Unit or Structure in an Area: This condition tests for the presence of a
minimum number of structures or units of a selected type in an area. For example, you can use it to
change strategies. If a player has created 5 Stinger sites, you might tell the AI to stop attacking with
helicopters and to use tanks instead.
SCRIPTING TUTORIAL
In the following section, you can read and learn how to script fundamental events in a scripted mission. The
materials covered here are just the basics, so be sure to test your scripts thoroughly.
✯
Keep it as simple as possible. No one cares if the AI made a right turn at a specific point. Avoid being
very specific. If your scripts are very specific, then re-examine your design goal. You could be setting up a
debugging nightmare for yourself.
✯
When developing for multiple difficulty settings, build either for the easiest or hardest difficulty setting.
Then, you can select or deselect scripts for the other difficulty settings.
HOW TO ACTIVATE THE SCRIPT DEBUGGER
World Builder includes a utility for debugging your scripts inside the game. For more information,
➤
Script
Debugger on p. 77.
HOW TO SET WIN CONDITIONS
You can tell a player that he has won the game at any time with any condition. When your chosen condition
has been met, the action to select is, [User] Announce quick win. The game is immediately over.
You may choose to take other script actions, such as destroying the remaining faction buildings, before you
announce the win.
HOW TO SET LOSS CONDITIONS
You can declare a player loss at any time with any condition. If the game is over for all players, use the
action, [Multiplayer] Announce Defeat. If the game has ended for only one player, use [Multiplayer]
Announce Local Defeat.










