User Guide

66
TRIGGER AREAS
Trigger areas are created with the Polygon tool. When you create a polygon on the map, you can name it
and then reference it in scripts. They are very powerful elements of the scripting library.
It becomes apparent very quickly that you can create scripting systems that know everything about every
player on the map. However, testing many trigger areas simultaneously can slow down the frame rate. Also,
it is less realistic to have all-knowing armies. When using trigger areas, remember that the overarching goal is
to create a fun and lively experience that seems like real combat.
NOTE: Don’t have more than five overlapping trigger areas. The outer ones tend to get
forgotten.
When creating trigger areas, be sure to give them descriptive names. For more information on creating
trigger areas,
Polygon Tool on p. 26.
The following sections describe the key conditions for using trigger areas to test for the presence of teams,
individual units, and players.
TEAMS AND TRIGGER AREAS
[Team] One Unit Enters an Area: Select the team name, Area name, and whether the team can enter
via ground, air, or both. You must select how the team enters. A player’s default team includes all of the
units on his side that have not been assigned to a team.
[Team] One Unit Exits an Area: The assumption of this condition is that the team is already in the area,
so don’t activate scripts using this conditional unless you are sure that the team has already entered the
area.
[Team] Team Completely Inside an Area: This script state becomes TRUE when all surviving members
of a team are inside an area. It is a good way to time events. For example, when all units are in an area,
you can launch an attack on them.
[Team] Team Entirely Enters an Area: This script state becomes TRUE when all surviving members of a
team have at one point or another entered an area. Use it to pass between the beginning, middle, and
end of your mission, for example. A common technique is to change the map perimeter during various
stages of the game, and this condition can be used to assess when to change it.
[Team] Team Entirely Exits an Area: This condition assumes that all surviving team members were in
the area at some time. Use it carefully.
[Team] Team Has Units in an Area: The team has entered the area in some form. This condition is a
catch-all trigger test.
[Team] Team Is Completely Outside an Area: The team has no presence at all in an area. This script is
useful for managing retreats or scripted exits of units from the map. You can also use it for checking
outer perimeter and inner perimeter breaching in Skirmish missions. For more information,
A Few Extra
Steps for Skirmish Maps on p. 40.
UNITS AND TRIGGER AREAS
You can also perform some of the team tests on individual units. Note that these units must be given
specific names, so these tests are useful for examining the state of units that are placed on the map by the
designer—not units created by a player.
Some conditions available for teams are not available to test for individual units. To make those
comparisons, put the individual unit in its own team.
[Unit] Unit Enters an Area: The named unit has crossed into a trigger area.
[Unit] Unit Exits an Area: The named unit has left a trigger area.
[Unit] Unit Inside an Area: The named unit is inside a trigger area.
[Unit] Unit Outside an Area: The named unit is outside a trigger area.