Eternity Engine Small Function Reference v1.4 -- 10/22/06
Return to the Eternity Engine Page
Format of the Reference
Here is a brief example and explanation of the entries in this reference:
- Function Name
    Small Language Declaration
    Parameter Explanation
    Return Value
    Found In
    Description
    Exceptions
 
The Function Name is the name of the function, by which it is called in a script
and can be found in this reference. Below the name is the exact declaration of the function
in Small along with a brief explanation of each parameter to the function and its return
value. Below this is the header file in which the declaration can be found, and then a
description with additional, verbose information about how to use the function. Finally, if
the function can cause any exceptions, the types of errors will be explained.
Return to Table of Contents
Core Small Functions
These functions are specified and provided by the Small interpreter, and provide some basic
facilities for using the language and the interpreter. Note that not all functions suggested
by the Small specification are supported by Eternity, so only supported functions are
documented here.
- heapspace
    native heapspace();
    Parameters: None
    Return value: Number of cells available on the interpreter's heap.
    Found in: core.inc
    Description: This function allows the user to query the amount of heap memory that
    is available to the interpreter in which the current script is running. This is not
    yet useful for anything within the Eternity environment.
    
 - funcidx
    native funcidx(const name[]);
    Parameters:
    
    - const name[] : Name of a public function found in the current script
    
 
    Return value: Internal index number of the function.
    Found in: core.inc
    Description: This function returns the internal index of a public Small function. This
    is not yet useful for anything within the Eternity environment.
    Exceptions:
    
    -  "Native function failed" : The value in name cannot be used as a function name.
    
 
    
 - numargs
    native numargs();
    Parameters: None
    Return value: Number of arguments with which the function was invoked.
    Found in: core.inc
    Description: This function allows the user to test how many arguments a function was
    invoked with. This is useful when using functions which accept a variable number of
    arguments by using the "..." syntax (see the Small Language Reference for full
    information).
    
 - getarg
    native getarg(arg, index = 0);
    Parameters:
    
    -  arg : Argument sequence number. The first argument to the function is argument zero.
    
 -  index : When the argument specified by 'arg' is an array, this parameter specifies
         an index into that array.
    
 
    Return value: Value of the specified argument (and for arrays, at the given index).
    Found in: core.inc
    Description: This function allows a script that takes a variable number of arguments
    to access the values which were passed to the script. As with all other indexing in
    Small, the first argument is considered to be #0, not #1. The second argument, which is
    optional, is used as an array index when a function takes arrays as parameters.
    
 - setarg
    native setarg(arg, index = 0, value);
    Parameters:
    
    -  arg : Argument sequence number. The first argument to the function is argument zero.
    
 -  index : When the argument specified by 'arg' is an array, this parameter specifies
         an index into that array.
    
 -  value : The value to put into the specified argument.
    
 
    Return value: 'true' if the argument and index are valid, 'false' otherwise.
    Found in: core.inc
    Description: Sets the value of the specified argument for variable-argument functions.
    
 - strlen
    native strlen(const string[]);
    Parameters:
    
    -  const string[] : A string array.
    
 
    Return value: Length of the given string in number of characters (not cells).
    Found in: core.inc
    Description: Returns the length of a string array. This function works on both
    packed and unpacked Small strings, and returns the number of characters in either case.
    
 - strpack
    native strpack(dest[], const source[]);
    Parameters:
    
    -  dest[] : The destination string array.
    
 -  const source[] : The source string array.
    
 
    Return value: None.
    Found in: core.inc
    Description: Copies the string in source to dest as a packed string. The source string
    may be either packed or unpacked. dest[] must be large enough to hold the output (use
    strlen to determine the required size).
    Exceptions:
    
    -  "Parameter error" : dest or source is not a valid string array.
    
 
    
 - strunpack
    native strunpack(dest[], const source[]);
    Parameters:
    
    -  dest[] : The destination string array.
    
 -  const source[] : The source string array.
    
 
    Return value: None.
    Found in: core.inc
    Description: Copies the string in source to dest as an unpacked string. The source
    string may be either packed or unpacked. dest[] must be large enough to hold the output
    (use strlen to determine the required size).
    Exceptions:
    
    -  "Parameter error" : dest or source is not a valid string array.
    
 
    
 - tolower
    native tolower(c);
    Parameters:
    
    -  c : Character value to convert.
    
 
    Return value: The lower-case equivalent of the character c.
    Found in: core.inc
    
 - toupper
    native toupper(c);
    Parameters:
    
    -  c : Character value to convert.
    
 
    Return value: The upper-case equivalent of the character c.
    Found in: core.inc
    
 - swapchars
    native swapchars(c);
    Parameters:
    
    Return value: See below.
    Found in: core.inc
    Description: Returns the value c with all bytes in the cell swapped.
    
 - min
    native min(value1, value2);
    Parameters:
    
    -  value1 : A numeric value.
    
 -  value2 : A numeric value.
    
 
    Return value: Returns the parameter which has the least value.
    Found in: core.inc
    
 - max
    native max(value1, value2);
    Parameters:
    
    -  value1 : A numeric value.
    
 -  value2 : A numeric value.
    
 
    Return value: Returns the parameter which has the greatest value.
    Found in: core.inc
    
 - clamp
    native clamp(value, min = cellmin, max = cellmax);
    Parameters:
    
    -  value : The numeric value to clamp.
    
 -  min : A numeric value representing the low end of the range.
    
 -  max : A numeric value representing the upper end of the range.
    
 
    Return value: See below.
    Found in: core.inc
    Description: If 'value' is between the values 'min' and 'max', the value will be
    returned. Otherwise, if 'value' is less than 'min', 'min' will be returned, and if
    'value' is greater than 'max', 'max' will be returned.
    Exceptions:
    
    -  "Native function failed" : The value of 'min' is greater than the value of 'max'.
    
 
 
Return to Table of Contents
Invocation Functions
Invocation functions allow scripts to be started and for special information to be retrieved
from within scripts. Understanding invocation models is important for using Small, as many
functions can only be used when a script is started under a certain model.
Currently supported invocation model types can be found in the invoke.inc file, and
include the following:
 _INVOKE_NONE     : No special invocation data is available.
 _INVOKE_CCMD     : Script was started via console command.
 _INVOKE_THING    : Script was started by the StartScript codepointer.
 _INVOKE_PLAYER   : Script was started by the StartPlayerScript codepointer.
 _INVOKE_LINE     : Script was started by a script linedef.
 _INVOKE_TERRAIN  : Reserved for future use.
 _INVOKE_CALLBACK : Script was scheduled as a callback or started by the game engine.
 _INVOKE_SPECIAL  : Reserved for future use.
 _INVOKE_DIALOGUE : Reserved for future use.
- _GetInvokeType
    native _invoketypes:_GetInvokeType();
    Parameters: None.
    Return value: The invocation type for the current script.
    Found in: invoke.inc
    Description: Returns the current invocation type. Any time the game engine starts a
    script, or a script starts another one indirectly, the invocation type and various
    invocation data will be set, and can be retrieved from any function called during the
    execution of the script. However, once the script ends, the invocation data is lost, thus
    if any of it is needed later, it must be saved in static or global variables. This function
    can be used to test the invocation model before running any function which requires a
    certain model to be active, and can therefore allow you to avoid any invocation-related
    errors.
    
 - _GetCcmdSrc
    native _GetCcmdSrc();
    Parameters: None.
    Return value: Player number from 1 to 4 representing source of command.
    Found in: invoke.inc
    Description: When a script is started by a console command (invocation type is
    _INVOKE_CCMD), this function can be used to find out which player started the command.
    Exceptions:
    
    -  "Bad invocation model for native function" : Invocation type is not _INVOKE_CCMD.
    
 
    
 - _GetPlayerSrc
    native _GetPlayerSrc();
    Parameters: None.
    Return value: Player number from 1 to 4 representing player involved in starting script.
    Found in: invoke.inc
    Description: If the invocation type is _INVOKE_CCMD, _INVOKE_PLAYER, or _INVOKE_DIALOGUE,
    the number of the player who started the script will be returned in all cases. If the
    invocation type is _INVOKE_THING, _INVOKE_LINE, or _INVOKE_TERRAIN, if a player object
    started the script, the player number will be returned, but if a non-player object started
    it, the value -1 will be returned instead. This can be used to tell if a player or a monster
    or other thing started a script.
    Exceptions:
    
    -  "Bad invocation model for native function" : Invocation type is not _INVOKE_CCMD,
         _INVOKE_PLAYER, _INVOKE_DIALOGUE, _INVOKE_THING, _INVOKE_LINE, or _INVOKE_TERRAIN.
    
 
    
 - _GetThingSrc
    native _GetThingSrc();
    Parameters: None.
    Return value: Several possible values. See below.
    Found in: invoke.inc
    Description: This function works under any invocation model. If the current script has
    a trigger object, one of the following values will be returned:
    
    -  If the object is a player, one of _TID_PLAYER1 through _TID_PLAYER4 will be returned.
    
 -  If the object has its own unique TID, that TID will be returned.
    
 -  If the object does not have a unique TID, _TID_TRIGGER will be returned.
         _TID_TRIGGER is the only way to manipulate objects which do not possess a unique
         TID.
    
 
    If there is no trigger object for the current script, zero will be returned. This can be
    used to test for the presence of a trigger object before using Thing functions with
    _TID_TRIGGER. While those functions will not cause errors when used with _TID_TRIGGER and
    there is no trigger object, it may often be better to know beforehand.
    
 - _SetCallback
    native _SetCallback(const name[], _waittypes:waittype = _SWAIT_NONE, waitdata = 0, flags = _CB_PAUSABLE | _CB_MPAUSE);
    Parameters:
    
    -  const name[] : Name of the function to execute as a callback script.
    
 -  _waittypes:waittype : One of the following enumeration values:
         
         -  _SWAIT_NONE
         
 -  _SWAIT_DELAY
         
 -  _SWAIT_TAG
         
 
     -  waitdata : Special data for callback
    
 -  flags : A value which can accept bitwise-OR combinations of the following values:
         
         -  _CB_PAUSABLE - Callback will pause when the game is paused
         
 -  _CB_MPAUSE - Callback will pause in single-player games when a menu is active
         
 
         The _CB_PAUSABLE and _CB_MPAUSE flags will be set if this parameter is allowed
         to default, as the majority of callbacks will be required to pause.
     
    Return value: None.
    Found in: invoke.inc
    Description: Schedules a function for execution as a callback script. Callbacks take
    the place of waiting scripts in FraggleScript and delayed scripts in ACS. Rather than
    suspend the execution of the current function, this allows you to execute a function later
    when a specified event takes place.
    If 'waittype' is _SWAIT_NONE, the callback will execute immediately on the next gametic.
    If 'waittype' is _SWAIT_DELAY, then the callback will execute after the number of gametics
    given in 'waitdata' has elapsed (35 gametics equals one second).
    If 'waittype' is _SWAIT_TAG, the callback will execute when all sectors with the tag given
    in 'waitdata' have no actions taking place on them (this includes floor, ceiling, and
    lighting actions).
    To create a continuously executing callback (a timer for example), simply reregister
    the callback function as a callback within the function itself. Unless reregistered,
    callbacks will execute only once. The callback lists for both VMs are saved in save games,
    and will thus be restored when the game is loaded. Levelscript callbacks will be cleared
    automatically when a level is exited.
    The optional flags parameter can be used to specify extended callback behaviors. The
    _CB_PAUSABLE and _CB_MPAUSE flags are used to make a callback wait indefinitely while
    the game is paused or menus are up (in non-network games only). Normal callbacks' wait
    conditions will expire even while the game is paused, which is not appropriate for all
    scripts. Flag values are combined using the bitwise OR operator, '|'.
    
    Exceptions:
    
    -  "Invalid memory access" : name[] is not a valid string array.
    
 -  "Native/Public function is not found" : name[] is not a valid public function.
    
 -  "Unknown wait type" : Wait type value is invalid.
    
 
    
 - _ExecGS
    native _ExecGS(const name[], ...);
    Parameters:
    
    -  const name[] : Name of a public function in the Gamescript VM.
    
 -  ... : Parameters to pass to the indicated script.
    
 
    Return value: Return value of the executed function.
    Found in: invoke.inc
    Description: This function allows Gamescript functions to be executed from within
    functions inside the Levelscript. This function cannot be called from within the Gamescript
    VM.
    Exceptions:
    
    -  "Invalid memory access" : name[] is not a valid string array.
    
 -  "Native/Public function is not found" : name[] is not a valid public function.
    
 -  "Unknown or uninitialized VM" : No Gamescript is loaded.
    
 
    
 - _ExecLS
    native _ExecLS(const name[], ...);
    Parameters:
    
    -  const name[] : Name of a public function in the Levelscript VM.
    
 -  ... : Parameters to pass to the indicated script.
    
 
    Return value: Return value of the executed function.
    Found in: invoke.inc
    Description: This function allows Levelscript functions to be executed from within
    functions inside the Gamescript. This function cannot be called from within the Levelscript
    VM.
    Exceptions:
    
    -  "Invalid memory access" : name[] is not a valid string array.
    
 -  "Native/Public function is not found" : name[] is not a valid public function.
    
 -  "Unknown or uninitialized VM" : No Levelscript is loaded.
    
 
    
 - _GetLevelVar
    native _GetLevelVar(const name[]);
    Parameters:
    
    -  name[] : Name of a public variable in the Levelscript VM.
    
 
    Return value: Value of the indicated public variable.
    Found in: invoke.inc
    Description: This function allows read access to public variables within the Levelscript
    VM from anywhere.
    Exceptions:
    
    -  "Invalid memory access" : name[] is not a valid string array.
    
 -  "Native/Public function is not found" : name[] is not a valid public variable.
    
 -  "Unknown or uninitialized VM" : No Levelscript is loaded.
    
 
    
 - _SetLevelVar
    native _SetLevelVar(const name[], value);
    Parameters:
    
    -  name[] : Name of a public variable in the Levelscript VM.
    
 -  value : New value to give the public variable.
    
 
    Return value: New value of the indicated public variable.
    Found in: invoke.inc
    Description: This function allows write access to public variables within the Levelscript
    VM from anywhere.
    Exceptions:
    
    -  "Invalid memory access" : name[] is not a valid string array.
    
 -  "Native/Public function is not found" : name[] is not a valid public variable.
    
 -  "Unknown or uninitialized VM" : No Levelscript is loaded.
    
 
    
 - _GetGameVar
    native _GetGameVar(const name[]);
    Parameters:
    
    -  const name[] : Name of a public variable in the Gamescript VM.
    
 
    Return value: Value of the indicated public variable.
    Found in: invoke.inc
    Description: This function allows read access to public variables within the Gamescript
    VM from anywhere.
    Exceptions:
    
    -  "Invalid memory access" : name[] is not a valid string array.
    
 -  "Native/Public function is not found" : name[] is not a valid public variable.
    
 -  "Unknown or uninitialized VM" : No Gamescript is loaded.
    
 
    
 - _SetGameVar
    native _SetGameVar(const name[], value);
    Parameters:
    
    -  const name[] : Name of a public variable in the Gamescript VM.
    
 -  value : New value to give the public variable.
    
 
    Return value: New value of the indicated public variable.
    Found in: invoke.inc
    Description: This function allows write access to public variables within the Gamescript
    VM from anywhere.
    Exceptions:
    
    -  "Invalid memory access" : name[] is not a valid string array.
    
 -  "Native/Public function is not found" : name[] is not a valid public variable.
    
 -  "Unknown or uninitialized VM" : No Gamescript is loaded.
    
 
 
Return to Table of Contents
Input/Output
Input/Output functions allow the user to manipulate and print string values.
- _ConsolePrint
    native _ConsolePrint(const string[], ...);
    Parameters:
    
    -  const string[] : First part of message.
    
 -  ... : Optional additional strings to concatenate to 'string[]'.
    
 
    Return value: None.
    Found in: io.inc
    Description: Concatenates all strings passed to the function into a single message which
    will then be printed to the console. Only string arrays may be passed to this function,
    and no special formatting will be performed. The '\a' character escape can be used to
    make this message cause a sound which will alert the user to look at the console.
    Exceptions:
    
    -  "Invalid memory access" : An invalid string array was provided.
    
 
    
 - _ConsoleHR
    native _ConsoleHR();
    Parameters: None.
    Return value:  None.
    Found in: io.inc
    Description: Prints a <HR>-style divider bar of default length to the console.
    This can also be achieved by using ConsolePrint with the string "{||}", using the
    appropriate number of pipe characters, but this function is available as a convenience.
    
 - _ConsoleBeep
    native _ConsoleBeep();
    Parameters: None.
    Return value: None.
    Found in: io.inc
    Description: Causes the console to emit its standard, gamemode-dependent warning sound.
    This can also be achieved by using ConsolePrint and the '\a' character escape, but this
    function is available as a convenience.
    
 - _Itoa
    native _Itoa(number, string[], base, bool:packed);
    Parameters:
    
    -  number : The number to convert.
    
 -  string[] : String array of minimum length 33 into which results will be placed.
    
 -  base : Number between 2 and 36; base into which number will be converted
    
 -  bool:packed : If true, string[] is packed, otherwise it is unpacked.
    
 
    Return value: None.
    Found in: io.inc
    Description: Converts the given number into a string representation in the requested
    numeric base. Base 10 is the normal representation for human-readable numbers. Other
    common bases are 2 (binary), 8 (octal), and 16 (hexadecimal). The string array provided
    to this function should be at least 33 characters long, otherwise an error may occur.
    Exceptions:
    
    -  "Invalid memory access" : string[] is not a valid string array.
    
 
    
 - _Printf
    native _Printf(_msgtypes:msgtype, const format[], ...);
    Parameters:
    
    -  msgtypes:msgtype : One of the following enumeration values:
         
         -  _MSG_CONSOLE
         
 -  _MSG_NORMAL
         
 -  _MSG_CENTER
         
 
     -  const format[] : Format string.
    
 -  ... : Values to be inserted into the message as formatted strings.
    
 
    Return value: None.
    Found in: io.inc
    Description: This function can print formatted messages to all available outputs, currently
    including the console, the normal player message widget, and the centered message widget.
    The format string contains any normal parts of the message, as well as the following
    special formatting sequences:
    
    -  %% : Inserts a literal % character.
    
 -  %c : Inserts the corresponding extra parameter as a character value.
    
 -  %s : Inserts the corresponding extra parameter as a string.
    
 -  %d : Inserts the corresponding extra parameter as an integer base 10 numeric value.
    
 
    When the %c, %s, and %d formatting sequences are used in the format string, extra
    parameters of the proper type should be supplied to the function in the same order as the
    formatting sequences appear in the format string. If this is not the case, an error may
    occur, or the output may appear incorrect. Note that colors and transparency can be
    controlled either via numeric character escapes (of the form \ddd, where ddd is a number)
    or with the special character values defined in the io.inc file.
    Exceptions:
    
    -  "Native function failed" : The format string is malformed or a parameter is incorrect.
    
 
    
 - _CenterMsgTimed
    native _CenterMsgTimed(const msg[], tics);
    Parameters:
    
    -  const msg[] : String to print as a centered message.
    
 -  tics : Number of gametics (35/second) the message will last.
    
 
    Return value: None.
    Found in: io.inc
    Description: Prints a center message to all players that will last a given number of
    gametics.
    
    Exceptions:
    
    -  "Invalid memory access" : msg[] is not a valid string array.
    
 
 
Return to Table of Contents
Fixed-Point Math Library
Because the DOOM Engine internally uses a fixed-point number representation, where the 16 most
significant bits of a 32-bit DWORD function as a 16-bit signed integer, and the lower 16 bits
function as decimal places, it will sometimes be necessary to work with fixed-point numbers.
The fixed-point math library, implemented in the fixed.inc file, makes this almost as
easy as working with normal integer numbers. Note that functions declared as 'stock' will not
be compiled into your scripts unless they are actually used, and that they are NOT public
functions and therefore cannot be executed as scripts by the game engine.
Some of the functions listed here are also aliased as overloaded operators, which means that
to perform the operations, you need only use the same natural operator notation used with
integers. The proper function will be automatically selected by the Small compiler. You can
still call the functions explicitly, however. The list of operators overloaded for the
Fixed tag can be viewed in the fixed.inc header file.
- _ffloat
    native Fixed:_ffloat(Float:value);
    Parameters:
    
    -  Float:value : A literal floating-point value (ie., 1.0).
    
 
    Return value: Fixed-point equivalent of provided floating-point value.
    Found in: fixed.inc
    Description: Small needs to store literal decimal values as floating point, therefore
    to use those values with fixed-point math, you need to convert them first using this
    function. You cannot pass floating-point literals directly to any other function unless
    it explicitly indicates that you may do so, and Eternity does not provide any operators
    or functions for working with literal Float values directly.
    
 - _fmul
    native Fixed:_fmul(Fixed:a, Fixed:b);
    Parameters:
    
    -  Fixed:a : First fixed-point multiplicand.
    
 -  Fixed:b : Second fixed-point multiplicand.
    
 
    Return value: a * b as a fixed-point value.
    Found in: fixed.inc
    Description: Implements multiplication of fixed-point values. This is also available
    implicitly as the * operator for fixed-point numbers, so you are NOT required to call
    this function explicitly. Simply perform the operation "a * b" with two variables that
    are tagged as Fixed numbers and this function will be called implicitly.
    
 - _fdiv
    native Fixed:_fdiv(Fixed:a, Fixed:b);
    Parameters:
    
    -  Fixed:a : Fixed-point dividend.
    
 -  Fixed:b : Fixed-point divisor.
    
 
    Return value: a / b as a fixed-point value.
    Found in: fixed.inc
    Description: Implements fixed-point division. This is also available implicitly as the
    / operator for fixed-point numbers, so you are NOT required to call this function
    explicitly. Simply perform the operation "a / b" with two variables that are tagged as
    Fixed numbers and this function will be called implicitly.
    Exceptions:
    
    -  "Divide by zero" : The divisor is zero; division by zero is undefined.
    
 
    
 - _fabs
    native Fixed:_fabs(Fixed:value);
    Parameters:
    
    -  Fixed:value : Fixed-point value.
    
 
    Return value: |value|
    Found in: fixed.inc
    Description: Returns the absolute value of the given fixed-point number. This can be done
    in Small code as well, but the internal implementation is very fast, so using this function
    is recommended.
    
 - fixed
    stock Fixed:fixed(value);
    Parameters:
    
    -  value : An integer value.
    
 
    Return value: 'value' converted to fixed-point format.
    Found in: fixed.inc
    Description: Converts the given integer value to fixed-point format. If the number is less
    than -32768 or greater than 32767, data will be lost.
    
 - _ffract
    stock Fixed:_ffract(Fixed:value);
    Parameters:
    
    -  Fixed:value : Fixed-point value.
    
 
    Return value: The fractional portion of 'value'.
    Found in: fixed.inc
    Warning: This function was incorrect for negative values in Eternity Engine v3.33.00.
    
 - _ffloor
    stock Fixed:_ffloor(Fixed:value);
    Parameters:
    
    -  Fixed:value : Fixed-point value.
    
 
    Return value: Returns the integral fixed-point number less than or equal to 'value'.
    Found in: fixed.inc
    Warning: This function was incorrect in Eternity Engine v3.33.00.
    
 - _fceil
    stock Fixed:_fceil(Fixed:value);
    Parameters:
    
    -  Fixed:value : Fixed-point value.
    
 
    Return value: Returns the integral fixed-point number greater than or equal to 'value'.
    Found in: fixed.inc
    
 - _ftoi
    stock _ftoi(Fixed:value);
    Parameters:
    
    -  Fixed:value : Fixed-point value.
    
 
    Return value: 'value' converted to an integer (the fractional portion is chopped).
    Found in: fixed.inc
    Warning: This function was incorrect for negative values in Eternity Engine v3.33.00.
 
Return to Table of Contents
Random Number Generators
In order to maintain demo sync and to work with the rest of the engine, Small must utilize the
special DOOM pseudo-random number generator. Two functions are provided for interfacing with
the system.
- _P_Random
    native _P_Random();
    Parameters: None.
    Return value: Random number between 0 and 255 inclusive.
    Found in: random.inc
    Description: This is the random function to use when interacting with anything which is
    demo-sync critical. To create a RNG of higher period, you may bitwise-OR the results of
    several Random calls together (4 such calls would create a RNG of maximum range). Note
    that changing the order or number of calls to this function in a script will impact demo
    compatibility for any levels using the script in question.
    
 - _M_Random
    native _M_Random();
    Parameters: None.
    Return value: Random number between 0 and 255 inclusive.
    Found in: random.inc
    Description: This function should ONLY be used for things which do not affect demo sync.
    These include sounds, screen graphics, particles, and a select few other systems. This
    function uses a special RNG class which is only used by non-sync-critical internal code.
    The order and number of calls to this function can be freely changed.
 
Return to Table of Contents
Heads-Up Display
Beginning with Eternity Engine v3.33.01, the heads-up display is fully scriptable. HUD
elements are called widgets, and are automatically maintained by the game engine, including
being erased and drawn each frame. Widgets must be created with a unique mnemonic string that
serves as their name. Widgets with duplicate mnemonics won't be created. As with all other
symbols, widget mnemonics starting with an underscore character are reserved by Eternity.
Eternity defines the following HUD widgets natively:
Mnemonic               Type    Description
---------------------------------------------------------------------
_HU_MsgWidget          Misc.   Player message widget
_HU_CrosshairWidget    Patch   Aiming crosshair
_HU_VPOWidget          Patch   VPO warning indicator
_HU_OpenSocketWidget   Patch   Network connection fail indicator
_HU_CenterMsgWidget    Text    Player center message
_HU_LevelTimeWidget    Text    Automap level clock
_HU_LevelNameWidget    Text    Automap level name
_HU_ChatWidget         Text    Player chat widget
_HU_CoordXWidget       Text    Automap x coordinate
_HU_CoordYWidget       Text    Automap y coordinate
_HU_CoordZWidget       Text    Automap z coordinate
---------------------------------------------------------------------
Not all native widgets support manipulation through all of the script interface functions.
Errors will not occur if a widget is specified inappropriately, but unexpected results may
occur, such as changes to those widgets not applying permanently or not applying at all.
The following optional engine-specified event callback functions can be defined in both the
Gamescript and Levelscript to interact smoothly with the native HUD system. The game engine
will call the Gamescript handlers first if they exist, and then the Levelscript handlers if
they exist.
Name            Purpose
-------------------------------------------------------------------------------
OnHUDStart      Called at start of a new level or when the player viewpoint
                changes (ie, to a different player in coop mode). Use this
                callback to set new values to auto-cleared text widgets, etc.
OnHUDPreDraw    Called immediately before all HUD widgets are drawn to the
                screen. This is the safest time to alter the properties of
                HUD widgets. Altering them at any other time may result in
                scraps being left on the game border and other odd visual
                errors.
-------------------------------------------------------------------------------
- _NewPatchWidget
    native _NewPatchWidget(const name[], const patch[], x, y, color = -1, tl = FRACUNIT);
    Parameters:
    
    -  const name[] : Unique mnemonic, must be no longer than 32 characters.
    
 -  const patch[] : Name of patch-format graphic lump, must be no longer than 8 characters.
    
 -  x : x coordinate of graphic relative to a 320x200 screen
    
 -  y : y coordinate of graphic relative to a 320x200 screen
    
 -  color : One of the following enumeration values:
         
         -  _PCR_BRICK
         
 -  _PCR_TAN
         
 -  _PCR_GRAY
         
 -  _PCR_GREEN
         
 -  _PCR_BROWN
         
 -  _PCR_GOLD
         
 -  _PCR_RED
         
 -  _PCR_BLUE
         
 -  _PCR_ORANGE
         
 -  _PCR_YELLOW
         
 
         The default value -1 means that no color translation will be used.
     -  tl : Translucency value as a number from 0 to 65536. Use the constant FRACUNIT to
         calculate the value in a convenient manner. 0 is invisible, 65536 is opaque.
    
 
    Return value: None
    Found in: hud.inc
    Description: Creates a new widget that displays the specified patch at the given location
    and with the specified properties. If a widget of the given name already exists, this
    function will return immediately without creating a new widget. If the patch specified does
    not exist, the game will exit with a "W_GetNumForName" error. If the patch specified is not
    a valid graphic, results will be undefined. The actual location of the patch on screen is
    subject to change via the patch graphic's x and y offset values. Use the x and y offsets to
    more easily position sets of patches relative to certain coordinates. If the color or
    translucency parameters are out of range, suitable default values of no translation and
    opaque will be applied.
    Exceptions:
    
    -  "Invalid memory access" : name[] or patch[] is not a valid string array.
    
 
    
 - _SetWidgetPatch
    native _SetWidgetPatch(const name[], const patch[]);
    Parameters:
    
    -  const name[] : mnemonic of an existing patch widget.
    
 -  const patch[] : Name of patch-format graphic lump, must be no longer than 8 characters.
    
 
    Return value: None.
    Found in: hud.inc
    Description: Changes the graphic displayed by an existing patch widget to the specified
    patch graphic. If the indicated widget does not exist or is not a patch widget, nothing
    will happen. If the patch specified does not exist, the game will exit with a "W_GetNumForName"
    error. If the patch specified is not a valid graphic, results will be undefined.
    
    Note: Patch graphics loaded for use by patch widgets will remain loaded in memory
    permanently in case they are needed again. This may impact memory usage if too many patches
    are loaded, so do not assume that resources are unlimited.
    
    Exceptions:
    
    -  "Invalid memory access" : name[] or patch[] is not a valid string array.
    
 
    
 - _PatchWidgetColor
    native _PatchWidgetColor(const name[], color = -2, tl = -1);
    Parameters:
    
    -  const name[] : mnemonic of an existing patch widget.
    
 -  color : One of the following enumeration values:
         
         -  _PCR_BRICK
         
 -  _PCR_TAN
         
 -  _PCR_GRAY
         
 -  _PCR_GREEN
         
 -  _PCR_BROWN
         
 -  _PCR_GOLD
         
 -  _PCR_RED
         
 -  _PCR_BLUE
         
 -  _PCR_ORANGE
         
 -  _PCR_YELLOW
         
 
         The default value -2 means that the current color used by the widget will not change.
         Any value other than these will clear the patch's color translation completely.
     -  tl : Translucency value as a number from 0 to 65536. Use the constant FRACUNIT to
         calculate the value in a convenient manner. 0 is invisible, 65536 is opaque. The
         default value -1 means that the current translucency level of the widget will not
         change.
    
 
    Return value: None.
    Found in: hud.inc
    Description: Changes the color and translucency properties of an existing patch widget. By
    letting either parameter default, it is possible to edit only one property and leave the
    other at its current value. If the indicated widget does not exist or is not a patch widget, nothing
    will happen.
    
    Exceptions:
    
    -  "Invalid memory access" : name[] is not a valid string array.
    
 
    
 - _NewTextWidget
    native _NewTextWidget(const name[], const msg[], x, y, _fonts:font = _FONT_NORMAL, cleartics = 0, flags = 0);
    Parameters:
    
    -  const name[] : Unique mnemonic, must be no longer than 32 characters.
    
 -  const msg[] : Text message to be displayed by widget. May be of any length. Escape
         codes for color and translucency are supported.
    
 -  x : x coordinate of widget relative to a 320x200 screen.
    
 -  y : y coordinate of widget relative to a 320x200 screen.
    
 -  _fonts:font : One of the following enumeration values:
         
         -  _FONT_NORMAL
         
 -  _FONT_HUD
         
 -  _FONT_BIG
         
 -  _FONT_BIG_NUM
         
 
     -  cleartics : Amount of time in gametics that the widget will be displayed. If this
         value is zero, the widget may be displayed indefinitely.
    
 -  flags : A value which can accept bitwise-OR combinations of the following values:
         
         -  _TW_AUTOMAP_ONLY : Widget appears only when automap is active.
         
 -  _TW_NOCLEAR : Widget is not automatically cleared on level or viewpoint change.
         
 -  _TW_BOXED : Text has a box drawn in the background.
         
 
     
    Return value: None.
    Found in: hud.inc
    Description: Creates a new widget that displays the specified text message at the given
    location and with the specified properties. If a widget of the given name already exists,
    this function will return immediately without creating a new widget.
    
    Exceptions:
    
    -  "Invalid memory access" : name[] or msg[] is not a valid string array.
    
 
    
 - _GetWidgetText
    native _GetWidgetText(const name[], dest[], size, bool:packed = false);
    Parameters:
    
    -  const name[] : Mnemonic of an existing text widget.
    
 -  dest[] : Destination string array to receive message.
    
 -  size : Number of characters to retrieve. This value MUST be less than or equal to
         the length of dest[].
    
 -  bool:packed : If true, dest[] will be treated as a packed string.
    
 
    Return value: None.
    Found in: hud.inc
    Description: If the specified text widget exists and has a valid message, as much of that
    message as possible will be copied into dest[]. You must specify the length of dest[] in
    the size parameter. If dest[] is a packed string array, you should set packed to true.
    
    Exceptions:
    
    -  "Invalid memory access" : name[] or dest[] is not a valid string array.
    
 
    
 - _SetWidgetText
    native _SetWidgetText(const name[], const value[], cleartics = 0);
    Parameters:
    
    -  const name[] : Mnemonic of an existing text widget.
    
 -  const value[] : New message to be displayed by widget, may be of any length.
    
 -  cleartics : Amount of time in gametics the message will be displayed. If this value
         is zero, the message will be displayed indefinitely.
    
 
    Return value: None.
    Found in: hud.inc
    Description: Sets the message of an existing text widget. If the indicated widget does
    not exist or is not a text widget, nothing will happen.
    
    Exceptions:
    
    -  "Invalid memory access" : name[] or value[] is not a valid string array.
    
 
    
 - _ToggleWidget
    native _ToggleWidget(const name[], bool:disable);
    Parameters:
    
    -  const name[] : Mnemonic of an existing text widget.
    
 -  bool:disable : If true, the widget will be disabled. If false, it will be enabled.
    
 
    Return value: None.
    Found in: hud.inc
    Description: Toggles the disable state of a widget. If the indicated widget does not
    exist, nothing will happen. This function can be used on all HUD widgets.
    
    Exceptions:
    
    -  "Invalid memory access" : name[] is not a valid string array.
    
 
    
 - _MoveWidget
    native _MoveWidget(const name[], x, y);
    Parameters:
    
    -  const name[] : Mnemonic of an existing text widget.
    
 -  x : x coordinate of widget relative to a 320x200 screen.
    
 -  y : y coordinate of widget relative to a 320x200 screen.
    
 
    Return value: None.
    Found in: hud.inc
    Description: Moves a widget to the given location. If the indicated widget does not
    exist, nothing will happen. This function can be used on all text and patch widgets.
    This function will not work on many native widgets because they actively control their
    own locations.
    
    Exceptions:
    
    -  "Invalid memory access" : name[] is not a valid string array.
    
 
 
- _GetHUDMode
    native _GetHUDMode();
    Parameters: None
    Return value: Depending on the current HUD mode it will return one of the following
    enum values:
         
         -  _HUD_NONE: No HUD visible.
         
 -  _HUD_STATUSBAR: Vanilla Doom status bar.
         
 -  _HUD_BOOM: Boom HUD
         
 -  _HUD_FLAT: The flat Boom HUD
         
 -  _HUD_DISTRIBUTED: The distributed Boom HUD
         
 -  _HUD_GRAPHICAL: Graphical HUD.
         
 
    Found in: hud.inc
    Description: Returns the current HUD mode or _HUD_NONE if no HUD is visible at all.
    
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode."
    
 
 
- _InAutomap
    native bool:_InAutomap();
    Parameters: None
    Return value: True if the automap is visible, false otherwise.
    Found in: hud.inc
    Description: Test if automap is active, true == active, false == inactive.
    
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode."
    
 
 
Return to Table of Contents
Game Functions
Game functions allow interaction with various aspects of the game engine and player data.
- _ExitLevel
    native _ExitLevel();
    Parameters: None.
    Return value: None.
    Found in: game.inc
    Description: Causes the current level to exit normally, as if the player hit a switch or
    crossed a line.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _ExitSecret
    native _ExitSecret();
    Parameters: None.
    Return value: None.
    Found in: game.inc
    Description: Causes the current level to exit and give credit for a secret exit. If the
    map is not normally a level with a secret exit, the 'nextsecret' value should be defined
    in MapInfo for the level. Otherwise, the default behavior is to restart the current level.
    
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _StartGame
    native _StartGame(_gameskills:skill, const mapname[]);
    Parameters:
    
    -  _gameskills:skill : One of the following enumeration values:
         
         -  _SKILL_ITYTD
         
 -  _SKILL_HNTR
         
 -  _SKILL_HMP
         
 -  _SKILL_UV
         
 -  _SKILL_NM
         
 
     -  const mapname[] : string array holding the name of the map to start.
    
 
    Return value: None.
    Found in: game.inc
    Description: Starts a new game on the specified map at the specified skill level. This
    function is most useful for start maps, custom menus, and other similar applications.
    
    Exceptions:
    
    -  "Invalid memory access" : mapname[] is not a valid string array.
    
 
    
 - _GameSkill
    native _gameskills:_GameSkill();
    Parameters: None.
    Return value: Current skill level of the game as one of the following enumeration values:
    
    -  _SKILL_ITYTD
    
 -  _SKILL_HNTR
    
 -  _SKILL_HMP
    
 -  _SKILL_UV
    
 -  _SKILL_NM
    
 
    Found in: game.inc
    
 - _GameType
    native _gametypes:_GameType();
    Parameters: None.
    Return value: Current game type as one of the following enumeration values:
    
    -  _GTYPE_SINGLE
    
 -  _GTYPE_COOP
    
 -  _GTYPE_DM
    
 
    Found in: game.inc
    
 - _EngineVersion
    native _EngineVersion();
    Parameters: None.
    Return value: Version number of this build of the Eternity Engine multiplied by 100.
    Found in: game.inc
    
 - _GetPlayerName
    native _GetPlayerName(num, str[], bool:packed);
    Parameters:
    
    -  num : Player number (1 - 4)
    
 -  str[] : String array of minimum length 20 characters
    
 -  bool:packed : If true, str will be packed. Otherwise, str will be unpacked.
    
 
    Return value: None.
    Found in: game.inc
    Description: Returns the name of the requested player in str[]. str[] should be a valid
    string array at least 20 characters long.
    Exceptions:
    
    -  "Invalid memory access" : str[] is not a valid string array.
    
 -  "Array index out of bounds" : num was not between 1 and 4 inclusive.
    
 
 
Return to Table of Contents
Mapthings
Mapthing functions allow interaction with moving objects in the map, including monsters and
player avatars. Most mapthing functions require TIDs, or thing ids, which must be set via
ExtraData. For more information, see the ExtraData Reference.
There are several special reserved TID values which can be found as macro definitions in
the things.inc file. These are as follows:
_TID_PLAYER1 : Refers to player 1's avatar.
_TID_PLAYER2 : Refers to player 2's avatar, if player 2 is present.
_TID_PLAYER3 : Refers to player 3's avatar, if player 3 is present.
_TID_PLAYER4 : Refers to player 4's avatar, if player 4 is present.
_TID_TRIGGER : Refers to the current script trigger object, if one exists.
These values are always safe to use, as all mapthing functions check whether the objects
exist before using them. However, sometimes results may be unexpected if the objects do
not exist, so it is best to check beforehand when possible.
- _ThingKill
    native _ThingKill(tid, _killtypes:dmgtype = _DMG_HEALTH, _mods:mod = _MOD_UNKNOWN);
    Parameters:
    
    -  tid : ID of the thing(s) to kill.
    
 -  _killtypes:dmgtype : One of the following enumeration values:
         
         -  _KILL_HEALTH
         
 -  _KILL_TELEFRAG
         
 
     -  _mods:mod : Means of death flag. See things.inc for a complete list. This
         affects the obituary that is shown when the player dies, and may have other
         effects in the future such as elemental deaths. The default is usually acceptable
         when hurting things other than the player.
    
 
    Return value: None.
    Found in: things.inc
    Description: Kills all things whose TIDs match the provided TID. When 'dmgtype' is
    _KILL_TELEFRAG, things are hit for 10000 damage. _KILL_HEALTH simply damages them for their
    current health value, guaranteeing a normal death.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _ThingHurt
    native _ThingHurt(tid, damage, _mods:mod = _MOD_UNKNOWN, inflictor = 0, source = 0);
    Parameters:
    
    -  tid : ID of the thing(s) to injure.
    
 -  damage: Amount of health to subtract from each thing.
    
 -  mods:mod : Means of death flag. See things.inc for a complete list.
    
 -  inflictor: Optional TID of a single object which is directly causing this damage.
    
 -  source: Optional TID of a single object which is ultimately responsible for this damage.
         This is the object which enemies will blame for the damage done to them.
    
 
    Return value: None.
    Found in: things.inc
    Description: Injures all things whose TIDs match the value in 'tid'. The inflictor and
    source are optional parameters, and if allowed to default, enemies will not blame anyone
    for the damage done to them and will appear to ignore it aside from feeling pain. Otherwise,
    the parameters have the functions as noted above. Inflictors are typically used for missiles
    and blast radii. For direct damage such as scratching, inflictor and source should refer to
    the same object. Note that if more than one object has the TID referred to by inflictor or
    source, the first one found by the game engine will be used. Which object will be picked in
    that situation is not easily predictable (note this does not apply to objects referred to
    via reserved TID values such as _TID_TRIGGER, which are always unambiguous).
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _ThingMassacre
    native _ThingMassacre(_massacres:massacreType);
    Parameters:
    
    -  _massacres:massacreType : Determines type of massacre. One of the following enumeration values:
         
         -  _MASSACRE_ALL : All living creatures will be killed.
         
 -  _MASSACRE_FRIENDS : All friendly creatures will be killed.
         
 -  _MASSACRE_ENEMIES : All enemy creatures will be killed.
         
 
     
    Return value: None.
    Found in: things.inc
    Description: Kills all creatures on the map that are included in the indicated class.
    Players are not included in any massacre. Massacres are not equivalent to the "killem"
    cheat code, and EDF nukespecial functions will NOT be invoked because of a massacre.
    Thus, there may still be living creatures on the map after a massacre as a result of
    spawn-on-death actions (like those of the Pain Elemental or Serpent Rider D'Sparil).
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _ThingHate
    native _ThingHate(object, target);
    Parameters:
    
    -  object : TID of the objects which will receive a new target
    
 -  target : TID of a single object to be hated
    
 
    Return value: None.
    Found in: things.inc
    Description: Causes the targets of all things with a TID matching 'object' to be set to
    the first object found with TID 'target', if one exists. This will cause enemies or friendly
    entities to begin fighting the indicated object, although it is still possible for them to
    become distracted by other targets later.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _ThingNumForName
    native _ThingNumForName(const name[]);
    Parameters:
    
    -  const name[] : string array containing an EDF thingtype mnemonic.
    
 
    Return value: Internal type number of requested thingtype.
    Found in: things.inc
    Description: Performs a lookup on the given name and returns an internal thingtype
    number if a thingtype was defined with that mnemonic by EDF. If no such thingtype is
    found, the number of the required "Unknown" thingtype will be returned instead.
    
 - _ThingNumForDEHNum
    native _ThingNumForDEHNum(num);
    Parameters:
    
    -  num : DeHackEd number of desired thingtype.
    
 
    Return value: Internal type number of requested thingtype.
    Found in: things.inc
    Description: Performs a lookup on the given DeHackEd number and returns an internal
    thingtype number if a thingtype was defined with that DeHackEd number by EDF. If no
    such thingtype is found, the number of the required "Unknown" thingtype will be
    returned instead. Note that the default DeHackEd number of -1 cannot be resolved to
    any particular thingtype.
    
 - _ThingUnknown
    native _ThingUnknown();
    Parameters: None.
    Return value: Internal thingtype number of the required "Unknown" thingtype.
    Found in: things.inc
    
 - _ThingCheckType
    stock bool:_ThingCheckType(num);
    Parameters:
    
    -  num : An internal thingtype number as retrieved by a lookup function.
    
 
    Return value: true if the thingtype exists and is not the "Unknown" type. false otherwise.
    Found in: things.inc
    Description: This stock function is a convenience method for testing if the results of a
    thingtype lookup resulted in a valid, unique thingtype.
    
 - _ThingSpawn
    native _ThingSpawn(type, x, y, z, tid = 0, angle = 0);
    Parameters:
    
    -  type : A valid internal thingtype number as retrieved by a lookup function.
    
 -  x, y, z : Integer coordinates at which to spawn this mapthing.
    
 -  tid : Optional TID value to give this mapthing.
    
 -  angle : Optional angle value to give this mapthing in degrees.
    
 
    Return value: None.
    Found in: things.inc
    Description: Spawns a mapthing of the requested type at the given coordinates. Optionally,
    the TID and/or angle may also be specified. The default values mean no unique TID and facing
    east, respectively.
    Exceptions:
    
    -  "Array index out of bounds" : The provided thingtype number is invalid.
    
 -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _ThingSpawnSpot
    native _ThingSpawnSpot(type, spottid, tid = 0, angle = 0);
    Parameters:
    
    -  type : A valid internal thingtype number as retrieved by a lookup function.
    
 -  spottid : TID of mapthings at which to spawn the new mapthings.
    
 -  tid : Optional TID to give the new mapthings.
    
 -  angle : Optional angle value to give the new mapthings.
    
 
    Return value: None.
    Found in: things.inc
    Description: Spawns mapthings of the requested type at the location of each mapthing with
    a TID matching the value in 'spottid'. Optionally, the TID and/or angle of the new
    mapthings may also be specified.
    Exceptions:
    
    -  "Array index out of bounds" : The provided thingtype number is invalid.
    
 -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _ThingGetProperty
    native _ThingGetProperty(tid, _thing_fields:field);
    Parameters:
    
    -  tid : TID of thing to examine.
    
 -  _thing_fields:field : Property to retrieve. One of the following enumeration values:
         
         -  _THING_TYPE : Internal thing type number as used for ThingSpawn.
         
 -  _THING_TICS : Time thing has remaining in its current frame.
         
 -  _THING_HEALTH : Health value.
         
 -  _THING_COUNTER0 : Counter field one value.
         
 -  _THING_COUNTER1 : Counter field two value.
         
 -  _THING_COUNTER2 : Counter field three value.
         
 -  _THING_EFFECTS : Particle effects flags value.
         
 -  _THING_TRANSLUCENCY : Flex translucency level of this thing.
         
 
     
    Return value: Value of the requested property for the given thing.
    Found in: things.inc
    Description: Returns one of numerous internal field values for the first thing found with
    the given TID. Notes for each value: Internal thing type numbers are determined at runtime
    during EDF parsing. You should not depend on a thing type to have a given value, but rather
    only compare against values returned by the _ThingNumForName
    and _ThingNumForDEHNum functions.  The COUNTER fields are
    the internal counters which are also modifiable by the Counter codepointers. The flex tran
    level for a normal thing will be 65536. Things which use BOOM-style translucency, which is
    exclusive of this effect, will not display a special value in this field.
    
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _ThingSetProperty
    native _ThingSetProperty(tid, _thing_fields:field, value);
    Parameters:
    
    -  tid : TID of things on which to set the requested property.
    
 -  _thing_fields:field : Property to set. One of the following enumeration values:
         
         -  _THING_TICS : Time thing has remaining in its current frame.
         
 -  _THING_HEALTH : Health value.
         
 -  _THING_COUNTER0 : Counter field one value.
         
 -  _THING_COUNTER1 : Counter field two value.
         
 -  _THING_COUNTER2 : Counter field three value.
         
 -  _THING_EFFECTS : Particle effects flags value.
         
 -  _THING_TRANSLUCENCY : Flex translucency level of this thing.
         
 
     -  value : New value of the property. Integer values only.
    
 
    Return value: None.
    Found in: things.inc
    Description: Sets the requested property of all things with the given tid. If a thing is given a flex tran level
    other than 65536, the BOOM translucency flag "TRANSLUCENT" should be cleared on it, otherwise
    the proper effect may not be chosen.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _ThingFlagsFromStr
    native _ThingFlagsFromStr(tid, _flagops:op, const str[]);
    Parameters:
    
    -  tid : TID value of things to manipulate.
    
 -  _flagops:op : Operation to perform with the flags. One of the following enumeration values:
         
         -  _FLAGS_SET : Sets the thing's flags fields to the resulting values. Only the
              flags indicated in str[] will be turned on after this operation.
         
 -  _FLAGS_ADD : Turns on the indicated flags, leaving others alone.
         
 -  _FLAGS_REMOVE : Turns off the indicated flags, leaving others alone.
         
 
     -  const str[] : EDF/BEX combined thing flags string. See the Eternity Engine DeHackEd/BEX
         documentation
         BEX Extension: Thing Flag Lists section for full
         information.
    
 
    Return value: None.
    Found in: things.inc
    Description: Sets the flags indicated in str[] on all things with the given TID. This function
    accepts an EDF/BEX-format combined flags string. The semantics of this field are similar to
    those of the "cflags" field in an EDF thingtype definition. Mnemonics for all three internal
    flags fields can be provided in the same string, with the sole exception of the flags field
    value "SLIDE", which cannot be specified and is overridden by the flags3 field value with the
    same name.
    
    Some flags should not be set using this function, however, as their effects will not be
    properly activated or removed simply by toggling the flag. Other functions will be provided
    in the future to toggle some of these thing properties properly. The following flags are not
    togglable and will may render incomplete, unexpected, or undefined results:
    
    -  NOSECTOR
    
 -  NOBLOCKMAP
    
 -  AMBUSH
    
 -  SPAWNCEILING
    
 -  PICKUP
    
 -  COUNTKILL
    
 -  COUNTITEM
    
 -  NOTDMATCH
    
 -  FRIEND
    
 -  SPAWNFLOAT
    
 -  DORMANT
    
 -  KILLABLE
    
 
    Exceptions:
    
    -  "Invalid memory access" : str[] is not a valid string array.
    
 -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
 
- _ThingThrust
    native _ThingThrust(angle, force, tid);
    Parameters:
    
    -  angle : Angle in which to move the thing.
    
 -  force : Force to apply to the thing.
    
 -  tid : TID value of things to manipulate.
    
 
    Return value: None.
    Found in: things.inc
    Description: Pushes all things with the given TID along the provided angle with
    the specified force.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
 
- _ThingThrust3f
    native _ThingThrust3f(tid, x, y, z);
    Parameters:
    
    -  tid : TID value of things to manipulate.
    
 -  x : Force to apply to the thing in the x direction.
    
 -  y : Force to apply to the thing in the y direction.
    
 -  z : Force to apply to the thing in the z direction.
    
 
    Return value: None.
    Found in: things.inc
    Description: Pushes all things with the specified TID with the forces in
    each direction.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
 
- _ThingGetPos
    native Fixed:_ThingGetPos(tid, _thing_pos:field);
    Parameters:
    
    -  tid : TID value of the thing(s) to use.
    
 -  _thing_pos:field : Specifies which property to return. Should be one of the following
       enumeration values:
       
       -  _POS_X : Return x coordinate.
       
 -  _POS_Y : Return y coordinate.
       
 -  _POS_Z : Return z coordinate.
       
 -  _POS_ANGLE : Return thing's angle.
       
 -  _POS_MOMX : Return the momentum of the thing in the x plane.
       
 -  _POS_MOMY : Return the momentum of the thing in the y plane.
       
 -  _POS_MOMZ : Return the momentum of the thing in the z plane.
       
 -  _POS_FLOORZ : Return the floor z level for the thing.
       
 -  _POS_CEILINGZ : Return the ceiling z level for the thing.
       
 
     
    Return value: Depends on the specified enum.
    Found in: things.inc
    Description: Returns one of a thing's properties.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
 
- _ThingTeleport
    native _ThingTeleport(tid, Fixed:x, Fixed:y, Fixed:z, _thing_tele:silent);
    Parameters:
    
    -  tid : TID value of the thing(s) to use.
    
 -  x : x coord to teleport to, must be in fixed point
    
 -  y : y coord to teleport to, must be in fixed point
    
 -  z : z coord to teleport to, must be in fixed point
    
 -  _thing_tele:silent : Specifies whether the teleport is silent or not. Should be one of the following
       enumeration values:
       
       -  _TELE_NORMAL : Teleportation is accompanied by telefog and the teleport sound
       
 -  _TELE_SILENT : Functions like a silent teleport, no fog or noises.
       
 
     
    Return value: None.
    Found in: things.inc
    Description: Teleports things of the given TID to the given location (silently or otherwise).
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
 
- _GetFreeTID
    native _GetFreeTID();
    Parameters: None
    Return value: An unused TID.
    Found in: things.inc
    Description: Returns an unused TID or 0 if there are no free TIDs.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
 
Return to Table of Contents
Sounds
Sound functions allow the playing of sounds and music in various ways.
- _SoundGlobal
    native _SoundGlobal(const name[]);
    Parameters:
    
    -  const name[] : EDF sound mnemonic of sound to play.
    
 
    Return value: None.
    Found in: sound.inc
    Description: Plays the requested sound on the full-volume global sound channel. If no sound
    exists with the requested mnemonic, no sound will be played.
    Exceptions:
    
    -  "Invalid memory access" : name[] is not a valid string array.
    
 
    
 - _SoundGlobalNum
    native _SoundGlobalNum(sndnum);
    Parameters:
    
    -  sndnum : DeHackEd number of sound to play.
    
 
    Return value: None.
    Found in: sound.inc
    Description: Plays the requested sound on the full-volume global sound channel. If no sound
    exists with the requested DeHackEd number, no sound will be played. The reserved sound
    DeHackEd number zero cannot be played.
    
 - _SectorSound
    native _SectorSound(const name[], tag);
    Parameters:
    
    -  const name[] : EDF sound mnemonic of sound to play.
    
 -  tag : A tag number for this sector.
    
 
    Return value: None.
    Found in: sound.inc
    Description: Plays the requested sound in every sector found with the given tag.
    Exceptions:
    
    -  "Invalid memory access" : name[] is not a valid string array.
    
 -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _SectorSoundNum
    native _SectorSoundNum(sndnum, tag);
    Parameters:
    
    -  sndnum : DeHackEd number of sound to play.
    
 -  id : A tag number for this sector.
    
 
    Return value: None.
    Found in: sound.inc
    Description: Plays the requested sound in every sector found with the given tag.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _ThingSound
    native _ThingSound(const name[], tid);
    Parameters:
    
    -  const name[] : EDF sound mnemonic of sound to play.
    
 -  tid : TID of objects which will play sound.
    
 
    Return value: None.
    Found in: sound.inc
    Description: Every thing found with the given TID will play the requested sound.
    Exceptions:
    
    -  "Invalid memory access" : name[] is not a valid string array.
    
 -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _ThingSoundNum
    native _ThingSoundNum(sndnum, tid);
    Parameters:
    
    -  sndnum : DeHackEd number of sound to play.
    
 -  tid : TID of objects which will play sound.
    
 
    Return value: None.
    Found in: sound.inc
    Description: Every thing found with the given TID will play the requested sound. If no
    sound exists with the requested DeHackEd number, no sound will be played. The reserved
    sound DeHackEd number zero cannot be played.
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _ThingInfoSound
    native _ThingInfoSound(_ti_sounds:type, tid);
    Parameters:
    
    -  _ti_sounds:type : One of the following enumeration values:
         
         -  _TI_SEESOUND
         
 -  _TI_ACTIVESOUND
         
 -  _TI_ATTACKSOUND
         
 -  _TI_PAINSOUND
         
 -  _TI_DEATHSOUND
         
 
     -  tid : TID of objects which will play sound(s).
    
 
    Return value: None.
    Found in: sound.inc
    Description: Every thing found with the given TID will play the requested type of sound
    which was assigned to it via EDF. If the requested sound field was not assigned a unique
    sound value for a particular thingtype, things of that type will not play the sound. This
    function is highly useful in custom behavior scripts along with use of _TID_TRIGGER.
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
 
Return to Table of Contents
Particles
These functions allow direct manipulation of particle effects.
- _PtclExplosionPos
    native _PtclExplosionPos(Fixed:x, Fixed:y, Fixed:z, color1, color2);
    Parameters:
    
    -  Fixed:x : Fixed-point x coordinate of particle explosion effect.
    
 -  Fixed:y : Fixed-point y coordinate of particle explosion effect.
    
 -  Fixed:z : Fixed-point z coordinate of particle explosion effect.
    
 -  color1 : Palette index of first particle color to use (0 to 255).
    
 -  color2 : Palette index of second particle color to use (0 to 255).
    
 
    Return value: None.
    Found in: particle.inc
    Description: Causes a particle explosion effect to occur at the specified location
    using the two specified colors.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _PtclExplosionThing
    native _PtclExplosionThing(tid, color1, color2);
    Parameters:
    
    -  tid : TID of objects to use as origin of particle explosion.
    
 -  color1 : Palette index of first particle color to use (0 to 255).
    
 -  color2 : Palette index of second particle color to use (0 to 255).
    
 
    Return value: None.
    Found in: particle.inc
    Description: Causes a particle explosion effect to occur at the locations of all
    objects with the provided TID using the two specified colors.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
 
Return to Table of Contents
Sectors
These functions allow manipulation of sectors.
- _SectorSpecial
    native _SectorSpecial(special, tag);
    Parameters:
    
    -  special : Numeric sector special to be set.
    
 -  tag : A tag number for this sector.
    
 
    Return value: None.
    Found in: specials.inc
    Description: Sets the special of all sectors with the given tag to the given value.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _SectorColormap
    Warning: This function is currently broken. Do not use it.
 
Return to Table of Contents
Parameterized Line Specials
These functions correspond to ExtraData parameterized linedef specials. These functions provide
functionality similar to BOOM generalized linedefs, but they can accept an even wider range of
values than the corresponding BOOM lines, and thus provide additional flexibility far beyond
what is possible with the DOOM map format. These specials are based loosely on those available
in Hexen.
- _SpecialMode
    native _SpecialMode(_spec_modes:mode);
    Parameters: None
    
    Return value: 0
    Found in: specials.inc
    Description: Deprecated, now performs no operation. Scripts started by linedefs will
    now automatically pass on line and thing information to script specials as with
    _SPEC_PASS. In any other context, the mode is implicitly _SPEC_NULL as always.
    
    
 - _ByteAngleToDegrees
    stock _ByteAngleToDegrees(byteang);
    Parameters:
    
    -  byteang : A byte angle value
    
 
    Return value: The byte angle converted to integer degrees.
    Found in: specials.inc
    Description: Converts a given byte angle value to degrees. The formula used is as follows:
    degrees = (byteangle * 360) / 256;
    
 - _DegreesToByteAngle
    stock _DegreesToByteAngle(degrees);
    Parameters:
    
    -  degrees : An integer angle in degrees
    
 
    Return value: The byte angle value corresponding to 'degrees'.
    Found in: specials.inc
    Description: Converts a given angle in degress to a byte angle. The formula used is as follows:
    byteangle = (degrees * 256) / 360;
    
 - _ByteAngleToFixed
    stock Fixed:_ByteAngleToFixed(byteang);
    Parameters:
    
    -  byteang : A byte angle value
    
 
    Return value: The byte angle converted to fixed-point degrees.
    Found in: specials.inc
    Description: Converts a given byte angle value to degrees in fixed-point number
    format. The formula used is as follows:
    degrees = Fixed:(byteang * (45 * FRACUNIT / 32));
    
 - _FixedToByteAngle
    stock _FixedToByteAngle(Fixed:angle);
    Parameters:
    
    -  angle : A fixed-point angle in degrees
    
 
    Return value: The byte angle value corresponding to 'angle'.
    Found in: specials.inc
    Description: Converts a given fixed-point angle in degress to a byte angle. The
    formula used is as follows:
    byteangle = _:(angle * 32 / (45 * FRACUNIT));
    
 - _Door_Raise
    native _Door_Raise(tag, speed, delay, lighttag = 0);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed door will open and close at, in eighths of a unit per tic.
    
 -  delay : Amount of time door will wait before closing in gametics.
    
 -  lighttag : Optional tag of sector to select for BOOM dynamic door lighting effect.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Opens all indicated sectors as doors, which will close after the given
    amount of delay time. Zero tags may only be used if the calling script was started from
    a linedef.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Door_Open
    native _Door_Open(tag, speed, lighttag = 0);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed door will open and close at, in eighths of a unit per tic.
    
 -  lighttag : Optional tag of sector to select for BOOM dynamic door lighting effect.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Opens all indicated sectors as doors; the sectors will remain open. Zero tags
    may only be used if the calling script was started from a linedef.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Door_Close
    native _Door_Close(tag, speed, lighttag = 0);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed door will open and close at, in eighths of a unit per tic.
    
 -  lighttag : Optional tag of sector to select for BOOM dynamic door lighting effect.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Closes all indicated sectors as doors; the sectors will remain closed. Zero
    tags may only be used if the calling script was started from a linedef.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Door_CloseWaitOpen
    native _Door_CloseWaitOpen(tag, speed, delay, lighttag = 0);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed door will open and close at, in eighths of a unit per tic.
    
 -  delay : Amount of time door will wait before opening in gametics.
    
 -  lighttag : Optional tag of sector to select for BOOM dynamic door lighting effect.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Closes all indicated sectors as doors, which will open after the given amount
    of delay time. Zero tags may only be used if the calling script was started from a linedef.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Door_WaitRaise
    native _Door_WaitRaise(tag, speed, delay, countdown, lighttag = 0);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed door will open and close at, in eighths of a unit per tic.
    
 -  delay : Amount of time door will wait before closing in gametics.
    
 -  countdown: Amount of time before door opens in gametics.
    
 -  lighttag : Optional tag of sector to select for BOOM dynamic door lighting effect.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Waits until the countdown period has expired, then opens all indicated sectors
    as doors, which will close after the given amount of delay time. Zero tags may only be
    used if the calling script was started from a linedef.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Door_WaitClose
    native _Door_WaitClose(tag, speed, countdown, lighttag = 0);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed door will open and close at, in eighths of a unit per tic.
    
 -  countdown : Amount of time before door closes in gametics.
    
 -  lighttag : Optional tag of sector to select for BOOM dynamic door lighting effect.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Waits until the countdown period has expired, then closes all indicated sectors
    as doors; the sectors will remain closed. Zero tags may only be used if the calling script was
    started from a linedef.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Floor_RaiseToHighest
    native _Floor_RaiseToHighest(tag, speed, change = _FNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _FNoChg : No texture or type change.
         
 - _FChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _FChgZeroNum : Copy texture, zero type; numeric model.
         
 - _FChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _FChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _FChgTypTrig : Copy texture and type; trigger model. ***
         
 - _FChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Raises all indicated sectors' floors to the highest neighboring floor. If
    the highest neighboring floor is lower, movement is instantaneous. If no neighboring
    floor exists, motion is to -32000. Zero tags may only be used if the calling script was started from a
    linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change models in any other circumstance will result in no change.
    
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Floor_LowerToHighest
    native _Floor_LowerToHighest(tag, speed, change = _FNoChg);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _FNoChg : No texture or type change.
         
 - _FChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _FChgZeroNum : Copy texture, zero type; numeric model.
         
 - _FChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _FChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _FChgTypTrig : Copy texture and type; trigger model. ***
         
 - _FChgTypNum : Copy texture and type; numeric model.
         
 
     
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Lowers all indicated sectors' floors to the highest neighboring floor. If
    the highest neighboring floor is higher, movement is instantaneous. If no neighboring
    floor exists, motion is to -32000. Zero tags may only be used if the calling script was started
    from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Floor_RaiseToLowest
    native _Floor_RaiseToLowest(tag, change = _FNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  change : One of the following enumeration values:
         
         - _FNoChg : No texture or type change.
         
 - _FChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _FChgZeroNum : Copy texture, zero type; numeric model.
         
 - _FChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _FChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _FChgTypTrig : Copy texture and type; trigger model. ***
         
 - _FChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Raises all indicated sectors' floors to the lowest neighboring floor.
    Movement is always instantaneous. Zero tags may only be used if the calling script was started
    from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Floor_LowerToLowest
    native _Floor_LowerToLowest(tag, speed, change = _FNoChg);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _FNoChg : No texture or type change.
         
 - _FChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _FChgZeroNum : Copy texture, zero type; numeric model.
         
 - _FChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _FChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _FChgTypTrig : Copy texture and type; trigger model. ***
         
 - _FChgTypNum : Copy texture and type; numeric model.
         
 
     
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Lowers all indicated sectors' floors to the lowest neighboring floor, including
    the floor itself. Movement is always at the indicated speed. Zero tags may only be used if the
    calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Floor_RaiseToNearest
    native _Floor_RaiseToNearest(tag, speed, change = _FNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _FNoChg : No texture or type change.
         
 - _FChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _FChgZeroNum : Copy texture, zero type; numeric model.
         
 - _FChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _FChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _FChgTypTrig : Copy texture and type; trigger model. ***
         
 - _FChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Raises all indicated sectors' floors to the next higher neighboring floor.
    Movement is always at the indicated speed. If no neighboring floor exists, the floor will
    not move. Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Floor_LowerToNearest
    native _Floor_LowerToNearest(tag, speed, change = _FNoChg);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _FNoChg : No texture or type change.
         
 - _FChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _FChgZeroNum : Copy texture, zero type; numeric model.
         
 - _FChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _FChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _FChgTypTrig : Copy texture and type; trigger model. ***
         
 - _FChgTypNum : Copy texture and type; numeric model.
         
 
     
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Lowers all indicated sectors' floors to the next lower neighboring floor.
    Movement is always at the indicated speed. If no neighboring floor exists, the floor will
    not move. Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Floor_RaiseToLowestCeiling
    native _Floor_RaiseToLowestCeiling(tag, speed, change = _FNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _FNoChg : No texture or type change.
         
 - _FChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _FChgZeroNum : Copy texture, zero type; numeric model.
         
 - _FChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _FChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _FChgTypTrig : Copy texture and type; trigger model. ***
         
 - _FChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Raises all indicated sectors' floors to the height of the lowest neighboring
    sector's ceiling, including the sector's ceiling itself. If the destination height is lower
    than the floor's current height, movement will be instantaneous. Zero tags may only be used
    if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Floor_LowerToLowestCeiling
    native _Floor_LowerToLowestCeiling(tag, speed, change = _FNoChg);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _FNoChg : No texture or type change.
         
 - _FChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _FChgZeroNum : Copy texture, zero type; numeric model.
         
 - _FChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _FChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _FChgTypTrig : Copy texture and type; trigger model. ***
         
 - _FChgTypNum : Copy texture and type; numeric model.
         
 
     
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Lowers all indicated sectors' floors to the height of the lowest neighboring
    sector's ceiling, including the sector's ceiling itself. If the destination height is higher
    than the floor's current height, movement will be instantaneous. Zero tags may only be used
    if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Floor_RaiseToCeiling
    native _Floor_RaiseToCeiling(tag, speed, change = _FNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _FNoChg : No texture or type change.
         
 - _FChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _FChgZeroNum : Copy texture, zero type; numeric model.
         
 - _FChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _FChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _FChgTypTrig : Copy texture and type; trigger model. ***
         
 - _FChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Raises all indicated sectors' floors to the height of their own ceilings.
    Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Floor_RaiseByTexture
    native _Floor_RaiseByTexture(tag, speed, change = _FNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _FNoChg : No texture or type change.
         
 - _FChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _FChgZeroNum : Copy texture, zero type; numeric model.
         
 - _FChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _FChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _FChgTypTrig : Copy texture and type; trigger model. ***
         
 - _FChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description:  Raises indicated sectors' floors by the height of the shortest lower texture
    on any line on the boundary of the sector. If no such texture exists, movement is to
    +32000. Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Floor_LowerByTexture
    native _Floor_LowerByTexture(tag, speed, change = _FNoChg);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _FNoChg : No texture or type change.
         
 - _FChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _FChgZeroNum : Copy texture, zero type; numeric model.
         
 - _FChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _FChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _FChgTypTrig : Copy texture and type; trigger model. ***
         
 - _FChgTypNum : Copy texture and type; numeric model.
         
 
     
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description:  Lowers indicated sectors' floors by the height of the shortest lower texture
    on any line on the boundary of the sector. If no such texture exists, movement is to
    -32000. Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Floor_RaiseByValue
    native _Floor_RaiseByValue(tag, speed, height, change = _FNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  height : Amount to raise floor in integer units.
    
 -  change : One of the following enumeration values:
         
         - _FNoChg : No texture or type change.
         
 - _FChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _FChgZeroNum : Copy texture, zero type; numeric model.
         
 - _FChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _FChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _FChgTypTrig : Copy texture and type; trigger model. ***
         
 - _FChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description:  Raises indicated sectors' floors by the indicated amount. Zero tags may only
    be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Floor_LowerByValue
    native _Floor_LowerByValue(tag, speed, height, change = _FNoChg);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  height : Amount to lower floor in integer units.
    
 -  change : One of the following enumeration values:
         
         - _FNoChg : No texture or type change.
         
 - _FChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _FChgZeroNum : Copy texture, zero type; numeric model.
         
 - _FChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _FChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _FChgTypTrig : Copy texture and type; trigger model. ***
         
 - _FChgTypNum : Copy texture and type; numeric model.
         
 
     
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description:  Lowers indicated sectors' floors by the indicated amount. Zero tags may
    only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Floor_MoveToValue
    native _Floor_MoveToValue(tag, speed, height, change = _FNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  height : Target z height of floor.
    
 -  change : One of the following enumeration values:
         
         - _FNoChg : No texture or type change.
         
 - _FChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _FChgZeroNum : Copy texture, zero type; numeric model.
         
 - _FChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _FChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _FChgTypTrig : Copy texture and type; trigger model. ***
         
 - _FChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description:  Moves indicated sectors' floors to the height given. Movement direction is
    always toward the destination height, and instantaneous movement is not possible. Zero tags
    may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Floor_RaiseInstant
    native _Floor_RaiseInstant(tag, height, change = _FNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  height : Amount to raise floor in integer units.
    
 -  change : One of the following enumeration values:
         
         - _FNoChg : No texture or type change.
         
 - _FChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _FChgZeroNum : Copy texture, zero type; numeric model.
         
 - _FChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _FChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _FChgTypTrig : Copy texture and type; trigger model. ***
         
 - _FChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description:  Raises indicated sectors' floors by the indicated amount instantaneously. Zero
    tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Floor_LowerInstant
    native _Floor_LowerInstant(tag, height, change = _FNoChg);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  height : Amount to lower floor in integer units.
    
 -  change : One of the following enumeration values:
         
         - _FNoChg : No texture or type change.
         
 - _FChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _FChgZeroNum : Copy texture, zero type; numeric model.
         
 - _FChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _FChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _FChgTypTrig : Copy texture and type; trigger model. ***
         
 - _FChgTypNum : Copy texture and type; numeric model.
         
 
     
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description:  Lowers indicated sectors' floors by the indicated amount instantaneously. Zero
    tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Floor_ToCeilingInstant
    native _Floor_ToCeilingInstant(tag, change = _FNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  change : One of the following enumeration values:
         
         - _FNoChg : No texture or type change.
         
 - _FChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _FChgZeroNum : Copy texture, zero type; numeric model.
         
 - _FChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _FChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _FChgTypTrig : Copy texture and type; trigger model. ***
         
 - _FChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Raises indicated sectors' floors to their respective ceilings instantaneously.
    Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Ceiling_RaiseToHighest
    native _Ceiling_RaiseToHighest(tag, speed, change = _CNoChg);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _CNoChg : No texture or type change.
         
 - _CChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _CChgZeroNum : Copy texture, zero type; numeric model.
         
 - _CChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _CChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _CChgTypTrig : Copy texture and type; trigger model. ***
         
 - _CChgTypNum : Copy texture and type; numeric model.
         
 
     
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Raises the indicated sectors' ceilings to the highest neighboring ceiling.
    Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Ceiling_ToHighestInstant
    native _Ceiling_ToHighestInstant(tag, change = _CNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  change : One of the following enumeration values:
         
         - _CNoChg : No texture or type change.
         
 - _CChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _CChgZeroNum : Copy texture, zero type; numeric model.
         
 - _CChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _CChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _CChgTypTrig : Copy texture and type; trigger model. ***
         
 - _CChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Raises the indicated sector's ceilings to the highest neighboring ceiling
    instantaneously. Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Ceiling_RaiseToNearest
    native _Ceiling_RaiseToNearest(tag, speed, change = _CNoChg);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _CNoChg : No texture or type change.
         
 - _CChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _CChgZeroNum : Copy texture, zero type; numeric model.
         
 - _CChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _CChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _CChgTypTrig : Copy texture and type; trigger model. ***
         
 - _CChgTypNum : Copy texture and type; numeric model.
         
 
     
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Raises the indicated sectors' ceilings to the nearest neighboring ceiling.
    Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Ceiling_LowerToNearest
    native _Ceiling_LowerToNearest(tag, speed, change = _CNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _CNoChg : No texture or type change.
         
 - _CChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _CChgZeroNum : Copy texture, zero type; numeric model.
         
 - _CChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _CChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _CChgTypTrig : Copy texture and type; trigger model. ***
         
 - _CChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Lowers the indicated sectors' ceilings to the nearest neighboring ceiling.
    Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Ceiling_RaiseToLowest
    native _Ceiling_RaiseToLowest(tag, speed, change = _CNoChg);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _CNoChg : No texture or type change.
         
 - _CChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _CChgZeroNum : Copy texture, zero type; numeric model.
         
 - _CChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _CChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _CChgTypTrig : Copy texture and type; trigger model. ***
         
 - _CChgTypNum : Copy texture and type; numeric model.
         
 
     
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Raises the indicated sectors' ceilings to the lowest neighboring ceiling.
    Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Ceiling_LowerToLowest
    native _Ceiling_LowerToLowest(tag, speed, change = _CNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _CNoChg : No texture or type change.
         
 - _CChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _CChgZeroNum : Copy texture, zero type; numeric model.
         
 - _CChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _CChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _CChgTypTrig : Copy texture and type; trigger model. ***
         
 - _CChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Lowers the indicated sectors' ceilings to the lowest neighboring ceiling.
    Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Ceiling_RaiseToHighestFloor
    native _Ceiling_RaiseToHighestFloor(tag, speed, change = _CNoChg);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _CNoChg : No texture or type change.
         
 - _CChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _CChgZeroNum : Copy texture, zero type; numeric model.
         
 - _CChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _CChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _CChgTypTrig : Copy texture and type; trigger model. ***
         
 - _CChgTypNum : Copy texture and type; numeric model.
         
 
     
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Raises the indicated sectors' ceilings to the highest neighboring floor.
    Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Ceiling_LowerToHighestFloor
    native _Ceiling_LowerToHighestFloor(tag, speed, change = _CNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _CNoChg : No texture or type change.
         
 - _CChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _CChgZeroNum : Copy texture, zero type; numeric model.
         
 - _CChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _CChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _CChgTypTrig : Copy texture and type; trigger model. ***
         
 - _CChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Lowers the indicated sectors' ceilings to the highest neighboring floor.
    Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Ceiling_ToFloorInstant
    native _Ceiling_ToFloorInstant(tag, change = _CNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  change : One of the following enumeration values:
         
         - _CNoChg : No texture or type change.
         
 - _CChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _CChgZeroNum : Copy texture, zero type; numeric model.
         
 - _CChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _CChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _CChgTypTrig : Copy texture and type; trigger model. ***
         
 - _CChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Lowers the indicated sectors' ceilings to their respective floors
    instantaneously. Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Ceiling_LowerToFloor
    native _Ceiling_LowerToFloor(tag, speed, change = _CNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _CNoChg : No texture or type change.
         
 - _CChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _CChgZeroNum : Copy texture, zero type; numeric model.
         
 - _CChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _CChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _CChgTypTrig : Copy texture and type; trigger model. ***
         
 - _CChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Lowers the indicated sectors' ceilings to their respective floors.
    Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Ceiling_RaiseByTexture
    native _Ceiling_RaiseByTexture(tag, speed, change = _CNoChg);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _CNoChg : No texture or type change.
         
 - _CChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _CChgZeroNum : Copy texture, zero type; numeric model.
         
 - _CChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _CChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _CChgTypTrig : Copy texture and type; trigger model. ***
         
 - _CChgTypNum : Copy texture and type; numeric model.
         
 
     
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Raises the indicated sectors' ceilings by the height of the shortest upper
    texture around the perimeter of each sector.
    Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Ceiling_LowerByTexture
    native _Ceiling_LowerByTexture(tag, speed, change = _CNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  change : One of the following enumeration values:
         
         - _CNoChg : No texture or type change.
         
 - _CChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _CChgZeroNum : Copy texture, zero type; numeric model.
         
 - _CChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _CChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _CChgTypTrig : Copy texture and type; trigger model. ***
         
 - _CChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Lowers the indicates sectors' ceilings by the height of the shortest upper
    texture around the perimeter of each sector.
    Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Ceiling_RaiseByValue
    native _Ceiling_RaiseByValue(tag, speed, height, change = _CNoChg);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  height : Amount to raise ceiling in integer units.
    
 -  change : One of the following enumeration values:
         
         - _CNoChg : No texture or type change.
         
 - _CChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _CChgZeroNum : Copy texture, zero type; numeric model.
         
 - _CChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _CChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _CChgTypTrig : Copy texture and type; trigger model. ***
         
 - _CChgTypNum : Copy texture and type; numeric model.
         
 
     
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Raises the indicated sectors' ceilings by an absolute amount.
    Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other cricumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Ceiling_LowerByValue
    native _Ceiling_LowerByValue(tag, speed, height, change = _CNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  height : Amount to lower ceiling in integer units.
    
 -  change : One of the following enumeration values:
         
         - _CNoChg : No texture or type change.
         
 - _CChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _CChgZeroNum : Copy texture, zero type; numeric model.
         
 - _CChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _CChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _CChgTypTrig : Copy texture and type; trigger model. ***
         
 - _CChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Lowers the indicated sectors' ceilings by an absolute amount.
    Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Ceiling_MoveToValue
    native _Ceiling_MoveToValue(tag, speed, height, change = _CNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed in eighths of a unit per tic.
    
 -  height : Amount to move ceiling in integer units.
    
 -  change : One of the following enumeration values:
         
         - _CNoChg : No texture or type change.
         
 - _CChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _CChgZeroNum : Copy texture, zero type; numeric model.
         
 - _CChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _CChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _CChgTypTrig : Copy texture and type; trigger model. ***
         
 - _CChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Moves the indicated sectors' ceilings toward the indicated z coordinate.
    Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Ceiling_RaiseInstant
    native _Ceiling_RaiseInstant(tag, height, change = _CNoChg);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  height : Amount to raise ceiling in integer units.
    
 -  change : One of the following enumeration values:
         
         - _CNoChg : No texture or type change.
         
 - _CChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _CChgZeroNum : Copy texture, zero type; numeric model.
         
 - _CChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _CChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _CChgTypTrig : Copy texture and type; trigger model. ***
         
 - _CChgTypNum : Copy texture and type; numeric model.
         
 
     
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Raises the indicated sectors' ceilings by the indicated amount
    instantaneously. Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used if the calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Ceiling_LowerInstant
    native _Ceiling_LowerInstant(tag, height, change = _CNoChg, crush = -1);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  height : Amount to lower ceiling in integer units.
    
 -  change : One of the following enumeration values:
         
         - _CNoChg : No texture or type change.
         
 - _CChgZeroTrig : Copy texture, zero type; trigger model. ***
         
 - _CChgZeroNum : Copy texture, zero type; numeric model.
         
 - _CChgTxtTrig : Copy texture, preserve type; trigger model. ***
         
 - _CChgTxtNum : Copy texture, preserve type; numeric model.
         
 - _CChgTypTrig : Copy texture and type; trigger model. ***
         
 - _CChgTypNum : Copy texture and type; numeric model.
         
 
     -  crush : Optional amount of crushing damage to apply per crush event. Zero or less means
         no crushing damage.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Lowers the indicated sectors' ceilings by the indicated amount
    instantaneously. Zero tags may only be used if the calling script was started from a linedef.
    *** : Trigger change models can only be used ifthe calling script was started from a linedef.
    Attempting to use trigger change model under any other circumstance mode will result in no change.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Stairs_BuildUpDoom
    native _Stairs_BuildUpDoom(tag, speed, stepsize, delay, reset);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed of steps in eights of a unit per tic. If the
    
 -  stepsize : Step size in eighths of a unit.
    
 -  delay : Delay time in tics before stair building begins.
    
 -  reset : If greater than zero, the stairs will wait this amount of time in tics
         after completely building and will then reset by repeating the same stair building
         action but in the reverse direction. If zero, the stairs will never reset.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Starts DOOM-style staircase building at every tagged sector.
    Zero tags may only be used if the calling script was started from a linedef.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Stairs_BuildDownDoom
    native _Stairs_BuildDownDoom(tag, speed, stepsize, delay, reset);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed of steps in eights of a unit per tic.
    
 -  stepsize : Step size in eighths of a unit.
    
 -  delay : Delay time in tics before stair building begins.
    
 -  reset : If greater than zero, the stairs will wait this amount of time in tics
         after completely building and will then reset by repeating the same stair building
         action but in the reverse direction. If zero, the stairs will never reset.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Starts DOOM-style staircase building at every tagged sector.
    Zero tags may only be used if the calling script was started from a linedef.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Stairs_BuildUpDoomSync
    native _Stairs_BuildUpDoomSync(tag, speed, stepsize, delay, reset);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed of first step in eights of a unit per tic. The remaining
         steps move at a speed calculated to allow them to arrive at their destination
         height at the same time as the first step.
    
 -  stepsize : Step size in eighths of a unit.
    
 -  delay : Delay time in tics before stair building begins.
    
 -  reset : If greater than zero, the stairs will wait this amount of time in tics
         after completely building and will then reset by repeating the same stair building
         action but in the reverse direction. If zero, the stairs will never reset.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Starts synchronized DOOM-style staircase building at every tagged sector.
    Zero tags may only be used if the calling script was started from a linedef.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Stairs_BuildDownDoomSync
    native _Stairs_BuildDownDoomSync(tag, speed, stepsize, delay, reset);
    Parameters:
    
    -  tag : A tag number for this sector.
    
 -  speed : Speed of first step in eights of a unit per tic. The remaining
         steps move at a speed calculated to allow them to arrive at their destination
         height at the same time as the first step.
    
 -  stepsize : Step size in eighths of a unit.
    
 -  delay : Delay time in tics before stair building begins.
    
 -  reset : If greater than zero, the stairs will wait this amount of time in tics
         after completely building and will then reset by repeating the same stair building
         action but in the reverse direction. If zero, the stairs will never reset.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Starts synchronized DOOM-style staircase building at every tagged sector.
    Zero tags may only be used if the calling script was started from a linedef.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Polyobj_DoorSlide
    native _Polyobj_DoorSlide(polyobj_id, speed, angle, dist, delay);
    Parameters:
    
    -  polyobj_id : ID number of the principle PolyObject to affect.
    
 -  speed : Linear speed of PolyObject motion in eighths of a unit per tic.
    
 -  angle : Byte angle of linear motion:
         
         -  0 = East
         
 -  64 = North
         
 -  128 = West
         
 -  192 = South
         
 
     -  dist : Total linear distance to move in units.
    
 -  delay : Time to wait before closing in tics.
    
 
    Return value: 1 if action was successful on the main PolyObject, 0 otherwise.
    Found in: specials.inc
    Description: Opens the indicated PolyObject as a sliding door.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Polyobj_DoorSwing
    native _Polyobj_DoorSwing(polyobj_id, aspeed, adist, delay);
    Parameters:
    
    -  polyobj_id : ID number of the principle PolyObject to affect.
    
 -  aspeed : Byte angle specifying speed in degrees per tic
         byteangle = degrees * 256 / 360;
     -  adist : Byte angle specifying total angular distance to rotate.
    
 -  delay : Time to wait before closing in tics.
    
 
    Return value: 1 if action was successful on the main PolyObject, 0 otherwise.
    Found in: specials.inc
    Description: Opens the indicated PolyObject as a swinging door.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Polyobj_Move
    native _Polyobj_Move(polyobj_id, speed, angle, dist);
    Parameters:
    
    -  polyobj_id : ID number of the principle PolyObject to affect.
    
 -  speed : Linear speed of PolyObject motion in eighths of a unit per tic.
    
 -  angle : Byte angle of linear motion:
         
         -  0 = East
         
 -  64 = North
         
 -  128 = West
         
 -  192 = South
         
 
     -  dist : Total linear distance to move in units.
    
 
    Return value: 1 if action was successful on the main PolyObject, 0 otherwise.
    Found in: specials.inc
    Description: Moves the indicated PolyObject on the (x,y) plane.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Polyobj_OR_Move
    native _Polyobj_OR_Move(polyobj_id, speed, angle, dist);
    Parameters:
    
    -  polyobj_id : ID number of the principle PolyObject to affect.
    
 -  speed : Linear speed of PolyObject motion in eighths of a unit per tic.
    
 -  angle : Byte angle of linear motion:
         
         -  0 = East
         
 -  64 = North
         
 -  128 = West
         
 -  192 = South
         
 
     -  dist : Total linear distance to move in units.
    
 
    Return value: 1 if action was successful on the main PolyObject, 0 otherwise.
    Found in: specials.inc
    Description: Moves the indicated PolyObject on the (x,y) plane, overriding
    any existing actions on the PolyObject.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Polyobj_RotateRight
    native _Polyobj_RotateRight(polyobj_id, aspeed, adist);
    Parameters:
    
    -  polyobj_id : ID number of the principle PolyObject to affect.
    
 -  aspeed : Byte angle specifying speed in degrees per tic
         byteangle = degrees * 256 / 360;
     -  adist : Byte angle specifying total angular distance to rotate.
         Special values for this parameter:
         
         -  0 = 360 degrees
         
 -  255 = Rotate perpetual
         
 
     
    Return value: 1 if action was successful on the main PolyObject, 0 otherwise.
    Found in: specials.inc
    Description: Rotates the indicated PolyObject to the right.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Polyobj_OR_RotateRight
    native _Polyobj_OR_RotateRight(polyobj_id, aspeed, adist);
    Parameters:
    
    -  polyobj_id : ID number of the principle PolyObject to affect.
    
 
    Return value: 1 if action was successful on the main PolyObject, 0 otherwise.
    Found in: specials.inc
    Description: Rotates the indicated PolyObject to the right, overriding any
    existing actions on the PolyObject.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Polyobj_RotateLeft
    native _Polyobj_RotateLeft(polyobj_id, aspeed, adist);
    Parameters:
    
    -  polyobj_id : ID number of the principle PolyObject to affect.
    
 -  aspeed : Byte angle specifying speed in degrees per tic
         byteangle = degrees * 256 / 360;
     -  adist : Byte angle specifying total angular distance to rotate.
         Special values for this parameter:
         
         -  0 = 360 degrees
         
 -  255 = Rotate perpetual
         
 
     
    Return value: 1 if action was successful on the main PolyObject, 0 otherwise.
    Found in: specials.inc
    Description: Rotates the indicated PolyObject to the left.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _Polyobj_OR_RotateLeft
    native _Polyobj_OR_RotateLeft(polyobj_id, aspeed, adist);
    Parameters:
    
    -  polyobj_id : ID number of the principle PolyObject to affect.
    
 -  aspeed : Byte angle specifying speed in degrees per tic
         byteangle = degrees * 256 / 360;
     -  adist : Byte angle specifying total angular distance to rotate.
         Special values for this parameter:
         
         -  0 = 360 degrees
         
 -  255 = Rotate perpetual
         
 
     
    Return value: 1 if action was successful on the main PolyObject, 0 otherwise.
    Found in: specials.inc
    Description: Rotates the indicated PolyObject to the left, overriding any
    existing actions on the PolyObject.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
     - _Pillar_Build
    native _Pillar_Build(tag, speed, height);
    Parameters:
    
    -  tag : Tag of sector to affect.
    
 -  speed : Speed of pillar.
    
 -  height : Height above the floor the pillar will close to.
    
 
    Return value:  1 if action was successful on any sector, 0 otherwise.
    Description: Floor and ceiling close in to the specified height above the inital
    floor height. The floor or ceiling furthest away from this height moves at the given
    speed, while other moves at a speed which will make them both arrive at the
    height at the same time. If the height is 0, they will meet in the middle. 
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
     - _Pillar_BuildAndCrush
    native _Pillar_BuildAndCrush(tag, speed, height, crush);
    Parameters:
    
    -  tag : Tag of sector to affect.
    
 -  speed : Speed of pillar.
    
 -  height : Height above the floor the pillar will close to.
    
 -  damage : Damage per tic the pillar will inflict while crushing
    
 
    Return value:  1 if action was successful on any sector, 0 otherwise.
    Description: Floor and ceiling close in to the specified height above the inital
    floor height. The floor or ceiling furthest away from this height moves at the given
    speed, while other moves at a speed which will make them both arrive at the
    height at the same time. If the height is 0, they will meet in the middle. If a thing is
    trapped between the floor and ceiling while they are moving, the thing will be crushed.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
     - _Pillar_Open
    native _Pillar_Open(tag, speed, fdist, cdist);
    Parameters:
    
    -  tag : Tag of sector to affect.
    
 -  speed : Speed of pillar.
    
 -  fdist : Distance the floor should move.
    
 -  cdist : Distance the ceiling should move.
    
 
    Return value:  1 if action was successful on any sector, 0 otherwise.
    Description: Floor and ceiling open up away from eachother by the given distances.
    If the floor distance is greater than the ceiling distance, the floor speed is
    the given speed, while the ceiling speed is set so the ceiling reaches its
    destination at the same time the floor does, and vice versa. If a distance is 0,
    the floor or ceiling will move to the lowest neighboring floor or highest neighboring
    ceiling. This function will only work properly if the floor and ceiling heights of the
    tagged sector are initally equal.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
	
	 - _ChangeFloor
    native _ChangeFloor(tag, const flat[]);
    Parameters:
    
    -  tag : Tag of the sectors to change the floor flat of.
    
 -  flat : The name of the flat to change the floor to.
	
 
    Return value: 0 if action was successful on any sector, -1 otherwise.
    Found in: specials.inc
    Description: Changes the tagged sector's floor flats to the given flat.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
	 - _ChangeCeiling
    native _ChangeCeiling(tag, const flat[]);
    Parameters:
    
    -  tag : Tag of the sectors to change the ceiling flat of.
    
 -  flat : The name of the flat to change the ceiling to.
	
 
    Return value: 0 if action was successful on any sector, -1 otherwise.
    Found in: specials.inc
    Description: Changes the tagged sector's ceiling flats to the given flat.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
	 - _SetLineTexture
    native _SetLineTexture(lineid, side, pos, const texturename[]);
    Parameters:
    
    -  lineid : The lineid of the line the function will change the texture of.
    
 -  side : The side of the line the texture the function will change is on. Can be:
         
         - _SIDE_FRONT : Front side of line
         
 - _SIDE_BACK : Back side of line
		
 
     -  pos : One of the following enumeration values:
         
         - _TEX_LOWER : The texture to change is the lower texture
         
 - _TEX_MID : The texture to change is the middle texture
         
 - _TEX_UPPER : The texture to change is the upper texture
         
 
     -  texturename : Name of texture to change to.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Changes the specified line's texture on the given position and side.
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
	 - _SetLineTextureTag
    native _SetLineTextureTag(tag, side, pos, const texturename[]);
    Parameters:
    
    -  tag : The tag of the lines the function will change the texture of.
    
 -  side : The side of the line the texture the function will change is on. Can be:
         
         - _SIDE_FRONT : Front side of line
         
 - _SIDE_BACK : Back side of line
         
 
     -  pos : One of the following enumeration values:
         
         - _TEX_LOWER : The texture to change is the lower texture
         
 - _TEX_MID : The texture to change is the middle texture
         
 - _TEX_UPPER : The texture to change is the upper texture
         
 
     -  texturename : Name of texture to change to.
    
 
    Return value: 1 if action was successful on any sector, 0 otherwise.
    Found in: specials.inc
    Description: Changes the specified lines's textures on the given position and side.
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 
Return to Table of Contents
Cameras
Camera functions allow manipulation of the various types of camera objects which exist in
the game.
- _ToggleChasecam
    native _ToggleChasecam(bool:onoff);
    Parameters:
    
    -  bool:onoff : If true, the chasecam will be activated. If false, it will be deactivated.
    
 
    Return value: None.
    Found in: cameras.inc
    Description: Sets the activation state of the chasecam to the given state.
    
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
    
 - _IsChasecamOn
    native bool:_IsChasecamOn();
    Parameters: None.
    Return value: true if the chasecam is on locally, false if not.
    Found in: cameras.inc
    Description: Returns the current state of the chasecam for the console player.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
 
Return to Table of Contents
Special Functions
- _ForceLightning
    native _ForceLightning();
    Parameters: None.
    Return value: None.
    Found in: specials.inc
    Description: If lightning is enabled for a level via MapInfo, this function can force a
    lightning strike to occur at an exact moment. This is useful for dramatic effects.
    Exceptions:
    
    -  "Bad gamemode for native function" : Game is not currently in level mode.
    
 
 
Return to Table of Contents