Doom Wiki
Register
Advertisement

FraggleScript is a scripting language originally created for the SMMU source port. The language has since been used in the Doom Legacy, ReMooD and GZDoom source ports. The name of the language comes from the author of SMMU, Simon "Fraggle" Howard. FraggleScript was renamed to LegacyScript by GhostlyDeath in ReMooD for the reason that Doom Legacy was the last remaining place to use it (as SMMU was not active and GZDoom does not document it or recommend its use).

FraggleScript scripts are embedded inside the level header — the entry in a WAD preceding the other level data, which is usually empty. The level header is divided into a number of sections; for example:

[level info]

levelname = The Doom Wiki
author = Mr. Shiny

[scripts]

include("things.h");

script 1
{
tip("Script 1 has been activated!"); 
}

In the above example the level info section is used to set information about the level, including the name of the level and its author. The scripts section contains the actual FraggleScript script data.

The syntax of the language is inspired by C. The scripts section is divided into a number of scripts, each of which is assigned a number. Individual scripts can be triggered by linedefs inside the level (crossing a line or pressing a button, for example). The sector tag is used to indicate the script number to activate.

Code written outside of any script is executed when the level is loaded, and can be used to set up the environment for the other scripts.

For a complete list of functions, see FraggleScript functions.

Advertisement