EVENT_TRIGGER
ENABLE_TRIGGER
Another entity executed c_move within the
trigger_range.
Modifies:
you - set to the moving entity.
Remarks:
- The event is only triggered when both entities
are in the same ABT section
and their trigger ranges overlap. The trigger ranges are boxes with radius trigger_range around
the origin of the moving entity, and around the bounding box of the triggered
entity. If
both entities' trigger_range is
zero, no event is triggered.
- The event is triggered by a c_move instruction of the moving entity. ACTIVATE_TRIGGER mode must be set.
Example:
function trigger_event()
{
if (event_type == EVENT_TRIGGER)
{
door_open(me);
}
// etc. ...
}
action door()
{
...
my.trigger_range = 200;
my.ENABLE_TRIGGER = ON;
my.emask |= ENABLE_TRIGGER;
my.event = trigger_event;
...
}
See also:
event, c_move, trigger_range, you