Skip to content

RTS Properties

Lobo edited this page Apr 16, 2022 · 4 revisions

Properties declare something special about the current radius trigger, or give it a certain attribute (name, tag, etc). For example, TAGGED_DISABLED says that this script will not run straight away but will start off in a disabled state.

Because properties are not commands, it doesn't matter where in the script they are or what order they are in. To keep scripts readable it is highly recommended to place all properties at the beginning of the script, before the very first action command.

Commands

COMMAND ARGUMENTS DESCRIPTION DETAILS
TAG <Number> This allows a script to be identified with a number, similar to how lines and sectors can be given tags in your level editor. It should be used in conjunction with TAGGED_DISABLED or the SLEEP command. <Number> is an integer tag number to assign to this script.

The tag allows the script to be enabled from an external source, which could be another script, a linedef on the map, or even a custom DDF thing or weapon using the RTS_ENABLE_TAG() action. 

Please see below for some common line-types used to activate scripts.

TAG INVENTORY <Number> This is a special version of the normal TAG used to link a script to an Inventory item. It should be used in conjunction with the COAL player.use_inventory() function. <Number> is an integer number between 01 and 25.

Example: TAG INVENTORY02

NAME <Name> This associates a radius trigger script with a <Name>. It's similar to the LABEL function, but refers to a whole radius trigger script, not just a part of one. <Name> is the name which we can use to make reference to this script. This then allows the radius trigger script to be affected by other scripts using TAGGED_PATH, ENABLE_SCRIPT and DISABLE_SCRIPT.
TAGGED_DISABLED Use this to make a radius trigger script inactive until another radius trigger script activates it. You can use it in conjuction with ENABLE_SCRIPT in the Flow Control section.
TAGGED_IMMEDIATE Use this to make a radius trigger script run immediately upon starting the map, without waiting until the player enters the trigger area.

Note: if the script has conditions (like ON_DEATH), then it still waits for them.

Useful when you want the trigger to cover a certain part of the map (for example, to damage all the monsters in that area) but you don't want the trigger to wait for the player to enter that area.

Immediate trigger scripts are also useful for setting things up on the map, e.g. spawning monsters or items on top of an extrafloor.

TIP: you don't need to use TAGGED_IMMEDIATE in a script which begins with "RADIUS_TRIGGER 0 0 -1". They both mean the same thing, basically "ignore where the player is".

TAGGED_INDEPENDENT This makes a radius trigger script complete even if the player leaves the trigger area.

Without the TAGGED_INDEPENDENT property, the script will become paused whenever the player leaves the trigger area, and only starts again if the player re-enters that area.

Note: TAGGED_INDEPENDENT is not needed when using TAGGED_IMMEDIATE or "RADIUS_TRIGGER 0 0 -1" scripts, because the player can never get outside of the script to make it pause.

Useful if you use a radius trigger script to open a door completely. If the player walks into the radius trigger area, then backs out, TAGGED_INDEPENDENT will allow the radius trigger script to keep going.
TAGGED_REPEATABLE <Times> <Rate> Use this to make looping radius trigger scripts. It is most useful when used with TIP and MOVE_SECTOR commands. <times> is the number of times we want the script to execute. If we specify 0 then it will repeat forever.

<Rate> a time value indicating how long before it repeats (in either ticks or seconds).

  • 0 = no delay
  • 0.5 = half a second
  • 2 = two seconds
  • 1T = one tick (shortest possible time)
  • 35T = one second
WHEN_APPEAR <appear flags> Controls when triggers exist on your map, based on skill level and game mode. It's not required if you want the trigger to exist on every skill and net mode, since that is the default setting for scripts. The <appear flags> is a bunch of numbers and/or keywords, which must be separated by the colon (':') character. These values can be:
  • the skill levels which this script will be run on. These are numbers in the range 1 to 5, and there can be multiple skill levels present.

    E.g. WHEN_APPEAR 1:2:3:4:5

  • the net mode of the current game. Valid values are:
    • "sp" for Single-Player,
    • "coop" for Co-operative,
    • "dm" for Death-Match.

    E.g. WHEN_APPEAR sp:coop:dm

  • you can negate the flags by adding the '!' character to the beginning.

    E.g. WHEN_APPEAR !4:5

WHEN_PLAYER_NUM <min> [max] Use this to define how many COOP or DM players have to be in a game for this trigger to exist. <min> gives the minimum number of players.
[max] gives the maximum number of players, with no limit when this value is absent.

Valid numbers are 1 to 8, since EDGE can handle up to 8 players.

Use WHEN_APPEAR to define what game modes (like DeathMatch) the script appears in.
TAGGED_PATH <Name> Used for defining a path which a monster with the "PATH_FOLLOW" action in its states will follow. <Name> references the name of another radius trigger script. This allows us to "daisy chain" the path nodes together.

Use the NAME command to name your radius triggers, then use the TAGGED_PATH property to create a path for a monster to follow. This is similar to how Quake makes monsters follow a path before they encounter the player.

All monsters spawned in a TAGGED_PATH script will be able to follow the path. Use the SPAWN_THING command to spawn the monster you want to walk the path in the first radius trigger script (using TAGGED_IMMEDIATE too), the monster will start here and then follow the path based on the TAGGED_PATH names.

You must use the "PATH_FOLLOW" action in the monster's states in THINGS.DDF (normally the IDLE states). This action makes the monster follow the path. (See DDF Online/THINGS.DDF for more info)

To make a looping path, the last radius trigger should use TAGGED_PATH with the name of the first node. Omitting the last TAGGED_PATH means that the monster will stop there.

NOTE: it's best to make the radius of this trigger about 10, otherwise the monster following the path will starting moving to the next node as soon as it hits the outer radius. Making the radius a small area forces the monster along a more precise path.

PATH_EVENT <State> When the "path-following" monster reaches this node it will enter the <State> we have defined. Must be used with TAGGED_PATH. <State> is the state we want the monster to go into when he reaches this path-node. Useful for making a thing "talk" when he gets to certain points on the map for example.

Common Linetypes used to Activate Scripts

The following are some common line-types which can be used to enable the script. There are additional line-types (e.g. ones which can DISABLE scripts). See DDFLINE for the full list.

Type Description Activator Mode
418 Enable Tagged RTS Player S1
419 Enable Tagged RTS Player SR
420 Enable Tagged RTS Player W1
421 Enable Tagged RTS Player WR
454 Enable Tagged RTS Monster W1
455 Enable Tagged RTS Monster WR

Examples

This radius trigger script will fire off every time we stand on the green-armor pedestal (in DOOM's E1M1) and press the USE button. It waits 4 seconds before "reactivating".

START_MAP e1m1
    RECT_TRIGGER -256 -3264 -192 -3200
        TAGGED_USE
        TAGGED_REPEATABLE 0 4
        TIP "Nothing of interest."
    END_RADIUS_TRIGGER
END_MAP

This script will only appear and run if we are playing a single player game on skill 1.

RADIUS_TRIGGER 0 0 -1
    WHEN_APPEAR 1:sp
    TIP "You're using a low skill setting!"
END_RADIUS_TRIGGER

This script shows how to use TAGGED_PATH

START_MAP map01
    RADIUS_TRIGGER 0 0 10
        NAME walk_1
        TAGGED_PATH walk_2
        TAGGED_IMMEDIATE
        SPAWN_THING imp
    END_RADIUS_TRIGGER

    RADIUS_TRIGGER 150 200 10
        NAME walk_2
        TAGGED_PATH walk_3
    END_RADIUS_TRIGGER

    RADIUS_TRIGGER 300 0 10
        NAME walk_3
        TAGGED_PATH walk_1
    END_RADIUS_TRIGGER
END_MAP




RTS docs written by many contributors. Original RTS Docs from EDGE Engine Home Page. EDGE Classic updates by Yamato. Problems with the docs, errors and comments should be directed to the Yamato at DoomWorld Forums or Arcades3d.net forum.

Home

EDGE-Classic Mod Downloads

COAL

DDF     Introduction
    Animations
    Attacks
    Colormaps
    Flats
    Fonts
    Games
    Images
    Languages
    Levels
    Lines and Sectors
    Playlist
    Sounds
    Styles
    Switches
    Things
    Weapons
RTS     Introduction
    Conditions
    Directives
    Flow Control
    Level Commands
    Maps and Triggers
    Properties
    Thing Commands
    Tips and Menus
Tutorials     Creating a Weapon
    Creating an Enemy
    Creating a Friendly Creature

Compiling EDGE-Classic

Clone this wiki locally