Difference between revisions of "RECT TRIGGER"

From 3DGE Wiki
Jump to: navigation, search
(Created page with "<div class="content"> === RECT_TRIGGER === '''Usage:'''<br /> RECT_TRIGGER <X1> <Y1> <X2> <Y2> [Low Z] [High Z] '''Description:'''<br /> This define...")
 
(No difference)

Latest revision as of 16:35, 8 June 2015

RECT_TRIGGER

Usage:
RECT_TRIGGER <X1> <Y1> <X2> <Y2> [Low Z] [High Z]

Description:
This defines a rectangular radius trigger instead of the normal square one. This is most useful to place a thin trigger area in front of a door, or some place you need a wide but narrow trigger area (since normal radius triggers are square, one that you need to cover a wide area covers a lot of unnecessary space).

Details:
<X1> <Y1> define the lower left corner of the rectangle.
<X2> <Y2> define the upper right corner of the rectangle.

It's best to use your map editor to determine the exact points for the X and Y values you want (most map editors show the grid location in real time).

The optional [low Z] and [high Z] values are to create a "3D" trigger: one that can be walked over or under without being triggered. The [low Z] must be a value below [high Z] (you cannot invert the low and high Z values). If you use Low Z then high Z is also required.

NOTE: close a RECT_TRIGGER with 'END_RADIUS_TRIGGER', just like a normal radius trigger.

Example:
Press the USE button somewhere within the starting room of DOOM2 MAP01 (the room with the two pillars and the V-shaped stairs). Pressing USE in other locations should do nothing (remember to reload the map, this script will only run once).

START_MAP map01
  RECT_TRIGGER 1280 3200  1920 3648
    TAGGED_USE
    TIP "You pressed use!"
  END_RADIUS_TRIGGER
END_MAP