buildingCityguards screaming 'PROTECT THE INNOCENT! BANZAI! CHARGE!', (a mob trigger).
A portal that teleports players when they enter it (an object trigger).
A room that creates a new exit when a player pulls a lever (a room trigger).
Every room, mobile, and object can have one or multiple triggers attached to it.
These triggers are activated by an event such as room entry, speech, commands,
etc.
There are several different types of triggers. Each trigger type determines
when the trigger will be checked. For example, a mob speech trigger is checked
every time a character who is in the same room as the mob with the trigger uses
the 'say' command. A room enter trigger is checked every time a character
enters the room. There are two parts of the trigger used to determine if the
trigger's commands are executed when it is checked, the argument and numerical
argument (NArg). Some triggers use both; some may use only one of the two; and
some may use neither. The interpretation of these two fields is dependant on
the type, and is described in more detail with each triggers help file. HELP
TRIG-TYPE for a listing of all the trigger type help files.
When an event in the game occurs, each trigger in the room where the event
occurred is checked to see if there are any triggers which are supposed to
react to that event. Only one trigger of each trigger will be run by a single
event. For example, if there are two triggers on a trigger, and both are the
same type with the same arguments, the second trigger will only be run if the
first one is already running.
Triggers can be of more than one type. For example, to simulate a cursed item,
a trigger on the object could be of types drop, give, and remove. A more common
combined trigger would have both random and global types, so the random trigger
would be checked even when the zone was empty. Combined triggers must have the
same argument and numerical argument.
The other component of a trigger is the command list. This is a series of
commands that are executed when the trigger is run. Commands are chosen from
two groups of commands, trigger specific commands and game commands. Triggers
specific commands are those commands that only the trigger interpreter can
recognize. These include flow control commands (such as if, elseif, else, end,
halt, wait, and return), and commands to manipulate variables (such as set,
eval, unset, and global). Game commands are those commands that a player could
issue from their command line as well as special commands added for mobiles,
objects, and rooms such as wake, east, sit, etc.
See also:: TRIGEDIT-MOB-TUTORIAL, TRIGEDIT-ADVANCED-TUTORIAL