UDB
Properties
Angle2D
Class containing methods related to angles. See Angle2D for more information.
let rad = UDB.Angle2D.degToRad(46);
Version: 5
BlockMap
Instantiable class that contains methods related to blockmaps. See [BlockMap][BlockMap.md) for more information.
Data
Class containing methods related to the game data. See Data for more information.
let hasfireblu = UDB.Data.textureExists('FIREBLU1');
GameConfiguration
Class containing methods related to the game configuration. See GameConfiguration for more information.
Line2D
Instantiable class that contains methods related to two-dimensional lines. See Line2D for more information.
let line = new UDB.Line2D([ 32, 64 ], [ 96, 128 ]);
Map
Object containing methods related to the map. See Map for more information.
let sectors = UDB.Map.getSelectedOrHighlightedSectors();
Version: 5
Plane
Instantiable class that contains methods related to a three-dimensional Plane. See Plane for more information.
QueryOptions
Class containing methods and properties related to querying options from the user at runtime. See QueryOptions for more information.
ScriptOptions
Object containing the script options. See Setting script options.
UniValue
The UniValue
class. Is only needed when trying to assign integer values to UDMF fields.
s.fields.user_myintfield = new UDB.UniValue(0, 25);
Vector2D
Instantiable class that contains methods related to two-dimensional vectors. See Vector2D for more information.
let v = new UDB.Vector2D(32, 64);
Vector3D
Instantiable class that contains methods related to three-dimensional vectors. See Vector3D for more information.
let v = new UDB.Vector3D(32, 64, 128);
Methods
die(s: string)
Exist the script prematurely with undoing its changes.
Parameters
- s: Text to show in the status bar (optional)
exit(s: string)
Exist the script prematurely without undoing its changes.
Parameters
- s: Text to show in the status bar (optional)
log(text: object)
Adds a line to the script log. Also shows the script running dialog.
Parameters
- text: Line to add to the script log
setProgress(value: int)
Set the progress of the script in percent. Value can be between 0 and 100. Also shows the script running dialog.
Parameters
- value: Number between 0 and 100
showMessage(message: object)
Shows a message box with an "OK" button.
Parameters
- message: Message to show
showMessageYesNo(message: object)
Shows a message box with an "Yes" and "No" button.
Parameters
- message: Message to show
Return value
true if "Yes" was clicked, false if "No" was clicked