Radius Trigger Script

From 3DGE Wiki
Jump to: navigation, search

RTS ("Radius Trigger Script") is the scripting language invented by DOSDoom and greatly expanded upon in 3DGE. It was the first such scripting language to be implemented in any source port.

Introduction

RTS is not intended to replace DDF, but accents and enhances DDF. Using both DDF and RTS together, you can create amazing events that even Quake 2 is not capable of.

With RTS, you can create scripted events that cannot be controlled by linedef triggers alone, such as a simple on-screen tip message, multiple linetypes being triggered by one switch, or a complex event where an entire structure is destroyed, monsters are spawned, sounds are played, and light levels are changed dramatically.

Somewhat more technically defined, a script is something a person writes in a text editor of some sort, that contains individual scripts (kind of like subroutines), commands, variable declarations, and so on. You cannot use word processor files (like "DOC" files), because these are not text files and 3DGE cannot read them.

The RTS specs were originally written by John Cole for DosDoom v0.64.

Getting Started

This guide is still being migrated over from the old EDGE SourceForge RTS Documentation website. Please visit the old site until this guide is completed.

Some general points about RTS scripting:

  • #CLEAR_ALL (if used) must be at the top of your script, or else everything before it will be cleared.
  • #VERSION and #DEFINE values (if used) must be after #CLEARALL, but before the rest of your script
  • Commands are not case sensitive, hence "start_map", "Start_Map" and "START_MAP" are all acceptable. Whether you use lowercase or uppercase is just a matter of personal taste.

You can include comments (text which will be ignored by 3DGE) by simply placing a double slash "//" at the beginning of a line and then typing your text after it.

For example: //This is a comment //and this is another one

Commands in RTS scripts can be extended over two (or more) actual lines by placing the \ character at the end. There must not be any spaces after the \ character, otherwise it doesn't work.

General Tips

Check your spelling and values carefully, and add a few functions at a time, then test.

Just like DDF development, adding a lot of entries without testing makes it much harder to find problems. If you add a little and test often, you have less scripting to rummage through to find errors.

Conventions

Most RTS commands take one or more parameters. Some parameters must be given, and the remaining parameters are optional (may be left out). Throughout this documentation the following bracket styles are used:

<Name> : a compulsory parameter [Name] : an optional parameter



Radius Trigger Scripts
RTSlogo.gif