Note: We'd like to thanks Quasar for allowing us to modify the docs of the Eternity Engine to reflect Legacy FraggleScript implementation.

FraggleScript Function Reference -- Updated 15 August 2001

Notation for those unfamiliar with C:

[return-type] [function-name]([parameter list])

[return-type] := The type of data returned by this function. This may by int for integers, fixed for fixed-point numbers, string for strings, mobj for a mapthing reference, array for an array reference, 'a for an arbitrary type, label for the literal name of a label, or void for nothing. If a function returns void, it cannot be meaningfully used in an assignment statement or as a parameter to another function because it does not evaluate to any meaningful value. Also notice that void is not actually a keyword in FraggleScript, and you cannot declare variables of type void.

[function-name] := The name of the function. Use this to call it in your program.
Example:

   script 0
   {
      print("Hello World!\n");
   }
[parameter-list] := If this is empty, then the function does not accept any parameters. When items appear in the list as [type] [name] constructs, then [type] indicates the type of variable you can pass in this position, and [name] is simply being used to refer to the value being passed in. If an item appears inside brackets -- {} -- then it is an optional parameter. "..." indicates that the function takes a variable number of parameters up to 128, minus the number of any parameters that occur before the ellipsis.

Basic Control Flow

Core Functions

Level Transfer and Game State

Player Interaction

Mapthing Interaction

Sector Interaction

Linedef Interaction

Camera Control

Math and Geometry

Sound and Music

Heads-Up Graphics

Array Functions

Miscellaneous

OpenGL