consoledoc.h

consoledoc.h

More...

Classes:

class

An invisible shape that allow objects within it to have an accumulation map.

class

ActionMaps assign platform input events to console commands.

class

Rendering Manager responsible for lighting, shadows, and global variables affecing both.

class

A datablock that specifies an Animation Clip effect.

class

A datablock that specifies an Animation Lock effect.

class

A datablock that specifies an Area Damage effect.

class

A datablock that specifies an Audio Bank effect.

class

A Billboard effect as defined by an afxBillboardData datablock.

class

A datablock that specifies a Billboard effect.

class

A 3rd person camera object.

class

A datablock that describes an afxCamera.

class

A datablock that specifies a Camera Puppet effect.

class

A datablock that specifies a Camera Shake effect.

class

Base class used by choreographers.

class

Datablock base class used by choreographers.

class

A datablock that specifies a Collision Event effect.

class

A datablock that specifies a Console Message effect.

class

A datablock that specifies a Damage effect.

class
class

A datablock that describes an Effect Group.

class

A basic effects choreographer.

class

Defines the properties of an afxEffectron.

class

An Effect Wrapper as defined by an afxEffectWrapperData datablock.

class

A datablock that describes an Effect Wrapper.

class

A simple but useful GUI control that propagates all events to its parent control.

class

A datablock for specifiying AFX drag forces.

class

A datablock for specifiying AFX gravity forces.

class

A datablock that specifies a Foot Switch effect.

class

A datablock that specifies a Gui Controller effect.

class

A customized variation of GuiInspectorField.

class

A datablock that specifies a Gui Text effect.

class

Similar to GuiShapeNameHud, afxGuiTextHud displays ShapeBase object names but also allows Gui Text effects.

class

afxLightData is a legacy datablock which is not supported for T3D.

class

A datablock that specifies a Machine Gun effect.

class

Magic-missile class used internally by afxMagicSpell. Properties of individual missile types are defined using afxMagicMissileData.

class

Defines a particular magic-missile type. (Use with afxMagicSpellData.)

class

A magic spell effects choreographer.

class

Defines the properties of an afxMagicSpell.

class

A Model effect as defined by an afxModelData datablock.

class

A datablock that specifies a Model effect.

class

A Mooring effect as defined by an afxMooringData datablock.

class

A datablock that specifies a Mooring effect.

class

afxMultiLightData is a legacy datablock which is not supported for T3D.

class

An AFX customized particle emitter that emits particles within a cone shape.

class

A base datablock inherited by AFX Particle Emitter effects.

class

An AFX customized particle emitter that emits particles within a disc shape.

class

An AFX customized particle emitter that emits particles along a path.

class

An AFX customized particle emitter that emits particles along a 3D vector.

class

A ParticlePool object as defined by an afxParticlePoolData datablock.

class

A ParticlePool datablock.

class

A datablock for specifiying a 3D path for use with AFX.

class

A datablock that specifies a Phrase Effect, a grouping of other effects.

class

A datablock that specifies a PhysicalZone effect.

class

A datablock that specifies a Player Movement effect.

class

A datablock that specifies a Player Puppet effect.

class

A Projectile effect as defined by an afxProjectileData datablock.

class

A datablock that specifies a Projectile effect.

class

A class that manages certain AFX effects that can persist for long durations.

class

A datablock for defining RPG aspects of a spell.

class

A datablock that specifies a Script Event effect.

class

A choreographer for selection effects.

class

Defines the properties of an afxSelectronData.

class

A spellbook object.

class

A spellbook datablock.

class

A GUI button with some special features that are useful for casting AFX spells.

class

A GUI progress bar useful as a spell casting bar.

class

A StaticShape effect as defined by an afxStaticShapeData datablock.

class

A datablock that specifies a StaticShape effect.

class

A GUI status bar for tracking and displaying health and energy of ShapeBase objects.

class

A simple GUI control used to contain player status bars and a label.

class

A simple GUI control used for a player status label.

class

A datablock that specifies a dynamic Point Light effect.

class

A datablock that specifies a dynamic Spot Light effect.

class

A customized variation of GameTSCtrl.

class

afxVolumeLightData is a legacy datablock which is not supported for T3D.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class
class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

An xmod datablock.

class

A datablock that specifies a decal-like Zodiac effect.

class

A render bin for zodiac rendering on GroundPlane objects.

class

A render bin for zodiac rendering on MeshRoad objects.

class

A ZodiacPlane effect as defined by an afxZodiacPlaneData datablock.

class

A datablock that specifies a Zodiac Plane effect.

class

A render bin for zodiac rendering on polysoup TSStatic objects.

class

A render bin for zodiac rendering on Terrain objects.

class

Simulated client driven by AI commands.

class

Special client connection driven by an AI, rather than a human.

class

A Player object not controlled by conventional input, but by an AI engine.

class

Defines properties for an AITurretShape object.

class

Data structure for storing indexed sequences of key/value pairs.

class

Defines properties for an AssetImprotConfig object. @AssetImportConfig is a SimObject derived object intended to act as a container for all the necessary configuration data when running the Asset Importer. @It dictates if and how any given asset type will be processed when running an import action. This is because the Asset Importer utilizes a lot of informed logic @to try and automate as much of the import process as possible. In theory, you would run the import on a given file, and based on your config the importer will do @everything from importing the designated file, as well as finding and importing any associated files such as images or materials, and prepping the objects at time @of import to avoid as much manual post-processing as possible.

class

Defines properties for an AssetImportObject object. @AssetImportObject is a SimObject derived object intended to act as a stand-in for the to-be imported objects. @It contains important info such as dependencies, if it's been processed, any error/status issues and the originating file @or if it's been programmatically generated as part of the import process.

class

Defines properties for an AssetImportObject object. @AssetImportObject is a SimObject derived object intended to act as a stand-in for the to-be imported objects. @It contains important info such as dependencies, if it's been processed, any error/status issues and the originating file @or if it's been programmatically generated as part of the import process.

class

Allows legacy AudioDescription datablocks to be treated as SFXDescription datablocks.

class

Allows legacy AudioProfile datablocks to be treated as SFXProfile datablocks.

class

Used for kicking and banning players from a server. There is only a single instance of BanList. It is very important to note that you do not ever create this object in script like you would other game play objects. You simply reference it via namespace.

class

Renders up to three layers of scrolling cloud-cover textures overhead.

class

An example scene object which renders a mesh.

class

Represents a position, direction and field of view to render a scene from.

class

A datablock that describes a camera.

class

A layer of clouds which change shape over time and are affected by scene lighting.

class

A renderable, collidable convex shape defined by a collection of surface planes.

class

A type of marker that designates a location AI characters can take cover.

class

Used to create static or dynamic cubemaps.

class

Material object which provides more control over surface properties.

class

A Shader Feature with custom definitions.

class

Base debris class. Uses the DebrisData datablock for properties of individual debris objects.

class

Stores properties for an individual debris type.

class

A debug helper for rendering debug primitives to the scene.

class

A datablock describing an individual decal.

class

The object that manages all of the decals in the active mission.

class

A strip shaped decal defined by spine nodes which clips against Terrain objects.

class

This class is used to find the correct icon file path for different SimObject class types.

class

The EventManager class is a wrapper for the standard messaging system.

class

The emitter for an explosion effect, with properties defined by a ExplosionData object.

class

Defines the attributes of an Explosion: particleEmitters, debris, lighting and camera shake effects.

class

Base class responsible for displaying an OS file browser.

class

This class is responsible opening, reading, creating, and saving file contents.

class

A wrapper around StreamObject for parsing text and data from files.

class

A flying vehicle.

class

Defines the properties of a FlyingVehicle.

class

Forest is a global-bounds scene object provides collision and rendering for a (.forest) data file.

class

Represents a type of ForestItem and parameters for how it is placed when painting with a ForestBrush that contains it.

class

Base class for defining a type of ForestItem. It does not implement loading or rendering of the shapeFile.

class

Object responsible for simulating wind in a level.

class

An emitter to replicate fxFoliageItem objects across an area.

class

The object definition for shapes that will be replicated across an area using an fxShapeReplicator.

class

An emitter for objects to replicate across an area.

class

Base class for game objects which use datablocks, networking, are editable, and need to process ticks.

class

Scriptable, demo-able datablock. Used by GameBase objects.

class

The game-specific subclass of NetConnection.

class

The main 3D viewport for a Torque 3D game.

class

This class is the interface between TorqueScript and GFXCardProfiler.

class

Functions for tracking GFX adapters and initializing them into devices.

class

A sampler state used by GFXStateBlockData.

class

A state block description for rendering.

class

Covers the ground in a field of objects (IE: Grass, Flowers, etc).

class

An infinite plane extending in all direction.

class

A container that scrolls its child control up over time.

class

A control that renders a skinned border specified in its profile.

class

A button that renders its various states (mouse over, pushed, etc.) from separate bitmaps.

class

An extension of GuiBitmapButtonCtrl that additionally renders a text label on the bitmapped button.

class

A gui control that is used to display an image.

class

A push button that renders only a border.

class

A single-line text control that displays its text in a multi-line popup when clicked.

class

The base class for the various button controls.

class

The most widely used button class.

class

A canvas on which rendering occurs.

class

A named checkbox that can be toggled on and off.

class

This is a control that will render a specified bitmap or a bitmap specified in a referenced variable.

class

Basic HUD clock. Displays the current simulation time offset from some base.

class

The on-screen, in-game console. Calls getLog() to get the on-screen console entries, then renders them as needed.

class

Text entry element of a GuiConsole.

class

Brief Desc.

class

Base class for all Gui control objects.

class
class

A collection of properties that determine control behavior and rendering.

class

Basic cross hair hud. Reacts to state of control object. Also displays health bar for named objects under the cross hair.

class

Acts as a skin for the cursor, where each GuiCursor object can have its own look and click-zone.

class

A control that displays a list of files from within a single directory in the game file system.

class

A container control that can be used to implement drag&drop behavior.

class

A container that arranges children into a grid.

class

A GUI control which renders a black square over a bitmap image. The black square will fade out, then fade back in after a determined time. This control is especially useful for transitions and splash screens.

class

A gui control allowing a window to be subdivided into panes, each of which displays a gui control child of the GuiFrameSetCtrl.

class

A base class for cross platform menu controls that are gamepad friendly.

class

A GuiControlProfile with additional fields specific to GuiGameListMenuCtrl.

class

A control for showing pages of options that are gamepad friendly.

class
class

A control that plots one or more curves in a chart.

class

A basic health bar. Shows the damage value of the current PlayerObjectType control object.

class

Shows the health or energy value of the current PlayerObjectType control object.

class

Draws the bitmap within a special button control. Only a single bitmap is used and the button will be drawn in a highlighted mode when the mouse hovers over it or when it has been clicked.

class

A control that locks the mouse and reports all keyboard input events to script.

class

A list of text items.

class

GUI Control which displays a horizontal bar with individual drop-down menu items. Each menu item may also have submenu items.

class

A chat HUD control that displays messages from a MessageVector.

class

A text control that uses the Gui Markup Language ('ML') tags to dynamically change the text.

class

A text entry control that accepts the Gui Markup Language ('ML') tags and multiple lines.

class

Used to overlaps a 'hot region' where you want to catch inputs with and have specific events occur based on individual callbacks.

class

GUI control which displays a 3D model.

class

A collapsable pane control.

class

The GuiPanel panel is a container that when opaque will draw a left to right gradient using its profile fill and fill highlight colors.

class

A control that allows to select a value from a drop-down list.

class

A control that allows to select a value from a drop-down list.

class

A horizontal progress bar rendered from a repeating image.

class

GUI Control which displays a horizontal bar which increases as the progress value of 0.0 - 1.0 increases.

class

A button based around the radio concept.

class

The most widely used button class.

class

A container that shows a single child with an optional header bar that can be used to collapse and expand the rollout.

class

A control which adds several reactions to other GUIs via callbacks.

class

A container that allows to view one or more possibly larger controls inside its area by providing horizontal and/or vertical scroll bars.

class

A control that renders a horizontal or vertical separator with an optional text label (horizontal only)

class

Displays name and damage of ShapeBase objects in its bounds. Must be a child of a GuiTSCtrl and a server connection must be present.

class

A control that displays a value between its minimal and maximal bounds using a slider placed on a vertical or horizontal axis.

class

Displays the speed of the current Vehicle based control object.

class

A container that splits its area between two child controls.

class

A container that stacks its children horizontally or vertically.

class

A button that is used to represent color; often used in correlation with a color picker.

class

A container.

class

A single page in a GuiTabBookCtrl.

class

GUI control object this displays a single line of text, without TorqueML.

class

A component that places a text entry box on the screen.

class

GUI Control which displays a numerical value which can be increased or decreased using a pair of bitmap up/down buttons.

class

GUI Control which displays a numerical value which can be increased or decreased using a pair of arrows.

class

GUI control that displays a list of text. Text items in the list can be individually selected.

class

A control to playing Theora videos.

class

Brief Description.

class

Deprecated gui control.

class

Hierarchical list of text items with optional icons.

class

Abstract base class for controls that render 3D scenes.

class

A window with a title bar and an optional set of buttons.

class

A hovering vehicle.

class

Defines the properties of a HoverVehicle.

class

Allows communications between the game and a server using HTTP.

class

Base Item class. Uses the ItemData datablock for common properties.

class

Stores properties for an individual Item type.

class

Provides the code necessary to handle the low level management of the string tables for localization.

class

Stores and controls the rendering and status information for a game level.

class

A datablock which defines and performs light animation, such as rotation, brightness fade, and colorization.

class

This is the base class for light objects.

class

A helper datablock used by classes (such as shapebase) that submit lights to the scene but do not use actual "LightBase" objects.

class

Defines a light flare effect usable by scene lights.

class

An emitter for lightning bolts.

class

Common data for a Lightning emitter object.

class

Network event that triggers a lightning strike on the client when it is received.

class

A single joint, or knot, along a path. Should be stored inside a Path container object. A path markers can be one of three primary movement types: "normal", "Position Only", or "Kink".

class

A material in Torque 3D is a data structure that describes a surface.

class

A strip of rectangular mesh segments defined by a 3D spline for prototyping road-shaped objects in your scene.

class

Base class for messages.

class

Forward messages from one queue to another.

class

Store a list of chat messages.

class

Level object which defines the boundaries of the level.

class

This is a base class for all "marker" related objets. It is a 3D representation of a point in the level.

class

A very basic class containing information used by MissionMarker objects for rendering.

class
class
class

Provides the basis for implementing a multiplayer game protocol.

class

Superclass for all ghostable networked objects.

class

An invisible shape that causes objects hidden from view behind it to not be rendered.

class

Derived from FileDialog, this class is responsible for opening a file browser with the intention of opening a file.

class

OS level dialog used for browsing folder structures.

class

Contains information for how specific particles should look and react including particle colors, particle imagemap, acceleration value for individual particles and spin information.

class

This object is responsible for spawning particles.

class

Defines particle emission properties such as ejection angle, period and velocity for a ParticleEmitter.

class

A particle emitter object that can be positioned in the world and dynamically enabled or disabled.

class

Contains additional data to be associated with a ParticleEmitterNode.

class

A spline along which various objects can move along. The spline object acts like a container for Marker objects, which make up the joints, or knots, along the path. Paths can be assigned a speed, can be looping or non-looping. Each of a path's markers can be one of three primary movement types: "normal", "Position Only", or "Kink".

class

A camera that moves along a path. The camera can then be made to travel along this path forwards or backwards.

class

General interface to control a PathCamera object from the script level.

class

Singleton class that exposes ConsoleStaticFunctions for debug visualizing PostEffects.

class

Physical Zones are areas that modify the player's gravity and/or velocity and/or applied force.

class

Represents one or more rigid bodies defined in a single mesh file with a limited lifetime.

class

Defines the properties of a PhysicsDebris object.

class

Helper object for gameplay physical forces.

class

Represents a destructible physical object simulated through the plugin system.

class

Defines the properties of a PhysicsShape.

class
class

Defines properties for a Player object.

class

Lighting object that radiates light in all directions.

class

An object that provides a "window" into a zone, allowing a viewer to see what's rendered in the zone.

class

A fullscreen shader effect.

class

Defines a precipitation based storm (rain, snow, etc).

class

Defines the droplets used in a storm (raindrops, snowflakes, etc).

class

A collection of arbitrary objects which can be allocated and manipulated as a group.

class

Base projectile class. Uses the ProjectileData class for properties of individual projectiles.

class

Stores properties for an individual projectile type.

class

A simple proximity mine.

class

Stores common properties for a ProximityMine.

class

Creates a physics-based impulse effect from a defined central point and magnitude.

class

An example scene object which renders a mesh.

class

A datablock which defines performance and quality properties for dynamic reflections.

class

The abstract base for all render bins.

class

The render bin which performs a z+normals deferred used in Advanced Lighting.

class

Used to change the render target format when rendering in AL.

class

A render bin for the glow pass.

class

A render bin for batch rendering imposters.

class

An example scene object which renders a mesh.

class

A render bin for mesh rendering.

class

An example scene object which renders using a callback.

class

A render bin which uses object callbacks for rendering.

class

A render bin which renders occlusion query requests.

class

A render bin which renders particle geometry.

class

A grouping of render bin managers which forms a render pass.

class

A non-rendering render bin used to enable/disable a RenderPassStateToken.

class

Abstract base class for RenderFormatToken, used to manipulate what goes on in the render manager.

class

A render bin which uses object callbacks for rendering.

class

An example scene object which renders a DTS.

class

A render bin for terrain mesh rendering.

class

An abstract base class for render bin managers that render to a named textue target.

class

A render bin for rendering translucent meshes.

class
class

Contains additional data to be associated with a RibbonNode.

class

The RigidShape class implements rigid-body physics for DTS objects in the world.

class

Defines the physics properties for an individual RigidShapeData physics object.

class

A water volume defined by a 3D spline.

class

Derived from FileDialog, this class is responsible for opening a file browser with the intention of saving a file.

class

Represents both the sun and sky for scenes with a dynamic time of day.

class
class

A networkable object that exists in the 3D world.

class

Essentially a SimGroup, but with onAdd and onRemove script callbacks.

class

Script accessible version of Dispatcher::IMessageListener. Often used in conjunction with EventManager.

class

A script-level OOP object which allows binding of a class, superClass and arguments along with declaration of methods.

class

A ScriptObject that responds to tick and frame events.

class

A datablock that describes an ambient sound space.

class

A sound source that drives multi-source playback.

class

A description for how a sound should be played.

class

An invisible 3D object that emits sound.

class

Description of a reverb environment.

class

A sound channel value that can be bound to multiple sound sources.

class

A datablock describing a playback pattern of sounds.

class

Encapsulates a single sound file for playback by the sound system.

class

A sound controller that directly plays a single sound file.

class

Playback controller for a sound source.

class

A volume in space that defines an ambient sound zone.

class

A boolean switch used to modify playlist behavior.

class

Abstract base class for sound data that can be played back by the sound system.

class

Allows legacy sgLightObjectData datablocks to appear in scripts.

class

Special type of data block that stores information about a handwritten shader.

class

Defines properties for a ShapeBase object.

class

Represents geometry to be mounted to a ShapeBase object.

class

A collection of SimObjects that are owned by the group.

class

Base class for almost all objects involved in the simulation.

class

A very simple example of a network event.

class

A very simple example of a class derived from NetObject.

class

A collection of SimObjects.

class

File I/O object used for creating, reading, and writing XML documents.

class

Represents the sky with an artist-created cubemap.

class

An example scene object which renders a mesh.

class

This class is used for creating any type of game object, assigning it a class, datablock, and other properties when it is spawned.

class

An example scene object which renders a mesh.

class

Manages the ring used for a Splash effect.

class

Acts as the physical point in space in white a Splash is created from.

class

Lighting object which emits conical light in a direction.

class

The most basic 3D shape with a datablock available in Torque 3D.

class

The most basic ShapeBaseData derrived shape datablock available in Torque 3D.

class

Base class for working with streams.

class

A global light affecting your entire scene and optionally renders a corona effect.

class
class

Allows communications between the game and a server using TCP/IP protocols.

class

Represent a terrain object in a Torque 3D level.

class

The TerrainMaterial class orginizes the material settings for a single terrain material layer.

class

Definition of a named texture target playing a Theora video.

class

Environmental object that triggers a day/night cycle in level.

class

A Trigger is a volume of space that initiates script callbacks when objects pass through the Trigger.

class

Defines shared properties for Trigger objects.

class

Concrete implementation of ForestItemData which loads and renders dts format shapeFiles.

class

An object used to modify a DTS or COLLADA shape model after it has been loaded by Torque.

class

A static object derived from a 3D model file and placed within the game world.

class

Defines properties for a TurretShape object.

class
class

Base functionality shared by all Vehicles (FlyingVehicle, HoverVehicle, WheeledVehicle).

class

Base properties shared by all Vehicles (FlyingVehicle, HoverVehicle, WheeledVehicle).

class
class
class
class

Volumetric Fog Object class. Main class defining the Volumetric Fog objects in the scene. Used in conjunction with the VolumetricFogRTManager class which is responsible for the required rendertargets.

class

Creates and maintains one set of rendertargets to be used by every VolumetricFog object in the scene.

class
class
class

A block shaped water volume defined by a 3D scale and orientation.

class

Abstract base class for representing a body of water.

class

Represents a large body of water stretching to the horizon in all directions.

class

Special type of marker, distinguished by a name and team ID number.

class

A wheeled vehicle.

class

Defines the properties of a WheeledVehicle.

class

Defines the properties of a WheeledVehicle spring.

class

Defines the properties of a WheeledVehicle tire.

class

Provides access to a zip file.

class

An object that represents an interior space.

Namespaces:

namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace
namespace

Public Enumerations

enum
_TamlFormatMode {
  xml 
  binary 
}
enum
afxBillboard_BlendStyle {
  NORMAL 
  ADDITIVE 
  SUBTRACTIVE 
  PREMULTALPHA 
}

Possible blending types.

enum
afxParticleEmitterPath_OriginType {
  origin 
  point 
  vector 
  tangent 
}

Possible particle emitter path origin types.

enum
afxParticlePool_PoolType {
  normal 
  pass 
  twopass 
}

Possible particle pool types.

enum
afxPath3DLoopType {
  constant 
  cycle 
  oscillate 
}

Possible loop types for an afxPath.

enum

Possible phrase effect match types.

enum
afxPhraseEffect_PhraseType {
  triggered 
  continuous 
}

Possible phrase effect types.

enum
afxPhraseEffect_StateType {
  on 
  off 
  both 
}

Possible phrase effect state types.

enum
afxPlayerMovement_OpType {
  add 
  multiply 
  replace 
  mult 
}

Possible player movement operation types.

enum
afxProjectile_LaunchDirType {
  towardPos2Constraint 
  orientConstraint 
  launchDirField 
}

Possible projectile launch direction types.

enum
afxRPGMagicSpell_TargetType {
  nothing 
  self 
  friend 
  enemy 
  corpse 
  free 
}

Possible RPG spell target types.

enum
afxXM_BoxConformType {
  x 
  x 
  y 
  y 
  z 
  z 
  x 
  y 
  z 
}

Possible box conform alignment types.

enum
afxXM_WaveFormType {
  none 
  sine 
  square 
  triangle 
  sawtooth 
  noise 
  one 
}

Possible waveform types.

enum
afxXM_WaveOpType {
  add 
  multiply 
  replace 
  mult 
}

Possible wave operation types.

enum
afxXM_WaveParamType {
  none 
  pos 
  x 
  y 
  z 
  ori 
  pos2 
  x 
  y 
  z 
  scale 
  x 
  y 
  z 
  color 
  red 
  green 
  blue 
  alpha 
  vis 
  position 
  x 
  y 
  z 
  orientation 
  position2 
  x 
  y 
  z 
  r 
  g 
  b 
  a 
  visibility 
}

Possible wave parameter types.

enum
afxZodiac_BlendType {
  normal 
  additive 
  subtractive 
}

Possible zodiac blend types.

enum
afxZodiacPlane_BlendType {
  normal 
  additive 
  subtractive 
}

Possible zodiac blend types.

enum
afxZodiacPlane_FacingType {
  up 
  down 
  forward 
  backward 
  right 
  left 
  front 
  back 
}

Possible zodiac plane facing types.

enum
baseTexFormat {
  NONE 
  DDS 
  PNG 
}

Description.

enum
CameraMotionMode {
  Stationary 
  FreeRotate 
  Fly 
  OrbitObject 
  OrbitPoint 
  TrackObject 
  Overhead 
  EditOrbit 
}

Movement behavior type for Camera.

enum
CoverPointSize {
  Prone 
  Crouch 
  Stand 
}

The size of a cover point.

enum
GFXAdapterType {
  OpenGL 
  D3D11 
  NullDevice 
}

Back-end graphics API used by the GFX subsystem.

enum
GFXBlend {
  GFXBlendZero 
  GFXBlendOne 
  GFXBlendSrcColor 
  GFXBlendInvSrcColor 
  GFXBlendSrcAlpha 
  GFXBlendInvSrcAlpha 
  GFXBlendDestAlpha 
  GFXBlendInvDestAlpha 
  GFXBlendDestColor 
  GFXBlendInvDestColor 
  GFXBlendSrcAlphaSat 
}

The supported blend modes.

enum
GFXBlendOp {
  GFXBlendOpAdd 
  GFXBlendOpSubtract 
  GFXBlendOpRevSubtract 
  GFXBlendOpMin 
  GFXBlendOpMax 
}

The blend operators.

enum
GFXCmpFunc {
  GFXCmpNever 
  GFXCmpLess 
  GFXCmpEqual 
  GFXCmpLessEqual 
  GFXCmpGreater 
  GFXCmpNotEqual 
  GFXCmpGreaterEqual 
  GFXCmpAlways 
}

The supported comparison functions.

enum
GFXCullMode {
  GFXCullNone 
  GFXCullCW 
  GFXCullCCW 
}

The render cull modes.

enum
GFXFormat {
  GFXFormatR8G8B8 
  GFXFormatR8G8B8A8 
  GFXFormatR8G8B8A8_SRGB 
  GFXFormatR8G8B8X8 
  GFXFormatR32F 
  GFXFormatR5G6B5 
  GFXFormatR5G5B5A1 
  GFXFormatR5G5B5X1 
  GFXFormatA4L4 
  GFXFormatA8L8 
  GFXFormatA8 
  GFXFormatL8 
  GFXFormatBC1 
  GFXFormatBC2 
  GFXFormatBC3 
  GFXFormatBC4 
  GFXFormatBC5 
  GFXFormatD32 
  GFXFormatD24X8 
  GFXFormatD24S8 
  GFXFormatD24FS8 
  GFXFormatD16 
  GFXFormatR32G32B32A32F 
  GFXFormatR16G16B16A16F 
  GFXFormatL16 
  GFXFormatR16G16B16A16 
  GFXFormatR16G16 
  GFXFormatR16F 
  GFXFormatR16G16F 
  GFXFormatR10G10B10A2 
}

The texture formats.

enum
GFXStencilOp {
  GFXStencilOpKeep 
  GFXStencilOpZero 
  GFXStencilOpReplace 
  GFXStencilOpIncrSat 
  GFXStencilOpDecrSat 
  GFXStencilOpInvert 
  GFXStencilOpIncr 
  GFXStencilOpDecr 
}

The stencil operators.

enum
GFXTextureAddressMode {
  GFXAddressWrap 
  GFXAddressMirror 
  GFXAddressClamp 
  GFXAddressBorder 
  GFXAddressMirrorOnce 
}

The texture address modes.

enum
GFXTextureFilterType {
  GFXTextureFilterNone 
  GFXTextureFilterPoint 
  GFXTextureFilterLinear 
  GFXTextureFilterAnisotropic 
}

The texture filter types.

enum
GuiAlignmentType {
  Left 
  Center 
  Right 
  Top 
  Bottom 
}
enum
GuiAutoScrollDirection {
  Up 
  Down 
  Left 
  Right 
}

Direction in which to scroll the child control.

enum
GuiBitmapMode {
  Stretched 
  Centered 
}

Rendering behavior when placing bitmaps in controls.

enum
GuiButtonType {
  PushButton 
  ToggleButton 
  RadioButton 
}

Type of button control.

enum
GuiDockingType {
  None 
  Client 
  Top 
  Bottom 
  Left 
  Right 
}
enum
GuiFontCharset {
  ANSI 
  SYMBOL 
  SHIFTJIS 
  HANGEUL 
  HANGUL 
  GB2312 
  CHINESEBIG5 
  OEM 
  JOHAB 
  HEBREW 
  ARABIC 
  GREEK 
  TURKISH 
  VIETNAMESE 
  THAI 
  EASTEUROPE 
  RUSSIAN 
  MAC 
  BALTIC 
}
enum
GuiFrameState {
  alwaysOn 
  alwaysOff 
  dynamic 
}
enum
GuiGraphType {
  Bar 
  Filled 
  Point 
  PolyLine 
}

The charting style of a single plotting curve in a GuiGraphCtrl.

enum
GuiHorizontalSizing {
  right 
  width 
  left 
  center 
  relative 
  aspectLeft 
  aspectRight 
  aspectCenter 
  windowRelative 
}

Horizontal sizing behavior of a GuiControl.

enum

Determines how child controls are stacked horizontally.

enum
GuiIconButtonIconLocation {
  None 
  Left 
  Right 
  Center 
}
enum
GuiIconButtonTextLocation {
  None 
  Bottom 
  Right 
  Top 
  Left 
  Center 
}
enum
GuiScrollBarBehavior {
  alwaysOn 
  alwaysOff 
  dynamic 
}

Display behavior of a scroll bar. Determines when a scrollbar will be visible.

enum
GuiSeparatorType {
  Vertical 
  Horizontal 
}

GuiSeparatorCtrl orientations.

enum
GuiSplitFixedPanel {
  None 
  FirstPanel 
  SecondPanel 
}

Which side of the splitter to keep at a fixed size (if any).

enum
GuiSplitOrientation {
  Vertical 
  Horizontal 
}

Axis along which to divide the container's space.

enum
GuiStackingType {
  Vertical 
  Horizontal 
  Dynamic 
}

Stacking method used to position child controls.

enum
GuiTabPosition {
  Top 
  Bottom 
}

Where the control should put the tab headers for selecting individual pages.

enum
GuiTheoraTranscoder {
  Auto 
  Generic 
  SSE2420RGBA 
}

Routine to use for converting Theora's Y'CbCr pixel format to RGB color space.

enum
GuiTSRenderStyles {
  standard 
  side 
  separate 
}

Style of rendering for a GuiTSCtrl.

enum
GuiVerticalSizing {
  bottom 
  height 
  top 
  center 
  relative 
  aspectTop 
  aspectBottom 
  aspectCenter 
  windowRelative 
}

Vertical sizing behavior of a GuiControl.

enum
GuiVerticalStackingType {
  Bottom 
  Top 
}

Determines how child controls are stacked vertically.

enum
ImageAssetType {
  Albedo 
  Normal 
  ORMConfig 
  GUI 
  Roughness 
  AO 
  Metalness 
  Glow 
  Particle 
  Decal 
  Cubemap 
}

Type of mesh data available in a shape.

enum
ItemLightType {
  NoLight 
  ConstantLight 
  PulsingLight 
}

The type of light the Item has.

enum
LogLevel {
  normal 
  warning 
  error 
}

Priority levels for logging entries.

enum
MarkerKnotType {
  Normal 
  Only 
  Kink 
}

The type of knot that this marker will be.

enum
MarkerSmoothingType {
  Spline 
  Linear 
}

The type of smoothing this marker will have for pathed objects.

enum
MaterialAnimType {
  Scroll 
  Rotate 
  Wave 
  Scale 
  Sequence 
}

The type of animation effect to apply to this material.

enum
MaterialBlendOp {
  None 
  Mul 
  PreMul 
  Add 
  AddAlpha 
  Sub 
  LerpAlpha 
}

The type of graphical blending operation to apply to this material.

enum
MaterialWaveType {
  Sin 
  Triangle 
  Square 
}

When using the Wave material animation, one of these Wave Types will be used to determine the type of wave to display.

enum
MBButtons {
  Ok 
  OkCancel 
  RetryCancel 
  SaveDontSave 
  SaveDontSaveCancel 
}

Which buttons to display on a message box.

enum
MBIcons {
  Information 
  Warning 
  Stop 
  Question 
}

What icon to show on a message box.

enum
MBReturnVal {
  OK 
  Cancelled 
  Retry 
  DontSave 
}

Return value for messageBox() indicating which button was pressed by the user.

enum
NavMeshWaterMethod {
  Ignore 
  Solid 
  Impassable 
}

The method used to include water surfaces in the NavMesh.

enum
ParticleBlendStyle {
  NORMAL 
  ADDITIVE 
  SUBTRACTIVE 
  PREMULTALPHA 
}

The type of visual blending style to apply to the particles.

enum
PFXRenderTime {
  PFXBeforeBin 
  PFXAfterBin 
  PFXAfterDiffuse 
  PFXEndOfFrame 
  PFXTexGenOnDemand 
}

When to process this effect during the frame.

enum
PFXTargetClear {
  PFXTargetClear_None 
  PFXTargetClear_OnCreate 
  PFXTargetClear_OnDraw 
}

Describes when the target texture should be cleared.

enum
PFXTargetViewport {
  PFXTargetViewport_TargetSize 
  PFXTargetViewport_GFXViewport 
  PFXTargetViewport_NamedInTexture0 
}

Specifies how the viewport should be set up for a PostEffect's target.

enum
PhysicalZone_ForceType {
  vector 
  spherical 
  cylindrical 
  sphere 
  cylinder 
}

Possible physical zone force types.

enum
PhysicsSimType {
  ClientOnly 
  ServerOnly 
  ClientServer 
}

How to handle the physics simulation with the client's and server.

enum
PlayerPose {
  Stand 
  Sprint 
  Crouch 
  Prone 
  Swim 
}

The pose of the Player.

enum
ReflectionModeEnum {
  Reflections 
  Cubemap 
  Cubemap 
}

Type of mesh data available in a shape.

enum
ReflectProbeType {
  Sphere 
  Box 
}

Type of mesh data available in a shape.

enum
RenderTexTargetSize {
  windowsize 
  windowsizescaled 
  fixedsize 
}

What size to render the target texture. Sizes are based on the Window the render is occuring in.

enum
SDLJoystickType {
  Unknown 
  Controller 
  Wheel 
  Stick 
  Stick 
  Pad 
  Guitar 
  Kit 
  Pad 
  Throttle 
}

The type of device connected.

enum
SDLPowerEnum {
  Unknown 
  Empty 
  Low 
  Medium 
  Full 
  Wired 
  Max 
}

An enumeration of battery levels of a joystick.

enum
SFXChannel {
  Volume 
  Pitch 
  Priority 
  PositionX 
  PositionY 
  PositionZ 
  RotationX 
  RotationY 
  RotationZ 
  VelocityX 
  VelocityY 
  VelocityZ 
  ReferenceDistance 
  MaxDistance 
  ConeInsideAngle 
  ConeOutsideAngle 
  ConeOutsideVolume 
  Cursor 
  Status 
  User0 
  User1 
  User2 
  User3 
}

Channels are individual properties of sound sources that may be animated over time.

enum
SFXDistanceModel {
  Linear 
  Logarithmic 
  Exponential 
}

Type of volume distance attenuation curve.

enum
SFXPlayListLoopMode {
  All 
  Single 
}

Playlist behavior when description is set to loop.

enum
SFXPlayListRandomMode {
  NotRandom 
  StrictRandom 
  OrderedRandom 
}

Randomization pattern to apply to playlist slot playback order.

enum
SFXPlayListReplayMode {
  IgnorePlaying 
  RestartPlaying 
  KeepPlaying 
  StartNew 
  SkipIfPlaying 
}

Behavior when hitting the play stage of a slot that is still playing from a previous cycle.

enum
SFXPlayListStateMode {
  StopWhenDeactivated 
  PauseWhenDeactivated 
  IgnoreWhenDeactivated 
}

Reaction behavior when a state is changed incompatibly on a slot that has already started playing.

enum
SFXPlayListTransitionMode {
  None 
  Wait 
  WaitAll 
  Stop 
  StopAll 
}

Playlist behavior when transitioning in and out of invididual slots.

enum
SFXStatus {
  Playing 
  Stopped 
  Paused 
}

Playback status of sound source.

enum
ShadowFilterMode {
  None 
  SoftShadow 
  SoftShadowHighQuality 
}

The shadow filtering modes for Advanced Lighting shadows.

enum
ShadowType {
  Spot 
  PSSM 
  DualParaboloidSinglePass 
  DualParaboloid 
  CubeMap 
}
enum
ShapeBaseImageLightType {
  NoLight 
  ConstantLight 
  SpotLight 
  PulsingLight 
  WeaponFireLight 
}

The type of light to attach to this ShapeBaseImage.

enum
ShapeBaseImageLoadedState {
  Ignore 
  Loaded 
  Empty 
}

The loaded state of this ShapeBaseImage.

enum
ShapeBaseImageRecoilState {
  NoRecoil 
  LightRecoil 
  MediumRecoil 
  HeavyRecoil 
}

What kind of recoil this ShapeBaseImage should emit when fired.

enum
ShapeBaseImageSpinState {
  Ignore 
  Stop 
  SpinUp 
  SpinDown 
  FullSpeed 
}

How the spin animation should be played.

enum
TSMeshType {
  None 
  Bounds 
  Mesh 
  Mesh 
}

Type of mesh data available in a shape.

enum
TSShapeConstructorAnimType {
  Frames 
  Seconds 
  Milliseconds 
}
enum
TSShapeConstructorLodType {
  DetectDTS 
  SingleSize 
  TrailingNumber 
}
enum
TSShapeConstructorUpAxis {
  X_AXIS 
  Y_AXIS 
  Z_AXIS 
  DEFAULT 
}

Axis to use for upwards direction when importing from Collada.

enum
TurretShapeFireLinkType {
  FireTogether 
  GroupedFire 
  IndividualFire 
}

How the weapons are linked to triggers for this TurretShape.

enum
VActionToggle {
  ON 
  OFF 
}
enum
VDataTableDataType {
  EXPRESSION 
  STATIC 
  VARIABLE 
}
enum
VPathEditorMode {
  GIZMO 
  ADDNODE 
  DELETENODE 
}
enum
VPathNodeOrientationType {
  FREE 
  TOPOINT 
}
enum
VPathObjectOrientationType {
  FREE 
  INTERPOLATE 
  TOPATH 
  TOOBJECT 
  TOPOINT 
}
enum
VPathType {
  BEZIER 
  LINEAR 
}
enum
VScriptEventCommandType {
  EXPRESSION 
  METHOD 
}

Public Variables

bool

Force all work items to execute on main thread. turns this into a single-threaded system. Primarily useful to find whether malfunctions are caused by parallel execution or not.

float

The camera's Field of View.

int

Sets the number of frames to skip while rendering the scene.

string

The group that objects will be added to when they are created.

float

Backwards movement speed for the active player.

bool

Boolean state for it the system is using a keyboard and mouse or not.

float

Downwards movement speed for the active player.

float

Forwards movement speed for the active player.

bool

Boolean state for if freelook is active or not.

float

Left movement speed for the active player.

float

Current pitch value, typically applied through input devices, such as a mouse.

float

Downwards pitch speed.

float

Upwards pitch speed.

float

Right movement speed for the active player.

float

Current roll value, typically applied through input devices, such as a mouse.

float

Left roll speed.

float

Right roll speed.

int

Used to determine the trigger counts of buttons. Namely used for input actions such as jumping and weapons firing.

int

Used to determine the trigger counts of buttons. Namely used for input actions such as jumping and weapons firing.

int

Used to determine the trigger counts of buttons. Namely used for input actions such as jumping and weapons firing.

int

Used to determine the trigger counts of buttons. Namely used for input actions such as jumping and weapons firing.

int

Used to determine the trigger counts of buttons. Namely used for input actions such as jumping and weapons firing.

int

Used to determine the trigger counts of buttons. Namely used for input actions such as jumping and weapons firing.

float

Upwards movement speed for the active player.

float

Left thumbstick X axis position on a dual-analog gamepad.

float

Right thumbstick X axis position on a dual-analog gamepad.

float

Current yaw value, typically applied through input devices, such as a mouse.

float

Left Yaw speed.

float

Right Yaw speed.

float

Left thumbstick Y axis position on a dual-analog gamepad.

float

Right thumbstick Y axis position on a dual-analog gamepad.

The control for which a command is currently being evaluated. Only set during 'command' and altCommand callbacks to the control for which the command or altCommand is invoked.

int

The speed at which system processing time advances.

float

Animation time scale.

void

[string1, string2, ...]Adds case sensitive strings to the StringTable.

int

schedule(time, refobject|0, command, )

Public Functions

void

Activates DirectInput.

void
activatePackage(String packageName)

Activates an existing package.

bool
addBadWord(string badWord)

Add a string to the bad word filter.

void
addGlobalShaderMacro(string name, string value)

Adds a global shader macro which will be merged with the script defined macros on every shader. The macro will replace the value of an existing macro of the same name. For the new macro to take effect all the shaders in the system need to be reloaded.

void
addMaterialMapping(string texName, string matName)

Maps the given texture to the given material.

RotationF
AddRotation(RotationF a, RotationF b)

Adds two rotations together.

string
addTaggedString(string str)

Use the addTaggedString function to tag a new string and add it to the NetStringTable.

string
string
int
aiAddPlayer(string name, string ns)

'playerName'[, 'AIClassType'] );

int
aiConnect(... )

Creates a new AIConnection, and passes arguments to its onConnect script callback.

void
allowConnections(bool allow)

Sets whether or not the global NetInterface allows connections from remote hosts.

void
Assert(bool condition, string message)

Fatal Script Assertion.

void

Prints the scripting call stack to the console log.

void
beginSampling(string location, string backend)

Takes a string informing the backend where to store sample data and optionally a name of the specific logging backend to use. The default is the CSV backend. In most cases, the logging store will be a file name.

string
buildTaggedString(string format, ... )

Build a string using the specified tagged string format.

float
calcExplosionCoverage(Point3F pos, int id, uint covMask)

Calculates how much an explosion effects a specific object.

string
call(string functionName, string args...)

Apply the given arguments to the specified global function and return the result of the call.

void
cancel(int eventId)

cancel(eventId)

void
cancelAll(string objectId)

cancelAll(objectId): cancel pending events on the specified object. Events will be automatically cancelled if object is deleted.

int
castSpell(afxMagicSpellData datablock, ShapeBase caster, SceneObject target, SimObject extra)

Instantiates the magic spell defined by datablock and cast by caster.

void

Release the unused pooled textures in texture manager freeing up video memory.

void

Clears the flagged state on all allocated GFX resources. See flagCurrentGFXResources for usage details.

void

Closes the current network port.

void

Close our startup splash window.

void
cls()

Clears the console output.

string
collapseEscape(string text)

Replace all escape sequences in text with their respective character codes.

ColorI
ColorFloatToInt(LinearColorF color)

Convert from a float color to an integer color (0.0 - 1.0 to 0 to 255).

ColorI
ColorHEXToRGB(string hex)

Convert from a hex color value to an integer RGB (red, green, blue) color (00 - FF to 0 to 255).

ColorI
ColorHSBToRGB(Point3I hsb)

Convert from a HSB (hue, saturation, brightness) to an integer RGB (red, green, blue) color. HSB is also know as HSL or HSV as well, with the last letter standing for lightness or value.

LinearColorF
ColorIntToFloat(ColorI color)

Convert from a integer color to an float color (0 to 255 to 0.0 - 1.0).

string
ColorRGBToHEX(ColorI color)

Convert from a integer RGB (red, green, blue) color to hex color value (0 to 255 to 00 - FF).

string
ColorRGBToHSB(ColorI color)

Convert from a integer RGB (red, green, blue) color to HSB (hue, saturation, brightness). HSB is also know as HSL or HSV as well, with the last letter standing for lightness or value.

string
ColorScale(LinearColorF color, float scalar)

Returns color scaled by scalar (color*scalar).

void
commandToClient(NetConnection client, string func, ... )

Send a command from the server to the client.

void
commandToServer(string func, ... )

Send a command to the server.

bool
compile(string fileName, bool overrideNoDSO)

Compile a file to bytecode.

void
CompileLanguage(string inputFile, bool createMap)

Compiles a LSO language file. if createIndex is true, will also create languageMap.cs with the global variables for each string index. The input file must follow this example layout: TXT_HELLO_WORLD = Hello world in english!

bool
containerBoxEmpty(uint mask, Point3F center, float xRadius, float yRadius, float zRadius, bool useClientContainer)

See if any objects of the given types are present in box of given extent.

string
containerFindFirst(uint typeMask, Point3F origin, Point3F size)

Find objects matching the bitmask type within a box centered at point, with extents x, y, z.

string

Get more results from a previous call to containerFindFirst().

string
containerRayCast(Point3F start, Point3F end, uint mask, SceneObject pExempt, bool useClientContainer)

Cast a ray from start to end, checking for collision against items matching mask.

float
containerSearchCurrDist(bool useClientContainer)

Get distance of the center of the current item from the center of the current initContainerRadiusSearch.

float
containerSearchCurrRadiusDist(bool useClientContainer)

Get the distance of the closest point of the current item from the center of the current initContainerRadiusSearch.

containerSearchNext(bool useClientContainer)

Get next item from a search started with initContainerRadiusSearch() or initContainerTypeSearch().

bool
containsBadWords(string text)

Checks to see if text is a bad word.

int
countBits(int v)

Count the number of bits that are set in the given 32 bit integer.

bool
createPath(string path)

Create the given directory or the path leading to the given filename.

void

Disables DirectInput.

void
deactivatePackage(String packageName)

Deactivates a previously activated package.

void

Drops the engine into the native C++ debugger.

void

Dumps all current EngineObject instances to the console.

void
debugEnumInstances(string className, string functionName)

Call the given function for each instance of the given class.

void
debugv(string variableName)

Logs the value of the given variable to the console.

int
decalManagerAddDecal(Point3F position, Point3F normal, float rot, float scale, DecalData decalData, bool isImmortal)

Adds a new decal to the decal manager.

void

Removes all decals currently loaded in the decal manager.

bool

Returns whether the decal manager has unsaved modifications.

bool
decalManagerEditDecal(int decalID, Point3F pos, Point3F normal, float rotAroundNormal, float decalScale)

Edit specified decal of the decal manager.

bool
decalManagerLoad(string fileName)

Clears existing decals and replaces them with decals loaded from the specified file.

bool

Remove specified decal from the scene.

void
decalManagerSave(String decalSaveFile)

Saves the decals for the active mission in the entered filename.

void

Delete all the datablocks we've downloaded.

void
deleteVariables(string pattern)

Undefine all global variables matching the given name pattern.

void
describeGFXResources(string resourceTypes, string filePath, bool unflaggedOnly)

Dumps a description of GFX resources to a file or the console.

void
describeGFXStateBlocks(string filePath)

Dumps a description of all state blocks.

string
detag(string str)

Returns the string from a tag string.

bool
dispatchMessage(string queueName, string message, string data)

Dispatch a message to a queue.

bool
dispatchMessageObject(string queueName, string message)

Dispatch a message object to a queue.

bool
displaySplashWindow(string path)

Display a startup splash window suitable for showing while the engine still starts up.

void
DNetSetLogging(bool enabled)

Enables logging of the connection protocols.

void
dumpAlloc(int allocNum)

Dumps information about the given allocated memory block.

void
dumpConsoleClasses(bool dumpScript, bool dumpEngine)

Dumps all declared console classes to the console.

void
dumpConsoleFunctions(bool dumpScript, bool dumpEngine)

Dumps all declared console functions to the console.

bool
dumpEngineDocs(string outputFile)

Dumps the engine scripting documentation to the specified file overwriting any existing content.

void

Dumps to the console a full description of all cached fonts, along with info on the codepoints each contains.

void

Dumps a formatted list of currently allocated material instances to the console.

void
dumpMemSnapshot(string fileName)

Dumps a snapshot of current memory to a file.

void

Dumps network statistics for each class to the console.

void

Dump the current contents of the networked string table to the console.

void

Dumps all ProcessObjects in ServerProcessList and ClientProcessList to the console.

void

Creates a 64x64 normal map texture filled with noise. The texture is saved to randNormTex.png in the location of the game executable.

void

Dumps information about String memory usage.

void

Dumps a list of all active texture objects to the console.

void
dumpUnflaggedAllocs(string fileName)

Dumps all unflagged memory allocations.

void
duplicateCachedFont(string oldFontName, int oldFontSize, string newFontName)

Copy the specified old font to a new name. The new copy will not have a platform font backing it, and so will never have characters added to it. But this is useful for making copies of fonts to add postprocessing effects to via exportCachedFont.

void
echo(string message...)

Logs a message to the console.

string
echoThru(string passthru, string text...)

Like echo(), but first argument is returned.

void
enableSamples(string pattern, bool state)

Enable sampling for all keys that match the given name pattern. Slashes are treated as separators.

bool
endsWith(string str, string suffix, bool caseSensitive)

Test whether the given string ends with the given suffix.

void
error(string message...)

Logs an error message to the console.

string
errorThru(string passthru, string text...)

Like error(), but first argument is returned.

string
eval(string consoleString)

eval(consoleString)

bool
excludeOtherInstance(string appIdentifer)

Used to exclude/prevent all other instances using the same identifier specified.

bool
exec(string fileName, bool noCalls, bool journalScript)

Execute the given script file.

bool
execPrefs(string relativeFileName, bool noCalls, bool journalScript)

Manually execute a special script file that contains game or editor preferences.

string
expandEscape(string text)

Replace all characters in text that need to be escaped for the string to be a valid string literal with their respective escape sequences.

string
expandFilename(string filename)

Grabs the full path of a specified file.

string
expandOldFilename(string filename)

Retrofits a filepath that uses old Torque style.

void
export(string pattern, string filename, bool append)

Write out the definitions of all global variables matching the given name pattern.

void
exportCachedFont(string faceName, int fontSize, string fileName, int padding, int kerning)

Export specified font to the specified filename as a PNG. The image can then be processed in Photoshop or another tool and reimported using importCachedFont. Characters in the font are exported as one long strip.

Create a XML document containing a dump of the entire exported engine API.

int
extractDatablockCacheCRC(string fileName)
String
fileBase(string fileName)

Get the base of a file name (removes extension and path)

String
fileCreatedTime(string fileName)

Returns a platform specific formatted string with the creation time for the file.

bool
fileDelete(string path)

Delete a file from the hard drive.

String
fileExt(string fileName)

Get the extension of a file.

String
fileModifiedTime(string fileName)

Returns a platform specific formatted string with the last modified time for the file.

String
fileName(string fileName)

Get only the file name of a path and file name string (removes path)

String
filePath(string fileName)

Get the path of a file (removes name and extension)

int
fileSize(string fileName)

Determines the size of a file on disk.

string
filterString(string baseString, string replacementChars)

Replaces the characters in a string with designated text.

String
findFirstFile(string pattern, bool recurse)

Returns the first file in the directory system matching the given pattern.

String
findFirstFileMultiExpr(string pattern, bool recurse)

Returns the first file in the directory system matching the given patterns.

String
findNextFile(string pattern)

Returns the next file matching a search begun in findFirstFile().

String
findNextFileMultiExpr(string pattern)

Returns the next file matching a search begun in findFirstFileMultiExpr().

string
firstWord(string text)

Return the first word in text.

void

Flags all current memory allocations.

void

Flags all currently allocated GFX resources. Used for resource allocation and leak tracking by flagging current resources then dumping a list of unflagged resources at some later point in execution.

void

Releases all textures and resurrects the texture manager.

void

Dumps some useful statistics regarding free memory.

bool

Generate a TAML schema file of all engine types.

Torque::UUID

Generate a new universally unique identifier (UUID).

int

Returns the count of active DDSs files in memory.

string

Returns the active light manager name.

int

Get the version of the application build, as a string.

string

Get the version of the aplication build, as a human readable string.

Returns the best texture format for storage of HDR data for the active device.

String
getBitmapInfo(string filename)

Returns image info in the following format: width TAB height TAB bytesPerPixel TAB format. It will return an empty string if the file is not found.

Point3F
getBoxCenter(Box3F box)

Get the center point of an axis-aligned box.

string

Get the type of build, "Debug" or "Release".

string
getCategoryOfClass(string className)

Returns the category of the given class.

string
getColorFromHSV(float hue, float sat, float val, float alpha)

Coverts an HSV formatted color into an RBG color.

string

Get the time of compilation.

int

Gets the primary LangTable used by the game.

Returns the current ActionMap.

String

Return the current working directory.

string
getDescriptionOfClass(string className)

Returns the description string for the named class.

Point3F

Returns the width, height, and bitdepth of the screen/desktop.

String
getDirectoryList(string path, int depth)

Gathers a list of directories starting at the given path.

string

Get the string describing the active GFX device.

String

Returns a tab-seperated string of the detected devices across all adapters.

Get the string describing the active GFX device type.

string
getDSOPath(string scriptFileName)

Get the absolute path to the file in which the compiled code for the given script file will be stored.

string

Get the name of the engine product that this is running from, as a string.

int
getEventTimeLeft(int scheduleId)

getEventTimeLeft(scheduleId) Get the time left in ms until this event will trigger.

String

Gets the name of the game's executable.

string
getField(string text, int index)

Extract the field at the given index in the newline and/or tab separated list in text.

int
getFieldCount(string text)

Return the number of newline and/or tab separated fields in text.

string
getFields(string text, int startIndex, int endIndex)

Extract a range of fields from the given startIndex onwards thru endIndex.

int
getFileCount(string pattern, bool recurse)

Returns the number of files in the directory tree that match the given patterns.

int
getFileCountMultiExpr(string pattern, bool recurse)

Returns the number of files in the directory tree that match the given patterns.

int
getFileCRC(string fileName)

Provides the CRC checksum of the given file.

String
getFirstNumber(string str)

Get the first occuring number from str.

string

Returns a list of supported shape format extensions separated by tabs.Example output: *.dsq TAB *.dae TAB.

string

Returns a list of supported shape formats in filter form.

Point3F

Returns the current location of the free target.

string
getFunctionPackage(string funcName)

Provides the name of the package the function belongs to.

String

Returns a tab seperated list of light manager names.

string

Return the current local time as: weekday month day year hour min sec.

String

Get the absolute path to the directory that contains the main.cs script from which the engine was started.

void
getMaterialInstances(BaseMaterialDefinition target, GuiTreeViewCtrl tree)

Dumps a formatted list of currently allocated material instances to the console.

string
getMaterialMapping(string texName)

Returns the name of the material mapped to this texture.

float
getMax(float v1, float v2)

Calculate the greater of two specified numbers.

int

Get max number of allowable dynamic vertices in a single vertex buffer.

float
getMaxF(float a, float b)

Returns the greater of the two arguments.

string
getMethodPackage(string nameSpace, string method)

Provides the name of the package the method belongs to.

float
getMin(float v1, float v2)

Calculate the lesser of two specified numbers.

float
getMinF(float a, float b)

Returns the lesser of the two arguments.

int

Get the EventManager object for all NavMesh updates.

string

Returns a space delimited list of the active packages in stack order.

float

Returns the pixel shader version for the active device.

float
getRandom(int a, int b)

Returns a random number based on parameters passed in..

Point3F
getRandomDir(Point3F axis, float thetaMin, float thetaMax, float phiMin, float phiMax)

Get a random direction vector.

float
getRandomF(float a, float b)

Get a random float number between a and b.

int

Get the current seed used by the random number generator.

int

Return the current real time in milliseconds.

string
getRecord(string text, int index)

Extract the record at the given index in the newline-separated list in text.

int
getRecordCount(string text)

Return the number of newline-separated records in text.

string
getRecords(string text, int startIndex, int endIndex)

Extract a range of records from the given startIndex onwards thru endIndex.

int

Get the root Scene object that is loaded.

Point3F
getRotationDirection(RotationF rot)

Gets the direction from the rotation's angles.

VectorF
getRotationForwardVector(RotationF rot)

Get the forward vector of a rotation.

VectorF
getRotationRightVector(RotationF rot)

Gets the right vector of a rotation.

VectorF
getRotationUpVector(RotationF rot)

Gets the up vector of a rotation.

getScene(uint sceneId)

Get the root Scene object that is loaded.

int

Get the number of active Scene objects that are loaded.

int
getScheduleDuration(int scheduleId)

getScheduleDuration(scheduleId);

int

Sim time is time since the game started.

int

Gets a count of available stock colors.

LinearColorF
getStockColorF(string stockColorName)

Gets a floating-point-based stock color by name.

ColorI
getStockColorI(string stockColorName)

Gets a byte-based stock color by name.

string
getStockColorName(int stockColorIndex)

Gets the stock color name at the specified index.

string
getSubStr(string str, int start, int numChars)

Return a substring of str starting at start and continuing either through to the end of str (if numChars is -1) or for numChars characters (except if this would exceed the actual source string length).

string
getTag(string textTagString)

Extracts the tag from a tagged string.

string
getTaggedString(string tag)

Use the getTaggedString function to convert a tag to a string.

bool
getTerrainHeight(F32 x, F32 y)

Gets the terrain height at the specified position.

bool
getTerrainHeight(Point2I position)

Gets the terrain height at the specified position.

bool

Takes a world point and find the "highest" terrain underneath it.

bool

Takes a world point and find the "highest" terrain underneath it.

bool
getTerrainUnderWorldPoint(F32 x, F32 y, F32 z)

Takes a world point and find the "highest" terrain underneath it.

bool
getTerrainUnderWorldPoint(Point3F position)

Gets the terrain block that is located under the given world point.

String

Returns a list of texture profiles in the format: ProfileName TextureCount TextureMB.

int
getTimeSinceStart(int scheduleId)

getTimeSinceStart(scheduleId);

string
getToken(string text, string delimiters, int index)

Extract the substring at the given index in the delimiters separated list in text.

int
getTokenCount(string text, string delimiters)

Return the number of delimiters substrings in text.

string
getTokens(string text, string delimiters, int startIndex, int endIndex)

Extract a range of substrings separated by delimiters at the given startIndex onwards thru endIndex.

int
getTrailingNumber(string str)

Get the numeric suffix of the given input string.

string
getVariable(string varName)

Returns the value of the named variable or an empty string if not found.

int

Get the version of the engine build, as a string.

string

Get the version of the engine build, as a human readable string.

bool

Test whether Torque is running in web-deployment mode.

string
getWord(string text, int index)

Extract the word at the given index in the whitespace-separated list in text.

int
getWordCount(string text)

Return the number of whitespace-separated words in text.

string
getWords(string text, int startIndex, int endIndex)

Extract a range of words from the given startIndex onwards thru endIndex.

String

Reports the current directory.

void
gotoWebPage(string address)

Open the given URL or file in the user's web browser.

void
importCachedFont(string faceName, int fontSize, string fileName, int padding, int kerning)

Import an image strip from exportCachedFont. Call with the same parameters you called exportCachedFont.

void
initContainerRadiusSearch(Point3F pos, float radius, uint mask, bool useClientContainer)

Start a search for items at the given position and within the given radius, filtering by mask.

void
initContainerTypeSearch(uint mask, bool useClientContainer)

Start a search for all items of the types specified by the bitset mask.

RotationF
InterpolateRotation(RotationF a, RotationF b, float factor)

Interpolates between two rotations.

bool
isAddressTypeAvailable(int addressType)

Determines if a specified address type can be reached.

bool
isalnum(string str, int index)

Test whether the character at the given position is an alpha-numeric character.

bool
isClass(string identifier)

Returns true if the passed identifier is the name of a declared class.

bool

Test whether the engine has been compiled with TORQUE_DEBUG, i.e. if it includes debugging functionality.

bool
isDefined(string varName, string varValue)

Determines if a variable exists and contains a value.

bool
IsDirectory(string directory)

Determines if a specified directory exists or not.

bool
isEventPending(int scheduleId)

isEventPending(scheduleId);

bool
isFile(string fileName)

Determines if the specified file exists or not.

bool
isFloat(string str, bool sciOk)

Returns true if the string is a float.

bool
isFunction(string funcName)

Determines if a function exists or not.

bool
isInt(string str)

Returns true if the string is an integer.

bool
isMemberOfClass(string className, string superClassName)

Returns true if the class is derived from the super class.

bool
isMethod(string nameSpace, string method)

Determines if a class/namespace method exists.

bool
isObject(string objectName)

isObject(object)

bool
isPackage(String identifier)

Returns true if the identifier is the name of a declared package.

bool
isQueueRegistered(string queueName)

Determines if a dispatcher queue exists.

bool

Test whether the engine has been compiled with TORQUE_SHIPPING, i.e. in a form meant for final release.

bool
isspace(string str, int index)

Test whether the character at the given position is a whitespace character.

bool
isStockColor(string stockColorName)

Gets whether the specified name is a stock color or not.

bool
isSupportedFormat(string extension)
bool

Test whether the engine has been compiled with TORQUE_TOOLS, i.e. if it includes tool-related functionality.

bool
isValidIP(string str)

Returns true if the string is a valid ip address, excepts localhost.

bool
isValidObjectName(string name)

Return true if the given name makes for a valid object name.

bool
isValidPort(string str)

Returns true if the string is a valid port number.

bool
isWriteableFileName(string fileName)

Determines if a file name can be written to using File I/O.

bool
lightScene(string completeCallbackFn, string mode)

Will generate static lighting for the scene if supported by the active light manager.

void
listGFXResources(bool unflaggedOnly)

Returns a list of the unflagged GFX resources. See flagCurrentGFXResources for usage details.

loadObject(string filename)

Loads a serialized object from a file.

void
lockMouse(bool isLocked)

Lock or unlock the mouse to the window.

void
log(string message)

Logs a message to the console.

void
logError(string message)

Logs an error message to the console.

void
logWarning(string message)

Logs a warning message to the console.

string
ltrim(string str)

Remove leading whitespace from the string.

float
m2Pi()

Return the value of 2*PI (full-circle in radians).

float
mAbs(float v)

Calculate absolute value of specified value.

float
mAcos(float v)

Calculate the arc-cosine of v.

String
makeFullPath(string path, string cwd)

Converts a relative file path to a full path.

String
makeRelativePath(string path, string to)

Turns a full or local path to a relative one.

void

Called before a series of datablocks are reloaded to help distinguish reloaded datablocks from already loaded ones.

float
mAsin(float v)

Calculate the arc-sine of v.

float
mAtan(float rise, float run)

Calculate the arc-tangent (slope) of a line defined by rise and run.

string
materialRayCast(Point3F start, Point3F end, uint mask, SceneObject pExempt, bool useClientContainer)

Cast a ray from start to end, checking for collision against items matching mask.

void
mathInit(... )

Install the math library with specified extensions.

TransformF
MatrixCreate(VectorF position, AngAxisF orientation)

Create a transform from the given translation and orientation.

TransformF
MatrixCreateFromEuler(Point3F angles)

@Create a matrix from the given rotations.

Point3F
MatrixInverseMulVector(MatrixF xfrm, Point3F vector)

Multiply the vector by the affine inverse of the transform.

Point3F
MatrixMulPoint(TransformF transform, Point3F point)

Multiply the given point by the given transform assuming that w=1.

TransformF
MatrixMultiply(TransformF left, TransformF right)

Multiply the two matrices.

VectorF
MatrixMulVector(TransformF transform, VectorF vector)

Multiply the vector by the transform assuming that w=0.

int
mCeil(float v)

Round v up to the nearest integer.

float
mClamp(float v, float min, float max)

Clamp the specified value between two bounds.

float
mCos(float v)

Calculate the cosine of v.

float
mDegToRad(float degrees)

Convert specified degrees into radians.

int
messageBox(string title, string message, MBButtons buttons, MBIcons icons)

Display a modal message box using the platform's native message box implementation.

string
mFloatLength(float v, uint precision)

Formats the specified number to the given number of decimal places.

int
mFloor(float v)

Round v down to the nearest integer.

float
mFMod(float v, float d)

Calculate the remainder of v/d.

float
mGetAngleBetweenVectors(VectorF vecA, VectorF vecB)

Returns angle between two vectors.

float
mGetSignedAngleBetweenVectors(VectorF vecA, VectorF vecB, VectorF norm)

Returns signed angle between two vectors, using a normal for orientation.

bool
mIsPow2(int v)

Returns whether the value is an exact power of two.

float
mLerp(float v1, float v2, float time)

Calculate linearly interpolated value between two specified numbers using specified normalized time.

float
mLog(float v)

Calculate the natural logarithm of v.

String
monthNumToStr(int num, bool abbreviate)

returns month as a word given a number or "" if number is bad

MatrixF
moveTransformAbs(MatrixF xfrm, Point3F pos)

Move the transform to the new absolute position.

MatrixF
moveTransformRel(MatrixF xfrm, Point3F pos)

Move the transform to the new relative position.

float
mPi()

Return the value of PI (half-circle in radians).

float
mPow(float v, float p)

Calculate b raised to the p-th power.

float
mRadToDeg(float radians)

Convert specified radians into degrees.

Point3F
mRandomDir(Point3F axis, float angleMin, float angleMax)

Returns a randomized direction based on a starting axis and the min/max angles.

Point3F
mRandomPointInSphere(float radius)

Returns a randomized point inside a sphere of a given radius.

int
mRound(float v)

Round v to the nth decimal place or the nearest whole number by default.

float
mRoundColour(float v, int n)

Round v to the nth decimal place or the nearest whole number by default.

int
mRoundDelta(float v, int d)

Round v to the nearest number based on the delta.

float
mSaturate(float v)

Clamp the specified value between 0 and 1 (inclusive).

float
mSin(float v)

Calculate the sine of v.

string
mSolveCubic(float a, float b, float c, float d)

Solve a cubic equation (3rd degree polynomial) of form a*x^3 + b*x^2 + c*x + d = 0.

string
mSolveQuadratic(float a, float b, float c)

Solve a quadratic equation (2nd degree polynomial) of form a*x^2 + b*x + c = 0.

string
mSolveQuartic(float a, float b, float c, float d, float e)

Solve a quartic equation (4th degree polynomial) of form a*x^4 + b*x^3 + c*x^2 + d*x + e = 0.

float
mSqrt(float v)

Calculate the square-root of v.

float
mTan(float v)

Calculate the tangent of v.

int
mWrap(int v, int min, int max)

Wrap the specified value between two bounds.

float
mWrapF(float v, float min, float max)

Wrap the specified value between two bounds.

int
nameToID(string objectName)

nameToID(object)

void
NavMeshIgnore(int objid, bool _ignore)

Flag this object as not generating a navmesh result.

void
NavMeshUpdateAll(int objid, bool remove)

Update all NavMesh tiles that intersect the given object's world box.

void
NavMeshUpdateAroundObject(int objid, bool remove)

Update all NavMesh tiles that intersect the given object's world box.

void
NavMeshUpdateOne(int meshid, int objid, bool remove)

Update all tiles in a given NavMesh that intersect the given object's world box.

string
nextToken(string str1, string token, string delim)

Tokenize a string using a set of delimiting characters.

void
openFile(string file)

Open the given file through the system. This will usually open the file in its associated application.

void
openFolder(string path)

Open the given folder in the system's file manager.

String
pathConcat(string path, string file)

Combines two separate strings containing a file path and file name together into a single string.

bool
pathCopy(string fromFile, string toFile, bool noOverwrite)

Copy a file to a new location.

void

Load all Path information from the mission.

void
physicsDestroyWorld(string worldName)

physicsDestroyWorld( String worldName )

bool
physicsInit(string library)

physicsInit( [string library] )

bool
physicsInitWorld(string worldName)

physicsInitWorld( String worldName )

bool

Returns true if a physics plugin exists and is initialized.

void
physicsSetTimeScale(float scale)

physicsSetTimeScale( F32 scale )

bool

physicsStopSimulation( String worldName )

void
physicsStartSimulation(string worldName)

physicsStartSimulation( String worldName )

void
physicsStopSimulation(string worldName)

physicsStopSimulation( String worldName )

void
playJournal(string filename)

Begin playback of a journal from a specified field.

void
playJournalToVideo(string journalFile, string videoFile, string encoder, float framerate, Point2I resolution)

Load a journal file and capture it video.

void
populateAllFontCacheRange(uint rangeStart, uint rangeEnd)

Populate the font cache for all fonts with Unicode code points in the specified range.

void

Populate the font cache for all fonts with characters from the specified string.

void
populateFontCacheRange(string faceName, int fontSize, uint rangeStart, uint rangeEnd)

Populate the font cache for the specified font with Unicode code points in the specified range.

void
populateFontCacheString(string faceName, int fontSize, string string)

Populate the font cache for the specified font with characters from the specified string.

void

Preload all datablocks in client mode.

void

Dumps current profiling stats to the console window.

void
profilerDumpToFile(string fileName)

Dumps current profiling stats to a file.

void
profilerEnable(bool enable)

Enables or disables the profiler.

void
profilerMarkerEnable(string markerName, bool enable)

Enable or disable a specific profile.

void

Resets the profiler, clearing it of all its data.

void
queryAllServers(uint lanPort, uint flags, string gameType, string missionType, uint minPlayers, uint maxPlayers, uint maxBots, uint regionMask, uint maxPing, uint minCPU, uint filterFlags)

queryAllServers(...);

void
queryLanServers(uint lanPort, uint flags, string gameType, string missionType, uint minPlayers, uint maxPlayers, uint maxBots, uint regionMask, uint maxPing, uint minCPU, uint filterFlags)

queryLanServers(...);

void
queryMasterServer(uint flags, string gameType, string missionType, uint minPlayers, uint maxPlayers, uint maxBots, uint regionMask, uint maxPing, uint minCPU, uint filterFlags)

queryMasterServer(...);

void
querySingleServer(string addrText, U8 flags)

querySingleServer(address, flags);

void
quit()

Shut down the engine and exit its process.

void
quitWithErrorMessage(string message, int status)

Display an error message box showing the given message and then shut down the engine and exit its process.

void
quitWithStatus(int status)

Shut down the engine and exit its process.

void
bool
registerMessageListener(string queueName, string listenerName)

Registers an event message.

void
registerMessageQueue(string queueName)

Registeres a dispatcher queue.

void

Flushes all procedural shaders and re-initializes all active material instances.

void

Reload all the textures from disk.

string
removeField(string text, int index)

Remove the field in text at the given index.

void

Removes an existing global macro by name.

string
removeRecord(string text, int index)

Remove the record in text at the given index.

void

Remove a tagged string from the Net String Table.

string
removeToken(string text, string delimiters, int index)

Remove the substring in text separated by delimiters at the given index.

string
removeWord(string text, int index)

Remove the word in text at the given index.

void

Reset FPS stats (fps::)

void

forces the gbuffer to be reinitialized in cases of improper/lack of buffer clears.

void

Deactivates and then activates the currently active light manager.This causes most shaders to be regenerated and is often used when global rendering changes have occured.

string
restWords(string text)

Return all but the first word in text.

int
rolloverRayCast(Point3F start, Point3F end, uint mask)

Performs a raycast from points start to end and returns the ID of nearest intersecting object with a type found in the specified mask. Returns -1 if no object is found.

RotationF
RotationLookAt(Point3F origin, Point3F target, Point3F up)

Provides a rotation orientation to look at a target from a given position.

string
rtrim(string str)

Remove trailing whitespace from the string.

void
saveCompositeTexture(string pathR, string pathG, string pathB, string pathA, string inputKeyString, string saveAs)

File1,file2,file3,file4,[chanels for r g b and a locations],saveAs.

void
saveJournal(string filename)

Save the journal to the specified file.

bool
saveObject(SimObject object, string filename)

Serialize the object to a file.

void
void
sceneDumpZoneStates(bool updateFirst)

Dump the current zoning states of all zone spaces in the scene to the console.

sceneGetZoneOwner(uint zoneId)

Return the SceneObject that contains the given zone.

void
screenShot(string file, string format, uint tileCount, float tileOverlap)

Takes a screenshot with optional tiling to produce huge screenshots.

void
setCoreLangTable(string lgTable)

Sets the primary LangTable used by the game.

bool
setCurrentDirectory(string path)

Set the current working directory.

void
void
setDefaultFov(float defaultFOV)

Set the default FOV for a camera.

string
setField(string text, int index, string replacement)

Replace the field in text at the given index with replacement.

int
SetFogVolumeQuality(uint new_quality)

Resizes the rendertargets of the Volumetric Fog object. @params new_quality new quality for the rendertargets 1 = full size, 2 = halfsize, 3 = 1/3, 4 = 1/4 ...

void
setFov(float FOV)

Set the FOV of the camera.

bool
setLightManager(string name)

Finds and activates the named light manager.

void
setLogMode(int mode)

Determines how log files are written.

bool
setNetPort(int port, bool bind)

Set the network port for the game to use.

void
setPixelShaderVersion(float version)

Sets the pixel shader version for the active device. This can be used to force a lower pixel shader version than is supported by the device for testing or performance optimization.

void
setRandomSeed(int seed)

Set the current seed for the random number generator.

string
setRecord(string text, int index, string replacement)

Replace the record in text at the given index with replacement.

void

Set the reflection texture format.

RotationF
setRotationRightVector(RotationF rot, VectorF rightVec)

Sets the right vector of the rotation.

RotationF
setRotationUpVector(RotationF rot, VectorF upVec)

Sets the up vector of the rotation.

bool
setServerInfo(uint index)

setServerInfo(index);

bool
setShadowManager(string sShadowSystemName)

string sShadowSystemName

string
setShadowVizLight(string name)
string
setToken(string text, string delimiters, int index, string replacement)

Replace the substring in text separated by delimiters at the given index with replacement.

void
setVariable(string varName, string value)

Sets the value of the named variable.

string
setWord(string text, int index, string replacement)

Replace the word in text at the given index with replacement.

void
setZoomSpeed(int speed)

Set the zoom speed of the camera. This affects how quickly the camera changes from one field of view to another.

bool
sfxCreateDevice(string provider, string device, bool useHardware, int maxBuffers)

Try to create a new sound device using the given properties.

sfxCreateSource(SFXDescription description, string filename)

Create a temporary SFXProfile from the given description and filename and then create and return a new source that plays the profile.

sfxCreateSource(SFXDescription description, string filename, float x, float y, float z)

Create a temporary SFXProfile from the given description and filename and then create and return a new source that plays the profile. Position the sound source at the given coordinates (if it is a 3D sound).

Create a new source that plays the given track.

sfxCreateSource(SFXTrack track, float x, float y, float z)

Create a new source that plays the given track and position its 3D sounds source at the given coordinates (if it is a 3D sound).

void

Delete the currently active sound device and release all its resources.

void

Mark the given source for deletion as soon as it moves into stopped state.

void
sfxDumpSources(bool includeGroups)

Dump information about all current SFXSource instances to the console.

string
sfxDumpSourcesToString(bool includeGroups)

Dump information about all current SFXSource instances to a string.

string

Return a newline-separated list of all active states.

string

Get a list of all available sound devices.

string

Return information about the currently active sound device.

Get the falloff curve type currently being applied to 3D sounds.

float

Get the current global doppler effect setting.

float

Get the current global scale factor applied to volume attenuation of 3D sounds in the logarithmic model.

Start playback of the given source.

void

Create a new play-once source for the given track and start playback of the source.

void
sfxPlay(SFXTrack track, float x, float y, float z)

Create a new play-once source for the given track, position its 3D sound at the given coordinates (if the track's description is set up for 3D sound) and start playback of the source.

sfxPlayOnce(SFXDescription description, string filename)

Create a new temporary SFXProfile from the given description and filename, then create a play-once source for it and start playback.

sfxPlayOnce(SFXDescription description, string filename, float x, float y, float z, float fadeInTime)

Create a new temporary SFXProfile from the given description and filename, then create a play-once source for it and start playback. Position the source's 3D sound at the given coordinates (only if the description is set up for 3D sound).

Create a play-once source for the given track.

sfxPlayOnce(SFXTrack track, float x, float y, float z, float fadeInTime)

Create a play-once source for the given given track and position the source's 3D sound at the given coordinates only if the track's description is set up for 3D sound).

void

Set the falloff curve type to use for distance-based volume attenuation of 3D sounds.

void
sfxSetDopplerFactor(float value)

Set the global doppler effect scale factor.

void
sfxSetRolloffFactor(float value)

Set the global scale factor to apply to volume attenuation of 3D sounds in the logarithmic model.

void

Stop playback of the given source.

void

Stop playback of the given source (if it is not already stopped) and delete the source.

void
ShakeCamera(float duration, float falloff, VectorF amplitude, VectorF frequency)
int
sizeof(string objectOrClass)

Determines the memory consumption of a class or object.

void

Prevents mouse movement from being processed.

bool
spawnObject(class )

Global function used for spawning any type of object.

void

Activates the shape replicator.

int
startEffectron(afxEffectronData datablock, string constraintSource, string constraintName, SimObject extra)

Instantiates the effectron defined by datablock.

void

Start watching resources for file changes.

void

Activates the foliage replicator.

int

startPrecisionTimer() - Create and start a high resolution platform timer. Returns the timer id.

int
startSelectron(SceneObject selectedObj, unsigned int subcode, SimObject extra)

Instantiates a selectron.

bool
startsWith(string str, string prefix, bool caseSensitive)

Test whether the given string begins with the given prefix.

void
startVideoCapture(GuiCanvas canvas, string filename, string encoder, float framerate, Point2I resolution)

Begins a video capture session.

void

Stop watching resources for file changes.

int

stopPrecisionTimer( S32 id ) - Stop and destroy timer with the passed id. Returns the elapsed milliseconds.

void

Stops the rendering sampler.

void

Stops the video capture session.

int
strasc(string chr)

Return the integer character code value corresponding to the first character in the given string.

string
strchr(string str, string chr)

Find the first occurrence of the given character in str.

int
strchrpos(string str, string chr, int start)

Find the first occurrence of the given character in the given string.

int
strcmp(string str1, string str2)

Compares two strings using case-sensitive comparison.

string
strformat(string format, string value)

Format the given value as a string using printf-style formatting.

int
stricmp(string str1, string str2)

Compares two strings using case-insensitive comparison.

int
strinatcmp(string str1, string str2)

Compares two strings using "natural order" case-insensitive comparison.

string
stripChars(string str, string chars)

Remove all occurrences of characters contained in chars from str.

string
StripMLControlChars(string inString)

Strip TorqueML control characters from the specified string, returning a 'clean' version.

String
stripTrailingNumber(string str)

Strip a numeric suffix from the given string.

bool
strIsMatchExpr(string pattern, string str, bool caseSensitive)

Match a pattern against a string.

bool
strIsMatchMultipleExpr(string patterns, string str, bool caseSensitive)

Match a multiple patterns against a single string.

int
strlen(string str)

Get the length of the given string in bytes.

int
strlenskip(string str, string first, string last)

Calculate the length of a string in characters, skipping everything between and including first and last.

string
strlwr(string str)

Return an all lower-case version of the given string.

int
strnatcmp(string str1, string str2)

Compares two strings using "natural order" case-sensitive comparison.

int
strpos(string haystack, string needle, int offset)

Find the start of needle in haystack searching from left to right beginning at the given offset.

int
strposr(string haystack, string needle, int offset)

Find the start of needle in haystack searching from right to left beginning at the given offset.

string
strrchr(string str, string chr)

Find the last occurrence of the given character in str.

int
strrchrpos(string str, string chr, int start)

Find the last occurrence of the given character in the given string.

string
strrepeat(string str, int numTimes, string delimiter)

Return a string that repeats str numTimes number of times delimiting each occurrence with delimiter.

string
strreplace(string source, string from, string to)

Replace all occurrences of from in source with to.

int
strstr(string string, string substring)

Find the start of substring in the given string searching from left to right.

string

Parse a Toggle Case word into separate words.

string
strupr(string str)

Return an all upper-case version of the given string.

RotationF
SubtractRotation(RotationF a, RotationF b)

Subtracts two rotations.

string
TamlRead(string filename, string format)

Read an object from a file using Taml.

bool
TamlWrite(SimObject simObject, string filename, string format, bool compressed)

Writes an object to a file using Taml.

void
telnetSetParameters(int port, string consolePass, string listenPass, bool remoteEcho)

Initializes and open the telnet console.

void

Called after a series of datablocks are reloaded to trigger some important actions on the reloaded datablocks.

void
trace(bool enable)

Enable or disable tracing in the script code VM.

string
trim(string str)

Remove leading and trailing whitespace from the string.

void
unregisterMessageListener(string queueName, string listenerName)

Unregisters an event message.

void
unregisterMessageQueue(string queueName)

Unregisters a dispatcher queue.

void

Used to validate memory space for the game.

VectorF
VectorAdd(VectorF a, VectorF b)

Add two vectors.

VectorF
VectorCross(VectorF a, VectorF b)

Calculcate the cross product of two vectors.

float
VectorDist(VectorF a, VectorF b)

Compute the distance between two vectors.

VectorF
VectorDiv(VectorF a, VectorF b)

Divide two vectors.

float
VectorDot(VectorF a, VectorF b)

Compute the dot product of two vectors.

float
VectorLen(VectorF v)

Calculate the magnitude of the given vector.

VectorF
VectorLerp(VectorF a, VectorF b, float t)

Linearly interpolate between two vectors by t.

VectorF
VectorMidPoint(VectorF a, VectorF b)

Gets the midpoint between the two vectors.

VectorF
VectorMul(VectorF a, VectorF b)

Multiplies two vectors.

VectorF
VectorNormalize(VectorF v)

Brings a vector into its unit form, i.e. such that it has the magnitute 1.

MatrixF
VectorOrthoBasis(AngAxisF aa)

Create an orthogonal basis from the given vector.

VectorF
VectorReflect(VectorF vec, VectorF normal)

Compute the reflection of a vector based on a normal.

string
VectorRot(Point3F v, float angle)

rotate a vector in 2d

VectorF
VectorScale(VectorF a, float scalar)

Scales a vector by a scalar.

VectorF
VectorSub(VectorF a, VectorF b)

Subtract two vectors.

void
warn(string message...)

Logs a warning message to the console.

string
warnThru(string passthru, string text...)

Like warn(), but first argument is returned.

bool

Returns true if script compiler had a syntax error. Useful for detecting syntax errors after reloading a script.

String
weekdayNumToStr(int num, bool abbreviate)

returns weekday as a word given a number or "" if number is bad

void

Force all cached fonts to serialize themselves to the cache.

Detailed Description

Public Enumerations

_TamlFormatMode

Enumerator

xml
binary
afxBillboard_BlendStyle

Enumerator

NORMAL

...

No blending style.

ADDITIVE

...

Adds the color of the pixel to the frame buffer with full alpha for each pixel.

SUBTRACTIVE

...

Subtractive Blending. Reverses the color model, causing dark colors to have a stronger visual effect.

PREMULTALPHA

...

Color blends with the colors of the imagemap rather than the alpha.

Possible blending types.

afxParticleEmitterPath_OriginType

Enumerator

origin

...

point

...

vector

...

tangent

...

Possible particle emitter path origin types.

afxParticlePool_PoolType

Enumerator

normal

...

Lowest priority level, no highlighting.

pass

...

twopass

...

Possible particle pool types.

afxPath3DLoopType

Enumerator

constant

...

cycle

...

oscillate

...

Possible loop types for an afxPath.

afxPhraseEffect_MatchType

Enumerator

any

...

all

...

Possible phrase effect match types.

afxPhraseEffect_PhraseType

Enumerator

triggered

...

continuous

...

Possible phrase effect types.

afxPhraseEffect_StateType

Enumerator

on

...

off

...

both

...

Possible phrase effect state types.

afxPlayerMovement_OpType

Enumerator

add

...

multiply

...

replace

...

mult

...

Possible player movement operation types.

afxProjectile_LaunchDirType

Enumerator

towardPos2Constraint

...

orientConstraint

...

launchDirField

...

Possible projectile launch direction types.

afxRPGMagicSpell_TargetType

Enumerator

nothing

...

self

...

friend

...

enemy

...

corpse

...

free

...

Possible RPG spell target types.

afxXM_BoxConformType

Enumerator

x

...

x

...

y

...

y

...

z

...

z

...

x

...

y

...

z

...

Possible box conform alignment types.

afxXM_WaveFormType

Enumerator

none

...

sine

...

square

...

triangle

...

sawtooth

...

noise

...

one

...

Possible waveform types.

afxXM_WaveOpType

Enumerator

add

...

multiply

...

replace

...

mult

...

Possible wave operation types.

afxXM_WaveParamType

Enumerator

none

...

pos

...

x

...

y

...

z

...

ori

...

pos2

...

x

...

y

...

z

...

scale

...

x

...

y

...

z

...

color

...

red

...

green

...

blue

...

alpha

...

vis

...

position

...

x

...

y

...

z

...

orientation

...

position2

...

x

...

y

...

z

...

r

...

g

...

b

...

a

...

visibility

...

Possible wave parameter types.

afxZodiac_BlendType

Enumerator

normal

...

Lowest priority level, no highlighting.

additive

...

subtractive

...

Possible zodiac blend types.

afxZodiacPlane_BlendType

Enumerator

normal

...

Lowest priority level, no highlighting.

additive

...

subtractive

...

Possible zodiac blend types.

afxZodiacPlane_FacingType

Enumerator

up

...

down

...

forward

...

backward

...

right

...

left

...

front

...

back

...

Possible zodiac plane facing types.

baseTexFormat

Enumerator

NONE

No cached terrain.

DDS

Cache the terrain in a DDS format.

PNG

Cache the terrain in a PNG format.

Description.

?

CameraMotionMode

Enumerator

Stationary

Camera does not rotate or move.

FreeRotate

Camera may rotate but does not move.

Fly

Camera may rotate and move freely.

OrbitObject

Camera orbits about a given object. Damage flash and white out is determined by the object being orbited. See Camera::setOrbitMode() to set the orbit object and other parameters.

OrbitPoint

Camera orbits about a given point. See Camera::setOrbitMode() to set the orbit point and other parameters.

TrackObject

Camera always faces a given object. See Camera::setTrackObject() to set the object to track and a distance to remain from the object.

Overhead

Camera moves in the XY plane.

EditOrbit

Used by the World Editor to orbit about a point. When first activated, the camera is rotated to face the orbit point rather than move to it.

Movement behavior type for Camera.

CoverPointSize

Enumerator

Prone

Only provides cover when prone.

Prone pose.

Crouch

Only provides cover when crouching.

Crouch pose.

Stand

Provides cover when standing.

Standard movement pose.

The size of a cover point.

GFXAdapterType

Enumerator

OpenGL

OpenGL.

D3D11

Direct3D 11.

NullDevice

Null device for dedicated servers.

Back-end graphics API used by the GFX subsystem.

GFXBlend

Enumerator

GFXBlendZero

(0, 0, 0, 0)

GFXBlendOne

(1, 1, 1, 1)

GFXBlendSrcColor

(Rs, Gs, Bs, As)

GFXBlendInvSrcColor

(1 - Rs, 1 - Gs, 1 - Bs, 1 - As)

GFXBlendSrcAlpha

(As, As, As, As)

GFXBlendInvSrcAlpha

( 1 - As, 1 - As, 1 - As, 1 - As)

GFXBlendDestAlpha

(Ad Ad Ad Ad)

GFXBlendInvDestAlpha

(1 - Ad 1 - Ad 1 - Ad 1 - Ad)

GFXBlendDestColor

(Rd, Gd, Bd, Ad)

GFXBlendInvDestColor

(1 - Rd, 1 - Gd, 1 - Bd, 1 - Ad)

GFXBlendSrcAlphaSat

(f, f, f, 1) where f = min(As, 1 - Ad)

The supported blend modes.

GFXBlendOp

Enumerator

GFXBlendOpAdd
GFXBlendOpSubtract
GFXBlendOpRevSubtract
GFXBlendOpMin
GFXBlendOpMax

The blend operators.

GFXCmpFunc

Enumerator

GFXCmpNever
GFXCmpLess
GFXCmpEqual
GFXCmpLessEqual
GFXCmpGreater
GFXCmpNotEqual
GFXCmpGreaterEqual
GFXCmpAlways

The supported comparison functions.

GFXCullMode

Enumerator

GFXCullNone
GFXCullCW
GFXCullCCW

The render cull modes.

GFXFormat

Enumerator

GFXFormatR8G8B8
GFXFormatR8G8B8A8
GFXFormatR8G8B8A8_SRGB
GFXFormatR8G8B8X8
GFXFormatR32F
GFXFormatR5G6B5
GFXFormatR5G5B5A1
GFXFormatR5G5B5X1
GFXFormatA4L4
GFXFormatA8L8
GFXFormatA8
GFXFormatL8
GFXFormatBC1
GFXFormatBC2
GFXFormatBC3
GFXFormatBC4
GFXFormatBC5
GFXFormatD32
GFXFormatD24X8
GFXFormatD24S8
GFXFormatD24FS8
GFXFormatD16
GFXFormatR32G32B32A32F
GFXFormatR16G16B16A16F
GFXFormatL16
GFXFormatR16G16B16A16
GFXFormatR16G16
GFXFormatR16F
GFXFormatR16G16F
GFXFormatR10G10B10A2

The texture formats.

note:

Not all formats are supported on all platforms.

GFXStencilOp

Enumerator

GFXStencilOpKeep
GFXStencilOpZero
GFXStencilOpReplace
GFXStencilOpIncrSat
GFXStencilOpDecrSat
GFXStencilOpInvert
GFXStencilOpIncr
GFXStencilOpDecr

The stencil operators.

GFXTextureAddressMode

Enumerator

GFXAddressWrap
GFXAddressMirror
GFXAddressClamp
GFXAddressBorder
GFXAddressMirrorOnce

The texture address modes.

GFXTextureFilterType

Enumerator

GFXTextureFilterNone
GFXTextureFilterPoint
GFXTextureFilterLinear
GFXTextureFilterAnisotropic

The texture filter types.

GuiAlignmentType

Enumerator

Left

Child controls are positioned in order from right to left (right-most control is first)

Scroll from right towards left.

Center
Right

Child controls are positioned in order from left to right (left-most control is first)

Scroll from left towards right.

Top

Tab headers on top edge.

Child controls are positioned in order from bottom to top (bottom-most control is first)

Bottom

Tab headers on bottom edge.

Child controls are positioned in order from top to bottom (top-most control is first)

GuiAutoScrollDirection

Enumerator

Up

Scroll from bottom towards top.

Down

Scroll from top towards bottom.

Left

Child controls are positioned in order from right to left (right-most control is first)

Scroll from right towards left.

Right

Child controls are positioned in order from left to right (left-most control is first)

Scroll from left towards right.

Direction in which to scroll the child control.

GuiBitmapMode

Enumerator

Stretched

Stretch bitmap to fit control extents.

Centered

Center bitmap in control.

Rendering behavior when placing bitmaps in controls.

GuiButtonType

Enumerator

PushButton

A button that triggers an action when clicked.

ToggleButton

A button that is toggled between on and off state.

RadioButton

A button placed in groups for presenting choices.

Type of button control.

GuiDockingType

Enumerator

None

Simple point sampled filtering. This is the fastest and lowest quality mode.

No transition. Immediately move on to processing the slot or immediately move on to the next slot.

Allow both childs to resize (default).

Disable blending for this material.

No mesh data.

Client
Top

Tab headers on top edge.

Child controls are positioned in order from bottom to top (bottom-most control is first)

Bottom

Tab headers on bottom edge.

Child controls are positioned in order from top to bottom (top-most control is first)

Left

Child controls are positioned in order from right to left (right-most control is first)

Scroll from right towards left.

Right

Child controls are positioned in order from left to right (left-most control is first)

Scroll from left towards right.

GuiFontCharset

Enumerator

ANSI
SYMBOL
SHIFTJIS
HANGEUL
HANGUL
GB2312
CHINESEBIG5
OEM
JOHAB
HEBREW
ARABIC
GREEK
TURKISH
VIETNAMESE
THAI
EASTEUROPE
RUSSIAN
MAC
BALTIC
GuiFrameState

Enumerator

alwaysOn

Always visible.

alwaysOff

Never visible.

dynamic

Only visible when actually needed, i.e. when the child control(s) exceed the visible space on the given axis.

GuiGraphType

Enumerator

Bar

Plot the curve as a bar chart.

Filled

Plot a filled poly graph that connects the data points on the curve.

Point

Plot each data point on the curve as a single dot.

PolyLine

Plot straight lines through the data points of the curve.

The charting style of a single plotting curve in a GuiGraphCtrl.

GuiHorizontalSizing

Enumerator

right

...

width
left

...

center
relative
aspectLeft
aspectRight
aspectCenter
windowRelative

Horizontal sizing behavior of a GuiControl.

GuiHorizontalStackingType

Enumerator

Right

Child controls are positioned in order from left to right (left-most control is first)

Scroll from left towards right.

Left

Child controls are positioned in order from right to left (right-most control is first)

Scroll from right towards left.

Determines how child controls are stacked horizontally.

GuiIconButtonIconLocation

Enumerator

None

Simple point sampled filtering. This is the fastest and lowest quality mode.

No transition. Immediately move on to processing the slot or immediately move on to the next slot.

Allow both childs to resize (default).

Disable blending for this material.

No mesh data.

Left

Child controls are positioned in order from right to left (right-most control is first)

Scroll from right towards left.

Right

Child controls are positioned in order from left to right (left-most control is first)

Scroll from left towards right.

Center
GuiIconButtonTextLocation

Enumerator

None

Simple point sampled filtering. This is the fastest and lowest quality mode.

No transition. Immediately move on to processing the slot or immediately move on to the next slot.

Allow both childs to resize (default).

Disable blending for this material.

No mesh data.

Bottom

Tab headers on bottom edge.

Child controls are positioned in order from top to bottom (top-most control is first)

Right

Child controls are positioned in order from left to right (left-most control is first)

Scroll from left towards right.

Top

Tab headers on top edge.

Child controls are positioned in order from bottom to top (bottom-most control is first)

Left

Child controls are positioned in order from right to left (right-most control is first)

Scroll from right towards left.

Center
GuiScrollBarBehavior

Enumerator

alwaysOn

Always visible.

alwaysOff

Never visible.

dynamic

Only visible when actually needed, i.e. when the child control(s) exceed the visible space on the given axis.

Display behavior of a scroll bar. Determines when a scrollbar will be visible.

GuiSeparatorType

Enumerator

Vertical

Stack children vertically by setting their Y position.

Divide vertically placing one child left and one child right.

Horizontal

Stack children horizontall by setting their X position.

Divide horizontally placing one child on top and one child below.

GuiSeparatorCtrl orientations.

GuiSplitFixedPanel

Enumerator

None

Simple point sampled filtering. This is the fastest and lowest quality mode.

No transition. Immediately move on to processing the slot or immediately move on to the next slot.

Allow both childs to resize (default).

Disable blending for this material.

No mesh data.

FirstPanel

Keep.

SecondPanel

Which side of the splitter to keep at a fixed size (if any).

GuiSplitOrientation

Enumerator

Vertical

Stack children vertically by setting their Y position.

Divide vertically placing one child left and one child right.

Horizontal

Stack children horizontall by setting their X position.

Divide horizontally placing one child on top and one child below.

Axis along which to divide the container's space.

GuiStackingType

Enumerator

Vertical

Stack children vertically by setting their Y position.

Divide vertically placing one child left and one child right.

Horizontal

Stack children horizontall by setting their X position.

Divide horizontally placing one child on top and one child below.

Dynamic

Automatically switch between Vertical and Horizontal stacking. Vertical stacking is chosen when the stack control is taller than it is wide, horizontal stacking is chosen when the stack control is wider than it is tall.

Stacking method used to position child controls.

GuiTabPosition

Enumerator

Top

Tab headers on top edge.

Child controls are positioned in order from bottom to top (bottom-most control is first)

Bottom

Tab headers on bottom edge.

Child controls are positioned in order from top to bottom (top-most control is first)

Where the control should put the tab headers for selecting individual pages.

GuiTheoraTranscoder

Enumerator

Auto

Automatically detect most appropriate setting.

Generic

Slower but beneric transcoder that can convert all Y'CbCr input formats to RGB or RGBA output.

SSE2420RGBA

Fast SSE2-based transcoder with fixed conversion from 4:2:0 Y'CbCr to RGBA.

Routine to use for converting Theora's Y'CbCr pixel format to RGB color space.

GuiTSRenderStyles

Enumerator

standard
side
separate

Style of rendering for a GuiTSCtrl.

GuiVerticalSizing

Enumerator

bottom
height
top
center
relative
aspectTop
aspectBottom
aspectCenter
windowRelative

Vertical sizing behavior of a GuiControl.

GuiVerticalStackingType

Enumerator

Bottom

Tab headers on bottom edge.

Child controls are positioned in order from top to bottom (top-most control is first)

Top

Tab headers on top edge.

Child controls are positioned in order from bottom to top (bottom-most control is first)

Determines how child controls are stacked vertically.

ImageAssetType

Enumerator

Albedo
Normal

Knot will have a smooth camera translation/rotation effect.

ORMConfig
GUI
Roughness
AO
Metalness
Glow
Particle
Decal
Cubemap

Uses a static CubemapData.

Uses a cubemap baked from the probe's current position.

Type of mesh data available in a shape.

ItemLightType

Enumerator

NoLight

No light is attached.

The item has no light attached.

ConstantLight

A constant emitting light is attached.

The item has a constantly emitting light attached.

PulsingLight

A pusling light is attached.

The item has a pulsing light attached.

The type of light the Item has.

LogLevel

Enumerator

normal

...

Lowest priority level, no highlighting.

warning

Mid level priority, tags and highlights possible issues in blue.

error

Highest priority level, extreme emphasis on this entry. Highlighted in red.

Priority levels for logging entries.

MarkerKnotType

Enumerator

Normal

Knot will have a smooth camera translation/rotation effect.

Only

Will do the same for translations, leaving rotation un-touched.

Kink

The rotation will take effect immediately for an abrupt rotation change.

The type of knot that this marker will be.

MarkerSmoothingType

Enumerator

Spline

Marker will cause the movements of the pathed object to be smooth.

Linear

Marker will have no smoothing effect.

Volume attenuates linearly from the references distance onwards to max distance where it reaches zero.

The type of smoothing this marker will have for pathed objects.

MaterialAnimType

Enumerator

Scroll

Scroll the material along the X/Y axis.

Rotate

Rotate the material around a point.

Wave

Warps the material with an animation using Sin, Triangle or Square mathematics.

Scale

Scales the material larger and smaller with a pulsing effect.

Sequence

Enables the material to have multiple frames of animation in its imagemap.

The type of animation effect to apply to this material.

MaterialBlendOp

Enumerator

None

Simple point sampled filtering. This is the fastest and lowest quality mode.

No transition. Immediately move on to processing the slot or immediately move on to the next slot.

Allow both childs to resize (default).

Disable blending for this material.

No mesh data.

Mul

Multiplicative blending.

PreMul

Premultiplied alpha.

Add

Adds the color of the material to the frame buffer with full alpha for each pixel.

AddAlpha

The color is modulated by the alpha channel before being added to the frame buffer.

Sub

Subtractive Blending. Reverses the color model, causing dark colors to have a stronger visual effect.

LerpAlpha

Linearly interpolates between Material color and frame buffer color based on alpha.

The type of graphical blending operation to apply to this material.

MaterialWaveType

Enumerator

Sin

Warps the material along a curved Sin Wave.

Triangle

Warps the material along a sharp Triangle Wave.

Square

Warps the material along a wave which transitions between two oppposite states. As a Square Wave, the transition is quick and sudden.

When using the Wave material animation, one of these Wave Types will be used to determine the type of wave to display.

MBButtons

Enumerator

Ok
OkCancel
RetryCancel
SaveDontSave
SaveDontSaveCancel

Which buttons to display on a message box.

MBIcons

Enumerator

Information
Warning
Stop

Stops the spin sequence at its current position.

Stop the sound source spawned last by this playlist. Then proceed.

Question

What icon to show on a message box.

MBReturnVal

Enumerator

OK
Cancelled
Retry
DontSave

Return value for messageBox() indicating which button was pressed by the user.

NavMeshWaterMethod

Enumerator

Ignore

Ignore all water surfaces.

Ignore the loaded state.

No changes to the spin sequence.

Solid

Treat water surfaces as solid and walkable.

Impassable

Treat water as an impassable obstacle.

The method used to include water surfaces in the NavMesh.

ParticleBlendStyle

Enumerator

NORMAL

...

No blending style.

ADDITIVE

...

Adds the color of the pixel to the frame buffer with full alpha for each pixel.

SUBTRACTIVE

...

Subtractive Blending. Reverses the color model, causing dark colors to have a stronger visual effect.

PREMULTALPHA

...

Color blends with the colors of the imagemap rather than the alpha.

The type of visual blending style to apply to the particles.

PFXRenderTime

Enumerator

PFXBeforeBin

Before a RenderInstManager bin.

PFXAfterBin

After a RenderInstManager bin.

PFXAfterDiffuse

After the diffuse rendering pass.

PFXEndOfFrame

When the end of the frame is reached.

PFXTexGenOnDemand

This PostEffect is not processed by the manager. It will generate its texture when it is requested.

When to process this effect during the frame.

PFXTargetClear

Enumerator

PFXTargetClear_None

Never clear the PostEffect target.

PFXTargetClear_OnCreate

Clear once on create.

PFXTargetClear_OnDraw

Clear before every draw.

Describes when the target texture should be cleared.

PFXTargetViewport

Enumerator

PFXTargetViewport_TargetSize

Set viewport to match target size (default).

PFXTargetViewport_GFXViewport

Use the current GFX viewport (scaled to match target size).

PFXTargetViewport_NamedInTexture0

Use the input texture 0 if it is named (scaled to match target size), otherwise revert to PFXTargetViewport_TargetSize if there is none.

Specifies how the viewport should be set up for a PostEffect's target.

note:

Applies to both the diffuse target and the depth target (if defined).

PhysicalZone_ForceType

Enumerator

vector

...

spherical

...

cylindrical

...

sphere

...

cylinder

...

Possible physical zone force types.

PhysicsSimType

Enumerator

ClientOnly

Only handle physics on the client.

ServerOnly

Only handle physics on the server.

ClientServer

Handle physics on both the client and server.

How to handle the physics simulation with the client's and server.

PlayerPose

Enumerator

Stand

Provides cover when standing.

Standard movement pose.

Sprint

Sprinting pose.

Crouch

Only provides cover when crouching.

Crouch pose.

Prone

Only provides cover when prone.

Prone pose.

Swim

Swimming pose.

The pose of the Player.

ReflectionModeEnum

Enumerator

Reflections

This probe does not provide any local reflection data.

Cubemap

Uses a static CubemapData.

Uses a cubemap baked from the probe's current position.

Cubemap

Uses a static CubemapData.

Uses a cubemap baked from the probe's current position.

Type of mesh data available in a shape.

ReflectProbeType

Enumerator

Sphere

Sphere shaped.

Box

Box shape.

Type of mesh data available in a shape.

RenderTexTargetSize

Enumerator

windowsize

Render to the size of the window.

windowsizescaled

Render to the size of the window, scaled to the render target's size.

fixedsize

Don't scale the target texture, and render to its default size.

What size to render the target texture. Sizes are based on the Window the render is occuring in.

SDLJoystickType

Enumerator

Unknown
Controller
Wheel
Stick
Stick
Pad
Guitar
Kit
Pad
Throttle

The type of device connected.

SDLPowerEnum

Enumerator

Unknown
Empty

ShapeBaseImage is not loaded.

Low
Medium
Full
Wired
Max

An enumeration of battery levels of a joystick.

SFXChannel

Enumerator

Volume

Channel controls volume level of attached sound sources.

Pitch

Channel controls pitch of attached sound sources.

Priority

Channel controls virtualizaton priority level of attached sound sources.

PositionX

Channel controls X coordinate of 3D sound position of attached sources.

PositionY

Channel controls Y coordinate of 3D sound position of attached sources.

PositionZ

Channel controls Z coordinate of 3D sound position of attached sources.

RotationX

Channel controls X rotation (in degrees) of 3D sound orientation of attached sources.

RotationY

Channel controls Y rotation (in degrees) of 3D sound orientation of attached sources.

RotationZ

Channel controls Z rotation (in degrees) of 3D sound orientation of attached sources.

VelocityX

Channel controls X coordinate of 3D sound velocity vector of attached sources.

VelocityY

Channel controls Y coordinate of 3D sound velocity vector of attached sources.

VelocityZ

Channel controls Z coordinate of 3D sound velocity vector of attached sources.

ReferenceDistance

Channel controls reference distance of 3D sound of attached sources.

MaxDistance

Channel controls max volume attenuation distance of 3D sound of attached sources.

ConeInsideAngle

Channel controls angle (in degrees) of 3D sound inner volume cone of attached sources.

ConeOutsideAngle

Channel controls angle (in degrees) of 3D sound outer volume cone of attached sources.

ConeOutsideVolume

Channel controls volume outside of 3D sound outer cone of attached sources.

Cursor

Channel controls playback cursor of attached sound sources.

note:

Be aware that different types of sound sources interpret play cursor positions differently or do not actually have play cursors (these sources will ignore the channel).

Status

Channel controls playback status of attached sound sources.

The channel's value is rounded down to the nearest integer and interpreted in the following way:

  • 1: Play

  • 2: Stop

  • 3: Pause

User0

Channel available for custom use. By default ignored by sources.

note:

For FMOD Designer event sources (SFXFMODEventSource), this channel is used for event parameters defined in FMOD Designer and should not be used otherwise.

User1

Channel available for custom use. By default ignored by sources.

User2

Channel available for custom use. By default ignored by sources.

User3

Channel available for custom use. By default ignored by sources.

Channels are individual properties of sound sources that may be animated over time.

SFX_interactive

SFXDistanceModel

Enumerator

Linear

Marker will have no smoothing effect.

Volume attenuates linearly from the references distance onwards to max distance where it reaches zero.

Logarithmic

Volume attenuates logarithmically starting from the reference distance and halving every reference distance step from there on. Attenuation stops at max distance but volume won't reach zero.

Exponential

Volume attenuates exponentially starting from the reference distance and attenuating every reference distance step by the rolloff factor. Attenuation stops at max distance but volume won't reach zero.

Type of volume distance attenuation curve.

The distance model determines the falloff curve applied to the volume of 3D sounds over distance.

Volume Attenuation

SFX_3d

SFXPlayListLoopMode

Enumerator

All

Loop over all slots, i.e. jump from last to first slot after all slots have played.

Single

Loop infinitely over the current slot. Only useful in combination with either states or manual playlist control.

Playlist behavior when description is set to loop.

SFXPlayListRandomMode

Enumerator

NotRandom

Play slots in sequential order. No randomization.

StrictRandom

Play a strictly random selection of slots.

In this mode, a set of numSlotsToPlay random numbers between 0 and numSlotsToPlay-1 (inclusive), i.e. in the range of valid slot indices, is generated and playlist slots are played back in the order of this list. This allows the same slot to occur multiple times in a list and, consequentially, allows for other slots to not appear at all in a given slot ordering.

OrderedRandom

Play all slots in the list in a random order.

In this mode, the

numSlotsToPlay
slots from the list with valid tracks assigned are put into a random order and played. This guarantees that each slots is played exactly once albeit at a random position in the total ordering.

Randomization pattern to apply to playlist slot playback order.

SFXPlayListReplayMode

Enumerator

IgnorePlaying

Ignore any sources that may already be playing on the slot and just create a new source.

RestartPlaying

Restart all sources that was last created for the slot.

KeepPlaying

Keep playing the current source(s) as if the source started last on the slot was created in this cycle. For this, the sources associated with the slot are brought to the top of the play stack.

StartNew

Stop all sources currently playing on the slot and then create a new source.

SkipIfPlaying

If there are sources already playing on the slot, skip the play stage.

Behavior when hitting the play stage of a slot that is still playing from a previous cycle.

SFXPlayListStateMode

Enumerator

StopWhenDeactivated

Stop the sources playing on the slot when a state changes to a setting that is incompatible with the slot's state setting.

PauseWhenDeactivated

Pause all sources playing on the slot when a state changes to a setting that is incompatible with the slot's state setting.

When the slot's state is reactivated again, the sources will resume playback.

IgnoreWhenDeactivated

Ignore when a state changes to a setting incompatible with the slot's state setting and just keep playing sources attached to the slot.

Reaction behavior when a state is changed incompatibly on a slot that has already started playing.

SFXPlayListTransitionMode

Enumerator

None

Simple point sampled filtering. This is the fastest and lowest quality mode.

No transition. Immediately move on to processing the slot or immediately move on to the next slot.

Allow both childs to resize (default).

Disable blending for this material.

No mesh data.

Wait

Wait for the sound source spawned last by this playlist to finish playing. Then proceed.

WaitAll

Wait for all sound sources currently spawned by the playlist to finish playing. Then proceed.

Stop

Stops the spin sequence at its current position.

Stop the sound source spawned last by this playlist. Then proceed.

StopAll

Stop all sound sources spawned by the playlist. Then proceed.

Playlist behavior when transitioning in and out of invididual slots.

Transition behaviors apply when the playback controller starts processing a playlist slot and when it ends processing a slot. Using transition behaviors, playback can be synchronized.

SFXStatus

Enumerator

Playing

The source is currently playing.

Stopped

Playback of the source is stopped. When transitioning to Playing state, playback will start at the beginning of the source.

Paused

Playback of the source is paused. Resuming playback will play from the current playback position.

Playback status of sound source.

ShadowFilterMode

Enumerator

None

Simple point sampled filtering. This is the fastest and lowest quality mode.

No transition. Immediately move on to processing the slot or immediately move on to the next slot.

Allow both childs to resize (default).

Disable blending for this material.

No mesh data.

SoftShadow

A variable tap rotated poisson disk soft shadow filter. It performs 4 taps to classify the point as in shadow, out of shadow, or along a shadow edge. Samples on the edge get an additional 8 taps to soften them.

SoftShadowHighQuality

A 12 tap rotated poisson disk soft shadow filter. It performs all the taps for every point without any early rejection.

The shadow filtering modes for Advanced Lighting shadows.

ShadowType

Enumerator

Spot
PSSM
DualParaboloidSinglePass
DualParaboloid
CubeMap
ShapeBaseImageLightType

Enumerator

NoLight

No light is attached.

The item has no light attached.

ConstantLight

A constant emitting light is attached.

The item has a constantly emitting light attached.

SpotLight

A spotlight is attached.

PulsingLight

A pusling light is attached.

The item has a pulsing light attached.

WeaponFireLight

Light emits when the weapon is fired, then dissipates.

The type of light to attach to this ShapeBaseImage.

ShapeBaseImageLoadedState

Enumerator

Ignore

Ignore all water surfaces.

Ignore the loaded state.

No changes to the spin sequence.

Loaded

ShapeBaseImage is loaded.

Empty

ShapeBaseImage is not loaded.

The loaded state of this ShapeBaseImage.

ShapeBaseImageRecoilState

Enumerator

NoRecoil

No recoil occurs.

LightRecoil

A light recoil occurs.

MediumRecoil

A medium recoil occurs.

HeavyRecoil

A heavy recoil occurs.

What kind of recoil this ShapeBaseImage should emit when fired.

ShapeBaseImageSpinState

Enumerator

Ignore

Ignore all water surfaces.

Ignore the loaded state.

No changes to the spin sequence.

Stop

Stops the spin sequence at its current position.

Stop the sound source spawned last by this playlist. Then proceed.

SpinUp

Increase spin sequence timeScale from 0 (on state entry) to 1 (after stateTimeoutValue seconds).

SpinDown

Decrease spin sequence timeScale from 1 (on state entry) to 0 (after stateTimeoutValue seconds).

FullSpeed

Resume the spin sequence playback at its current position with timeScale = 1.

How the spin animation should be played.

TSMeshType

Enumerator

None

Simple point sampled filtering. This is the fastest and lowest quality mode.

No transition. Immediately move on to processing the slot or immediately move on to the next slot.

Allow both childs to resize (default).

Disable blending for this material.

No mesh data.

Bounds

Bounding box of the shape.

Mesh

Specifically desingated "collision" meshes.

Rendered mesh polygons.

Mesh

Specifically desingated "collision" meshes.

Rendered mesh polygons.

Type of mesh data available in a shape.

TSShapeConstructorAnimType

Enumerator

Frames
Seconds
Milliseconds
TSShapeConstructorLodType

Enumerator

DetectDTS
SingleSize
TrailingNumber
TSShapeConstructorUpAxis

Enumerator

X_AXIS
Y_AXIS
Z_AXIS
DEFAULT

Axis to use for upwards direction when importing from Collada.

TurretShapeFireLinkType

Enumerator

FireTogether

All weapons fire under trigger 0.

GroupedFire

Weapon mounts 0,2 fire under trigger 0, mounts 1,3 fire under trigger 1.

IndividualFire

Each weapon mount fires under its own trigger 0-3.

How the weapons are linked to triggers for this TurretShape.

VActionToggle

Enumerator

ON
OFF
VDataTableDataType

Enumerator

EXPRESSION
STATIC
VARIABLE
VPathEditorMode

Enumerator

GIZMO
ADDNODE
DELETENODE
VPathNodeOrientationType

Enumerator

FREE
TOPOINT
VPathObjectOrientationType

Enumerator

FREE
INTERPOLATE
TOPATH
TOOBJECT
TOPOINT
VPathType

Enumerator

BEZIER
LINEAR
VScriptEventCommandType

Enumerator

EXPRESSION
METHOD

Public Variables

bool $_forceAllMainThread 

Force all work items to execute on main thread. turns this into a single-threaded system. Primarily useful to find whether malfunctions are caused by parallel execution or not.

float $cameraFov 

The camera's Field of View.

int $frameSkip 

Sets the number of frames to skip while rendering the scene.

string $instantGroup 

The group that objects will be added to when they are created.

float $mvBackwardAction 

Backwards movement speed for the active player.

bool $mvDeviceIsKeyboardMouse 

Boolean state for it the system is using a keyboard and mouse or not.

float $mvDownAction 

Downwards movement speed for the active player.

float $mvForwardAction 

Forwards movement speed for the active player.

bool $mvFreeLook 

Boolean state for if freelook is active or not.

float $mvLeftAction 

Left movement speed for the active player.

float $mvPitch 

Current pitch value, typically applied through input devices, such as a mouse.

float $mvPitchDownSpeed 

Downwards pitch speed.

float $mvPitchUpSpeed 

Upwards pitch speed.

float $mvRightAction 

Right movement speed for the active player.

float $mvRoll 

Current roll value, typically applied through input devices, such as a mouse.

float $mvRollLeftSpeed 

Left roll speed.

float $mvRollRightSpeed 

Right roll speed.

int $mvTriggerCount0 

Used to determine the trigger counts of buttons. Namely used for input actions such as jumping and weapons firing.

int $mvTriggerCount1 

Used to determine the trigger counts of buttons. Namely used for input actions such as jumping and weapons firing.

int $mvTriggerCount2 

Used to determine the trigger counts of buttons. Namely used for input actions such as jumping and weapons firing.

int $mvTriggerCount3 

Used to determine the trigger counts of buttons. Namely used for input actions such as jumping and weapons firing.

int $mvTriggerCount4 

Used to determine the trigger counts of buttons. Namely used for input actions such as jumping and weapons firing.

int $mvTriggerCount5 

Used to determine the trigger counts of buttons. Namely used for input actions such as jumping and weapons firing.

float $mvUpAction 

Upwards movement speed for the active player.

float $mvXAxis_L 

Left thumbstick X axis position on a dual-analog gamepad.

float $mvXAxis_R 

Right thumbstick X axis position on a dual-analog gamepad.

float $mvYaw 

Current yaw value, typically applied through input devices, such as a mouse.

float $mvYawLeftSpeed 

Left Yaw speed.

float $mvYawRightSpeed 

Right Yaw speed.

float $mvYAxis_L 

Left thumbstick Y axis position on a dual-analog gamepad.

float $mvYAxis_R 

Right thumbstick Y axis position on a dual-analog gamepad.

GuiControl $ThisControl 

The control for which a command is currently being evaluated. Only set during 'command' and altCommand callbacks to the control for which the command or altCommand is invoked.

int $timeAdvance 

The speed at which system processing time advances.

float $timeScale 

Animation time scale.

void addCaseSensitiveStrings 

[string1, string2, ...]Adds case sensitive strings to the StringTable.

void restartInstance 

restartInstance()

int schedule 

schedule(time, refobject|0, command, )

Public Functions

activateDirectInput()

Activates DirectInput.

Also activates any connected joysticks.

activatePackage(String packageName)

Activates an existing package.

The activation occurs by updating the namespace linkage of existing functions and methods. If the package is already activated the function does nothing.

addBadWord(string badWord)

Add a string to the bad word filter.

The bad word filter is a table containing words which will not be displayed in chat windows. Instead, a designated replacement string will be displayed. There are already a number of bad words automatically defined.

Parameters:

badWord

Exact text of the word to restrict.

return:

True if word was successfully added, false if the word or a subset of it already exists in the table

// In this game, "Foobar" is banned
%badWord = "Foobar";

// Returns true, word was successfully added
addBadWord(%badWord);

// Returns false, word has already been added
addBadWord("Foobar");

addGlobalShaderMacro(string name, string value)

Adds a global shader macro which will be merged with the script defined macros on every shader. The macro will replace the value of an existing macro of the same name. For the new macro to take effect all the shaders in the system need to be reloaded.

addMaterialMapping(string texName, string matName)

Maps the given texture to the given material.

Generates a console warning before overwriting.

Material maps are used by terrain and interiors for triggering effects when an object moves onto a terrain block or interior surface using the associated texture.

AddRotation(RotationF a, RotationF b)

Adds two rotations together.

Parameters:

a

Rotation one.

b

Rotation two.

return:

v sum of both rotations.

addTaggedString(string str)

Use the addTaggedString function to tag a new string and add it to the NetStringTable.

Parameters:

str

The string to be tagged and placed in the NetStringTable. Tagging ignores case, so tagging the same string (excluding case differences) will be ignored as a duplicated tag.

return:

Returns a string( containing a numeric value) equivalent to the string ID for the newly tagged string

see:

syntaxDataTypes under Tagged Strings

afxEndMissionNotify()

...

afxGetEngine()

...

afxGetVersion()

...

aiAddPlayer(string name, string ns)

'playerName'[, 'AIClassType'] );

aiConnect(... )

Creates a new AIConnection, and passes arguments to its onConnect script callback.

return:

The newly created AIConnection

see:

GameConnection for parameter information

allowConnections(bool allow)

Sets whether or not the global NetInterface allows connections from remote hosts.

allowConnections(bool allow)

Parameters:

allow

Set to true to allow remote connections.

Assert(bool condition, string message)

Fatal Script Assertion.

backtrace()

Prints the scripting call stack to the console log.

Used to trace functions called from within functions. Can help discover what functions were called (and not yet exited) before the current point in scripts.

beginSampling(string location, string backend)

Takes a string informing the backend where to store sample data and optionally a name of the specific logging backend to use. The default is the CSV backend. In most cases, the logging store will be a file name.

beginSampling( "mysamples.csv" );

buildTaggedString(string format, ... )

Build a string using the specified tagged string format.

This function takes an already tagged string (passed in as a tagged string ID) and one or more additional strings. If the tagged string contains argument tags that range from %%1 through %%9, then each additional string will be substituted into the tagged string. The final (non-tagged) combined string will be returned. The maximum length of the tagged string plus any inserted additional strings is 511 characters.

Parameters:

format

A tagged string ID that contains zero or more argument tags, in the form of %%1 through %%9.

...

A variable number of arguments that are insterted into the tagged string based on the argument tags within the format string.

return:

An ordinary string that is a combination of the original tagged string with any additional strings passed in inserted in place of each argument tag.

// Create a tagged string with argument tags
%taggedStringID = addTaggedString("Welcome %1 to the game!");

// Some point later, combine the tagged string with some other string
%string = buildTaggedString(%taggedStringID, %playerName);
echo(%string);

see:

syntaxDataTypes under Tagged Strings

calcExplosionCoverage(Point3F pos, int id, uint covMask)

Calculates how much an explosion effects a specific object.

Use this to determine how much damage to apply to objects based on their distance from the explosion's center point, and whether the explosion is blocked by other objects.

Parameters:

pos

Center position of the explosion.

id

Id of the object of which to check coverage.

covMask

Mask of object types that may block the explosion.

return:

Coverage value from 0 (not affected by the explosion) to 1 (fully affected)

// Get the position of the explosion.
%position = %explosion.getPosition();

// Set a list of TypeMasks (defined in gameFunctioncs.cpp), seperated by the | character.
%TypeMasks = $TypeMasks::StaticObjectType | $TypeMasks::ItemObjectType

// Acquire the damage value from 0.0f - 1.0f.
%coverage = calcExplosionCoverage( %position, %sceneObject, %TypeMasks );

// Apply damage to object
%sceneObject.applyDamage( %coverage * 20 );

call(string functionName, string args...)

Apply the given arguments to the specified global function and return the result of the call.

Parameters:

functionName

The name of the function to call. This function must be in the global namespace, i.e. you cannot call a function in a namespace through call. Use eval() for that.

return:

The result of the function call.

function myFunction( %arg )
{
  return ( %arg SPC "World!" );
}

echo( call( "myFunction", "Hello" ) ); // Prints "Hello World!" to the console.

cancel(int eventId)

cancel(eventId)

cancelAll(string objectId)

cancelAll(objectId): cancel pending events on the specified object. Events will be automatically cancelled if object is deleted.

cancelServerQuery()

cancelServerQuery();

castSpell(afxMagicSpellData datablock, ShapeBase caster, SceneObject target, SimObject extra)

Instantiates the magic spell defined by datablock and cast by caster.

cleanupTexturePool()

Release the unused pooled textures in texture manager freeing up video memory.

clearClientPaths()

UNDOCUMENTED!

clearGFXResourceFlags()

Clears the flagged state on all allocated GFX resources. See flagCurrentGFXResources for usage details.

clearServerPaths()

UNDOCUMENTED!

closeNetPort()

Closes the current network port.

closeSplashWindow()

Close our startup splash window.

note:

This is currently only implemented on Windows.

cls()

Clears the console output.

collapseEscape(string text)

Replace all escape sequences in text with their respective character codes.

This function replaces all escape sequences (\n, \t, etc) in the given string with the respective characters they represent.

The primary use of this function is for converting strings from their literal form into their compiled/translated form, as is normally done by the TorqueScript compiler.

Parameters:

text

A string.

return:

A duplicate of text with all escape sequences replaced by their respective character codes.

// Print:
//
//    str
//    ing
//
// to the console.  Note how the backslash in the string must be escaped here
// in order to prevent the TorqueScript compiler from collapsing the escape
// sequence in the resulting string.
echo( collapseEscape( "str\ning" ) );

ColorFloatToInt(LinearColorF color)

Convert from a float color to an integer color (0.0 - 1.0 to 0 to 255).

Parameters:

color

Float color value to be converted in the form "R G B A", where R is red, G is green, B is blue, and A is alpha.

return:

Converted color value (0 - 255)

ColorFloatToInt( "0 0 1 0.5" ) // Returns "0 0 255 128".

ColorHEXToRGB(string hex)

Convert from a hex color value to an integer RGB (red, green, blue) color (00 - FF to 0 to 255).

Parameters:

hex

Hex color value (#000000 - #FFFFFF) to be converted to an RGB (red, green, blue) value.

return:

Integer color value to be converted in the form "R G B A", where R is red, G is green, B is blue, and A is alpha. Alpha isn't handled/converted so only pay attention to the RGB value

ColorHEXToRGB( "#0000FF" ) // Returns "0 0 255 0".

ColorHSBToRGB(Point3I hsb)

Convert from a HSB (hue, saturation, brightness) to an integer RGB (red, green, blue) color. HSB is also know as HSL or HSV as well, with the last letter standing for lightness or value.

Parameters:

hsb

HSB (hue, saturation, brightness) value to be converted.

return:

Integer color value to be converted in the form "R G B A", where R is red, G is green, B is blue, and A is alpha. Alpha isn't handled/converted so only pay attention to the RGB value

ColorHSBToRGB( "240 100 100" ) // Returns "0 0 255 0".

ColorIntToFloat(ColorI color)

Convert from a integer color to an float color (0 to 255 to 0.0 - 1.0).

Parameters:

color

Integer color value to be converted in the form "R G B A", where R is red, G is green, B is blue, and A is alpha.

return:

Converted color value (0.0 - 1.0)

ColorIntToFloat( "0 0 255 128" ) // Returns "0 0 1 0.5".

ColorRGBToHEX(ColorI color)

Convert from a integer RGB (red, green, blue) color to hex color value (0 to 255 to 00 - FF).

Parameters:

color

Integer color value to be converted in the form "R G B A", where R is red, G is green, B is blue, and A is alpha. It excepts an alpha, but keep in mind this will not be converted.

return:

Hex color value (#000000 - #FFFFFF), alpha isn't handled/converted so it is only the RGB value

ColorRBGToHEX( "0 0 255 128" ) // Returns "#0000FF".

ColorRGBToHSB(ColorI color)

Convert from a integer RGB (red, green, blue) color to HSB (hue, saturation, brightness). HSB is also know as HSL or HSV as well, with the last letter standing for lightness or value.

Parameters:

color

Integer color value to be converted in the form "R G B A", where R is red, G is green, B is blue, and A is alpha. It excepts an alpha, but keep in mind this will not be converted.

return:

HSB color value, alpha isn't handled/converted so it is only the RGB value

ColorRBGToHSB( "0 0 255 128" ) // Returns "240 100 100".

ColorScale(LinearColorF color, float scalar)

Returns color scaled by scalar (color*scalar).

Parameters:

color

The color to be scaled.

scalar

The amount to scale the color.

commandToClient(NetConnection client, string func, ... )

Send a command from the server to the client.

Parameters:

client

The numeric ID of a client GameConnection

func

Name of the client function being called

...

Various parameters being passed to client command

// Set up the client command.  Needs to be executed on the client, such as
// within scripts/client/client.cs
// Update the Ammo Counter with current ammo, if not any then hide the counter.
function clientCmdSetAmmoAmountHud(%amount)
{
   if (!%amount)
     AmmoAmount.setVisible(false);
   else
   {
     AmmoAmount.setVisible(true);
     AmmoAmount.setText("Ammo: "@%amount);
   }
}

// Call it from a server function.  Needs to be executed on the server, 
//such as within scripts/server/game.cs
function GameConnection::setAmmoAmountHud(%client, %amount)
{
   commandToClient(%client, 'SetAmmoAmountHud', %amount);
}

commandToServer(string func, ... )

Send a command to the server.

Parameters:

func

Name of the server command being called

...

Various parameters being passed to server command

// Create a standard function.  Needs to be executed on the client, such 
// as within scripts/client/default.bind.cs
function toggleCamera(%val)
{
   // If key was down, call a server command named 'ToggleCamera'
   if (%val)
      commandToServer('ToggleCamera');
}

// Server command being called from above.  Needs to be executed on the 
// server, such as within scripts/server/commands.cs
function serverCmdToggleCamera(%client)
{
   if (%client.getControlObject() == %client.player)
   {
     %client.camera.setVelocity("0 0 0");
     %control = %client.camera;
   }
   else
   {
     %client.player.setVelocity("0 0 0");
     %control = %client.player;
  }
   %client.setControlObject(%control);
   clientCmdSyncEditorGui();
}

compile(string fileName, bool overrideNoDSO)

Compile a file to bytecode.

This function will read the TorqueScript code in the specified file, compile it to internal bytecode, and, if DSO generation is enabled or overrideNoDDSO is true, will store the compiled code in a .dso file in the current DSO path mirrorring the path of fileName.

Parameters:

fileName

Path to the file to compile to bytecode.

overrideNoDSO

If true, force generation of DSOs even if the engine is compiled to not generate write compiled code to DSO files.

return:

True if the file was successfully compiled, false if not.

note:

The definitions contained in the given file will not be made available and no code will actually be executed. Use exec() for that.

see:

CompileLanguage(string inputFile, bool createMap)

Compiles a LSO language file. if createIndex is true, will also create languageMap.cs with the global variables for each string index. The input file must follow this example layout: TXT_HELLO_WORLD = Hello world in english!

containerBoxEmpty(uint mask, Point3F center, float xRadius, float yRadius, float zRadius, bool useClientContainer)

See if any objects of the given types are present in box of given extent.

note:

Extent parameter is last since only one radius is often needed. If one radius is provided, the yRadius and zRadius are assumed to be the same. Unfortunately, if you need to use the client container, you'll need to set all of the radius parameters. Fortunately, this function is mostly used on the server.

Parameters:
mask

Indicates the type of objects we are checking against.

center

Center of box.

xRadius

Search radius in the x-axis. See note above.

yRadius

Search radius in the y-axis. See note above.

zRadius

Search radius in the z-axis. See note above.

useClientContainer

Optionally indicates the search should be within the client container.

return:

true if the box is empty, false if any object is found.

containerFindFirst(uint typeMask, Point3F origin, Point3F size)

Find objects matching the bitmask type within a box centered at point, with extents x, y, z.

return:

The first object found, or an empty string if nothing was found. Thereafter, you can get more results using containerFindNext().

containerFindNext()

Get more results from a previous call to containerFindFirst().

note:

You must call containerFindFirst() to begin the search.

return:

The next object found, or an empty string if nothing else was found.

containerRayCast(Point3F start, Point3F end, uint mask, SceneObject pExempt, bool useClientContainer)

Cast a ray from start to end, checking for collision against items matching mask.

If pExempt is specified, then it is temporarily excluded from collision checks (For instance, you might want to exclude the player if said player was firing a weapon.) Parameters:

start

An XYZ vector containing the tail position of the ray.

end

An XYZ vector containing the head position of the ray

mask

A bitmask corresponding to the type of objects to check for

pExempt

An optional ID for a single object that ignored for this raycast

useClientContainer

Optionally indicates the search should be within the client container.

return:

A string containing either null, if nothing was struck, or these fields:

  • The ID of the object that was struck.

  • The x, y, z position that it was struck.

  • The x, y, z of the normal of the face that was struck.

  • The distance between the start point and the position we hit.

containerSearchCurrDist(bool useClientContainer)

Get distance of the center of the current item from the center of the current initContainerRadiusSearch.

Parameters:

useClientContainer

Optionally indicates the search should be within the client container.

return:

distance from the center of the current object to the center of the search

containerSearchCurrRadiusDist(bool useClientContainer)

Get the distance of the closest point of the current item from the center of the current initContainerRadiusSearch.

Parameters:

useClientContainer

Optionally indicates the search should be within the client container.

return:

distance from the closest point of the current object to the center of the search

containerSearchNext(bool useClientContainer)

Get next item from a search started with initContainerRadiusSearch() or initContainerTypeSearch().

Parameters:

useClientContainer

Optionally indicates the search should be within the client container.

return:

the next object found in the search, or null if no more

// print the names of all nearby ShapeBase derived objects
%position = %obj.getPosition;
%radius = 20;
%mask = $TypeMasks::ShapeBaseObjectType;
initContainerRadiusSearch( %position, %radius, %mask );
while ( (%targetObject = containerSearchNext()) != 0 )
{
   echo( "Found: " @ %targetObject.getName() );
}

containsBadWords(string text)

Checks to see if text is a bad word.

The text is considered to be a bad word if it has been added to the bad word filter.

Parameters:

text

Text to scan for bad words

return:

True if the text has bad word(s), false if it is clean

see:

filterString()

// In this game, "Foobar" is banned
%badWord = "Foobar";

// Add a banned word to the bad word filter
addBadWord(%badWord);

// Create the base string, can come from anywhere like user chat
%userText = "Foobar";

// Create a string of random letters
%replacementChars = "knqwrtlzs";

// If the text contains a bad word, filter it before printing
// Otherwise print the original text
if(containsBadWords(%userText))
{
  // Filter the string
  %filteredText = filterString(%userText, %replacementChars);

  // Print filtered text
  echo(%filteredText);
}
else
  echo(%userText);

countBits(int v)

Count the number of bits that are set in the given 32 bit integer.

Parameters:

v

An integer value.

return:

The number of bits that are set in v.

createPath(string path)

Create the given directory or the path leading to the given filename.

If path ends in a trailing slash, then all components in the given path will be created as directories (if not already in place). If path, does not end in a trailing slash, then the last component of the path is taken to be a file name and only the directory components of the path will be created.

Parameters:

path

The path to create.

note:

Only present in a Tools build of Torque.

deactivateDirectInput()

Disables DirectInput.

Also deactivates any connected joysticks.

deactivatePackage(String packageName)

Deactivates a previously activated package.

The package is deactivated by removing its namespace linkages to any function or method. If there are any packages above this one in the stack they are deactivated as well. If the package is not on the stack this function does nothing.

debug()

Drops the engine into the native C++ debugger.

This function triggers a debug break and drops the process into the IDE's debugger. If the process is not running with a debugger attached it will generate a runtime error on most platforms.

note:

This function is not available in shipping builds.

debugDumpAllObjects()

Dumps all current EngineObject instances to the console.

note:

This function is only available in debug builds.

debugEnumInstances(string className, string functionName)

Call the given function for each instance of the given class.

Parameters:

className

Name of the class for which to enumerate instances.

functionName

Name of function to call and pass each instance of the given class.

note:

This function is only available in debug builds and primarily meant as an aid in debugging.

debugv(string variableName)

Logs the value of the given variable to the console.

Prints a string of the form " = " to the console.

Parameters:

variableName

Name of the local or global variable to print.

%var = 1;
debugv( "%var" ); // Prints "%var = 1"

decalManagerAddDecal(Point3F position, Point3F normal, float rot, float scale, DecalData decalData, bool isImmortal)

Adds a new decal to the decal manager.

Parameters:

position

World position for the decal.

normal

Decal normal vector (if the decal was a tire lying flat on a surface, this is the vector pointing in the direction of the axle).

rot

Angle (in radians) to rotate this decal around its normal vector.

scale

Scale factor applied to the decal.

decalData

DecalData datablock to use for the new decal.

isImmortal

Whether or not this decal is immortal. If immortal, it does not expire automatically and must be removed explicitly.

return:

Returns the ID of the new Decal object or -1 on failure.

// Specify the decal position
%position = "1.0 1.0 1.0";

// Specify the up vector
%normal = "0.0 0.0 1.0";

// Add the new decal.
%decalObj = decalManagerAddDecal( %position, %normal, 0.5, 0.35, ScorchBigDecal, false );

decalManagerClear()

Removes all decals currently loaded in the decal manager.

// Tell the decal manager to remove all existing decals.
decalManagerClear();

decalManagerDirty()

Returns whether the decal manager has unsaved modifications.

return:

True if the decal manager has unsaved modifications, false if everything has been saved.

// Ask the decal manager if it has unsaved modifications.
%hasUnsavedModifications = decalManagerDirty();

decalManagerEditDecal(int decalID, Point3F pos, Point3F normal, float rotAroundNormal, float decalScale)

Edit specified decal of the decal manager.

Parameters:

decalID

ID of the decal to edit.

pos

World position for the decal.

normal

Decal normal vector (if the decal was a tire lying flat on a surface, this is the vector pointing in the direction of the axle).

rotAroundNormal

Angle (in radians) to rotate this decal around its normal vector.

decalScale

Scale factor applied to the decal.

return:

Returns true if successful, false if decalID not found.

decalManagerLoad(string fileName)

Clears existing decals and replaces them with decals loaded from the specified file.

Parameters:

fileName

Filename to load the decals from.

return:

True if the decal manager was able to load the requested file, false if it could not.

// Set the filename to load the decals from.
%fileName = "./missionDecals.mis.decals";
// Inform the decal manager to load the decals from the entered filename.
decalManagerLoad( %fileName );

decalManagerRemoveDecal(int decalID)

Remove specified decal from the scene.

Parameters:

decalID

ID of the decal to remove.

return:

Returns true if successful, false if decal ID not found.

// Specify a decal ID to be removed
%decalID = 1;

// Tell the decal manager to remove the specified decal ID.
decalManagerRemoveDecal( %decalId )

decalManagerSave(String decalSaveFile)

Saves the decals for the active mission in the entered filename.

Parameters:

decalSaveFile

Filename to save the decals to.

// Set the filename to save the decals in. If no filename is set, then the
// decals will default to <activeMissionName>.mis.decals
%fileName = "./missionDecals.mis.decals";
// Inform the decal manager to save the decals for the active mission.
decalManagerSave( %fileName );

deleteDataBlocks()

Delete all the datablocks we've downloaded.

This is usually done in preparation of downloading a new set of datablocks, such as occurs on a mission change, but it's also good post-mission cleanup.

deleteVariables(string pattern)

Undefine all global variables matching the given name pattern.

Parameters:

pattern

A global variable name pattern. Must begin with '$'.

// Define a global variable in the "My" namespace.
$My::Variable = "value";

// Undefine all variable in the "My" namespace.
deleteVariables( "$My::*" );

describeGFXResources(string resourceTypes, string filePath, bool unflaggedOnly)

Dumps a description of GFX resources to a file or the console.

Parameters:

resourceTypes

A space seperated list of resource types or an empty string for all resources.

filePath

A file to dump the list to or an empty string to write to the console.

unflaggedOnly

If true only unflagged resources are dumped. See flagCurrentGFXResources.

note:

The resource types can be one or more of the following:

  • texture

  • texture target

  • window target

  • vertex buffers

  • primitive buffers

  • fences

  • cubemaps

  • shaders

  • stateblocks

describeGFXStateBlocks(string filePath)

Dumps a description of all state blocks.

Parameters:

filePath

A file to dump the state blocks to or an empty string to write to the console.

detag(string str)

Returns the string from a tag string.

Should only be used within the context of a function that receives a tagged string, and is not meant to be used outside of this context. Use getTaggedString() to convert a tagged string ID back into a regular string at any time.

// From scripts/client/message. cs
function clientCmdChatMessage(%sender, %voice, %pitch, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10)
{
   onChatMessage(detag(%msgString), %voice, %pitch);
}

see:

syntaxDataTypes under Tagged Strings

dispatchMessage(string queueName, string message, string data)

Dispatch a message to a queue.

Parameters:

queueName

Queue to dispatch the message to

message

Message to dispatch

data

Data for message

return:

True for success, false for failure

dispatchMessageObject(string queueName, string message)

Dispatch a message object to a queue.

Parameters:

queueName

Queue to dispatch the message to

message

Message to dispatch

return:

true for success, false for failure

displaySplashWindow(string path)

Display a startup splash window suitable for showing while the engine still starts up.

note:

This is currently only implemented on Windows.

Parameters:
path

relative path to splash screen image to display.

return:

True if the splash window could be successfully initialized.

DNetSetLogging(bool enabled)

Enables logging of the connection protocols.

When enabled a lot of network debugging information is sent to the console. Parameters:

enabled

True to enable, false to disable

dumpActivePostFX()

UNDOCUMENTED!

dumpAlloc(int allocNum)

Dumps information about the given allocated memory block.

Parameters:

allocNum

Memory block to dump information about.

note:

Available in debug builds only. In torqueConfig.h, TORQUE_DISABLE_MEMORY_MANAGER must be undefined to use this function.

dumpConsoleClasses(bool dumpScript, bool dumpEngine)

Dumps all declared console classes to the console.

Parameters:

dumpScript

Optional parameter specifying whether or not classes defined in script should be dumped.

dumpEngine

Optional parameter specifying whether or not classes defined in the engine should be dumped.

dumpConsoleFunctions(bool dumpScript, bool dumpEngine)

Dumps all declared console functions to the console.

Parameters:

dumpScript

Optional parameter specifying whether or not functions defined in script should be dumped.

dumpEngine

Optional parameter specitying whether or not functions defined in the engine should be dumped.

dumpEngineDocs(string outputFile)

Dumps the engine scripting documentation to the specified file overwriting any existing content.

Parameters:

outputFile

The relative or absolute output file path and name.

return:

Returns true if successful.

dumpFontCacheStatus()

Dumps to the console a full description of all cached fonts, along with info on the codepoints each contains.

dumpMaterialInstances()

Dumps a formatted list of currently allocated material instances to the console.

dumpMemSnapshot(string fileName)

Dumps a snapshot of current memory to a file.

The total memory used will also be output to the console. This function will attempt to create the file if it does not already exist. Parameters:

fileName

Name and path of file to save profiling stats to. Must use forward slashes (/)

dumpMemSnapshot( "C:/Torque/ProfilerLogs/profilerlog1.txt" );

note:

Available in debug builds only. In torqueConfig.h, TORQUE_DISABLE_MEMORY_MANAGER must be undefined to use this function.

dumpNetStats()

Dumps network statistics for each class to the console.

The returned avg, min and max values are in bits sent per update. The num value is the total number of events collected.

note:

This method only works when TORQUE_NET_STATS is defined in torqueConfig.h.

dumpNetStringTable()

Dump the current contents of the networked string table to the console.

The results are returned in three columns. The first column is the network string ID. The second column is the string itself. The third column is the reference count to the network string.

note:

This function is available only in debug builds.

dumpProcessList()

Dumps all ProcessObjects in ServerProcessList and ClientProcessList to the console.

dumpRandomNormalMap()

Creates a 64x64 normal map texture filled with noise. The texture is saved to randNormTex.png in the location of the game executable.

dumpStringMemStats()

Dumps information about String memory usage.

dumpTextureObjects()

Dumps a list of all active texture objects to the console.

note:

This function is only available in debug builds.

dumpUnflaggedAllocs(string fileName)

Dumps all unflagged memory allocations.

Dumps all memory allocations that were made after a call to flagCurrentAllocs(). Helpful when used with flagCurrentAllocs() for detecting memory leaks and analyzing general memory usage.

Parameters:

fileName

Optional file path and location to dump all memory allocations not flagged by flagCurrentAllocs(). If left blank, data will be dumped to the console.

dumpMemSnapshot(); // dumps info to console
dumpMemSnapshot( "C:/Torque/profilerlog1.txt" ); // dumps info to file

note:

Available in debug builds only. In torqueConfig.h, TORQUE_DISABLE_MEMORY_MANAGER must be undefined to use this function.

duplicateCachedFont(string oldFontName, int oldFontSize, string newFontName)

Copy the specified old font to a new name. The new copy will not have a platform font backing it, and so will never have characters added to it. But this is useful for making copies of fonts to add postprocessing effects to via exportCachedFont.

Parameters:

oldFontName

The name of the font face to copy.

oldFontSize

The size of the font to copy.

newFontName

The name of the new font face.

echo(string message...)

Logs a message to the console.

Concatenates all given arguments to a single string and prints the string to the console. A newline is added automatically after the text.

Parameters:

message

Any number of string arguments.

echoThru(string passthru, string text...)

Like echo(), but first argument is returned.

enableSamples(string pattern, bool state)

Enable sampling for all keys that match the given name pattern. Slashes are treated as separators.

enableWinConsole(bool _enable)

enableWinConsole(bool);

endsWith(string str, string suffix, bool caseSensitive)

Test whether the given string ends with the given suffix.

Parameters:

str

The string to test.

suffix

The potential suffix of str.

caseSensitive

If true, the comparison will be case-sensitive; if false, differences in casing will not be taken into account.

return:

True if the last characters in str match the complete contents of suffix; false otherwise.

startsWith( "TEST123", "123" ) // Returns true.

error(string message...)

Logs an error message to the console.

Concatenates all given arguments to a single string and prints the string to the console as an error message (in the in-game console, these will show up using a red font by default). A newline is added automatically after the text.

Parameters:

message

Any number of string arguments.

errorThru(string passthru, string text...)

Like error(), but first argument is returned.

eval(string consoleString)

eval(consoleString)

excludeOtherInstance(string appIdentifer)

Used to exclude/prevent all other instances using the same identifier specified.

note:

Not used on OSX, Xbox, or in Win debug builds

Parameters:
appIdentifier

Name of the app set up for exclusive use.

return:

False if another app is running that specified the same appIdentifier

exec(string fileName, bool noCalls, bool journalScript)

Execute the given script file.

Parameters:

fileName

Path to the file to execute

noCalls

Deprecated

journalScript

Deprecated

return:

True if the script was successfully executed, false if not.

// Execute the init.cs script file found in the same directory as the current script file.
exec( "./init.cs" );

see:

execPrefs(string relativeFileName, bool noCalls, bool journalScript)

Manually execute a special script file that contains game or editor preferences.

Parameters:

relativeFileName

Name and path to file from project folder

noCalls

Deprecated

journalScript

Deprecated

return:

True if script was successfully executed

note:

Appears to be useless in Torque 3D, should be deprecated

expandEscape(string text)

Replace all characters in text that need to be escaped for the string to be a valid string literal with their respective escape sequences.

All characters in text that cannot appear in a string literal will be replaced by an escape sequence (\n, \t, etc).

The primary use of this function is for converting strings suitable for being passed as string literals to the TorqueScript compiler.

Parameters:

text

A string

return:

A duplicate of the text parameter with all unescaped characters that cannot appear in string literals replaced by their respective escape sequences.

@tsxample expandEscape( "str" NL "ing" ) // Returns "str\ning". @endtsxample

expandFilename(string filename)

Grabs the full path of a specified file.

Parameters:

filename

Name of the local file to locate

return:

String containing the full filepath on disk

expandOldFilename(string filename)

Retrofits a filepath that uses old Torque style.

return:

String containing filepath with new formatting

export(string pattern, string filename, bool append)

Write out the definitions of all global variables matching the given name pattern.

If fileName is not "", the variable definitions are written to the specified file. Otherwise the definitions will be printed to the console.

The output are valid TorqueScript statements that can be executed to restore the global variable values.

Parameters:

pattern

A global variable name pattern. Must begin with '$'.

filename

Path of the file to which to write the definitions or "" to write the definitions to the console.

append

If true and fileName is not "", then the definitions are appended to the specified file. Otherwise existing contents of the file (if any) will be overwritten.

// Write out all preference variables to a prefs.cs file.
export( "$prefs::*", "prefs.cs" );

exportCachedFont(string faceName, int fontSize, string fileName, int padding, int kerning)

Export specified font to the specified filename as a PNG. The image can then be processed in Photoshop or another tool and reimported using importCachedFont. Characters in the font are exported as one long strip.

Parameters:

faceName

The name of the font face.

fontSize

The size of the font in pixels.

fileName

The file name and path for the output PNG.

padding

The padding between characters.

kerning

The kerning between characters.

exportEngineAPIToXML()

Create a XML document containing a dump of the entire exported engine API.

return:

A SimXMLDocument containing a dump of the engine's export information or NULL if the operation failed.

extractDatablockCacheCRC(string fileName)

UNDOCUMENTED!

fileBase(string fileName)

Get the base of a file name (removes extension and path)

Parameters:

fileName

Name and path of file to check

return:

String containing the file name, minus extension and path

fileCreatedTime(string fileName)

Returns a platform specific formatted string with the creation time for the file.

Parameters:

fileName

Name and path of file to check

return:

Formatted string (OS specific) containing created time, "9/3/2010 12:33:47 PM" for example

fileDelete(string path)

Delete a file from the hard drive.

Parameters:

path

Name and path of the file to delete

note:

THERE IS NO RECOVERY FROM THIS. Deleted file is gone for good.

return:

True if file was successfully deleted

fileExt(string fileName)

Get the extension of a file.

Parameters:

fileName

Name and path of file

return:

String containing the extension, such as ".exe" or ".cs"

fileModifiedTime(string fileName)

Returns a platform specific formatted string with the last modified time for the file.

Parameters:

fileName

Name and path of file to check

return:

Formatted string (OS specific) containing modified time, "9/3/2010 12:33:47 PM" for example

fileName(string fileName)

Get only the file name of a path and file name string (removes path)

Parameters:

fileName

Name and path of file to check

return:

String containing the file name, minus the path

filePath(string fileName)

Get the path of a file (removes name and extension)

Parameters:

fileName

Name and path of file to check

return:

String containing the path, minus name and extension

fileSize(string fileName)

Determines the size of a file on disk.

Parameters:

fileName

Name and path of the file to check

return:

Returns filesize in bytes, or -1 if no file

filterString(string baseString, string replacementChars)

Replaces the characters in a string with designated text.

Uses the bad word filter to determine which characters within the string will be replaced.

Parameters:

baseString

The original string to filter.

replacementChars

A string containing letters you wish to swap in the baseString.

return:

The new scrambled string

see:

containsBadWords()

// Create the base string, can come from anywhere
%baseString = "Foobar";

// Create a string of random letters
%replacementChars = "knqwrtlzs";

// Filter the string
%newString = filterString(%baseString, %replacementChars);

// Print the new string to console
echo(%newString);

findFirstFile(string pattern, bool recurse)

Returns the first file in the directory system matching the given pattern.

Use the corresponding findNextFile() to step through the results. If you're only interested in the number of files returned by the pattern match, use getFileCount().

This function differs from findFirstFileMultiExpr() in that it supports a single search pattern being passed in.

note:

You cannot run multiple simultaneous file system searches with these functions. Each call to findFirstFile() and findFirstFileMultiExpr() initiates a new search and renders a previous search invalid.

Parameters:
pattern

The path and file name pattern to match against.

recurse

If true, the search will exhaustively recurse into subdirectories of the given path and match the given filename pattern.

return:

The path of the first file matched by the search or an empty string if no matching file could be found.

// Execute all .cs files in a subdirectory and its subdirectories.
for( %file = findFirstFile( "subdirectory/*.cs" ); %file !$= ""; %file = findNextFile() )
   exec( %file );

findFirstFileMultiExpr(string pattern, bool recurse)

Returns the first file in the directory system matching the given patterns.

Use the corresponding findNextFileMultiExpr() to step through the results. If you're only interested in the number of files returned by the pattern match, use getFileCountMultiExpr().

This function differs from findFirstFile() in that it supports multiple search patterns to be passed in.

note:

You cannot run multiple simultaneous file system searches with these functions. Each call to findFirstFile() and findFirstFileMultiExpr() initiates a new search and renders a previous search invalid.

Parameters:
pattern

The path and file name pattern to match against, such as *.cs. Separate multiple patterns with TABs. For example: "*.cs" TAB "*.dso"

recurse

If true, the search will exhaustively recurse into subdirectories of the given path and match the given filename patterns.

return:

String of the first matching file path, or an empty string if no matching files were found.

// Find all DTS or Collada models
%filePatterns = "*.dts" TAB "*.dae";
%fullPath = findFirstFileMultiExpr( %filePatterns );
while ( %fullPath !$= "" )
{
   echo( %fullPath );
   %fullPath = findNextFileMultiExpr( %filePatterns );
}

findNextFile(string pattern)

Returns the next file matching a search begun in findFirstFile().

Parameters:

pattern

The path and file name pattern to match against. This is optional and may be left out as it is not used by the code. It is here for legacy reasons.

return:

The path of the next filename matched by the search or an empty string if no more files match.

// Execute all .cs files in a subdirectory and its subdirectories.
for( %file = findFirstFile( "subdirectory/*.cs" ); %file !$= ""; %file = findNextFile() )
   exec( %file );

findNextFileMultiExpr(string pattern)

Returns the next file matching a search begun in findFirstFileMultiExpr().

Parameters:

pattern

The path and file name pattern to match against. This is optional and may be left out as it is not used by the code. It is here for legacy reasons.

return:

String of the next matching file path, or an empty string if no matching files were found.

// Find all DTS or Collada models
%filePatterns = "*.dts" TAB "*.dae";
%fullPath = findFirstFileMultiExpr( %filePatterns );
while ( %fullPath !$= "" )
{
   echo( %fullPath );
   %fullPath = findNextFileMultiExpr( %filePatterns );
}

firstWord(string text)

Return the first word in text.

Parameters:

text

A list of words separated by newlines, spaces, and/or tabs.

return:

The word at index 0 in text or "" if text is empty.

note:

This is equal to @tsexample_nopar getWord( text, 0 )

flagCurrentAllocs()

Flags all current memory allocations.

Flags all current memory allocations for exclusion in subsequent calls to dumpUnflaggedAllocs(). Helpful in detecting memory leaks and analyzing memory usage.

flagCurrentGFXResources()

Flags all currently allocated GFX resources. Used for resource allocation and leak tracking by flagging current resources then dumping a list of unflagged resources at some later point in execution.

flushTextureCache()

Releases all textures and resurrects the texture manager.

freeMemoryDump()

Dumps some useful statistics regarding free memory.

Dumps an analysis of 'free chunks' of memory. Does not print how much memory is free.

GenerateTamlSchema()

Generate a TAML schema file of all engine types.

The schema file is specified using the console variable '$pref::T2D::TAMLSchema'.

return:

Whether the schema file was writtent or not.

generateUUID()

Generate a new universally unique identifier (UUID).

return:

A newly generated UUID.

getActiveDDSFiles()

Returns the count of active DDSs files in memory.

getActiveLightManager()

Returns the active light manager name.

getAppVersionNumber()

Get the version of the application build, as a string.

getAppVersionString()

Get the version of the aplication build, as a human readable string.

getBestHDRFormat()

Returns the best texture format for storage of HDR data for the active device.

getBitmapInfo(string filename)

Returns image info in the following format: width TAB height TAB bytesPerPixel TAB format. It will return an empty string if the file is not found.

getBoxCenter(Box3F box)

Get the center point of an axis-aligned box.

Parameters:

b

A Box3F, in string format using "minExtentX minExtentY minExtentZ maxExtentX maxExtentY maxExtentZ"

return:

Center of the box.

getBuildString()

Get the type of build, "Debug" or "Release".

getCategoryOfClass(string className)

Returns the category of the given class.

Parameters:

className

The name of the class.

getColorFromHSV(float hue, float sat, float val, float alpha)

Coverts an HSV formatted color into an RBG color.

Parameters:

hue

The hue of the color (0-360).

sat

The saturation of the color (0-1).

val

The value of the color (0-1).

alpha

The alpha of the color (0-1).

getCompileTimeString()

Get the time of compilation.

getCoreLangTable()

Gets the primary LangTable used by the game.

return:

ID of the core LangTable

getCurrentActionMap()

Returns the current ActionMap.

getCurrentDirectory()

Return the current working directory.

return:

The absolute path of the current working directory.

note:

Only present in a Tools build of Torque.

getDatablockCacheCRC()

UNDOCUMENTED!

getDescriptionOfClass(string className)

Returns the description string for the named class.

Parameters:

className

The name of the class.

return:

The class description in string format.

getDesktopResolution()

Returns the width, height, and bitdepth of the screen/desktop.

getDirectoryList(string path, int depth)

Gathers a list of directories starting at the given path.

Parameters:

path

String containing the path of the directory

depth

Depth of search, as in how many subdirectories to parse through

return:

Tab delimited string containing list of directories found during search, "" if no files were found

getDisplayDeviceInformation()

Get the string describing the active GFX device.

getDisplayDeviceList()

Returns a tab-seperated string of the detected devices across all adapters.

getDisplayDeviceType()

Get the string describing the active GFX device type.

getDSOPath(string scriptFileName)

Get the absolute path to the file in which the compiled code for the given script file will be stored.

Parameters:

scriptFileName

Path to the .cs script file.

return:

The absolute path to the .dso file for the given script file.

note:

The compiler will store newly compiled DSOs in the prefs path but pre-existing DSOs will be loaded from the current paths.

see:

getPrefsPath

getEngineName()

Get the name of the engine product that this is running from, as a string.

getEventTimeLeft(int scheduleId)

getEventTimeLeft(scheduleId) Get the time left in ms until this event will trigger.

getExecutableName()

Gets the name of the game's executable.

return:

String containing this game's executable name

getField(string text, int index)

Extract the field at the given index in the newline and/or tab separated list in text.

Fields in text must be separated by newlines and/or tabs. Parameters:

text

A list of fields separated by newlines and/or tabs.

index

The zero-based index of the field to extract.

return:

The field at the given index or "" if the index is out of range.

getField( "a b" TAB "c d" TAB "e f", 1 ) // Returns "c d"

getFieldCount(string text)

Return the number of newline and/or tab separated fields in text.

Parameters:

text

A list of fields separated by newlines and/or tabs.

return:

The number of newline and/or tab sepearated elements in text.

getFieldCount( "a b" TAB "c d" TAB "e f" ) // Returns 3

getFields(string text, int startIndex, int endIndex)

Extract a range of fields from the given startIndex onwards thru endIndex.

Fields in text must be separated by newlines and/or tabs. Parameters:

text

A list of fields separated by newlines and/or tabs.

startIndex

The zero-based index of the first field to extract from text.

endIndex

The zero-based index of the last field to extract from text. If this is -1, all fields beginning with startIndex are extracted from text.

return:

A string containing the specified range of fields from text or "" if startIndex is out of range or greater than endIndex.

getFields( "a b" TAB "c d" TAB "e f", 1 ) // Returns "c d" TAB "e f"

getFileCount(string pattern, bool recurse)

Returns the number of files in the directory tree that match the given patterns.

This function differs from getFileCountMultiExpr() in that it supports a single search pattern being passed in.

If you're interested in a list of files that match the given pattern and not just the number of files, use findFirstFile() and findNextFile().

Parameters:

pattern

The path and file name pattern to match against.

recurse

If true, the search will exhaustively recurse into subdirectories of the given path and match the given filename pattern counting files in subdirectories.

return:

Number of files located using the pattern

// Count the number of .cs files in a subdirectory and its subdirectories.
getFileCount( "subdirectory/*.cs" );

getFileCountMultiExpr(string pattern, bool recurse)

Returns the number of files in the directory tree that match the given patterns.

If you're interested in a list of files that match the given patterns and not just the number of files, use findFirstFileMultiExpr() and findNextFileMultiExpr().

Parameters:

pattern

The path and file name pattern to match against, such as *.cs. Separate multiple patterns with TABs. For example: "*.cs" TAB "*.dso"

recurse

If true, the search will exhaustively recurse into subdirectories of the given path and match the given filename pattern.

return:

Number of files located using the patterns

// Count all DTS or Collada models
%filePatterns = "*.dts" TAB "*.dae";
echo( "Nunmer of shape files:" SPC getFileCountMultiExpr( %filePatterns ) );

getFileCRC(string fileName)

Provides the CRC checksum of the given file.

Parameters:

fileName

The path to the file.

return:

The calculated CRC checksum of the file, or -1 if the file could not be found.

getFirstNumber(string str)

Get the first occuring number from str.

Parameters:

str

The string from which to read out the first number.

return:

String representation of the number or if no number.

getFormatExtensions()

Returns a list of supported shape format extensions separated by tabs.Example output: *.dsq TAB *.dae TAB.

getFormatFilters()

Returns a list of supported shape formats in filter form.

Example output: DSQ Files|*.dsq|COLLADA Files|*.dae|

getFreeTargetPosition()

Returns the current location of the free target.

getFunctionPackage(string funcName)

Provides the name of the package the function belongs to.

Parameters:

funcName

String containing name of the function

return:

The name of the function's package

getLightManagerNames()

Returns a tab seperated list of light manager names.

getLocalTime()

Return the current local time as: weekday month day year hour min sec.

Local time is platform defined.

getMainDotCsDir()

Get the absolute path to the directory that contains the main.cs script from which the engine was started.

This directory will usually contain all the game assets and, in a user-side game installation, will usually be read-only.

return:

The path to the main game assets.

getMaterialInstances(BaseMaterialDefinition target, GuiTreeViewCtrl tree)

Dumps a formatted list of currently allocated material instances to the console.

getMaterialMapping(string texName)

Returns the name of the material mapped to this texture.

If no materials are found, an empty string is returned.

Parameters:

texName

Name of the texture

getMax(float v1, float v2)

Calculate the greater of two specified numbers.

Parameters:

v1

Input value.

v2

Input value.

return:

The greater value of the two specified values.

getMaxDynamicVerts()

Get max number of allowable dynamic vertices in a single vertex buffer.

return:

the max number of allowable dynamic vertices in a single vertex buffer

getMaxF(float a, float b)

Returns the greater of the two arguments.

getMaxFrameAllocation()

UNDOCUMENTED!

getMethodPackage(string nameSpace, string method)

Provides the name of the package the method belongs to.

Parameters:

namespace

Class or namespace, such as Player

method

Name of the funciton to search for

return:

The name of the method's package

getMin(float v1, float v2)

Calculate the lesser of two specified numbers.

Parameters:

v1

Input value.

v2

Input value.

return:

The lesser value of the two specified values.

getMinF(float a, float b)

Returns the lesser of the two arguments.

getMissionAreaServerObject()

Get the MissionArea object, if any.

getNamedTargetList()

UNDOCUMENTED!

getNavMeshEventManager()

Get the EventManager object for all NavMesh updates.

getPackageList()

Returns a space delimited list of the active packages in stack order.

getPixelShaderVersion()

Returns the pixel shader version for the active device.

getRandom(int a, int b)

Returns a random number based on parameters passed in..

If no parameters are passed in, getRandom() will return a float between 0.0 and 1.0. If one parameter is passed an integer between 0 and the passed in value will be returned. Two parameters will return an integer between the specified numbers.

Parameters:

a

If this is the only parameter, a number between 0 and a is returned. Elsewise represents the lower bound.

b

Upper bound on the random number. The random number will be <= b.

return:

A pseudo-random integer between a and b, between 0 and a, or a float between 0.0 and 1.1 depending on usage.

note:

All parameters are optional.

getRandomDir(Point3F axis, float thetaMin, float thetaMax, float phiMin, float phiMax)

Get a random direction vector.

getRandomF(float a, float b)

Get a random float number between a and b.

getRandomSeed()

Get the current seed used by the random number generator.

return:

The current random number generator seed value.

getRealTime()

Return the current real time in milliseconds.

Real time is platform defined; typically time since the computer booted.

getRecord(string text, int index)

Extract the record at the given index in the newline-separated list in text.

Records in text must be separated by newlines. Parameters:

text

A list of records separated by newlines.

index

The zero-based index of the record to extract.

return:

The record at the given index or "" if index is out of range.

getRecord( "a b" NL "c d" NL "e f", 1 ) // Returns "c d"

getRecordCount(string text)

Return the number of newline-separated records in text.

Parameters:

text

A list of records separated by newlines.

return:

The number of newline-sepearated elements in text.

getRecordCount( "a b" NL "c d" NL "e f" ) // Returns 3

getRecords(string text, int startIndex, int endIndex)

Extract a range of records from the given startIndex onwards thru endIndex.

Records in text must be separated by newlines. Parameters:

text

A list of records separated by newlines.

startIndex

The zero-based index of the first record to extract from text.

endIndex

The zero-based index of the last record to extract from text. If this is -1, all records beginning with startIndex are extracted from text.

return:

A string containing the specified range of records from text or "" if startIndex is out of range or greater than endIndex.

getRecords( "a b" NL "c d" NL "e f", 1 ) // Returns "c d" NL "e f"

getRootScene()

Get the root Scene object that is loaded.

return:

The id of the Root Scene. Will be 0 if no root scene is loaded

getRotationDirection(RotationF rot)

Gets the direction from the rotation's angles.

Parameters:

Our

rotation.

getRotationForwardVector(RotationF rot)

Get the forward vector of a rotation.

getRotationRightVector(RotationF rot)

Gets the right vector of a rotation.

Parameters:

Our

rotation.

getRotationUpVector(RotationF rot)

Gets the up vector of a rotation.

Parameters:

Our

rotation.

getScene(uint sceneId)

Get the root Scene object that is loaded.

return:

The id of the Root Scene. Will be 0 if no root scene is loaded

getSceneCount()

Get the number of active Scene objects that are loaded.

return:

The number of active scenes

getScheduleDuration(int scheduleId)

getScheduleDuration(scheduleId);

getServerCount()

getServerCount();

getServerPathSet()

UNDOCUMENTED!

getSimTime()

Sim time is time since the game started.

Return the current sim time in milliseconds.

getStockColorCount()

Gets a count of available stock colors.

return:

A count of available stock colors.

getStockColorF(string stockColorName)

Gets a floating-point-based stock color by name.

Parameters:

stockColorName

- The stock color name to retrieve.

return:

The stock color that matches the specified color name. Returns nothing if the color name is not found.

getStockColorI(string stockColorName)

Gets a byte-based stock color by name.

Parameters:

stockColorName

- The stock color name to retrieve.

return:

The stock color that matches the specified color name. Returns nothing if the color name is not found.

getStockColorName(int stockColorIndex)

Gets the stock color name at the specified index.

Parameters:

stockColorIndex

The zero-based index of the stock color name to retrieve.

return:

The stock color name at the specified index or nothing if the string is invalid.

getSubStr(string str, int start, int numChars)

Return a substring of str starting at start and continuing either through to the end of str (if numChars is -1) or for numChars characters (except if this would exceed the actual source string length).

Parameters:

str

The string from which to extract a substring.

start

The offset at which to start copying out characters.

numChars

Optional argument to specify the number of characters to copy. If this is -1, all characters up the end of the input string are copied.

return:

A string that contains the given portion of the input string.

getSubStr( "foobar", 1, 2 ) // Returns "oo".

getTag(string textTagString)

Extracts the tag from a tagged string.

Should only be used within the context of a function that receives a tagged string, and is not meant to be used outside of this context.

Parameters:

textTagString

The tagged string to extract.

return:

The tag ID of the string.

see:

syntaxDataTypes under Tagged Strings

getTaggedString(string tag)

Use the getTaggedString function to convert a tag to a string.

This is not the same as detag() which can only be used within the context of a function that receives a tag. This function can be used any time and anywhere to convert a tag to a string.

Parameters:

tag

A numeric tag ID.

return:

The string as found in the Net String table.

see:

syntaxDataTypes under Tagged Strings

getTerrainHeight(F32 x, F32 y)

Gets the terrain height at the specified position.

Parameters:

x

The X coordinate in world space

y

The Y coordinate in world space

return:

Returns the terrain height at the given point as an F32 value.

getTerrainHeight(Point2I position)

Gets the terrain height at the specified position.

Parameters:

position

The world space point, minus the z (height) value. Formatted as ("x y")

return:

Returns the terrain height at the given point as an F32 value.

getTerrainHeightBelowPosition(F32 x, F32 y)

Takes a world point and find the "highest" terrain underneath it.

Parameters:

x

The X coordinate in world space

y

The Y coordinate in world space

return:

Returns the closest terrain height below the given point as an F32 value.

getTerrainHeightBelowPosition(Point2I position)

Takes a world point and find the "highest" terrain underneath it.

Parameters:

position

The world space point, minus the z (height) value. Formatted as ("x y")

return:

Returns the closest terrain height below the given point as an F32 value.

getTerrainUnderWorldPoint(F32 x, F32 y, F32 z)

Takes a world point and find the "highest" terrain underneath it.

Parameters:

x

The X coordinate in world space

y

The Y coordinate in world space

z

The Z coordinate in world space

return:

Returns the ID of the requested terrain block (0 if not found).

getTerrainUnderWorldPoint(Point3F position)

Gets the terrain block that is located under the given world point.

Parameters:

position

The world space coordinate you wish to query at. Formatted as ("x y z")

return:

Returns the ID of the requested terrain block (0 if not found).

getTextureProfileStats()

Returns a list of texture profiles in the format: ProfileName TextureCount TextureMB.

getTimeSinceStart(int scheduleId)

getTimeSinceStart(scheduleId);

getToken(string text, string delimiters, int index)

Extract the substring at the given index in the delimiters separated list in text.

Parameters:

text

A delimiters list of substrings.

delimiters

Character or characters that separate the list of substrings in text.

index

The zero-based index of the substring to extract.

return:

The substring at the given index or "" if the index is out of range.

getToken( "a b c d", " ", 2 ) // Returns "c"

getTokenCount(string text, string delimiters)

Return the number of delimiters substrings in text.

Parameters:

text

A delimiters list of substrings.

delimiters

Character or characters that separate the list of substrings in text.

return:

The number of delimiters substrings in text.

getTokenCount( "a b c d e", " " ) // Returns 5

getTokens(string text, string delimiters, int startIndex, int endIndex)

Extract a range of substrings separated by delimiters at the given startIndex onwards thru endIndex.

Parameters:

text

A delimiters list of substrings.

delimiters

Character or characters that separate the list of substrings in text.

startIndex

The zero-based index of the first substring to extract from text.

endIndex

The zero-based index of the last substring to extract from text. If this is -1, all words beginning with startIndex are extracted from text.

return:

A string containing the specified range of substrings from text or "" if startIndex is out of range or greater than endIndex.

getTokens( "a b c d", " ", 1, 2, ) // Returns "b c"

getTrailingNumber(string str)

Get the numeric suffix of the given input string.

Parameters:

str

The string from which to read out the numeric suffix.

return:

The numeric value of the number suffix of str or -1 if str has no such suffix.

getTrailingNumber( "test123" ) // Returns '123'.

getUserDataDirectory()

getUserDataDirectory()

getUserHomeDirectory()

getUserHomeDirectory()

getVariable(string varName)

Returns the value of the named variable or an empty string if not found.

@varName Name of the variable to search for

return:

Value contained by varName, "" if the variable does not exist

getVersionNumber()

Get the version of the engine build, as a string.

getVersionString()

Get the version of the engine build, as a human readable string.

getWebDeployment()

Test whether Torque is running in web-deployment mode.

In this mode, Torque will usually run within a browser and certain restrictions apply (e.g. Torque will not be able to enter fullscreen exclusive mode).

return:

True if Torque is running in web-deployment mode.

getWord(string text, int index)

Extract the word at the given index in the whitespace-separated list in text.

Words in text must be separated by newlines, spaces, and/or tabs. Parameters:

text

A whitespace-separated list of words.

index

The zero-based index of the word to extract.

return:

The word at the given index or "" if the index is out of range.

getWord( "a b c", 1 ) // Returns "b"

getWordCount(string text)

Return the number of whitespace-separated words in text.

Words in text must be separated by newlines, spaces, and/or tabs. Parameters:

text

A whitespace-separated list of words.

return:

The number of whitespace-separated words in text.

getWordCount( "a b c d e" ) // Returns 5

getWords(string text, int startIndex, int endIndex)

Extract a range of words from the given startIndex onwards thru endIndex.

Words in text must be separated by newlines, spaces, and/or tabs. Parameters:

text

A whitespace-separated list of words.

startIndex

The zero-based index of the first word to extract from text.

endIndex

The zero-based index of the last word to extract from text. If this is -1, all words beginning with startIndex are extracted from text.

return:

A string containing the specified range of words from text or "" if startIndex is out of range or greater than endIndex.

getWords( "a b c d", 1, 2, ) // Returns "b c"

getWorkingDirectory()

Reports the current directory.

return:

String containing full file path of working directory

gotoWebPage(string address)

Open the given URL or file in the user's web browser.

Parameters:

address

The address to open. If this is not prefixed by a protocol specifier ("...://"), then the function checks whether the address refers to a file or directory and if so, prepends "file://" to adress; if the file check fails, "http://" is prepended to address.

gotoWebPage( "http://www.garagegames.com" );

importCachedFont(string faceName, int fontSize, string fileName, int padding, int kerning)

Import an image strip from exportCachedFont. Call with the same parameters you called exportCachedFont.

Parameters:

faceName

The name of the font face.

fontSize

The size of the font in pixels.

fileName

The file name and path for the input PNG.

padding

The padding between characters.

kerning

The kerning between characters.

initContainerRadiusSearch(Point3F pos, float radius, uint mask, bool useClientContainer)

Start a search for items at the given position and within the given radius, filtering by mask.

Parameters:

pos

Center position for the search

radius

Search radius

mask

Bitmask of object types to include in the search

useClientContainer

Optionally indicates the search should be within the client container.

initContainerTypeSearch(uint mask, bool useClientContainer)

Start a search for all items of the types specified by the bitset mask.

Parameters:

mask

Bitmask of object types to include in the search

useClientContainer

Optionally indicates the search should be within the client container.

InterpolateRotation(RotationF a, RotationF b, float factor)

Interpolates between two rotations.

Parameters:

a

Rotation one.

b

Rotation two.

factor

The amount to interpolate between the two.

return:

v, interpolated result.

isAddressTypeAvailable(int addressType)

Determines if a specified address type can be reached.

isalnum(string str, int index)

Test whether the character at the given position is an alpha-numeric character.

Alpha-numeric characters are characters that are either alphabetic (a-z, A-Z) or numbers (0-9). Parameters:

str

The string to test.

index

The index of a character in str.

return:

True if the character at the given index in str is an alpha-numeric character; false otherwise.

isClass(string identifier)

Returns true if the passed identifier is the name of a declared class.

isDatablockCacheSaved()

UNDOCUMENTED!

isDebugBuild()

Test whether the engine has been compiled with TORQUE_DEBUG, i.e. if it includes debugging functionality.

return:

True if this is a debug build; false otherwise.

isDefined(string varName, string varValue)

Determines if a variable exists and contains a value.

Parameters:

varName

Name of the variable to search for

return:

True if the variable was defined in script, false if not

isDefined( "$myVar" );

IsDirectory(string directory)

Determines if a specified directory exists or not.

Parameters:

directory

String containing path in the form of "foo/bar"

return:

Returns true if the directory was found.

note:

Do not include a trailing slash '/'.

isEventPending(int scheduleId)

isEventPending(scheduleId);

isFile(string fileName)

Determines if the specified file exists or not.

Parameters:

fileName

The path to the file.

return:

Returns true if the file was found.

isFloat(string str, bool sciOk)

Returns true if the string is a float.

Parameters:

str

The string to test.

sciOk

Test for correct scientific notation and accept it (ex. 1.2e+14)

return:

true if str is a float and false if not

isFloat( "13.5" ) // Returns true.

isFunction(string funcName)

Determines if a function exists or not.

Parameters:

funcName

String containing name of the function

return:

True if the function exists, false if not

isInt(string str)

Returns true if the string is an integer.

Parameters:

str

The string to test.

return:

true if str is an integer and false if not

isInt( "13" ) // Returns true.

isMemberOfClass(string className, string superClassName)

Returns true if the class is derived from the super class.

If either class doesn't exist this returns false. Parameters:

className

The class name.

superClassName

The super class to look for.

isMethod(string nameSpace, string method)

Determines if a class/namespace method exists.

Parameters:

namespace

Class or namespace, such as Player

method

Name of the function to search for

return:

True if the method exists, false if not

isObject(string objectName)

isObject(object)

isPackage(String identifier)

Returns true if the identifier is the name of a declared package.

isQueueRegistered(string queueName)

Determines if a dispatcher queue exists.

Parameters:

queueName

String containing the name of queue

isShippingBuild()

Test whether the engine has been compiled with TORQUE_SHIPPING, i.e. in a form meant for final release.

return:

True if this is a shipping build; false otherwise.

isspace(string str, int index)

Test whether the character at the given position is a whitespace character.

Characters such as tab, space, or newline are considered whitespace. Parameters:

str

The string to test.

index

The index of a character in str.

return:

True if the character at the given index in str is a whitespace character; false otherwise.

isStockColor(string stockColorName)

Gets whether the specified name is a stock color or not.

Parameters:

stockColorName

- The stock color name to test for.

return:

Whether the specified name is a stock color or not.

isSupportedFormat(string extension)

UNDOCUMENTED!

isToolBuild()

Test whether the engine has been compiled with TORQUE_TOOLS, i.e. if it includes tool-related functionality.

return:

True if this is a tool build; false otherwise.

isValidIP(string str)

Returns true if the string is a valid ip address, excepts localhost.

Parameters:

str

The string to test.

return:

true if str is a valid ip address and false if not

isValidIP( "localhost" ) // Returns true.

isValidObjectName(string name)

Return true if the given name makes for a valid object name.

Parameters:

name

Name of object

return:

True if name is allowed, false if denied (usually because it starts with a number, _, or invalid character

isValidPort(string str)

Returns true if the string is a valid port number.

Parameters:

str

The string to test.