-
Notifications
You must be signed in to change notification settings - Fork 13
RTS Thing Commands
Radius Trigger Scripts can be used to interact with players or monsters, by making them enter certain states, giving benefits to players, and damaging monsters or players. Monsters and items can also be dynamically spawned, which can be useful for placing them onto ExtraFloors.
COMMAND | ARGUMENTS | DESCRIPTION | DETAILS |
---|---|---|---|
DAMAGE_MONSTERS | <thing id> <amount> | This takes away health from a specific species of monster, or all monsters within the trigger radius. Combine a low <amount> with TAGGED_REPEATABLE if you want to do damage in increments. | <thing id> is to specify a species of monster to be
damaged. Can be the name or number from THINGS.DDF, like IMP or
3001. For example, 3001 will cause only Imps within the radius
trigger to be damaged, but no other monsters will be harmed.
If you use the value "ANY" instead of a thing ID then all monsters within the trigger radius will be damaged. <amount> is the amount of damage to be inflicted. In higher skills, this does more damage, so be sure to test how much damage you do on all skill levels. For example, on skill 5, "DAMAGE_MONSTERS ANY 50" would likely clobber all monsters, instead of just hurt them a bit. |
DAMAGE_PLAYER | <amount> | This takes away from the players health and armor within the radius of the trigger. Combine a low <amount> with TAGGED_REPEATABLE if you want to do damage in increments. | <amount> is the amount of damage to be inflicted. In higher skills, this does more damage, so be sure to test how much damage you do on all skill levels. For example, on skill 5, "DAMAGE_PLAYER 50" would likely clobber the player, instead of just hurting him a bit. |
HEAL_PLAYER | <amount> [limit] | This gives the players health within the radius of the trigger. Combine a low <amount> with TAGGED_REPEATABLE if you want to give health in increments. | <amount> is the amount of health to give.
<limit> sets the max the players health can reach based on the amount. If you want to award 100 health, but not allow the player to exceed 100 max health, set the <amount> and <limit> to 100. That would mean that if the player has 30 health, they are awarded only 70 health, since the <limit> is set to 100. That is how the health pick-ups work. NOTE: <limit> is optional, but defaults to 200 if left empty. Also note that the <limit> cannot exceed 200 (rules of normal DOOM) |
GIVE_ARMOUR | <class> <amount> <limit> | This gives armour to the player. Combine a low <amount> with TAGGED_REPEATABLE if you want to give armour in increments. | <class> is the strength of armor to give. Higher
absorption results in less damage to the player.
Possible values are:
<amount> is how much armour is awarded. <limit> sets the max the players armour can reach based on the amount. If you want to award 100 armour, but not allow the player to exceed 100 max armour, set the <amount> and <limit> to 100. That would mean that if the player has 30 armour, they are awarded only 70 armour, since the <limit> is set to 100. This is how the pick-up armour works. NOTE: the <limit> can not exceed 200 (rules of normal DOOM). |
GIVE_BENEFIT | <benefit> [amount] | Use this to give the player ammo, weapons, powerups etc. | <benefit> is the type of benefit to give the player (ammo
names, armour types, inventory items, keys, weapons and powerups).
Some examples:
[amount] is how much of the benefit is given, and is only required in the case of ammo types, armour, inventory and powerups. Note that the amount must be enclosed in (). Some examples:
Note: for powerups, if you don't specify an [amount] the powerup will last the entire level. |
LOSE_BENEFIT | <benefit> [amount] | Use this to take away ammo, inventory items, weapons, powerups etc. from the player. | <benefit> is the type of benefit to take from player (ammo
names, armour types, inventory items, keys, and weapons).
[amount] is how much of the benefit to be taken, and is only required in the case of ammo types, armour, inventory items and powerups. The amount must be enclosed in (). |
SPAWN_THING | <thing id> <X> <Y> <Angle> <Z> <mlook> | This command spawns a new monster or item on the map. You can set the point where you want the monster to spawn, the angle to face, the z height to spawn, and the mlook angle. | <thing id> specifies the type of monster or item to be
spawned, and can be either the name or the number from THINGS.DDF,
like "IMP" or "3001".
<X> <Y> is the spawn coordinates. 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). <Angle> the monster will be facing. Common map angles are:
<Z> is the vertical coordinate, useful to spawn monsters or items on top of extrafloors, where the <Z> can equal the top of an extrafloor. Most things spawned above the floor will fall with gravity (just like a Quake entity). NOTE: you cannot spawn players anywhere (OUR_HERO or PLAYER2-8). You must use a level editor to spawn players. <mlook> this is the vertical looking angle of the thing, which ranges from -89 to 89, and 0 (zero) is straight ahead. Use this for laser shooters, special aiming attacks, and for end of map cameras. |
SPAWN_THING_FLASH | <thing id> <X> <Y> <Angle> <Z> <mlook> | This command spawns a new monster or item on the map. You can set the point where you want the monster to spawn, the angle to face, the z height to spawn, and the mlook angle. Makes the thing spawn as if it teleported in, displaying the flash associated with the event. | (Same as above) |
SPAWN_THING_AMBUSH | <thing id> <X> <Y> <Angle> <Z> <mlook> | This command spawns a new monster or item on the map. You can set the point where you want the monster to spawn, the angle to face, the z height to spawn, and the mlook angle. Spawns the thing in ambush mode (some editors call this deaf mode). | (Same as above) |
THING_EVENT | <thing id> <State> TAG=[TAG] | This is used to force a thing to certain states (defined in its THINGS.DDF entry). | <thing id> can be the name or number from THINGS.DDF, like
"IMP" or "3001".
<State> is the state we want the monster to go into. Most useful for special events, like walking up to a human, pressing space (the use button) which causes a friendly monster to enter states that make him talk, give advice, or a hint. You could also do events like make a weapons house, and a merchant inside that talks to you, or sells weapons and ammo. [Tag] is the specific ID for this "thing" which uniquely identifies it from amongst other "things" of the same type. Basically this is EDGEs implementation of the "TID" used in Hexen editing. Say you have 3 IMPS and you want to single out one in particular for a messy death later on: you assign a unique [Tag] to that IMP when you SPAWN_THING him, and then later in the script you could use either THING_EVENT or DAMAGE_MONSTERS with the [Tag] of our unfortunate Imp to hurt only him, and not ALL the other Imps. |
REPLACE_THING | <Old Thing> <New Thing> | Use this to substitute one map thing with another. For randomizer scripts. | <Old Thing> is the thing to be replaced.
<New Thing> is the thing to change to. |
TELEPORT_TO_START | no arguments | Simply teleport the player back to player 1 start | -- |
SWITCH_WEAPON | <weapon> | Use this to force toggle a weapon change for the player | <weapon> is the weapon to change to |
REPLACE_WEAPON | <Old weapon> <New weapon> | Use this to replace one weapon with another instantly(no up/down states run) if the player has it. It doesn't matter if we have the old one currently selected or not | <Old weapon> is the weapon to be replaced.
<New weapon> is the weapon to change to. |
WEAPON_EVENT | <Weapon> <State> | This is used to force select a weapon and go to a certain state (defined in its WEAPONS.DDF entry) | <Weapon> the name from WEAPONS.DDF, like 'PISTOL'
<State> is the state we want the weapon to go into. |
This example gives the player the Chaingun, a Blue Keycard and 50 bullets:
RADIUS_TRIGGER 0 0 -1
TAGGED_USE
TIP "You got a chaingun, ammo and a blue key!"
GIVE_BENEFIT CHAINGUN
GIVE_BENEFIT KEY_BLUECARD
GIVE_BENEFIT BULLETS(50)
END_RADIUS_TRIGGER
Similar to the previous example but this removes the items instead of giving to the player.
RADIUS_TRIGGER 0 0 -1
TAGGED_USE
TIP "You lose a chaingun, 50 bullets and a blue key!"
LOSE_BENEFIT CHAINGUN
LOSE_BENEFIT KEY_BLUECARD
LOSE_BENEFIT BULLETS(50)
END_RADIUS_TRIGGER
This script forces the thing with tag #200 to enter the MISSILE state.
RADIUS_TRIGGER 0 0 -1
TAGGED_USE
THING_EVENT 200 MISSILE
END_RADIUS_TRIGGER
_RTS docs written by many contributors. _