ActionMap SimObject bind actionMap.bind( device, action, [modifier spec, mod...], command )@hide bindCmd ( string device, string action, string makeCmd, string breakCmd="" ) Bind a make and optional break command to a specified input device action. @param device The device to bind to. Can be keyboard, mouse, joystick or gamepad. @param action The device action to bind to. The action is dependant upon the device but for keyboard you specify a key. @param makeCmd The command to execute when the device/action is made. @param breakCmd The command to execute when the device/action is unmade [optional]. @return Whether the bind was successful. @tsexample // Print to the console when the spacebar is pressed function onSpaceDown() { echo("Space bar down!"); } // Print to the console when the spacebar is released function onSpaceUp() { echo("Space bar up!"); } // Bind the commands onSpaceDown and onSpaceUp to spacebar events moveMap.bindCmd(keyboard, "space", "onSpaceDown();", "onSpaceUp();"); @endtsexample bindObj (device, action, [modifier spec, mod...], command, object) @hide getBinding ( string command ) Get ActionMap binding for the specified command. @param command The specified command to search for. @return The binding against the specified command. @tsexample // Find what the function "jump()" is bound to in moveMap %bind = moveMap.getBinding( "jump" ); if ( %bind !$= "" ) { // Find out what device is used in the binding ^%device = getField( %bind, 0 ); // Find out what action (such as a key) is used in the binding ^%action = getField( %bind, 1 ); } @endtsexample getCommand ( string device, string action ) Get ActionMap command for the device and action. @param device The device that was bound. Can be keyboard, mouse, joystick or gamepad. @param action The device action that was bound. The action is dependant upon the device but for keyboard you specify a key. @return The command against the specified device and action. @tsexample // Find what function is bound to a device's action // In this example, "jump()" was assigned to the space key in another script %command = moveMap.getCommand("keyboard", "space"); // Should print "jump" in the console echo(%command) @endtsexample getDeadZone ( string device, string action ) Get DeadZone for the specified device and action. @param device The device that was bound. Can be keyboard, mouse, joystick or gamepad. @param action The device action that was bound. The action is dependant upon the device but for keyboard you specify a key. @return DeadZone for the specified device and action. @tsexample %deadZone = moveMap.getDeadZone( "gamepad", "thumbrx"); @endtsexample getScale ( string device, string action ) Get any scaling on the specified device and action. @param device The device that was bound. Can be keyboard, mouse, joystick or gamepad. @param action The device action that was bound. The action is dependant upon the device but for keyboard you specify a key. @return Any scaling applied to the specified device and action. @tsexample %scale = %moveMap.getScale( "gamepad", "thumbrx"); @endtsexample isInverted ( string device, string action ) Is the specified device and action binding inverted? @param device The device that was bound. Can be keyboard, mouse, joystick or gamepad. @param action The device action that was bound. The action is dependant upon the device but for keyboard you specify a key. @return If the specified device and action is inverted. @tsexample %flags = moveMap.isInverted( "mouse", "xaxis") ? "SDI" : "SD"; @endtsexample pop () Pop the ActionMap off the ActionMap stack. @tsexample // Deactivate moveMap moveMap.pop(); @endtsexample push () Push the ActionMap onto the ActionMap stack. @tsexample // Make moveMap the active action map moveMap.push(); @endtsexample save ( string fileName=NULL, bool append=false ) Save actionmap to the specified file. @param fileName The specified filename [optional]. If a filename is not specified then the ActionMap is dumped to the console. @param append Whether to write the ActionMap at the end of the specified file or not [optional]. Default is false. @tsexample // write out the control config into the rw/config.cs file moveMap.save( "scripts/client/config.cs" );@endtsexample unbind ( string device, string action ) Remove any binding on specified input device action. @param device The device to unbind from. Can be keyboard, mouse, joystick or gamepad. @param action The device action to unbind from. The action is dependant upon the device but for keyboard you specify a key. @return Whether the unbind was successful. @tsexample moveMap.unbind("keyboard", "space"); @endtsexample unbindObj ( string device, string action, string obj ) Remove any object-binding on specified input device action. @param device The device to bind to. Can be keyboard, mouse, joystick or gamepad. @param action The device action to unbind from. The action is dependant upon the device but for keyboard you specify a key. @param object The object to perform unbind against. @return Whether the unbind was successful. @tsexample moveMap.unbindObj("keyboard", "numpad1", "rangeChange", %player);@endtsexample ActionMapClass ConsoleClassObject ActionMapGroup SimGroup ActiveActionMapSet SimSet AdvancedLightBinManager RenderTexTargetBinManager AdvancedLightBinManagerClass ConsoleClassObject AIClient AIConnection getAimLocation ai.getAimLocation(); getLocation ai.getLocation(); getMoveDestination ai.getMoveDestination(); getTargetObject ai.getTargetObject(); missionCycleCleanup ai.missionCycleCleanup(); move ai.move(); moveForward ai.moveForward(); setAimLocation ai.setAimLocation( x y z ); setMoveDestination ai.setMoveDestination( x y z ); setMoveSpeed ai.setMoveSpeed( float ); setTargetObject ai.setTargetObject( obj ); stop ai.stop(); AIClientClass ConsoleClassObject AIConnection GameConnection getAddress getFreeLook getFreeLook()Is freelook on for the current move? getMove (string field) Get the given field of a move. @param field One of {'x','y','z','yaw','pitch','roll'} @returns The requested field on the current move. getTrigger (int trigger) Is the given trigger set? setFreeLook (bool isFreeLook) Enable/disable freelook on the current move. setMove (string field, float value) Set a field on the current move. @param field One of {'x','y','z','yaw','pitch','roll'} @param value Value to set field to. setTrigger (int trigger, bool set) Set a trigger. AIConnectionClass ConsoleClassObject AIPlayer Player clearAim () Use this to stop aiming at an object or a point. getAimLocation () @brief Returns the point the AI aiming at. This will reflect the position set by setAimLocation(), or the position of the object that the bot is now aiming at, or if the bot is not aiming at anything, this value will change to whatever point the bot's current line-of-sight intercepts.@return World space coordinates of the object AI is aiming at. Formatted as "X Y Z". getAimObject () @brief Gets the object the AI is targeting. @return Returns -1 if no object is being aimed at, or a non-zero positive integer ID of the object the bot is aiming at. getMoveDestination () @brief Push a line onto the back of the list. @return Returns a vector containing the <x y z> position of the bot's current move destination. If no move destination has yet been set, this returns "0 0 0". setAimLocation ( Point3F target ) @brief Tells the AI to aim at the location provided. @param target An XYZ vector representing a position in the game world. setAimObject ( GameBase obj, [Point3F offset] ) Sets the bot's target object. Optionally set an offset from target location.@hide setMoveDestination (Point3F goal, bool slowDown=true) Tells the AI to move to the location provided.@hide setMoveSpeed ( float speed ) @brief Sets the move speed for an AI object. @param speed A speed multiplier between 0.0 and 1.0. This is multiplied by the bot's base movement rates (from its datablock stop () Tells the AIPlayer to stop moving. AIPlayerClass ConsoleClassObject ArrayObject SimObject add ( string key, string value="" ) Adds a new element to the end of an array append ( ArrayObject target ) Appends the target array to the array object count () Get the number of elements in the array countKey ( string key ) Get the number of times a particular key is found in the array countValue ( string value ) Get the number of times a particular value is found in the array crop ( ArrayObject target ) Removes elements with matching keys from array duplicate ( ArrayObject target ) Alters array into an exact duplicate of the target array echo () Echos the array in the console empty () Emptys all elements from an array erase ( int index ) Removes an element at a specific position from the array getCurrent () Gets the current pointer index getIndexFromKey ( string key ) Search the array from the current position for the key @param value Array key to search for @return Index of the first element found, or -1 if none getIndexFromValue ( string value ) Search the array from the current position for the element @param value Array value to search for @return Index of the first element found, or -1 if none getKey ( int index ) Get the key of the array element at the submitted index getValue ( int index ) Get the value of the array element at the submitted index insert ( string key, string value, int index ) Adds a new element to a specified position in the array moveFirst () Moves array pointer to start of array @return Returns the new array pointer moveLast () Moves array pointer to end of array @return Returns the new array pointer moveNext () Moves array pointer to next position @return Returns the new array pointer, or -1 if already at the end movePrev () Moves array pointer to prev position @return Returns the new array pointer, or -1 if already at the start pop_back () Removes the last element from the array pop_front () Removes the first element from the array push_back ( string key, string value="" ) Adds a new element to the end of an array push_front ( string key, string value="" ) Adds a new element to the front of an array setCurrent ( int index ) Sets the current pointer index setKey ( string key, int index ) Set the key at the given index setValue ( string value, int index ) Set the value at the given index sort ( bool descending=false ) Alpha sorts the array by value @param descending [optional] True for descending sort, false for ascending sort sorta () Alpha sorts the array by value in ascending order sortd () Alpha sorts the array by value in descending order sortf ( string functionName ) Sorts the array by value in ascending order using the given callback function sortfd ( string functionName ) Sorts the array by value in descending order using the given callback function sortfk ( string functionName ) Sorts the array by key in ascending order using the given callback function sortfkd ( string functionName ) Sorts the array by key in descending order using the given callback function sortk ( bool descending=false ) Alpha sorts the array by key @param descending [optional] True for descending sort, false for ascending sort sortka () Alpha sorts the array by key in ascending order sortkd () Alpha sorts the array by key in descending order sortn ( bool descending=false ) Numerically sorts the array by value @param descending [optional] True for descending sort, false for ascending sort sortna () Numerically sorts the array by value in ascending order sortnd () Numerically sorts the array by value in descending order sortnk ( bool descending=false ) Numerically sorts the array by key @param descending [optional] True for descending sort, false for ascending sort sortnka () Numerical sorts the array by key in ascending order sortnkd () Numerical sorts the array by key in descending order uniqueKey () Removes any elements that have duplicated keys (leaving the first instance) uniqueValue () Removes any elements that have duplicated values (leaving the first instance) caseSensitive Makes the keys and values case-sensitive. By default, comparison of key and value strings will be case-insensitive. key Helper field which allows you to add new key['keyname'] = value pairs. ArrayObjectClass ConsoleClassObject BanList add ( int uniqueId, string transportAddress, int banLength ) Ban a user for banLength seconds. @param uniqueId Unique ID of the player. @param transportAddress Address from which the player connected. @param banLength Time period over which to ban the player.@tsexample // Kick someone off the server // %client - This is the connection to the person we are kicking function kick(%client) { ^^// Let the server know what happened ^^messageAll( 'MsgAdminForce', '\c2The Admin has kicked %1.', %client.playerName); ^^// If it is not an AI Player, execute the ban. ^^if (!%client.isAIControlled()) ^^^BanList::add(%client.guid, %client.getAddress(), $pref::Server::KickBanTime); ^^// Let the player know they messed up ^^%client.delete("You have been kicked from this server"); } @endtsexample addAbsolute ( int uniqueId, string transportAddress, int banTime ) Ban a user until a given time. @param uniqueId Unique ID of the player. @param transportAddress Address from which the player connected. @param banTime Time at which they will be allowed back in.@tsexample // Kick someone off the server // %client - This is the connection to the person we are kicking function kick(%client) { ^^// Let the server know what happened ^^messageAll( 'MsgAdminForce', '\c2The Admin has kicked %1.', %client.playerName); ^^// If it is not an AI Player, execute the ban. ^^if (!%client.isAIControlled()) ^^^BanList::addAbsolute(%client.guid, %client.getAddress(), $pref::Server::KickBanTime); ^^// Let the player know they messed up ^^%client.delete("You have been kicked from this server"); } @endtsexample export ( string filename ) Dump the banlist to a file. @param filename Path of the file to write the list to. @tsexample BanList::Export("./server/banlist.cs"); @endtsexample isBanned ( int uniqueId, string transportAddress ) Is someone banned? @param uniqueId Unique ID of the player. @param transportAddress Address from which the player connected. @tsexample //----------------------------------------------------------------------------- // This script function is called before a client connection // is accepted. Returning will accept the connection, // anything else will be sent back as an error to the client. // All the connect args are passed also to onConnectRequest function GameConnection::onConnectRequest( %client, %netAddress, %name ) { ^ // Find out who is trying to connect ^ echo("Connect request from: " @ %netAddress); ^ // Are they allowed in? ^ if(BanList::isBanned(%client.guid, %netAddress)) ^^ return "CR_YOUAREBANNED"; ^ // Is there room for an unbanned player? ^ if($Server::PlayerCount >= $pref::Server::MaxPlayers) ^^ return "CR_SERVERFULL"; ^ return ; } @endtsexample removeBan ( int uniqueId, string transportAddress ) Unban someone. @param uniqueId Unique ID of the player. @param transportAddress Address from which the player connected. @tsexample BanList::removeBan(%userID, %ipAddress); @endtsexample BasicClouds SceneObject height Abstract number which controls the curvature and height of the dome mesh layerEnabled Enable or disable rendering of this layer. texDirection Texture scroll direction for this layer, relative to the world axis. texOffset UV offset for this layer. texScale Texture repeat for this layer. texSpeed Texture scroll speed for this layer. texture Texture for this layer. BasicCloudsClass ConsoleClassObject BehaviorSet SimSet CachedInterfaceExampleComponent SimComponent CachedInterfaceExampleComponentClass ConsoleClassObject Camera ShapeBase autoFitRadius ( float radius ) Move the camera to fully view the given radius. @note For this operation to take affect a valid edit orbit point must first be specified. See Camera::setEditOrbitPoint(). @param radius The radius to view. getAngularVelocity () Get the angular velocity for a Newton mode camera. @returns The angular velocity in the form of "x y z". @note Only returns useful results when Camera::newtonRotation is set to true. getMode () Returns the current camera control mode. @see CameraMode getOffset () Get the camera's offset. The offset is added to the camera's position when set to CameraMode::OrbitObject. @returns The offset in the form of "x y z". getPosition () Get the camera's position in the world. @returns The position in the form of "x y z". getRotation () Get the camera's Euler rotation in radians. @returns The rotation in radians in the form of "x y z". getVelocity () Get the velocity for the camera. @returns The camera's velocity in the form of "x y z". isEditOrbitMode () Is the camera in edit orbit mode? @returns true if the camera is in edit orbit mode. isRotationDamped () Is this a Newton Fly mode camera with damped rotation? @returns true if the camera uses a damped rotation. i.e. Camera::newtonRotation is set to true. lookAt ( Point3F point ) Point the camera at the specified position. Does not work in Orbit or Track modes. @param point The position to point the camera at. setAngularDrag ( float drag ) Set the angular drag for a Newton mode camera. @param drag The angular drag applied while the camera is rotating.@note Only takes affect when Camera::newtonRotation is set to true. setAngularForce ( float force ) Set the angular force for a Newton mode camera. @param force The angular force applied when attempting to rotate the camera.@note Only takes affect when Camera::newtonRotation is set to true. setAngularVelocity ( VectorF velocity ) Set the angular velocity for a Newton mode camera. @param velocity The angular velocity infor form of "x y z". @note Only takes affect when Camera::newtonRotation is set to true. setBrakeMultiplier ( float multiplier ) Set the Newton mode camera brake multiplier when trigger[1] is active. @param multiplier The brake multiplier to apply. setDrag ( float drag ) Set the drag for a Newton mode camera. @param drag The drag applied to the camera while moving. setEditOrbitMode () Set the editor camera to orbit around a point set with Camera::setEditOrbitPoint(). @note This method is generally used only within the World Editor and other tools. To orbit about an object or point within a game, see Camera::setOrbitMode() and its helper methods. setEditOrbitPoint ( Point3F point ) Set the editor camera's orbit point. @param point The point the camera will orbit in the form of "x y z". setFlyForce ( float force ) Set the force applied to a Newton mode camera while moving. @param force The force applied to the camera while attempting to move. setFlyMode () Set the camera to fly freely. Allows the camera to have 6 degrees of freedom. Provides for instantaneous motion and rotation unless one of the Newton fields has been set to true. See Camera::newtonMode and Camera::newtonRotation. setMass ( float mass ) Set the mass for a Newton mode camera. @param mass The mass used during ease-in and ease-out calculations. setNewtonFlyMode () Set the camera to fly freely, but with ease-in and ease-out. This method allows for the same 6 degrees of freedom as Camera::setFlyMode() but activates the ease-in and ease-out on the camera's movement. To also activate Newton mode for the camera's rotation, set Camera::newtonRotation to true. setOffset ( Point3F offset ) Set the camera's offset. The offset is added to the camera's position when set to CameraMode::OrbitObject. @param offset The distance to offset the camera by in the form of "x y z". setOrbitMode ( GameBase orbitObject, TransformF orbitPoint, float minDistance, float maxDistance, float initDistance, bool ownClientObj=false, Point3F offset=Point3F(0.0f, 0.0f, 0.0f), bool locked=false ) Set the camera to orbit around the given object, or if none is given, around the given point. @param orbitObject The object to orbit around. If no object is given (0 or blank string is passed in) use the orbitPoint instead @param orbitPoint The point to orbit around when no object is given. In the form of "x y z ax ay az aa" such as returned by SceneObject::getTransform(). @param minDistance The minimum distance allowed to the orbit object or point. @param maxDistance The maximum distance allowed from the orbit object or point. @param initDistance The initial distance from the orbit object or point. @param ownClientObj [optional] Are we orbiting an object that is owned by us? Default is false. @param offset [optional] An offset added to the camera's position. Default is no offset. @param locked [optional] Indicates the camera does not receive input from the player. Default is false. @see Camera::setOrbitObject() @see Camera::setOrbitPoint() setOrbitObject ( GameBase orbitObject, VectorF rotation, float minDistance, float maxDistance, float initDistance, bool ownClientObject=false, Point3F offset=Point3F(0.0f, 0.0f, 0.0f), bool locked=false ) Set the camera to orbit around a given object. @param orbitObject The object to orbit around. @param rotation The initial camera rotation about the object in radians in the form of "x y z". @param minDistance The minimum distance allowed to the orbit object or point. @param maxDistance The maximum distance allowed from the orbit object or point. @param initDistance The initial distance from the orbit object or point. @param ownClientObj [optional] Are we orbiting an object that is owned by us? Default is false. @param offset [optional] An offset added to the camera's position. Default is no offset. @param locked [optional] Indicates the camera does not receive input from the player. Default is false. @returns false if the given object could not be found. @see Camera::setOrbitMode() setOrbitPoint ( TransformF orbitPoint, float minDistance, float maxDistance, float initDistance, Point3F offset=Point3F(0.0f, 0.0f, 0.0f), bool locked=false ) Set the camera to orbit around a given point. @param orbitPoint The point to orbit around. In the form of "x y z ax ay az aa" such as returned by SceneObject::getTransform(). @param minDistance The minimum distance allowed to the orbit object or point. @param maxDistance The maximum distance allowed from the orbit object or point. @param initDistance The initial distance from the orbit object or point. @param offset [optional] An offset added to the camera's position. Default is no offset. @param locked [optional] Indicates the camera does not receive input from the player. Default is false. @see Camera::setOrbitMode() setRotation ( Point3F rot ) Set the camera's Euler rotation in radians. @param The rotation in radians in the form of "x y z".@note Rotation around the Y axis is ignored setSpeedMultiplier ( float multiplier ) Set the Newton mode camera speed multiplier when trigger[0] is active. @param multiplier The speed multiplier to apply. setTrackObject ( GameBase trackObject, Point3F offset=Point3F(0.0f, 0.0f, 0.0f) ) Set the camera to track a given object. @param objtrackObjectect The object to track. @param offset [optional] An offset added to the camera's position. Default is no offset. @returns false if the given object could not be found. setValidEditOrbitPoint ( bool validPoint ) Set if there is a valid editor camera orbit point. @param validPoint Indicates the validity of the orbit point. setVelocity ( VectorF velocity ) Set the velocity for the camera. @param velocity The camera's velocity in the form of "x y z". angularDrag Drag on camera when rotating. Default value is 2. angularForce Force applied on camera when asked to rotate. Default value is 100. brakeMultiplier Speed multiplier when triggering the brake. Default value is 2. controlMode The current camera control mode. drag Drag on camera when moving. Default value is 2. force Force applied on camera when asked to move. Default value is 500. mass The camera's mass. Default value is 10. newtonMode Apply smoothing (acceleration and damping) to camera movements. newtonRotation Apply smoothing (acceleration and damping) to camera rotations. speedMultiplier Speed multiplier when triggering the accelerator. Default value is 2. CameraBookmark MissionMarker CameraBookmarkClass ConsoleClassObject CameraClass ConsoleClassObject CameraData ShapeBaseData CameraDataClass ConsoleClassObject ClientConnectionGroup SimGroup ClientGroup SimGroup CloudLayer SceneObject baseColor Base cloud color before lighting. coverage Fraction of sky covered by clouds 0-1. exposure Brightness scale so CloudLayer can be overblown if desired. height Abstract number which controls the curvature and height of the dome mesh. texDirection Controls the direction this slot scrolls. texScale Controls the texture repeat of this slot. texSpeed Controls the speed this slot scrolls. texture An RGBA texture which should contain normals and opacity (density). windSpeed Overall scalar to texture scroll speed. CloudLayerClass ConsoleClassObject CompoundUndoAction UndoAction addAction addAction( UndoAction ) CompoundUndoActionClass ConsoleClassObject ConnectionMessageEvent ConnectionMessageEventClass ConsoleClassObject ConsoleClassObject ConsoleReflectionObject createObject ( string name=, id group=RootGroup ) Return a new instance of this class. getCategory () Return the category string for the class. getDescription () Return the description string for the class. getNameOfClass () Return the name of the class. getSuperClass () Return the meta-object of the superclass (0 for SimObject). isSubclassOf ( id classObject ) Return true if this class is a subclass of the class represented by the given class object. lookup ( string className ) Return the class object for the given class. lookupField ( string fieldName ) Look up the given field in the hierarchy of this class. lookupMethod ( string methodName ) Look up the given method in the hierarchy of this class. ConsoleClassObjectClass ConsoleClassObject ConsoleClassObjectGroup SimGroup ConsoleFieldObject ConsoleReflectionObject getDefiningClass () Return the meta-object for the class that defines this field. getFieldType () Return the field type name. getNameOfField () Return the name of the field. getValueFromObject ( id object, int offset=0 ) ConsoleFieldObjectClass ConsoleClassObject ConsoleFunctionObject ConsoleReflectionObject getMaxNumArgs () Return the maximum number of arguments that this function expects. getMinNumArgs () Return the minimum number of arguments that this function expects. getReturnType () Return the type of values returned by this function. getUsage () Return the usage string for the function. ConsoleFunctionObjectClass ConsoleClassObject ConsoleLogger SimObject attach () Attaches the logger to the console and begins writing to file@tsexample // Create the logger // Will automatically start writing to testLogging.txt with normal priority new ConsoleLogger(logger, "testLogging.txt", false); // Send something to the console, with the logger consumes and writes to file echo("This is logged to the file"); // Stop logging, but do not delete the logger logger.detach(); echo("This is not logged to the file"); // Attach the logger to the console again logger.attach(); // Logging has resumed echo("Logging has resumed");@endtsexample detach () Detaches the logger from the console and stops writing to file@tsexample // Create the logger // Will automatically start writing to testLogging.txt with normal priority new ConsoleLogger(logger, "testLogging.txt", false); // Send something to the console, with the logger consumes and writes to file echo("This is logged to the file"); // Stop logging, but do not delete the logger logger.detach(); echo("This is not logged to the file"); // Attach the logger to the console again logger.attach(); // Logging has resumed echo("Logging has resumed");@endtsexample level Determines the priority level and attention the logged entry gets when recorded ConsoleLoggerClass ConsoleClassObject ConsoleMethodObject ConsoleFunctionObject ConsoleMethodObjectClass ConsoleClassObject ConsoleReflectionObject SimGroup ConsoleReflectionObjectClass ConsoleClassObject ConvexShape SceneObject Material Material used to render the ConvexShape surface. surface Do not modify, for internal use. ConvexShapeClass ConsoleClassObject CreatorTree GuiArrayCtrl addGroup (string group, string name, string value) addItem (Node group, string name, string value) clear Clear the tree. fileNameMatch (string world, string type, string filename) getName (Node item) getParent (Node n) getSelected Return a handle to the currently selected item. getValue (Node n) isGroup (Group g) CreatorTreeClass ConsoleClassObject CubemapData SimObject getFilename () Returns the script filename of where the CubemapData object was defined. This is used by the material editor. updateFaces () Update the assigned cubemaps faces. cubeFace @breif The 6 cubemap face textures for a static cubemap. They are in the following order: - cubeFace[0] is -X - cubeFace[1] is +X - cubeFace[2] is -Z - cubeFace[3] is +Z - cubeFace[4] is -Y - cubeFace[5] is +Y dynamic Set to true if this is a dynamic cubemap. The default is false. dynamicFarDist The far clip distance used when rendering to the dynamic cubemap. dynamicNearDist The near clip distance used when rendering to the dynamic cubemap. dynamicObjectTypeMask The typemask used to filter the objects rendered to the dynamic cubemap. dynamicSize The size of each dynamic cubemap face in pixels. CubemapDataClass ConsoleClassObject CustomMaterial Material fallback Alternate CustomMaterial targeting lower end hardware shader Name of a GFXShaderData for this effect stateBlock Name of a GFXStateBlockData for this effect target String identifier of this material's target texture version Specifies pixel shader version for hardware, such as 2.0, 3.0, etc CustomMaterialClass ConsoleClassObject DataBlockGroup SimGroup DataBlockSet SimSet DBDeleteUndoAction UndoAction DBDeleteUndoActionClass ConsoleClassObject DbgFileView GuiArrayCtrl clearBreakPositions () Clear all break points in the current file. findString (string findThis) Find the specified string in the currently viewed file and scroll it into view. getCurrentLine () Get the currently executing file and line, if any. @returns A string containing the file, a tab, and then the line number. Use getField() with this. open (string filename) Open a file for viewing. @note This loads the file from the local system. removeBreak (int line) Remove a breakpoint from the specified line. setBreak (int line) Set a breakpoint at the specified line. setBreakPosition (int line) Set a breakpoint at the specified line. setCurrentLine (int line, bool selected) Set the current highlighted line. DbgFileViewClass ConsoleClassObject DBRetargetUndoAction UndoAction DBRetargetUndoActionClass ConsoleClassObject Debris GameBase init ( string inputPosition="1.0 1.0 1.0", string inputVelocity="1.0 0.0 0.0" ) Set this piece of debris at the given position with the given velocity. @param Position Position to place the debris. @param Velocity Velocity to move the debris after it has been placed. @return Always returns true. @tsexample // Define the position %position = "1.0 1.0 1.0"; // Define the velocity %velocity = "1.0 0.0 0.0"; // Inform the debris object of its new position and velocity %debris.init(%position,%velocity); @endtsexample @see DebrisData @see Explosion @see ExplosionData @ingroup FX Lifetime Length of time for this debris object to exist. When expired, the object will be deleted. DebrisClass ConsoleClassObject DebrisData GameBaseData baseRadius Radius at which the standard elasticity and friction apply. bounceVariance Allowed variance in the value of numBounces. elasticity A floating-point value specifying how 'bouncy' this object is. emitters List of particle emitters to spawn along with this debris object. explodeOnMaxBounce If true, this debris object will explode after it has bounced max times. Explosion ExplosionData to spawn along with this debris object. fade If true, this debris object will fade out when destroyed. friction A floating-point value specifying how much velocity is lost to impact and sliding friction. gravModifier How much gravity affects debris. ignoreWater If true, this debris object will not collide with water, acting as if the water is not there. Lifetime Amount of time until this debris object is destroyed. lifetimeVariance Allowed variance in the value of lifetime. maxSpinSpeed Maximum speed that this debris object will rotate. minSpinSpeed Minimum speed that this debris object will rotate. numBounces How many times to allow this debris object to bounce until it either explodes, becomes static or snaps (defined in explodeOnMaxBounce, staticOnMaxBounce, snapOnMaxBounce). shapeFile Object model to use for this debris object. snapOnMaxBounce If true, this debris object will snap into a resting position on the last bounce. staticOnMaxBounce If true, this debris object becomes static after it has bounced max times. terminalVelocity Max velocity magnitude. texture Texture imagemap to use for this debris object. useRadiusMass Use mass calculations based on radius. velocity Speed at which this debris object will move. velocityVariance Allowed variance in the value of velocity DebrisDataClass ConsoleClassObject DebugDraw DebugDrawer DebugDrawer SimObject drawBox ( Point3F a, Point3F b, ColorF color=ColorF::WHITE ) Draws an axis aligned box primitive within the two 3d points. drawLine ( Point3F a, Point3F b, ColorF color=ColorF::WHITE ) Draws a line primitive between two 3d points. setLastTTL ( int ms ) Sets the "time to live" (TTL) for the last rendered primitive. setLastZTest ( bool enabled ) Sets the z buffer reading state for the last rendered primitive. toggleDrawing () Toggles the rendering of DebugDrawer primitives. toggleFreeze () Toggles freeze mode which keeps the currently rendered primitives from expiring. DebugDrawerClass ConsoleClassObject DecalData SimDataBlock postApply () Reloads imagemap textures for this DecalData. @tsexample // Inform the decal object to reload its imagemap and frame data. %decalData.postApply(); @endtsexample clippingAngle The angle in degrees used to clip geometry that faces away from the decal projection direction. fadeEndPixelSize LOD value - size in pixels at which decals of this type are fully faded out. This should be a smaller value than fadeStartPixelSize. fadeStartPixelSize LOD value - size in pixels at which decals of this type begin to fade out. This should be a larger value than fadeEndPixelSize. However, you may also set this to a negative value to disable lod-based fading. fadeTime Milliseconds of sim time for decal to fade after expiration. frame Index of texture rectangle to use for this decal. lifeSpan Milliseconds of sim time for decal to expire. Material Material for this decal type. randomize If true, a random texture rectangle is picked for each instance of this decal. renderPriority Default renderPriority for decals of this type. size Width/height in meters before scale is applied. texCols Number of columns on the supplied imagemap. texRows Number of rows on the supplied imagemap. textureCoordCount Number of individual frames in this imagemap. textureCoords A RectF in uv space - eg ( topleft.x topleft.y extent.x extent.y ) DecalDataClass ConsoleClassObject DecalManager SceneObject DecalManagerClass ConsoleClassObject DecalRoad SceneObject postApply () Intended as a helper to developers and editor scripts. Force trigger an inspectPostApply. This will transmit the material and other fields ( not including nodes ) to client objects. regenerate () Intended as a helper to developers and editor scripts. Force DecalRoad to update it's spline and reclip geometry. breakAngle Angle in degrees - DecalRoad will subdivided the spline if its curve is greater than this threshold. Material Material used for rendering. Node Do not modify, for internal use. renderPriority DecalRoad(s) are rendered in descending renderPriority order. textureLength The length in meters of textures mapped to the DecalRoad DecalRoadClass ConsoleClassObject DICreateUndoAction UndoAction DICreateUndoActionClass ConsoleClassObject DIDeleteUndoAction UndoAction DIDeleteUndoActionClass ConsoleClassObject DynamicConsoleMethodComponent SimComponent callMethod (methodName, argi) Calls script defined method @param methodName The method's name as a string @param argi Any arguments to pass to the method @return No return value@note %obj.callMethod( %methodName, %arg1, %arg2, ... ); DynamicConsoleMethodComponentClass ConsoleClassObject EditManager GuiControl editorDisabled Perform the onEditorDisabled callback on all SimObjects and set gEditingMission false editorEnabled Perform the onEditorEnabled callback on all SimObjects and set gEditingMission true gotoBookmark (int slot) isEditorEnabled Return the value of gEditingMission. setBookmark (int slot) EditManagerClass ConsoleClassObject EditorIconRegistry add ( String className, String imageFile [, bool overwrite = true] ) @internal clear @internal findIconByClassName ( String className ) Returns the file path to the icon file if found.@internal findIconBySimObject ( SimObject ) Returns the file path to the icon file if found.@internal loadFromPath ( String imagePath [, bool overwrite = true] ) @internal EditTSCtrl GuiTSCtrl getDisplayType () getGizmo () getOrthoFOV () Return the FOV for orthographic views. isMiddleMouseDown () renderBox ( Point3F pos, Point3F size ) renderCircle ( Point3F pos, Point3F normal, float radius, int segments=0 ) renderLine ( Point3F start, Point3F end, float lineWidth=0 ) renderSphere ( Point3F pos, float radius, int sphereLevel=0 ) renderTriangle ( Point3F a, Point3F b, Point3F c ) setDisplayType ( int displayType ) setOrthoFOV ( float fov ) Set the FOV for to use for orthographic views. allowBorderMove bool allowBorderMove borderMovePixelSize int borderMovePixelSize borderMoveSpeed float borderMoveSpeed consoleCircleSegments int consoleCircleSegments consoleFillColor ColorI consoleFillColor consoleFrameColor ColorI consoleFrameColor consoleLineWidth int consoleLineWidth consoleSphereLevel int consoleSphereLevel GizmoProfile GizmoProfile GizmoProfile gridColor ColorI gridColor gridMinorTickColor ColorI gridMinorTickColor gridOriginColor ColorI gridOriginColor gridSize float gridSize missionAreaFillColor ColorI missionAreaFillColor missionAreaFrameColor ColorI missionAreaFrameColor renderMissionArea bool renderMissionArea renderOrthoGrid Whether to render the grid in orthographic axial projections. renderOrthoGridPixelBias Grid patch pixel size below which to switch to coarser grid resolutions. EditTSCtrlClass ConsoleClassObject EventManager SimObject dumpEvents () Print all registered events to the console. dumpSubscribers ( String event ) Print all subscribers to an event to the console. @param event The event whose subscribers are to be printed. If this parameter isn't specified, all events will be dumped. isRegisteredEvent ( String event ) Check if an event is registered or not. @param event The event to check. @return Whether or not the event exists. postEvent ( String event, String data ) Trigger an event. @param event The event to trigger. @param data The data associated with the event. @return Whether or not the event was dispatched successfully. registerEvent ( String event ) Register an event with the event manager. @param event The event to register. @return Whether or not the event was registered successfully. remove ( SimObject listener, String event ) Remove a listener from an event. @param listener The listener to remove. @param event The event to be removed from. removeAll ( SimObject listener ) Remove a listener from all events. @param listener The listener to remove. subscribe ( SimObject listener, String event, String callback ) Subscribe a listener to an event. @param listener The listener to subscribe. @param event The event to subscribe to. @param callback Optional method name to receive the event notification. If this is not specified, "on[event]" will be used. @return Whether or not the subscription was successful. unregisterEvent ( String event ) Remove an event from the EventManager. @param event The event to remove. queue List of events currently waiting EventManagerClass ConsoleClassObject Explosion GameBase ExplosionClass ConsoleClassObject ExplosionData GameBaseData camShakeAmp Amplitude to shake the camera, defined as the 3 F32 values of X Y Z. camShakeDuration Duration to shake the camera. camShakeFalloff Falloff value for the camera shake. camShakeFreq Frequency to shake the camera, defined as the 3 F32 values of X Y Z. camShakeRadius Radial distance that a camera's position must be in relation to the center of the explosion to have its camera shaken. Debris List of DebrisData to spawn with this explosion. debrisNum Number of debris objects to create. debrisNumVariance Variance in the number of debris objects to create, from 0 to n. debrisPhiMax Maximum reference angle, from the vertical plane, to eject debris from. debrisPhiMin Minimum reference angle, from the vertical plane, to eject debris from. debrisThetaMax Maximum angle, from the horizontal plane, to eject debris from. debrisThetaMin Minimum angle, from the horizontal plane, to eject debris from. debrisVelocity Velocity to toss debris at. debrisVelocityVariance Variance in the debris velocity, from 0 to n. delayMS Amount of time, in milliseconds, to delay the explosion from starting from the creation of this ExplosionData object. delayVariance Variance of the delayMS, in milliseconds, to delay the expolosion from start from the creation of this ExplosionData object. emitter List of ParticleEmitterData objects to spawn with this explosion. explosionScale Scale size create the explosionShape DTS model at the start of the explosion. explosionShape DTS shape to place at the center of the explosion. The 'ambient' animation of this model will automatically be played at the start of the explosion. faceViewer Boolean, sets if the visual effects of the explosion should or should not face the player. lifetimeMS Lifetime, in milliseconds, of this ExplosionData object. lifetimeVariance Time variance, in milliseconds, for the lifetimeMS of this ExplosionData object. lightEndBrightness float lightEndBrightness lightEndColor ColorF lightEndColor lightEndRadius float lightEndRadius lightNormalOffset float lightNormalOffset lightStartBrightness float lightStartBrightness lightStartColor ColorF lightStartColor lightStartRadius float lightStartRadius offset Allowed offset for the center position of this ExplosionData to be created from the specified position. particleDensity Density of the particles used in the explosion. ParticleEmitter ParticleEmitterData object to be spawned with this explosion. particleRadius Radius distance that particles should travel from the explosion. playSpeed Time scale at which to play the full explosion sequence. shakeCamera Boolean, determines if the camera shakes or not during this explosion. sizes Sizes to set the ExplosionData. Up to 4 allowed. Will transition through sizes based on values set in the times value. soundProfile Non-looping sound effect that will be played at the start of the explosion. subExplosion List of additional ExplosionData objects to create alongside this ExplosionData object. times Times to transition through the explosion effect. Up to 4 allowed. Values are 0.0 - 1.0, and corrispond to the life of the ExplosionData where 0 is the beginning and 1 is end of the lifespace. ExplosionDataClass ConsoleClassObject FieldBrushObject SimObject copyFields (simObject, [fieldList]) Copy selected static-fields for selected object./ @param simObject Object to copy static-fields from. @param fieldList fields to filter static-fields against. @return No return value. pasteFields (simObject) Paste copied static-fields to selected object./ @param simObject Object to paste static-fields to. @return No return value. queryFields (simObject, [groupList]) Query available static-fields for selected object./ @param simObject Object to query static-fields on. @param groupList groups to filter static-fields against. @return Space-seperated static-field list. queryGroups (simObject) Query available static-field groups for selected object./ @param simObject Object to query static-field groups on. @return Space-seperated static-field group list. description caseString description sortName string sortName FieldBrushObjectClass ConsoleClassObject FileChunkEvent FileChunkEventClass ConsoleClassObject FileDialog SimObject Execute () Launches the OS file browser @tsexample // NOTE: This is not he preferred class to use, but this still works // Create the file dialog %baseFileDialog = new FileDialog() { // Allow browsing of all file types filters = "*.*"; // No default file defaultFile = ; // Set default path relative to project defaultPath = "./"; // Set the title title = "Durpa"; // Allow changing of path you are browsing changePath = true; }; // Launch the file dialog %baseFileDialog.Execute(); // Don't forget to cleanup %baseFileDialog.delete(); // A better alternative is to use the // derived classes which are specific to file open and save // Create a dialog dedicated to opening files %openFileDlg = new OpenFileDialog() { // Look for jpg image files // First part is the descriptor|second part is the extension Filters = "Jepg Files|*.jpg"; // Allow browsing through other folders ChangePath = true; // Only allow opening of one file at a time MultipleFiles = false; }; // Launch the open file dialog %openFileDlg.Execute(); // Cleanup %openFileDlg.delete(); // Create a dialog dedicated to opening file %saveFileDlg = new SaveFileDialog() { // Only allow for saving of COLLADA files Filters = "COLLADA Files (*.dae)|*.dae|"; // Default save path to where the WorldEditor last saved DefaultPath = $pref::WorldEditor::LastPath; // No default file specified DefaultFile = ""; // Do not allow the user to change to a new directory ChangePath = false; // Prompt the user if they are going to overwrite an existing file OverwritePrompt = true; }; // Launch the save file dialog %saveFileDlg.Execute(); // Cleanup %saveFileDlg.delete(); @endtsexample @return True if the file was selected was successfully found (opened) and declared (saved). changePath True/False whether to set the working directory to the directory returned by the dialog. defaultFile The default file path when the dialog is shown. defaultPath The default directory path when the dialog is shown. fileName The default file name when the dialog is shown. filters The filter string for limiting the types of files visible in the dialog. For example: ^ 'All Files|*.*' ^ 'Image Files|*.png;*.jpg|Png Files|*.png|Jepg Files|*.jpg' title The title for the dialog. FileDialogClass ConsoleClassObject FileDownloadRequestEvent FileDownloadRequestEventClass ConsoleClassObject FileObject SimObject close () @brief Close the file. It is EXTREMELY important that you call this function when you are finished reading or writing to a file. Failing to do so is not only a bad programming practice, but could result in bad data or corrupt files. Remember: Open, Read/Write, Close, Delete...in that order! @tsexample // Create a file object for reading %fileRead = new FileObject(); // Open a text file, if it exists %fileRead.OpenForRead("./test.txt"); // Peek the first line %line = %fileRead.peekLine(); // Print the line we just peeked echo(%line); // If we peek again... %line = %fileRead.peekLine(); // We will get the same output as the first time // since the stream did not move forward echo(%line); // Close the file when finished %fileWrite.close(); // Cleanup the file object %fileWrite.delete(); @endtsexample isEOF () @brief Determines if the parser for this FileObject has reached the end of the file @tsexample // Create a file object for reading %fileRead = new FileObject(); // Open a text file, if it exists %fileRead.OpenForRead("./test.txt"); // Keep reading until we reach the end of the file while( !%fileRead.isEOF() ) { %line = %fileRead.readline(); echo(%line); } // Made it to the end echo("Finished reading file"); @endtsexample @return True if the parser has reached the end of the file, false otherwise openForAppend ( string filename ) @brief Open a specified file for writing, adding data to the end of the file There is no limit as to what kind of file you can write. Any format and data is allowable, not just text. Unlike openForWrite, which will erase an existing file if it is opened, openForAppend preserves data in an existing file and adds to it. @param filename Path, name, and extension of file to append to@tsexample // Create a file object for writing %fileWrite = new FileObject(); // Open a file to write to, if it does not exist it will be created // If it does exist, whatever we write will be added to the end %fileWrite.OpenForAppend("./test.txt"); @endtsexample @return True if file was successfully opened, false otherwise openForRead ( string filename ) @brief Open a specified file for reading There is no limit as to what kind of file you can read. Any format and data contained within is accessible, not just text @param filename Path, name, and extension of file to be read@tsexample // Create a file object for reading %fileRead = new FileObject(); // Open a text file, if it exists %fileRead.OpenForRead("./test.txt"); @endtsexample @return True if file was successfully opened, false otherwise openForWrite ( string filename ) @brief Open a specified file for writing There is no limit as to what kind of file you can write. Any format and data is allowable, not just text @param filename Path, name, and extension of file to write to@tsexample // Create a file object for writing %fileWrite = new FileObject(); // Open a file to write to, if it does not exist it will be created %fileWrite.OpenForWrite("./test.txt"); @endtsexample @return True if file was successfully opened, false otherwise peekLine () @brief Read a line from the file without moving the stream position. Emphasis on *line*, as in you cannot parse individual characters or chunks of data. There is no limitation as to what kind of data you can read. Unlike readLine, the parser does not move forward after reading. @param filename Path, name, and extension of file to be read@tsexample // Create a file object for reading %fileRead = new FileObject(); // Open a text file, if it exists %fileRead.OpenForRead("./test.txt"); // Peek the first line %line = %fileRead.peekLine(); // Print the line we just peeked echo(%line); // If we peek again... %line = %fileRead.peekLine(); // We will get the same output as the first time // since the stream did not move forward echo(%line); @endtsexample @return String containing the line of data that was just peeked readLine () @brief Read a line from file. Emphasis on *line*, as in you cannot parse individual characters or chunks of data. There is no limitation as to what kind of data you can read. @tsexample // Create a file object for reading %fileRead = new FileObject(); // Open a text file, if it exists %fileRead.OpenForRead("./test.txt"); // Read in the first line %line = %fileRead.readline(); // Print the line we just read echo(%line); @endtsexample @return String containing the line of data that was just read writeLine ( string text ) @brief Write a line to the file, if it was opened for writing. There is no limit as to what kind of text you can write. Any format and data is allowable, not just text. Be careful of what you write, as whitespace, current values, and literals will be preserved. @param text The data we are writing out to file.@tsexample // Create a file object for writing %fileWrite = new FileObject(); // Open a file to write to, if it does not exist it will be created %fileWrite.OpenForWrite("./test.txt"); // Write a line to the text files %fileWrite.writeLine("READ. READ CODE. CODE"); @endtsexample @return True if file was successfully opened, false otherwise writeObject FileObject.writeObject(SimObject, object prepend)@hide FileObjectClass ConsoleClassObject FileStreamObject StreamObject close () @brief Close the file. You can no longer read or write to it unless you open it again. @tsexample // Create a file stream object for reading %fsObject = new FileStreamObject(); // Open a file for reading %fsObject.open("./test.txt", "read"); // Always remember to close a file stream when finished %fsObject.close(); @endtsexample open ( string filename, string openMode ) @brief Open a file for reading, writing, reading and writing, or appending Using "Read" for the open mode allows you to parse the contents of file, but not making modifications. "Write" will create a new file if it does not exist, or erase the contents of an existing file when opened. Write also allows you to modify the contents of the file. "ReadWrite" will provide the ability to parse data (read it in) and manipulate data (write it out) interchangeably. Keep in mind the stream can move during each operation. Finally, "WriteAppend" will open a file if it exists, but will not clear the contents. You can write new data starting at the end of the files existing contents. @param filename Name of file to open @param openMode One of "Read", "Write", "ReadWrite" or "WriteAppend" @tsexample // Create a file stream object for reading %fsObject = new FileStreamObject(); // Open a file for reading %fsObject.open("./test.txt", "read"); // Get the status and print it %status = %fsObject.getStatus(); echo(%status); // Always remember to close a file stream when finished %fsObject.close(); @endtsexample @return True if the file was successfully opened, false if something went wrong FileStreamObjectClass ConsoleClassObject FlyingVehicle Vehicle useCreateHeight ( bool enabled ) Set whether the vehicle should temporarily use the createHoverHeight specified in the datablock. This can help avoid problems with spawning. @param enabled true to use the datablock createHoverHeight, false otherwise FlyingVehicleClass ConsoleClassObject FlyingVehicleData VehicleData autoAngularForce Corrective torque applied to level out the vehicle when moving at less than maxAutoSpeed. The force is inversely proportional to vehicle speed. autoInputDamping Scale factor applied to steering input if speed is less than maxAutoSpeed. Smaller values make steering less sensitive. autoLinearForce Corrective force applied to slow the vehicle when moving at less than maxAutoSpeed. The force is inversely proportional to vehicle speed. backwardJetEmitter Emitter to generate particles for backward jet thrust. Backward jet thrust particles are emitted from model nodes JetNozzleX and JetNozzleY. createHoverHeight The vehicle's height off the ground when useCreateHeight is active. This can help avoid problems with spawning the vehicle. downJetEmitter Emitter to generate particles for downward jet thrust. Downward jet thrust particles are emitted from model nodes JetNozzle2 and JetNozzle3. engineSound Looping engine sound. forwardJetEmitter Emitter to generate particles for forward jet thrust. Forward jet thrust particles are emitted from model nodes JetNozzle0 and JetNozzle1. horizontalSurfaceForce Damping force in the opposite direction to sideways velocity. hoverHeight The vehicle's height off the ground when at rest. jetSound Looping sound to play while the vehicle is jetting. maneuveringForce Maximum X and Y (horizontal plane) maneuvering force. The actual force applied depends on the current thrust. maxAutoSpeed Maximum speed for automatic vehicle control assistance. Vehicles travelling at speeds above this value do not get control assitance. minTrailSpeed Minimum speed to start generating contrail particles. rollForce Damping torque against rolling maneuvers (rotation about the y-axis). Acts to adjust roll to a stable position over time. rotationalDrag Rotational drag factor. Slows vehicle rotation. steeringForce Maximum X and Z (sideways and vertical) steering force. The actual force applied depends on the current steering input. steeringRollForce Roll force induced by sideways steering input value. trailEmitter Emitter to generate contrail particles from model nodes contrail0 - contrail3. verticalSurfaceForce Damping force in the opposite direction to vertical velocity. vertThrustMultiple Multiplier applied to the jetForce (defined in VehicleData) when thrusting vertically. FlyingVehicleDataClass ConsoleClassObject ForcedMaterialMeshMgr RenderMeshMgr Material Material used to draw all meshes in the render bin. ForcedMaterialMeshMgrClass ConsoleClassObject Forest SceneObject clear () dumpToTextFile dumpToTextFile( String fileName ) isDirty () regenCells () saveDataFile saveDataFile( [path] ) dataFile The source forest data file. lodReflectScalar Scalar applied to the farclip distance when Forest renders into a reflection. ForestBrush SimGroup containsItemData ( ForestItemData obj ) ForestBrushClass ConsoleClassObject ForestBrushElement SimObject elevationMax The max world space elevation this item will be placed. elevationMin The min world space elevation this item will be placed. ForestItemData The type of ForestItem this element holds placement parameters for. probability The probability that this element will be created during an editor brush stroke is the sum of all element probabilities in the brush divided by the probability of this element. rotationRange The max rotation in degrees that items will be placed. scaleExponent An exponent used to bias between the minimum and maximum random sizes. scaleMax The maximum random size of each item. scaleMin The minimum random size for each item. sinkMax Max variation in the sink radius. sinkMin Min variation in the sink radius. sinkRadius This is the radius used to calculate how much to sink the trunk at its base and is used to sink the tree into the ground when its on a slope. slopeMax The max surface slope in degrees this item will be placed on. slopeMin The min surface slope in degrees this item will be placed on. ForestBrushElementClass ConsoleClassObject ForestBrushTool ForestTool collectElements hardness Brush Hardness mode ForestBrushMode mode pressure Brush Pressure size Brush Size ForestBrushToolClass ConsoleClassObject ForestClass ConsoleClassObject ForestEditorCtrl EditTSCtrl deleteMeshSafe ( ForestItemData obj ) getActiveTool () isDirty setActiveTool ( ForestTool tool ) updateActiveForest () ForestEditorCtrlClass ConsoleClassObject ForestItemData SimDataBlock branchAmp Amplitude of the effect on larger branches. collidable Can other objects or spacial queries hit items of this type. dampingCoefficient Coefficient used in calculating spring forces on the trunk. Causes oscillation and forces to decay faster over time. detailAmp Amplitude of the winds effect on leafs/fronds. detailFreq Frequency (speed) of the effect on leafs/fronds. mass Mass used in calculating spring forces on the trunk. Generally how springy a plant is. radius Radius used during placement to ensure items are not crowded. rigidity Rigidity used in calculating spring forces on the trunk. How much the plant resists the wind force shapeFile Shape file for this item type tightnessCoefficient Coefficient used in calculating spring forces on the trunk. How much the plant resists bending. trunkBendScale Overall bend amount of the tree trunk by wind and impacts. windScale Overall scale to the effect of wind. ForestItemDataClass ConsoleClassObject ForestSelectionTool ForestTool clearSelection copySelection cutSelection deleteSelection getSelectionCount pasteSelection ForestSelectionToolClass ConsoleClassObject ForestTool SimObject ForestToolClass ConsoleClassObject ForestWindEmitter SceneObject attachToObject ( int objectID ) @brief Mounts the wind emitter to another scene object @param objectID Unique ID of the object wind emitter should attach to@tsexample // Wind emitter previously created and named %windEmitter // Going to attach it to the player, making him a walking wind storm %windEmitter.attachToObject(%player); @endtsexample gustFrequency The frequency of gusting in seconds. gustStrength The maximum strength of a gust. gustWobbleStrength The amount of random wobble added to gust and turbulence vectors. gustYawAngle The amount of degrees the wind direction can drift (both positive and negative). gustYawFrequency The frequency of wind yaw drift, in seconds. hasMount Determines if the emitter is mounted to another object. radialEmitter Determines if the emitter is a global direction or local radial emitter. radius The radius of the emitter for local radial emitters. strength The strength of the wind force. turbulenceFrequency The frequency of gust turbulence, in seconds. turbulenceStrength The strength of gust turbulence. windEnabled Determines if the emitter will be counted in wind calculations. ForestWindEmitterClass ConsoleClassObject fxCloth GameBase clearForces Clears explosion force. onExplosion Applies explosion force. setLifetime Sets lifetime in MS. ExternAccel Point3F ExternAccel height float height HW bool HW LockBottom bool LockBottom LockLeft bool LockLeft LockLowerLeft bool LockLowerLeft LockLowerRight bool LockLowerRight LockRight bool LockRight LockTop bool LockTop LockUpperLeft bool LockUpperLeft LockUpperRight bool LockUpperRight NumParticlesX int NumParticlesX NumParticlesY int NumParticlesY Tube bool Tube Width float Width WindCycle int WindCycle fxClothClass ConsoleClassObject fxClothData GameBaseData AttachmentResponseCoefficient float AttachmentResponseCoefficient BendingStiffness float BendingStiffness CollisionResponseCoefficient float CollisionResponseCoefficient dampingCoefficient float dampingCoefficient density float density ExternAccel Point3F ExternAccel FrictionCoefficient float FrictionCoefficient PressureCoefficient float PressureCoefficient SolverIterations int SolverIterations StretchingStiffness float StretchingStiffness TearFactor float TearFactor Thickness float Thickness fxClothDataClass ConsoleClassObject fxFlexBody ShapeBase act addMattersNode addMattersNode(S32 seqnum,S32 nodenum) addPlaylistSeq addPlaylistSeq() addUltraframe addUltraframe(S32 seq, S32 frame, S32 node, S32 type, S32 target, Point3F value) addUltraframeNoInsert addUltraframeNoInsert(S32 seq, S32 frame, S32 node, S32 type, S32 target, Point3F value) addUltraframeSet addUltraframeSet(S32 seq) addUltraframeSingle addUltraframeSingle(S32 seq, S32 frame, S32 node, S32 type, Point3F value) addWeapon addWeapon(fxRigidBody weaponID,S32 mount_slot addWeapon2 addWeapon2(fxRigidBody weaponID,S32 mount_slot adjustBaseNodePosPermanent adjustBaseNodePosPermanent(seq,pos) adjustBaseNodePosRegion adjustBaseNodePosRegion(seq,pos,start,stop) adjustNodeRotPermanent adjustNodeRotPermanent(U32 node,EulerF &rot) adjustNodeRotRegion adjustNodeRotRegion(seq,node,rot,start,stop) attackPosition attackPosition(Point3F pos,String action) backupSequenceData backupSequenceData() bvh (bool importGround,char bvhname,char bvhProfile) clean (char filename) cleanDir cleanDir(char dir) cleanupBvh (char filename) clearBodypart clearBodypart(U32 i) clearChainParts clearChainParts clearKinematic clearNoGravity clearPlaylist dropPlaylist clearUltraframe clearUltraframe(S32 seq, S32 frame, S32 node) convertAckToKork convertAckToKork(S32 ackID,S32 seq) convertKorkDefault convertKorkDefault(S32 ackID) cropSequence cropSequence(U32 seq, F32 start, F32 stop, char name) doMatrixFix doMatrixFix(seq,eulerF,eulerF) dropAllSequences dropAllSequences(); dropMattersNode dropMattersNode(S32 seqnum,S32 nodenum) dropPlaylistSeq dropPlaylistSeq() dropSeq dropSeq(char sequence) dropSeqByName dropSequence(U32 sequence) dropSeqByNum dropSequence(S32 sequence) dropUltraframe dropUltraframe(S32 seq, S32 frame, S32 node) findStop findStop(U32 slot, F32 start) finishFollowEvent finishFollowEvent(); fixCfg fixCfg(cfg_filename,bvh_filename) getActionUser getActorId getActorId() getActorName getActorName() getBeenHitTick getBeenHitTick getBodyPart getbodypart(const char *) - returns flexbodypart ID for bodypart getBodypartKinematic getBodypartKinematic(S32 partID) getBodypartName getBodypartName(S32 partID) getBodypartParent getBodypartParent(S32 partID) getBodypartPos getBodypartPos(S32 partID) getCurrentTick getCurrentTick getCurrSeqNum getSeqNum() getFlexBodyName getKeyFrame getKeyFrame(S32 slot) getKinematic getLinearVelocity getLinearVelocity getMattersNodeIndex getMattersNodeIndex(S32 seqnum,S32 nodenum) getModelName getMoveThreshold getMoveThreshold() getName getName() getNodeFrameEuler getNodeFrameEuler(seq,frame,node) getNodeFrameQuat getNodeFrameQuat(seq,frame,node) getNodeMattersIndex getNodeMattersIndex(S32 seqnum,S32 nodenum) getNodeName getNodeName(U32 index) getNodeNum getNodeNum(const char *name) getNodeParent getNodeName(S32) getNumBodyparts returns bodypart count getNumMattersNodes getNumMattersNodes(S32 seqnum) getNumNodes getNumNodes() getNumPlaylistSeqs getNumPlaylistSeqs() getNumSeqs getNumSeqs() getNumUltraframes getNumUltraframes(S32 seq); getPath getPersonaId getPersonaId() getPersonaName getPersonaName() getPhysActive getPhysActive() getPhysicsDamage getPhysicsDamage getPlaylistId getPlaylistId() getPlaylistName getPlaylistName() getPlaylistNum getPlaylistNum(S32 seqnum) getPlaylistRepeats getPlaylistRepeats() getPlaylistSeq getPlaylistSeq() getPlaylistSpeed getPlaylistSpeed() getSampleRate getSampleRate() getSeqBlend getSeqBlend(U32 index) getSeqCyclic getSeqCyclic(U32 index) getSeqDuration getSeqDuration(U32 index) getSeqFilename getSeqFilename(const char *name) getSeqName getSeqName(U32 index) getSeqNum getSeqNum(const char *name) getSeqNumGroundFrames getSeqNumGroundframes(U32 index) getSeqNumKeyframes getSeqNumKeyframes(U32 index) getSeqNumTriggers getSeqNumTriggers(U32 index) getSeqPos getSeqPos(S32 slot) getShapeConstructor getShapeConstructor() getShapeSize getShapeSize() getSkeletonId getSkeletonId() getSkeletonName getSkeletonName() getSleepThreshold getSleepThreshold() getSubType S32 getSubType() getTarget getTarget(); getTargetPosition getTargetPosition() getThreadTimescale getThreadTimescale(S32 slot) getUltraframe getUltraframe(S32 seq, S32 frame, S32 node, S32 type) giveDetails (char filename) grabSeqByName grabSequence(other,char sequence,char cfg) grabSeqByNum grabSeqNum(other,U32 sequence,char cfg) groundCaptureDir groundCaptureDir(char *inDir, char *outDir) groundCaptureSeq groundCaptureSeq(U32 seq) hasRagdollBodyparts hasRagdollBodyparts hasUltraframe hasUltraframe(S32 seq, S32 frame, S32 node, S32 type) hasUltraframeSets hasUltraframeSets() hasUltraframesForNode hasUltraframesForNode(seq,node) hasUltraframesForType hasUltraframesForType(seq,type) headCheck headClear headUp importBvh (bool importGround,char bvhname,char bvhProfile) importDir importDir(bool importGround,char bvhDir,char dsqDir) info info() isEcstasyFirstTime isEcstasyFirstTime() loadAction loadAction(char *name) loadBest (char filename) loadDsq (char filename) loadKeyframeSets loadKeyframeSets(S32 scene_id); loadPlaylist loadPlaylist(S32 scene_id) loadPlaylistById loadPlaylist(S32 playlist_id) loadUltraframes loadUltraframes(char *filename) makeSequence makeSequence(char seqName) motorize activates all joint motors moveToPosition moveToPosition(Point3F pos,String action) null (char filename) nullBvh (char filename) onCollision calls onCollision orientToPosition orientToPosition(Point3F pos) pauseThreads pauseThreads() play (char seqname) playAtPos (char filename) playThread (int slot, string sequenceName) printPos reloadSequences reloadSequences(); removeBodyparts removeBodyparts() renameSequence renameSequence(char *old_name, char *new_name); resetPosition reset position resetSequence (S32 seq) runPlaylist runPlaylist() saveAll saveBest (char filename) saveBvh (char sequence, char outputname, char outputformat) saveBvhDir saveBvhDir(char *inDir, char *outDir) saveOut (char filename) savePlaylist savePlaylist(filename) savePlaylistSeq savePlaylistSeq() saveSequence (char filename,char seqname) saveShapeConstructor saveShapeConstructor(const char *filename) saveUltraframe saveUltraframe(S32 seq, S32 frame, S32 node, S32 type, Point3F value) saveUltraframes saveUltraframes(S32 seq,char *filename) setActorName setActorName(const char*) setAnimationFreeze setAnimationFreeze(bool) setBaseNodePosPermanent setBaseNodePosPermanent(seq,pos) setBaseNodePosRegion setBaseNodePosRegion(seq,pos,start,stop) setBodypart setBodypart(U32 i) setBodypartDelayForces setBodyPartDelayForces(Point3F force) setBodypartForce (index i, Point3F force) setBodypartForces applies explosion forces to bodyparts. setBodypartGlobalForce setBodypartGlobalForce(index i, Point3F force) setBodypartGlobalTorque (index i, Point3F torque) setBodypartImpulseForce (index i, Point3F force) setBodypartImpulseTorque (index i, Point3F torque) setBodypartMotorSpring (index i, Point3F target,F32 force) setBodypartMotorTarget (index i, Point3F target) setBodypartTorque (index i, Point3F torque) setInitialOrientation setInitialOrientation(rot) setInitialPosition setInitialPosition(pos) setIsRecording setIsRecording(bool) setIsRendering setIsRendering(bool) setIsReturnToZero setIsReturnToZero(bool) setIsStriking (bool isStriking) setKinematic setLifetime Sets lifetime in MS setMaskBit setMaskBit) setMoveSequence setMoveSequence(String action) setMoveThreshold setMoveThreshold(F32 value) setNodeFrameEuler setNodeFrameEuler(seq,frame,node,euler) setNodeFrameQuat setNodeFrameQuat(seq,frame,node,quat) setNodeRotPermanent setNodeRotPermanent(U32 node,EulerF &rot) setNodeRotRegion setNodeRotRegion(seq,node,rot,start,stop) setNoGravity setPersona setPersona() setPersonaName setPersonaName() setPhysActive setPhysActive(bool) setPhysicsDamage setPhysicsDamage(F32 damage) setPlaylist setPlaylist() setPlaylistName setPlaylistName() setPosition setPosition(Point3F pos); setSampleRate setSampleRate(S32 rate) setSeqBlend setSeqBlend(U32 index, bool blend) setSeqCyclic setSeqCyclic(U32 index, bool cyclic) setSeqDuration getSeqDuration(U32 index, F32 duration) setSequenceFrames setSequenceFrames(U32 seq, U32 frames) setShapeSize setShapeSize(F32 size) setSkeletonId setSkeletonId(U32) setSkeletonName setSkeletonName(const char*) setSleepThreshold setSleepThreshold(F32) setTarget setTarget(shapebase_id); setTweakerDone setTweakerDone(); setWeapon2MotorTarget setWeapon2MotorTarget(Point3F rot) setWeapon2TriggerMotorTarget setWeapon2TriggerMotorTarget(Point3F rot) setWeaponMotorTarget setWeaponMotorTarget(Point3F rot) setWeaponTriggerMotorTarget setWeaponTriggerMotorTarget(Point3F rot) setWeaponTriggerRotAdjA setWeaponTriggerRotAdjA(Point3F) setWeaponTriggerRotAdjB setWeaponTriggerRotAdjB(Point3F) showChainParts showChainParts showDefRots showDefRots() showGroundRots showGroundRots(seq) showGroundTrans showGroundTrans(seq) showKinematicNodes showKinematicNodes showNodeRots showNodeRots(seq) showNodes showNodeTrans showNodeTrans(seq) showNodeTransform showNodeTransform(S32 nodeIndex) showNodeTransforms showNodeTransforms() showSeq splay startAnimating (S32 sequence) startAnimatingAtPos (char sequence,F32 pos) startThinking stopAnimating stopThinking threadInfo threadInfo(S32 index toggleIsRecording toggleIsRecording(bool) write (char filename) zeroForces zeroHeight zeroHeight ActorName string ActorName InitialVelocity Point3F InitialVelocity IsClientOnly bool IsClientOnly IsNoGravity bool IsNoGravity IsRendering bool IsRendering IsReturnToZero bool IsReturnToZero KeyframesFile filename KeyframesFile Persona string Persona PlaylistDelay int PlaylistDelay PlaylistFile filename PlaylistFile SkeletonName string SkeletonName SpawnScript string SpawnScript fxFlexBodyClass ConsoleClassObject fxFlexBodyData ShapeBaseData ActionUserData SimObject ActionUserData BodyNode string BodyNode DynamicFriction float DynamicFriction GA bool GA HeadNode string HeadNode HW bool HW LeftBackNode string LeftBackNode LeftFrontNode string LeftFrontNode Lifetime int Lifetime MeshExcludes string MeshExcludes MeshObject string MeshObject myDensity float myDensity NeckNode string NeckNode RelaxType int RelaxType Restitution float Restitution RightBackNode string RightBackNode RightFrontNode string RightFrontNode SDK bool SDK SkeletonName string SkeletonName SleepThreshold float SleepThreshold StaticFriction float StaticFriction TriggerDimensions Point3F TriggerDimensions TriggerOffset Point3F TriggerOffset TriggerOrientation Point3F TriggerOrientation TriggerShapeType physShapeType TriggerShapeType upAxis Override the <up_axis> element in the COLLADA (.dae) file. No effect for DTS files. Set to one of the following values: <dl><dt>X_AXIS</dt><dd>Positive X points up. Model will be rotated into Torque's coordinate system (Z up).</dd><dt>Y_AXIS</dt><dd>Positive Y points up. Model will be rotated into Torque's coordinate system (Z up).</dd><dt>Z_AXIS</dt><dd>Positive Z points up. No rotation will be applied to the model.</dd><dt>DEFAULT</dt><dd>The default value. Use the value in the .dae file (defaults to Z_AXIS if the <up_axis> element is not present).</dd></dl> fxFlexBodyDataClass ConsoleClassObject fxFlexBodyPart GameBase getSubType S32 getSubType() onCollision calls onCollision. onDelayCollision onCollision, one tick later. setForce Sets local force. setGlobalDelayForce Sets local force. setGlobalForce Sets local force. setGlobalTorque (Point3F kTorque) setTorque (Point3F kTorque) fxFlexBodyPartClass ConsoleClassObject fxFlexBodyPartData GameBaseData BaseNode string BaseNode BodypartChain physChainType BodypartChain BoundsMax Point3F BoundsMax BoundsMin Point3F BoundsMin ChildNode string ChildNode ChildVerts int ChildVerts DamageMultiplier float DamageMultiplier density float density Dimensions Point3F Dimensions DynamicFriction float DynamicFriction FarVerts int FarVerts FlexBodyData fxFlexBodyData FlexBodyData ForceMax Point3F ForceMax ForceMin Point3F ForceMin ForceMultiplier float ForceMultiplier ForwardForce float ForwardForce InflictMultiplier float InflictMultiplier IsInflictor bool IsInflictor IsKinematic bool IsKinematic JointData fxJointData JointData MeshObject string MeshObject offset Point3F offset orientation Point3F orientation ParentNode string ParentNode ParentVerts int ParentVerts PlayerData SimObject PlayerData RagdollThreshold float RagdollThreshold Restitution float Restitution ShapeType physShapeType ShapeType StaticFriction float StaticFriction TorqueMax Point3F TorqueMax TorqueMin Point3F TorqueMin TriggerActorOffset Point3F TriggerActorOffset TriggerDimensions Point3F TriggerDimensions TriggerOffset Point3F TriggerOffset TriggerOrientation Point3F TriggerOrientation TriggerShapeType physShapeType TriggerShapeType WeightThreshold float WeightThreshold fxFlexBodyPartDataClass ConsoleClassObject fxFoliageReplicator SceneObject AllowedTerrainSlope Maximum surface angle allowed for foliage instances. AllowOnInteriors Foliage will be placed on InteriorInstances when set. AllowOnStatics Foliage will be placed on Static shapes when set. AllowOnTerrain Foliage will be placed on terrain when set. AllowOnWater Foliage will be placed on/under water when set. AllowWaterSurface Foliage will be placed on water when set. Requires AllowOnWater. AlphaCutoff Minimum alpha value allowed on foliage instances. CullResolution Minimum size of culling bins. Must be >= 8 and <= OuterRadius. DebugBoxHeight Height multiplier for drawn culling bins. FadeInRegion Region beyond ViewDistance where foliage fades in/out. FadeOutRegion Region before ViewClosest where foliage fades in/out. FixAspectRatio Maintain aspect ratio of image if true. This option ignores MaxWidth. FixSizeToMax Use only MaxWidth and MaxHeight for billboard size. Ignores MinWidth and MinHeight. FoliageCount Maximum foliage instance count. FoliageFile Image file for the foliage texture. FoliageRetries Number of times to try placing a foliage instance before giving up. GroundAlpha Alpha of the foliage at ground level. 0 = transparent, 1 = opaque. HideFoliage Foliage is hidden when set to true. InnerRadiusX Placement area inner radius on the X axis InnerRadiusY Placement area inner radius on the Y axis LightOn Foliage should be illuminated with changing lights when true. LightSync Foliage instances have the same lighting when set and LightOn is set. LightTime Time before foliage illumination cycle repeats. MaxHeight Maximum height of foliage billboards MaxLuminance Maximum luminance for foliage instances. MaxSwayTime Maximum sway cycle time in seconds. MaxWidth Maximum width of foliage billboards MinHeight Minimum height of foliage billboards MinLuminance Minimum luminance for foliage instances. MinSwayTime Minumum sway cycle time in seconds. MinWidth Minimum width of foliage billboards OffsetZ Offset billboards by this amount vertically. OuterRadiusX Placement area outer radius on the X axis OuterRadiusY Placement area outer radius on the Y axis PlacementAreaHeight Height of the placement ring in world units. PlacementColour Color of the placement ring. RandomFlip Randomly flip billboards left-to-right. seed Random seed for foliage placement. ShowPlacementArea Draw placement rings when set to true. SwayMagFront Front-to-back sway magnitude. SwayMagSide Left-to-right sway magnitude. SwayOn Foliage should sway randomly when true. SwaySync Foliage instances should sway together when true and SwayOn is enabled. UseCulling Use culling bins when enabled. UseDebugInfo Culling bins are drawn when set to true. useTrueBillboards Use camera facing billboards ( including the z axis ). ViewClosest Minimum distance from camera where foliage appears. ViewDistance Maximum distance from camera where foliage appears. fxFoliageReplicatorClass ConsoleClassObject fxFoliageSet SimSet fxJoint GameBase AxisA Point3F AxisA AxisB Point3F AxisB BodyA int BodyA BodyB int BodyB FlexBodyPartA int FlexBodyPartA FlexBodyPartB int FlexBodyPartB GlobalAnchor Point3F GlobalAnchor GlobalAxis Point3F GlobalAxis LocalAnchor0 Point3F LocalAnchor0 LocalAnchor1 Point3F LocalAnchor1 LocalAxis0 Point3F LocalAxis0 LocalAxis1 Point3F LocalAxis1 LocalNormal0 Point3F LocalNormal0 LocalNormal1 Point3F LocalNormal1 NormalA Point3F NormalA NormalB Point3F NormalB fxJointClass ConsoleClassObject fxJointData GameBaseData AxisA Point3F AxisA AxisB Point3F AxisB BreakingForce float BreakingForce BreakingTorque float BreakingTorque CollisionEnabled bool CollisionEnabled DistanceLimit float DistanceLimit HighLimit float HighLimit HighRestitution float HighRestitution HW bool HW JointSpring float JointSpring JointType physJointType JointType LimitPlaneAnchor1 Point3F LimitPlaneAnchor1 LimitPlaneAnchor2 Point3F LimitPlaneAnchor2 LimitPlaneAnchor3 Point3F LimitPlaneAnchor3 LimitPlaneAnchor4 Point3F LimitPlaneAnchor4 LimitPlaneNormal1 Point3F LimitPlaneNormal1 LimitPlaneNormal2 Point3F LimitPlaneNormal2 LimitPlaneNormal3 Point3F LimitPlaneNormal3 LimitPlaneNormal4 Point3F LimitPlaneNormal4 LimitPoint Point3F LimitPoint LocalAnchor0 Point3F LocalAnchor0 LocalAnchor1 Point3F LocalAnchor1 LocalAxis0 Point3F LocalAxis0 LocalAxis1 Point3F LocalAxis1 LocalNormal0 Point3F LocalNormal0 LocalNormal1 Point3F LocalNormal1 LowLimit float LowLimit LowRestitution float LowRestitution MotorForce float MotorForce MotorSpeed float MotorSpeed NormalA Point3F NormalA NormalB Point3F NormalB SpringDamper float SpringDamper SpringTargetAngle float SpringTargetAngle SwingLimit float SwingLimit SwingLimit2 float SwingLimit2 SwingSpring float SwingSpring TwistLimit float TwistLimit TwistSpring float TwistSpring fxJointDataClass ConsoleClassObject fxPhysMaterial GameBaseData density float density DynamicFriction float DynamicFriction Restitution float Restitution StaticFriction float StaticFriction TextureName string TextureName fxPhysMaterialClass ConsoleClassObject fxReplicatorSet SimSet fxRigidBody ShapeBase clearKinematic () getPhysSpeed getPhysSpeed() getPhysVelocity getPhysVelocity() getWeaponPosAdj getWeaponPosAdj() remove remove() resetPosition () setAngularVelocity setAngularVelocity(Point3F) setForce Sets local force. setGlobalDelayForce Sets delayed global force. setGlobalForce Sets global force. setGlobalTorque (Point3F kTorque) setIsStriking (bool isStriking) setKinematic () setLifetime Sets lifetime in MS. setLinearVelocity setLinearVelocity(Point3F) setNoGravity Sets gravity (true/false). setTorque (Point3F kTorque) setWeaponPosAdj setWeaponPosAdj(Point3F) setWeaponRotAdjA setWeaponRotAdjA(Point3F) setWeaponRotAdjB setWeaponRotAdjB(Point3F) AutoClearKinematic bool AutoClearKinematic CurrentForce Point3F CurrentForce CurrentTorque Point3F CurrentTorque HadCollision bool HadCollision HasTrigger bool HasTrigger InitialVelocity Point3F InitialVelocity IsClientOnly bool IsClientOnly IsKinematic bool IsKinematic IsNoGravity bool IsNoGravity Lifetime int Lifetime ReferenceNumber int ReferenceNumber fxRigidBodyClass ConsoleClassObject fxRigidBodyData ShapeBaseData Dimensions Point3F Dimensions DynamicFriction float DynamicFriction HasSpring bool HasSpring HasTrigger bool HasTrigger HW bool HW InflictMultiplier float InflictMultiplier IsInflictor bool IsInflictor IsKinematic bool IsKinematic IsNoGravity bool IsNoGravity IsTransient bool IsTransient Lifetime int Lifetime myDensity float myDensity offset Point3F offset orientation Point3F orientation ProjectileAxis Point3F ProjectileAxis Restitution float Restitution ShapeType physShapeType ShapeType SleepThreshold float SleepThreshold StaticFriction float StaticFriction TriggerActorOffset Point3F TriggerActorOffset TriggerDimensions Point3F TriggerDimensions TriggerOffset Point3F TriggerOffset TriggerOrientation Point3F TriggerOrientation TriggerShapeType physShapeType TriggerShapeType WeaponPosAdj Point3F WeaponPosAdj WeaponRotAdjA Point3F WeaponRotAdjA WeaponRotAdjB Point3F WeaponRotAdjB fxRigidBodyDataClass ConsoleClassObject fxShapeReplicatedStatic SceneObject allowPlayerStep Allow a Player to walk up sloping polygons in the TSStatic (based on the collisionType). collisionType The type of mesh data to use for collision queries. decalType The type of mesh data used to clip decal polygons against. forceDetail Forces rendering to a particular detail level. meshCulling Enables detailed culling of meshes within the TSStatic. Should only be used with large complex shapes like buildings which contain many submeshes. originSort Enables translucent sorting of the TSStatic by its origin instead of the bounds. playAmbient Enables automatic playing of the animation named "ambient" (if it exists) when the TSStatic is loaded. renderNormals Debug rendering mode shows the normals for each point in the TSStatic's mesh. shapeName Path and filename of the model file (.DTS, .DAE) to use for this TSStatic. fxShapeReplicatedStaticClass ConsoleClassObject fxShapeReplicator SceneObject AlignToTerrain Align shapes to surface normal when set. AllowedTerrainSlope Maximum surface angle allowed for shape instances. AllowOnInteriors Shapes will be placed on InteriorInstances when set. AllowOnStatics Shapes will be placed on Static shapes when set. AllowOnTerrain Shapes will be placed on terrain when set. AllowOnWater Shapes will be placed on/under water when set. AllowWaterSurface Shapes will be placed on water when set. Requires AllowOnWater. HideReplications Replicated shapes are hidden when set to true. InnerRadiusX Placement area inner radius on the X axis InnerRadiusY Placement area inner radius on the Y axis Interactions Allow physics interactions with shapes. OffsetZ Offset shapes by this amount vertically. OuterRadiusX Placement area outer radius on the X axis OuterRadiusY Placement area outer radius on the Y axis PlacementAreaHeight Height of the placement ring in world units. PlacementColour Color of the placement ring. seed Random seed for shape placement. ShapeCount Maximum shape instance count. shapeFile Filename of shape to replicate. ShapeRetries Number of times to try placing a shape instance before giving up. ShapeRotateMax Maximum shape rotation angles. ShapeRotateMin Minimum shape rotation angles. ShapeScaleMax Maximum shape scale. ShapeScaleMin Minimum shape scale. ShowPlacementArea Draw placement rings when set to true. TerrainAlignment Surface normals will be multiplied by these values when AlignToTerrain is enabled. fxShapeReplicatorClass ConsoleClassObject fxSpring GameBase AnchorA Point3F AnchorA AnchorB Point3F AnchorB BodyA int BodyA BodyB int BodyB fxSpringClass ConsoleClassObject fxSpringData GameBaseData CompressSaturate float CompressSaturate HW bool HW MaxDamper float MaxDamper MaxDamperCompress float MaxDamperCompress MaxDamperStretch float MaxDamperStretch MaxSpring float MaxSpring MaxSpringCompress float MaxSpringCompress MaxSpringStretch float MaxSpringStretch RestLengthModifier float RestLengthModifier StretchSaturate float StretchSaturate VelocityDamperCompress float VelocityDamperCompress VelocityDamperStretch float VelocityDamperStretch fxSpringDataClass ConsoleClassObject gaActionUser GameBase gaActionUserClass ConsoleClassObject gaActionUserData GameBaseData actionName string actionName FitnessData1 gaFitnessData FitnessData1 FitnessData2 gaFitnessData FitnessData2 FitnessData3 gaFitnessData FitnessData3 FitnessData4 gaFitnessData FitnessData4 FitnessData5 gaFitnessData FitnessData5 FitnessData6 gaFitnessData FitnessData6 MigrateChance float MigrateChance MutationAmount float MutationAmount MutationChance float MutationChance NumActionSets int NumActionSets NumPopulations int NumPopulations NumRestSteps int NumRestSteps NumSequenceReps int NumSequenceReps ObserveInterval int ObserveInterval gaActionUserDataClass ConsoleClassObject gaFitnessData GameBaseData BodypartName string BodypartName PositionGoal Point3F PositionGoal PositionGoalType Point3I PositionGoalType RotationGoal float RotationGoal RotationGoalType int RotationGoalType gaFitnessDataClass ConsoleClassObject GameBase SceneObject applyImpulse ( Point3F pos, VectorF vel ) Apply an impulse to this object. @param pos impulse world position @param vel impulse velocity (impulse force F = m * v) @return true applyRadialImpulse ( Point3F origin, float radius, float magnitude ) Applies a radial impulse to the object using the given origin and force. @param origin Point of origin of the radial impulse. @param radius The radius of the impulse area. @param magnitude The strength of the impulse. getDataBlock () Get the datablock used by this object. @return the datablock this GameBase is using. setDataBlock ( GameBaseData data ) Assign this GameBase to use the specified datablock. @param data new datablock to use @return true if successful, false if failed. dataBlock Script datablock used for game objects. setControl( bool controlled ) Called when the client controlling the object changes. @param controlled true if a client now controls this object, false if no client controls this object. GameBaseClass ConsoleClassObject GameBaseData SimDataBlock category The group that this datablock will show up in under the "Scripted" tab in the World Editor Library. onAdd( GameBase obj ) Called when the object is added to the scene. @param obj the GameBase object @tsexample datablock GameBaseData(MyObjectData) { category = "Misc"; }; function MyObjectData::onAdd( %this, %obj ) { echo( "Added " @ %obj.getName() @ " to the scene." ); } function MyObjectData::onNewDataBlock( %this, %obj ) { echo( "Assign " @ %this.getName() @ " datablock to " %obj.getName() ); } function MyObjectData::onRemove( %this, %obj ) { echo( "Removed " @ %obj.getName() @ " to the scene." ); } function MyObjectData::onMount( %this, %obj, %mountObj, %node ) { echo( %obj.getName() @ " mounted to " @ %mountObj.getName() ); } function MyObjectData::onUnmount( %this, %obj, %mountObj, %node ) { echo( %obj.getName() @ " unmounted from " @ %mountObj.getName() ); } @endtsexample onMount( GameBase obj, SceneObject mountObj, int node ) Called when the object is mounted to another object in the scene. @param obj the GameBase object being mounted @param mountObj the object we are mounted to @param node the mountObj node we are mounted to @see onAdd onNewDataBlock( GameBase obj ) Called when the object has a new datablock assigned. @param obj the GameBase object @see onAdd onRemove( GameBase obj ) Called when the object is removed to the scene. @param obj the GameBase object @see onAdd onUnmount( GameBase obj, SceneObject mountObj, int node ) Called when the object is unmounted from another object in the scene. @param obj the GameBase object being unmounted @param mountObj the object we are unmounted from @param node the mountObj node we are unmounted from @see onAdd GameBaseDataClass ConsoleClassObject GameConnection NetConnection activateGhosting () @brief Called by the server during phase 2 of the mission download to start sending ghosts to the client. Ghosts represent objects on the server that are in scope for the client. These need to be synchronized with the client in order for the client to see and interact with them. This is typically done during the standard mission start phase 2 when following Torque's example mission startup sequence. @tsexample function serverCmdMissionStartPhase2Ack(%client, %seq, %playerDB) { // Make sure to ignore calls from a previous mission load if (%seq != $missionSequence || !$MissionRunning) return; if (%client.currentPhase != 1.5) return; %client.currentPhase = 2; // Set the player datablock choice %client.playerDB = %playerDB; // Update mod paths, this needs to get there before the objects. %client.transmitPaths(); // Start ghosting objects to the client %client.activateGhosting(); } @endtsexample @see @ref ghosting_scoping for a description of the ghosting system. chaseCam ( int size ) @brief Sets the size of the chase camera's matrix queue. @note This sets the queue size across all GameConnections. @note This is not currently hooked up. clearCameraObject () @brief Clear the connection's camera object reference. @see GameConnection::setCameraObject() and GameConnection::getCameraObject() delete ( string reason="" ) @brief On the server, disconnect a client and pass along an optional reason why. This method performs two operations: it disconnects a client connection from the server, and it deletes the connection object. The optional reason is sent in the disconnect packet and is often displayed to the user so they know why they've been disconnected. @param reason [optional] The reason why the user has been disconnected from the server. @tsexample function kick(%client) { messageAll( 'MsgAdminForce', '\c2The Admin has kicked %1.', %client.playerName); if (!%client.isAIControlled()) BanList::add(%client.guid, %client.getAddress(), $Pref::Server::KickBanTime); %client.delete("You have been kicked from this server"); } @endtsexample getCameraObject () @brief Returns the connection's camera object used when not viewing through the control object. @see GameConnection::setCameraObject() and GameConnection::clearCameraObject() getControlCameraFov () @brief Returns the field of view as used by the control object's camera. getControlObject () @brief On the server, returns the object that the client is controlling.By default the control object is an instance of the Player class, but can also be an instance of Camera (when editing the mission, for example), or any other ShapeBase derived class as appropriate for the game. @see GameConnection::setControlObject() getServerConnection () @brief On the client, this static mehtod will return the connection to the server, if any. @returns The SimObject ID of the server connection, or -1 if none is found. isAIControlled () @brief Returns true if this connection is AI controlled. @see AIConnection isControlObjectRotDampedCamera () @brief Returns true if the object being controlled by the client is making use of a rotation damped camera. @see Camera isDemoPlaying () @brief Returns true if a previously recorded demo file is now playing. @see GameConnection::playDemo() isDemoRecording () @brief Returns true if a demo file is now being recorded. @see GameConnection::startRecording(), GameConnection::stopRecording() isFirstPerson () @brief Returns true if this connection is in first person mode. @note Transition to first person occurs over time via mCameraPos, so this won't immediately return true after a set. listClassIDs () @brief List all of the classes that this connection knows about, and what their IDs are. Useful for debugging network problems. @note The list is sent to the console. play2D ( SFXProfile profile ) @brief Used on the server to play a 2D sound that is not attached to any object. @param profile The SFXProfile that defines the sound to play. @tsexample function ServerPlay2D(%profile) { // Play the given sound profile on every client. // The sounds will be transmitted as an event, not attached to any object. for(%idx = 0; %idx < ClientGroup.getCount(); %idx++) ClientGroup.getObject(%idx).play2D(%profile); } @endtsexample play3D ( SFXProfile profile, TransformF location ) @brief Used on the server to play a 3D sound that is not attached to any object. @param profile The SFXProfile that defines the sound to play. @param location The position and orientation of the 3D sound given in the form of "x y z ax ay az aa". @tsexample function ServerPlay3D(%profile,%transform) { // Play the given sound profile at the given position on every client // The sound will be transmitted as an event, not attached to any object. for(%idx = 0; %idx < ClientGroup.getCount(); %idx++) ClientGroup.getObject(%idx).play3D(%profile,%transform); } @endtsexample playDemo ( string demoFileName ) @brief On the client, play back a previously recorded game session. It is often useful to play back a game session. This could be for producing a demo of the game that will be shown at a later time, or for debugging a game. By recording the entire network stream it is possible to later play game the game exactly as it unfolded during the actual play session. This is because all user control and server results pass through the connection. @returns True if the playback was successful. False if there was an issue, such as not being able to open the demo file for playback. @see GameConnection::startRecording(), GameConnection::stopRecording() resetGhosting () @brief On the server, resets the connection to indicate that ghosting has been disabled. Typically when a mission has ended on the server, all connected clients are informed of this change and their connections are reset back to a starting state. This method resets a connection on the server to indicate that ghosts are no longer being transmitted. On the client end, all ghost information will be deleted. @tsexample // Inform the clients for (%clientIndex = 0; %clientIndex < ClientGroup.getCount(); %clientIndex++) { // clear ghosts and paths from all clients %cl = ClientGroup.getObject(%clientIndex); %cl.endMission(); %cl.resetGhosting(); %cl.clearPaths(); } @endtsexample @see @ref ghosting_scoping for a description of the ghosting system. setBlackOut ( bool doFade, int timeMS ) @brief On the server, sets the client's 3D display to fade to black. @param doFade Set to true to fade to black, and false to fade from black. @param timeMS Time it takes to perform the fade as measured in ms. @note Not currently hooked up, and is not synchronized over the network. setCameraObject ( GameBase camera ) @brief On the server, set the connection's camera object used when not viewing through the control object. @see GameConnection::getCameraObject() and GameConnection::clearCameraObject() setConnectArgs (const char* args) @brief On the client, pass along a variable set of parameters to the server. Once the connection is established with the server, the server calls its onConnect() method with the client's passed in parameters as aruments. @see GameConnection::onConnect() setControlCameraFov ( float newFOV ) @brief On the server, sets the control object's camera's field of view. @param newFOV New field of view (in degrees) to force the control object's camera to use. This value is clamped to be within the range of 1 to 179 degrees. @note When transmitted over the network to the client, the resolution is limited to one degree. Any fraction is dropped. setControlObject ( GameBase ctrlObj ) @brief On the server, sets the object that the client will control. By default the control object is an instance of the Player class, but can also be an instance of Camera (when editing the mission, for example), or any other ShapeBase derived class as appropriate for the game. @param ctrlObj The GameBase object on the server to control. setFirstPerson ( bool firstPerson ) @brief On the server, sets this connection into or out of first person mode. @param firstPerson Set to true to put the connection into first person mode. setJoinPassword ( string password ) @brief On the client, set the password that will be passed to the server. On the server, this password is compared with what is stored in $pref::Server::Password. If $pref::Server::Password is empty then the client's sent password is ignored. Otherwise, if the passed in client password and the server password do not match, the CHR_PASSWORD error string is sent back to the client and the connection is immediately terminated. This password checking is performed quite early on in the connection request process so as to minimize the impact of multiple failed attempts -- also known as hacking. setMissionCRC ( int CRC ) @brief On the server, transmits the mission file's CRC value to the client. Typically, during the standard mission start phase 1, the mission file's CRC value on the server is send to the client. This allows the client to determine if the mission has changed since the last time it downloaded this mission and act appropriately, such as rebuilt cached lightmaps. @param CRC The mission file's CRC value on the server. @tsexample function serverCmdMissionStartPhase1Ack(%client, %seq) { // Make sure to ignore calls from a previous mission load if (%seq != $missionSequence || !$MissionRunning) return; if (%client.currentPhase != 0) return; %client.currentPhase = 1; // Start with the CRC %client.setMissionCRC( $missionCRC ); // Send over the datablocks... // OnDataBlocksDone will get called when have confirmation // that they've all been received. %client.transmitDataBlocks($missionSequence); } @endtsexample startRecording ( string fileName ) @brief On the client, starts recording the network connection's traffic to a demo file. It is often useful to play back a game session. This could be for producing a demo of the game that will be shown at a later time, or for debugging a game. By recording the entire network stream it is possible to later play game the game exactly as it unfolded during the actual play session. This is because all user control and server results pass through the connection. @param fileName The file name to use for the demo recording. @see GameConnection::stopRecording(), GameConnection::playDemo() stopRecording () @brief On the client, stops the recording of a connection's network traffic to a file. @see GameConnection::startRecording(), GameConnection::playDemo() transmitDataBlocks ( int sequence ) @brief Sent by the server during phase 1 of the mission download to send the datablocks to the client. SimDataBlocks, also known as just datablocks, need to be transmitted to the client prior to the client entering the game world. These represent the static data that most objects in the world reference. This is typically done during the standard mission start phase 1 when following Torque's example mission startup sequence. When the datablocks have all been transmitted, onDataBlocksDone() is called to move the mission start process to the next phase.@param sequence The sequence is common between the server and client and ensures that the client is acting on the most recent mission start process. If an errant network packet (one that was lost but has now been found) is received by the client with an incorrect sequence, it is just ignored. This sequence number is updated on the server every time a mission is loaded. @tsexample function serverCmdMissionStartPhase1Ack(%client, %seq) { // Make sure to ignore calls from a previous mission load if (%seq != $missionSequence || !$MissionRunning) return; if (%client.currentPhase != 0) return; %client.currentPhase = 1; // Start with the CRC %client.setMissionCRC( $missionCRC ); // Send over the datablocks... // OnDataBlocksDone will get called when have confirmation // that they've all been received. %client.transmitDataBlocks($missionSequence); } @endtsexample @see GameConnection::onDataBlocksDone() initialControlSet() @brief Called on the client when the first control object has been set by the server and we are now ready to go. A common action to perform when this callback is called is to switch the GUI canvas from the loading screen and over to the 3D game GUI. onConnectionAccepted() @brief Called on the client when the connection to the server has been established. onConnectionDropped( string reason ) @brief Called on the client when the connection to the server has been dropped. @param reason The reason why the connection was dropped. onConnectionError( string errorString ) @brief Called on the client when there is an error with the connection to the server. @param errorString The connection error text. onConnectionTimedOut() @brief Called on the client when the connection to the server times out. onConnectRequestRejected( string reason ) @brief Called on the client when the connection to the server has been rejected. @param reason The reason why the connection request was rejected. onConnectRequestTimedOut() @brief Called when connection attempts have timed out. onDataBlocksDone( int sequence ) @brief Called on the server when all datablocks has been sent to the client. During phase 1 of the mission download, all datablocks are sent from the server to the client. Once all datablocks have been sent, this callback is called and the mission download procedure may move on to the next phase. @param sequence The sequence is common between the server and client and ensures that the client is acting on the most recent mission start process. If an errant network packet (one that was lost but has now been found) is received by the client with an incorrect sequence, it is just ignored. This sequence number is updated on the server every time a mission is loaded. @see GameConnection::transmitDataBlocks() onDrop( string disconnectReason ) @brief Called on the server when the client's connection has been dropped. @param disconnectReason The reason why the connection was dropped. setLagIcon( bool state ) @brief Called on the client to display the lag icon. When the connection with the server is lagging, this callback is called to allow the game GUI to display some indicator to the player. @param state Set to true if the lag icon should be displayed. GameConnectionClass ConsoleClassObject GameTSCtrl GuiTSCtrl GameTSCtrlClass ConsoleClassObject GFXCardProfilerAPI getCard () Returns the card name. getRenderer () Returns the renderer name. For example D3D9 or OpenGL. getVendor () Returns the card vendor name. getVersion () Returns the driver version string. getVideoMemoryMB () Returns the amount of video memory in megabytes. queryProfile ( string name, int defaultValue ) Used to query the value of a specific card capability. @param name The name of the capability being queried. @param defaultValue The value to return if the capability is not defined. setCapability ( string name, int value ) Used to set the value for a specific card capability. @param name The name of the capability being set. @param value The value to set for that capability. GFXInit createNullDevice () Create the NULL graphics device used for testing or headless operation. getAdapterCount () Return the number of graphics adapters available. @ingroup GFX getAdapterMode ( int index, int modeIndex ) Gets the details of the specified adapter mode. @param index Index of the adapter to query. @param modeIndex Index of the mode to get data from. @return A video mode string in the format 'width height fullscreen bitDepth refreshRate aaLevel'. @see GuiCanvas::getVideoMode() getAdapterModeCount ( int index ) Gets the number of modes available on the specified adapter. @param index Index of the adapter to get modes from. @return The number of video modes supported by the adapter or -1 if the given adapter was not found. getAdapterName ( int index ) Returns the name of the graphics adapter. @param index The index of the adapter. getAdapterShaderModel ( int index ) Returns the supported shader model of the graphics adapter or -1 if the index is bad. @param index The index of the adapter. getAdapterType ( int index ) Returns the type (D3D9, D3D8, GL, Null) of a graphics adapter. @param index The index of the adapter. getDefaultAdapterIndex () Returns the index of the default graphics adapter. This is the graphics device which will be used to initialize the engine. GFXSamplerStateData SimObject addressModeU The texture address mode for the u coordinate. The default is GFXAddressWrap. addressModeV The texture address mode for the v coordinate. The default is GFXAddressWrap. addressModeW The texture address mode for the w coordinate. The default is GFXAddressWrap. alphaArg1 The first alpha argument for the texture stage. The default value is GFXTATexture. alphaArg2 The second alpha argument for the texture stage. The default value is GFXTADiffuse. alphaArg3 The third alpha channel selector operand for triadic operations (multiply, add, and linearly interpolate). The default value is GFXTACurrent. alphaOp The texture alpha blending operation. The default value is GFXTOPModulate. colorArg1 The first color argument for the texture stage. The default value is GFXTACurrent. colorArg2 The second color argument for the texture stage. The default value is GFXTATexture. colorArg3 The third color argument for triadic operations (multiply, add, and linearly interpolate). The default value is GFXTACurrent. magFilter The texture magnification filter. The default is GFXTextureFilterLinear. maxAnisotropy The maximum texture anisotropy. The default value is 1. minFilter The texture minification filter. The default is GFXTextureFilterLinear. mipFilter The texture mipmap filter used during minification. The default is GFXTextureFilterLinear. mipLODBias The mipmap level of detail bias. The default value is zero. resultArg The selection of the destination register for the result of this stage. The default is GFXTACurrent. textureColorOp The texture color blending operation. The default value is GFXTOPDisable which disables the sampler. textureTransform Sets the texture transform state. The default is GFXTTFFDisable. GFXSamplerStateDataClass ConsoleClassObject GFXStateBlockData SimObject alphaDefined Set to true if the alpha test state is not all defaults. alphaTestEnable Enables per-pixel alpha testing. The default is false. alphaTestFunc The test function used to accept or reject a pixel based on its alpha value. The default is GFXCmpGreaterEqual. alphaTestRef The reference alpha value against which pixels are tested. The default is zero. blendDefined Set to true if the alpha blend state is not all defaults. blendDest The destination blend state. The default is GFXBlendZero. blendEnable Enables alpha blending. The default is false. blendOp The arithmetic operation applied to alpha blending. The default is GFXBlendOpAdd. blendSrc The source blend state. The default is GFXBlendOne. colorWriteAlpha Enables alpha channel writes. The default is true. colorWriteBlue Enables blue channel writes. The default is true. colorWriteDefined Set to true if the color write state is not all defaults. colorWriteGreen Enables green channel writes. The default is true. colorWriteRed Enables red channel writes. The default is true. cullDefined Set to true if the culling state is not all defaults. cullMode Defines how back facing triangles are culled if at all. The default is GFXCullCCW. ffLighting Enables fixed function lighting when rendering without a shader on geometry with vertex normals. The default is false. samplersDefined Set to true if the sampler states are not all defaults. samplerStates The array of texture sampler states. @note Not all graphics devices support 16 samplers. In general all systems support 4 samplers with most modern cards doing 8. separateAlphaBlendDefined Set to true if the seperate alpha blend state is not all defaults. separateAlphaBlendDest The destination blend state. The default is GFXBlendZero. separateAlphaBlendEnable Enables the separate blend mode for the alpha channel. The default is false. separateAlphaBlendOp The arithmetic operation applied to separate alpha blending. The default is GFXBlendOpAdd. separateAlphaBlendSrc The source blend state. The default is GFXBlendOne. stencilDefined Set to true if the stencil state is not all defaults. stencilEnable Enables stenciling. The default is false. stencilFailOp The stencil operation to perform if the stencil test fails. The default is GFXStencilOpKeep. stencilFunc The comparison function to test the reference value to a stencil buffer entry. The default is GFXCmpNever. stencilMask The mask applied to the reference value and each stencil buffer entry to determine the significant bits for the stencil test. The default is 0xFFFFFFFF. stencilPassOp The stencil operation to perform if both the stencil and the depth tests pass. The default is GFXStencilOpKeep. stencilRef The reference value for the stencil test. The default is zero. stencilWriteMask The write mask applied to values written into the stencil buffer. The default is 0xFFFFFFFF. stencilZFailOp The stencil operation to perform if the stencil test passes and the depth test fails. The default is GFXStencilOpKeep. textureFactor The color used for multiple-texture blending with the GFXTATFactor texture-blending argument or the GFXTOPBlendFactorAlpha texture-blending operation. The default is opaque white (255, 255, 255, 255). vertexColorEnable Enables fixed function vertex coloring when rendering without a shader. The default is false. zBias A floating-point bias used when comparing depth values. The default is zero. zDefined Set to true if the depth state is not all defaults. zEnable Enables z-buffer reads. The default is true. zFunc The depth comparision function which a pixel must pass to be written to the z-buffer. The default is GFXCmpLessEqual. zSlopeBias An additional floating-point bias based on the maximum depth slop of the triangle being rendered. The default is zero. zWriteEnable Enables z-buffer writes. The default is true. GFXStateBlockDataClass ConsoleClassObject GhostAlwaysObjectEvent GhostAlwaysObjectEventClass ConsoleClassObject GhostAlwaysSet SimSet Gizmo SimObject GizmoClass ConsoleClassObject GizmoProfile SimObject alignment GizmoAlignment alignment allowSnapRotations bool allowSnapRotations allowSnapScale bool allowSnapScale flags int flags gridColor ColorI gridColor gridSize Point3F gridSize mode GizmoMode mode planeDim float planeDim renderInfoText bool renderInfoText renderPlane bool renderPlane renderPlaneHashes bool renderPlaneHashes renderSolid bool renderSolid renderWhenUsed bool renderWhenUsed rotateScalar float rotateScalar rotationSnap float rotationSnap scaleScalar float scaleScalar scaleSnap float scaleSnap screenLength int screenLength snapToGrid bool snapToGrid GizmoProfileClass ConsoleClassObject GlobalActionMap ActionMap GroundCover SceneObject billboardUVs Subset material UV coordinates for this cover billboard. clumpExponent An exponent used to bias between the minimum and maximum clump counts for a particular clump. clumpRadius The maximum clump radius. dissolveRadius This is less than or equal to radius and defines when fading of cover elements begins. gridSize The number of cells per axis in the grid. invertLayer Indicates that the terrain material index given in 'layer' is an exclusion mask. layer Terrain material name to limit coverage to, or blank to not limit. lockFrustum Debug parameter for locking the culling frustum which will freeze the cover generation. Material Material used by all GroundCover segments. maxBillboardTiltAngle The maximum amout of degrees the billboard will tilt down to match the camera. maxClumpCount The maximum amount of elements in a clump. maxElements The maximum amount of cover elements to include in the grid at any one time. maxElevation The maximum world space elevation for placement. maxSlope The maximum slope angle in degrees for placement. minClumpCount The minimum amount of elements in a clump. minElevation The minimum world space elevation for placement. noBillboards Debug parameter for turning off billboard rendering. noShapes Debug parameter for turning off shape rendering. probability The probability of one cover type verses another (relative to all cover types). radius Outer generation radius from the current camera position. reflectScale Scales the various culling radii when rendering a reflection. Typically for water. renderCells Debug parameter for displaying the grid cells. seed This RNG seed is saved and sent to clients for generating the same cover. shapeCullRadius This is the distance at which DTS elements are completely culled out. shapeFilename The cover shape filename. [Optional] sizeExponent An exponent used to bias between the minimum and maximum random sizes. sizeMax The maximum random size of this cover type. sizeMin The minimum random size for each cover type. windDirection The direction of the wind. windGustFrequency Controls how often the wind gust peaks per second. windGustLength The length in meters between peaks in the wind gust. windGustStrength The maximum distance in meters that the peak wind gust will displace an element. windScale The wind effect scale. windTurbulenceFrequency Controls the overall rapidity of the wind turbulence. windTurbulenceStrength The maximum distance in meters that the turbulence can displace a ground cover element. zOffset Offset along the Z axis to render the ground cover. GroundCoverClass ConsoleClassObject GroundPlane SceneObject postApply () Intended as a helper to developers and editor scripts. Force trigger an inspectPostApply. This will transmit material and other fields to client objects. Material Name of Material used to render %GroundPlane's surface. scaleU Scale of texture repeat in the U direction. scaleV Scale of texture repeat in the V direction. squareSize Square size in meters to which %GroundPlane subdivides its geometry. GroundPlaneClass ConsoleClassObject GuiArrayCtrl GuiControl GuiArrayCtrlClass ConsoleClassObject GuiAutoScrollCtrl GuiTickCtrl reset () Reset scrolling. childBorder Padding to put around child control (in pixels). isLooping If true, the scrolling will reset to the beginning once completing a cycle. onComplete() Called when the child control has been scrolled in entirety. onReset() Called when the child control is reset to its initial position and the cycle starts again. onStart() Called when the control starts to scroll. onTick() Called every 32ms on the control. resetDelay Seconds to wait after scrolling completes before resetting and starting over. @note Only takes effect if #isLooping is true. scrollDirection Direction in which the child control is moved. scrollOutOfSight If true, the child control will be completely scrolled out of sight; otherwise it will only scroll until the other end becomes visible. scrollSpeed Scrolling speed in pixels per second. startDelay Seconds to wait before starting to scroll. GuiAutoScrollCtrlClass ConsoleClassObject GuiBackgroundCtrl GuiControl GuiBackgroundCtrlClass ConsoleClassObject GuiBitmapBorderCtrl GuiControl GuiBitmapBorderCtrlClass ConsoleClassObject GuiBitmapButtonCtrl GuiButtonCtrl setBitmap ( string path ) Set the bitmap to show on the button. @param path Path to the texture file in any of the supported formats. autoFitExtents If true, the control's extents will be set to match the bitmap's extents when setting the bitmap. The bitmap extents will always be taken from the default/normal bitmap (in case the extents of the various bitmaps do not match up.) bitmap Texture file to display on this button. If useStates is false, this will be the file that renders on the control. Otherwise, this will specify the default texture name to which the various state and modifier suffixes are appended to find the per-state and per-modifier (if enabled) textures. bitmapMode Behavior for fitting the bitmap to the control extents. If set to 'Stretched', the bitmap will be stretched both verticall and horizontally to fit inside the control's extents. If set to 'Centered', the bitmap will stay at its original resolution centered in the control's rectangle (getting clipped if the control is smaller than the texture). onAltClick() Called when per-modifier functionality is enabled and the user clicks on the button with the ALT key pressed. @ref guibitmapbutton_modifiers onCtrlClick() Called when per-modifier functionality is enabled and the user clicks on the button with the CTRL key pressed. @ref guibitmapbutton_modifiers onDefaultClick() Called when per-modifier functionality is enabled and the user clicks on the button without any modifier pressed. @ref guibitmapbutton_modifiers onShiftClick() Called when per-modifier functionality is enabled and the user clicks on the button with the SHIFT key pressed. @ref guibitmapbutton_modifiers useModifiers If true, per-modifier button functionality is enabled. @ref guibitmapbutton_modifiers useStates If true, per-mouse state button functionality is enabled. Defaults to true. If you do not use per-state images on this button set this to false to speed up the loading process by inhibiting searches for the individual images. GuiBitmapButtonCtrlClass ConsoleClassObject GuiBitmapButtonTextCtrl GuiBitmapButtonCtrl GuiBitmapButtonTextCtrlClass ConsoleClassObject GuiBitmapCtrl GuiControl setBitmap ( String filename | String filename, bool resize ) Assign an image to the control. @hide setValue ( int x, int y ) Set the offset of the bitmap within the control. @param x The x-axis offset of the image. @param y The y-axis offset of the image. bitmap The bitmap file to display in the control. wrap If true, the bitmap is tiled inside the control rather than stretched to fit. GuiBitmapCtrlClass ConsoleClassObject GuiBorderButtonCtrl GuiButtonBaseCtrl GuiBorderButtonCtrlClass ConsoleClassObject GuiBubbleTextCtrl GuiTextCtrl GuiBubbleTextCtrlClass ConsoleClassObject GuiButtonBaseCtrl GuiControl getText () Get the text display on the button's label (if any). @return The button's label. performClick () Simulate a click on the button. This method will trigger the button's action just as if the button had been pressed by the user. resetState () Reset the mousing state of the button. This method should not generally be called. setStateOn ( bool isOn=true ) For toggle or radio buttons, set whether the button is currently activated or not. For radio buttons, toggling a button on will toggle all other radio buttons in its group to off. @param isOn If true, the button will be toggled on (if not already); if false, it will be toggled off. @note Toggling the state of a button with this method will <em>not</em> not trigger the action associated with the button. To do that, use performClick(). setText ( string text ) Set the text displayed on the button's label. @param The text to display as the button's text label. @note Not all buttons render text labels. @see getText @see setTextID setTextID ( string id ) Set the text displayed on the button's label using a string from the string table assigned to the control. @param id Name of the variable that contains the integer string ID. Used to look up string in table. @note Not all buttons render text labels. @see setText @see getText @see GuiControl::langTableMod @see LangTable @ref Gui_i18n buttonType Button behavior type. groupNum Radio button toggle group number. All radio buttons that are assigned the same #groupNum and that are parented to the same control will synchronize their toggle state, i.e. if one radio button is toggled on all other radio buttons in its group will be toggled off. The default group is -1. onClick() Called when the primary action of the button is triggered (e.g. by a left mouse click). onDoubleClick() Called when the left mouse button is double-clicked on the button. onMouseDown() If #useMouseEvents is true, this is called when the left mouse button is pressed on an (active) button. onMouseDragged() If #useMouseEvents is true, this is called when a left mouse button drag is detected, i.e. when the user pressed the left mouse button on the control and then moves the mouse over a certain distance threshold with the mouse button still pressed. onMouseEnter() If #useMouseEvents is true, this is called when the mouse cursor moves over the button (only if the button is the front-most visible control, though). onMouseLeave() If #useMouseEvents is true, this is called when the mouse cursor moves off the button (only if the button had previously received an onMouseEvent() event). onMouseUp() If #useMouseEvents is true, this is called when the left mouse button is release over an (active) button. @note To trigger actions, better use onClick() since onMouseUp() will also be called when the mouse was not originally pressed on the button. onRightClick() Called when the right mouse button is clicked on the button. text Text label to display on button (if button class supports text labels). textID ID of string in string table to use for text label on button. @see setTextID @see GuiControl::langTableMod @see LangTable useMouseEvents If true, mouse events will be passed on to script. Default is false. GuiButtonBaseCtrlClass ConsoleClassObject GuiButtonCtrl GuiButtonBaseCtrl GuiButtonCtrlClass ConsoleClassObject GuiCanvas GuiControl clientToScreen ( Point2I coordinate ) Translate a coordinate from canvas window-space to screen-space. @param coordinate The coordinate in window-space. @return The given coordinate translated to screen-space. cursorOff () @brief Turns on the mouse off. @tsexample Canvas.cursorOff(); @endtsexample cursorOn () @brief Turns on the mouse cursor. @tsexample Canvas.cursorOn(); @endtsexample getContent () @brief Get the GuiControl which is being used as the content. @tsexample Canvas.getContent(); @endtsexample @return ID of current content control getCursorPos () @brief Get the current position of the cursor. @param param Description @tsexample %cursorPos = Canvas.getCursorPos(); @endtsexample @return Screen coordinates of mouse cursor, in format "X Y" getExtent () @brief Returns the dimensions of the canvas @tsexample %extent = Canvas.getExtent(); @endtsexample @return Width and height of canvas. Formatted as numerical values in a single string "# #" getMode ( int modeId ) @brief Gets information on the specified mode of this device. @param modeId Index of the mode to get data from. @return A video mode string given an adapter and mode index. @see GuiCanvas::getVideoMode() getModeCount () @brief Gets the number of modes available on this device. @param param Description @tsexample %modeCount = Canvas.getModeCount() @endtsexample @return The number of video modes supported by the device getMouseControl () @brief Gets the gui control under the mouse. @tsexample %underMouse = Canvas.getMouseControl(); @endtsexample @return ID of the gui control, if one was found. NULL otherwise getVideoMode () @brief Gets the current screen mode as a string. The return string will contain 5 values (width, height, fullscreen, bitdepth, refreshRate). You will need to parse out each one for individual use. @tsexample %screenWidth = getWord(Canvas.getVideoMode(), 0); %screenHeight = getWord(Canvas.getVideoMode(), 1); %isFullscreen = getWord(Canvas.getVideoMode(), 2); %bitdepth = getWord(Canvas.getVideoMode(), 3); %refreshRate = getWord(Canvas.getVideoMode(), 4); @endtsexample @return String formatted with screen width, screen height, screen mode, bit depth, and refresh rate. getWindowPosition () Get the current position of the platform window associated with the canvas. @return The window position of the canvas in screen-space. hideCursor () @brief Disable rendering of the cursor. @tsexample Canvas.hideCursor(); @endtsexample isCursorOn () @brief Determines if mouse cursor is enabled. @tsexample // Is cursor on? if(Canvas.isCursorOn()) ^echo("Canvas cursor is on"); @endtsexample @return Returns true if the cursor is on. isCursorShown () @brief Determines if mouse cursor is rendering. @tsexample // Is cursor rendering? if(Canvas.isCursorShown()) ^echo("Canvas cursor is rendering"); @endtsexample @return Returns true if the cursor is rendering. isFullscreen () Is this canvas currently fullscreen? isMaximized () isMinimized () maximizeWindow () maximize this canvas' window. minimizeWindow () minimize this canvas' window. popDialog (GuiControl ctrl=NULL) @hide popLayer (int layer) @hide pushDialog (GuiControl ctrl, int layer=0, bool center=false) @hide renderFront ( bool enable ) @brief This turns on/off front-buffer rendering. @param enable True if all rendering should be done to the front buffer @tsexample Canvas.renderFront(false); @endtsexample repaint () @brief Force canvas to redraw. @tsexample Canvas.repaint(); @endtsexample reset () @brief Reset the update regions for the canvas. @tsexample Canvas.reset(); @endtsexample restoreWindow () restore this canvas' window. screenToClient ( Point2I coordinate ) Translate a coordinate from screen-space to canvas window-space. @param coordinate The coordinate in screen-space. @return The given coordinate translated to window-space. setContent ( GuiControl ctrl ) @brief Set the content of the canvas to a specified control. @param ctrl ID or name of GuiControl to set content to @tsexample Canvas.setContent(PlayGui); @endtsexample setCursor ( GuiCursor cursor ) @brief Sets the cursor for the canvas. @param cursor Name of the GuiCursor to use @tsexample Canvas.setCursor("DefaultCursor"); @endtsexample setCursorPos (Point2I pos) @hide setFocus () Claim OS input focus for this canvas' window. setVideoMode (int width, int height, bool fullscreen, [int bitDepth], [int refreshRate]) Change the video mode of this canvas. This method has the side effect of setting the $pref::Video::mode to the new values. \param width The screen width to set. \param height The screen height to set. \param fullscreen Specify true to run fullscreen or false to run in a window \param bitDepth [optional] The desired bit-depth. Defaults to the current setting. This parameter is ignored if you are running in a window. \param refreshRate [optional] The desired refresh rate. Defaults to the current setting. This parameter is ignored if you are running in a window\param antialiasLevel [optional] The level of anti-aliasing to apply 0 = none setWindowPosition ( Point2I position ) Set the position of the platform window associated with the canvas. @param position The new position of the window in screen-space. setWindowTitle ( string newTitle ) @brief Change the title of the OS window. @param newTitle String containing the new name @tsexample Canvas.setWindowTitle("Documentation Rocks!"); @endtsexample showCursor () @brief Enable rendering of the cursor. @tsexample Canvas.showCursor(); @endtsexample toggleFullscreen () @brief toggle canvas from fullscreen to windowed mode or back. @tsexample // If we are in windowed mode, the following will put is in fullscreen Canvas.toggleFullscreen();@endtsexample numFences The number of GFX fences to use. GuiCanvasClass ConsoleClassObject GuiCheckBoxCtrl GuiButtonBaseCtrl isStateOn () Test whether the checkbox is currently checked. @return True if the checkbox is currently ticked, false otherwise. setStateOn ( bool newState ) Set whether the checkbox is ticked or not. @param newState If true the box will be checked, if false, it will be unchecked. @note This method will @b not trigger the command associated with the control. To toggle the checkbox state as if the user had clicked the control, use performClick(). GuiCheckBoxCtrlClass ConsoleClassObject GuiChunkedBitmapCtrl GuiControl setBitmap ( string filename ) @brief Set the image rendered in this control. @param filename The image name you want to set @tsexample ChunkedBitmap.setBitmap("images/background.png");@endtsexample bitmap This is the bitmap to render to the control. tile This is no longer in use useVariable This decides whether to use the "bitmap" file or a bitmap stored in "variable" GuiChunkedBitmapCtrlClass ConsoleClassObject GuiClockHud GuiControl getTime () Returns the current time, in seconds. @return timeInseconds Current time, in seconds @tsexample // Get the current time from the GuiClockHud control %timeInSeconds = %guiClockHud.getTime(); @endtsexample setTime ( float timeInSeconds=60 ) Sets the current base time for the clock. @param timeInSeconds Time to set the clock, in seconds (IE: 00:02 would be 120) @tsexample // Define the time, in seconds %timeInSeconds = 120; // Change the time on the GuiClockHud control %guiClockHud.setTime(%timeInSeconds); @endtsexample fillColor Standard color for the background of the control. frameColor Color for the control's frame. showFill If true, draws a background color behind the control. showFrame If true, draws a frame around the control. textColor Color for the text on this control. GuiClockHudClass ConsoleClassObject GuiColorPickerCtrl GuiControl getSelectorPos Gets the current position of the selector setSelectorPos Sets the current position of the selector updateColor Forces update of pick color actionOnMove bool actionOnMove baseColor ColorF baseColor displayMode GuiColorPickMode displayMode pickColor ColorF pickColor selectorGap int selectorGap showReticle bool showReticle GuiColorPickerCtrlClass ConsoleClassObject GuiConsole GuiArrayCtrl GuiConsoleClass ConsoleClassObject GuiConsoleEditCtrl GuiTextEditCtrl useSiblingScroller bool useSiblingScroller GuiConsoleEditCtrlClass ConsoleClassObject GuiConsoleTextCtrl GuiControl expression string expression GuiConsoleTextCtrlClass ConsoleClassObject GuiContainer GuiControl anchorBottom bool anchorBottom anchorLeft bool anchorLeft anchorRight bool anchorRight anchorTop bool anchorTop docking GuiDockingType docking margin RectSpacingI margin padding RectSpacingI padding GuiContainerClass ConsoleClassObject GuiControl SimGroup addGuiControl ( GuiControl control ) Add the given control as a child to this control. This is synonymous to calling SimGroup::addObject. @param control The control to add as a child. @note The control will retain its current position and size. @see SimGroup::addObject @ref GuiControl_Hierarchy clearFirstResponder ( bool ignored=false ) Clear this control from being the first responder in its hierarchy chain. @param ignored Ignored. Supported for backwards-compatibility. controlIsChild ( GuiControl control ) Test whether the given control is a direct or indirect child to this control. @param control The potential child control. @return True if the given control is a direct or indirect child to this control. findHitControl ( int x, int y ) Find the topmost child control located at the given coordinates. @note Only children that are both visible and have the 'modal' flag set in their profile will be considered in the search.@param x The X coordinate in the control's own coordinate space. @param y The Y coordinate in the control's own coordinate space. @return The topmost child control at the given coordintes or the control on which the method was called if no matching child could be found. @see GuiControlProfile::modal @see findHitControls findHitControls ( int x, int y, int width, int height ) Find all visible child controls that intersect with the given rectangle. @note Invisible child controls will not be included in the search. @param x The X coordinate of the rectangle's upper left corner in the control's own coordinate space. @param y The Y coordinate of the rectangle's upper left corner in the control's own coordinate space. @param width The width of the search rectangle in pixels. @param height The height of the search rectangle in pixels. @return A space-separated list of the IDs of all visible control objects intersecting the given rectangle. @tsexample // Lock all controls in the rectangle at x=10 and y=10 and the extent width=100 and height=100. foreach$( %ctrl in %this.findHitControls( 10, 10, 100, 100 ) ) %ctrl.setLocked( true ); @endtsexample @see findHitControl getAspect () Get the aspect ratio of the control's extents. @return The width of the control divided by its height. @see getExtent getCenter () Get the coordinate of the control's center point relative to its parent. @return The coordinate of the control's center point in parent-relative coordinates. getExtent () Get the width and height of the control. @return A point structure containing the width of the control in x and the height in y. getFirstResponder () Get the first responder set on this GuiControl tree. @return The first responder set on the control's subtree. @see isFirstResponder @see makeFirstResponder @see setFirstResponder @ref GuiControl_FirstResponders getGlobalCenter () Get the coordinate of the control's center point in coordinates relative to the root control in its control hierarchy. @Return the center coordinate of the control in root-relative coordinates. getGlobalPosition () Get the position of the control relative to the root of the GuiControl hierarchy it is contained in. @return The control's current position in root-relative coordinates. getMinExtent () Get the minimum allowed size of the control. @return The minimum size to which the control can be shrunk. @see minExtent getParent () Get the immediate parent control of the control. @return The immediate parent GuiControl or 0 if the control is not parented to a GuiControl. getPosition () Get the control's current position relative to its parent. @return The coordinate of the control in its parent's coordinate space. getRoot () Get the canvas on which the control is placed. @return The canvas on which the control's hierarchy is currently placed or 0 if the control is not currently placed on a GuiCanvas. @see GuiControl_Hierarchy getValue isActive isAwake () Test whether the control is currently awake. If a control is awake it means that it is part of the GuiControl hierarchy of a GuiCanvas. @return True if the control is awake.@ref GuiControl_Waking isFirstResponder () Test whether the control is the current first responder. @return True if the control is the current first responder. @see makeFirstResponder @see setFirstResponder @ref GuiControl_FirstResponders isVisible () Test whether the control is currently set to be visible. @return True if the control is currently set to be visible.@note This method does not tell anything about whether the control is actually visible to the user at the moment. @ref GuiControl_VisibleActive makeFirstResponder (bool isFirst) pointInControl ( int x, int y ) Test whether the given point lies within the rectangle of the control. @param x X coordinate of the point in parent-relative coordinates. @param y Y coordinate of the point in parent-relative coordinates. @return True if the point is within the control, false if not. @see getExtent @see getPosition resize ( int x, int y, int width, int height ) Resize and reposition the control using the give coordinates and dimensions. Child controls will resize according to their layout behaviors. @param x The new X coordinate of the control in its parent's coordinate space. @param y The new Y coordinate of the control in its parent's coordinate space. @param width The new width to which the control should be resized. @param height The new height to which the control should be resized. setActive ( bool state=true ) setCenter ( int x, int y ) Set the control's position by its center point. @param x The X coordinate of the new center point of the control relative to the control's parent. @param y The Y coordinate of the new center point of the control relative to the control's parent. setExtent ( Point2I p | int x, int y ) Set the width and height of the control. @hide setFirstResponder () Make this control the current first responder. @note Only controls with a profile that has canKeyFocus enabled are able to become first responders. @see GuiControlProfile::canKeyFocus @see isFirstResponder @ref GuiControl_FirstResponders setPosition ( int x, int y ) Position the control in the local space of the parent control. @param x The new X coordinate of the control relative to its parent's upper left corner. @param y The new Y coordinate of the control relative to its parent's upper left corner. setPositionGlobal ( int x, int y ) Set position of the control relative to the root of the GuiControl hierarchy it is contained in. @param x The new X coordinate of the control relative to the root's upper left corner. @param y The new Y coordinate of the control relative to the root's upper left corner. setProfile ( GuiControlProfile profile ) Set the control profile for the control to use. The profile used by a control determines a great part of its behavior and appearance. @param profile The new profile the control should use. @ref GuiControl_Profiles setValue ( string value ) Set the value associated with the control. @param value The new value for the control. setVisible ( bool state=true ) Set whether the control is visible or not. @param state The new visiblity flag state for the control. @ref GuiControl_VisibleActive accelerator Key combination that triggers the control's primary action when the control is on the canvas. active Whether the control is enabled for user interaction. altCommand Command to execute on the secondary action of the control. @note Within this script snippet, the control on which the #altCommand is being executed is bound to the global variable $ThisControl. command Command to execute on the primary action of the control. @note Within this script snippet, the control on which the #command is being executed is bound to the global variable $ThisControl. extent The width and height of the control. horizSizing The horizontal resizing behavior. hovertime Time for mouse to hover over control until tooltip is shown (in milliseconds). isContainer If true, the control may contain child controls. langTableMod Name of string table to use for lookup of internationalized text. minExtent The minimum width and height of the control. The control will not be resized smaller than this. modal @deprecated This member is deprecated, which means that its value is always undefined. onAction() Called when the control's associated action is triggered and no 'command' is defined for the control. @ref GuiControl_Actions onActive( bool state ) Called when the control changes its activeness state, i.e. when going from active to inactive or vice versa. @param stat The new activeness state. @see isActive @see setActive @ref GuiControl_VisibleActive onAdd() Called when the control object is registered with the system after the control has been created. onControlDragEnter( GuiControl control, Point2I dropPoint ) Called when a drag&drop operation through GuiDragAndDropControl has entered the control. This is only called for topmost visible controls as the GuiDragAndDropControl moves over them. @param control The payload of the drag operation. @param dropPoint The point at which the payload would be dropped if it were released now. Relative to the canvas. onControlDragExit( GuiControl control, Point2I dropPoint ) Called when a drag&drop operation through GuiDragAndDropControl has exited the control and moved over a different control. This is only called for topmost visible controls as the GuiDragAndDropControl moves off of them. @param control The payload of the drag operation. @param dropPoint The point at which the payload would be dropped if it were released now. Relative to the canvas. onControlDragged( GuiControl control, Point2I dropPoint ) Called when a drag&drop operation through GuiDragAndDropControl is moving across the control after it has entered it. This is only called for topmost visible controls as the GuiDragAndDropControl moves across them. @param control The payload of the drag operation. @param dropPoint The point at which the payload would be dropped if it were released now. Relative to the canvas. onControlDropped( GuiControl control, Point2I dropPoint ) Called when a drag&drop operation through GuiDragAndDropControl has completed and is dropping its payload onto the control. This is only called for topmost visible controls as the GuiDragAndDropControl drops its payload on them. @param control The control that is being dropped onto this control. @param dropPoint The point at which the control is being dropped. Relative to the canvas. onDialogPop() Called when the control is removed as a dialog from the canvas. @see GuiCanvas::popDialog onDialogPush() Called when the control is pushed as a dialog onto the canvas. @see GuiCanvas::pushDialog onGainFirstResponder() Called when the control gains first responder status on the GuiCanvas. @see setFirstResponder @see makeFirstResponder @see isFirstResponder @ref GuiControl_FirstResponders onLoseFirstResponder() Called when the control loses first responder status on the GuiCanvas. @see setFirstResponder @see makeFirstResponder @see isFirstResponder @ref GuiControl_FirstResponders onRemove() Called when the control object is removed from the system before it is deleted. onSleep() Called when the control is put to sleep. @ref GuiControl_Waking onVisible( bool state ) Called when the control changes its visibility state, i.e. when going from visible to invisible or vice versa. @param state The new visibility state. @see isVisible @see setVisible @ref GuiControl_VisibleActive onWake() Called when the control is woken up. @ref GuiControl_Waking position The position relative to the parent control. profile The control profile that determines fill styles, font settings, etc. setFirstResponder @deprecated This member is deprecated, which means that its value is always undefined. tooltip String to show in tooltip for this control. tooltipProfile Control profile to use when rendering tooltips for this control. variable Name of the variable to which the value of this control will be synchronized. vertSizing The vertical resizing behavior. visible Whether the control is visible or hidden. GuiControlArrayControl GuiControl colCount Number of colums in the array. colSizes Size of each individual column. colSpacing Padding to put between columns. rowSize Heigth of a row in the array. rowSpacing Padding to put between rows. GuiControlArrayControlClass ConsoleClassObject GuiControlClass ConsoleClassObject GuiControlProfile SimObject getStringWidth ( pString ) autoSizeHeight Automatically adjust height of control to fit contents. autoSizeWidth Automatically adjust width of control to fit contents. bevelColorHL ColorI bevelColorHL bevelColorLL ColorI bevelColorLL bitmap Texture to use for rendering control. border Border type (0=no border). borderColor Color to draw border with. borderColorHL ColorI borderColorHL borderColorNA ColorI borderColorNA borderThickness Thickness of border in pixels. canKeyFocus Whether the control can have the keyboard focus. category Category under which the profile will appear in the editor. cursorColor Color to use for the text cursor. fillColor ColorI fillColor fillColorHL ColorI fillColorHL fillColorNA ColorI fillColorNA fillColorSEL ColorI fillColorSEL fontCharset GuiFontCharset fontCharset fontColor Font color for normal text (same as fontColors[0]). fontColorHL Font color for highlighted text (same as fontColors[1]). fontColorLink Font color for links in text (same as fontColors[4]). fontColorLinkHL Font color for highlighted links in text (same as fontColors[5]). fontColorNA Font color when control is not active/disabled (same as fontColors[2]). fontColors Font colors to use for different text types/states. fontColorSEL Font color for selected text (same as fontColors[3]). fontSize Font size in points. fontType Name of font family and typeface (e.g. "Arial Bold"). hasBitmapArray If true, 'bitmap' is an array of images. justify Horizontal alignment for text. modal bool modal mouseOverSelected bool mouseOverSelected numbersOnly Whether control should only accept numerical data (GuiTextEditCtrl). opaque bool opaque profileForChildren string profileForChildren returnTab Whether to add automatic tab event when return is pressed so focus moves on to next control (GuiTextEditCtrl). soundButtonDown Sound to play when mouse has been pressed on control. soundButtonOver Sound to play when mouse is hovering over control. tab bool tab textOffset Point2I textOffset yPositionOffset int yPositionOffset GuiControlProfileClass ConsoleClassObject GuiConvexEditorCtrl EditTSCtrl dropSelectionAtScreenCenter handleDelete handleDeselect hasSelection hollowSelection recenterSelection selectConvex ( ConvexShape ) splitSelectedFace isDirty bool isDirty materialName string materialName GuiConvexEditorCtrlClass ConsoleClassObject GuiCrossHairHud GuiBitmapCtrl damageFillColor As the health bar depletes, this color will represent the health loss amount. damageFrameColor Color for the health bar's frame. damageOffset Offset for drawing the damage portion of the health control. damageRect Size for the health bar portion of the control. GuiCrossHairHudClass ConsoleClassObject GuiCursor SimObject bitmapName File name of the bitmap for the cursor. hotSpot The location of the cursor's hot spot (which pixel carries the click). renderOffset Offset of the bitmap, where 0 signifies left edge of the bitmap, 1, the right. Similarly for the Y-component. GuiCursorClass ConsoleClassObject GuiDataGroup SimGroup GuiDecalEditorCtrl EditTSCtrl deleteDecalDatablock deleteSelectedDecalDatablock( String datablock ) deleteSelectedDecal deleteSelectedDecal() editDecalDetails editDecalDetails( S32 )() getDecalCount getDecalCount() getDecalLookupName getDecalLookupName( S32 )() getDecalTransform getDecalTransform() getMode getMode() getSelectionCount retargetDecalDatablock selectDecal selectDecal( S32 )() setMode setMode( String mode )() currentDecalData DecalData currentDecalData GuiDecalEditorCtrlClass ConsoleClassObject GuiDecoyCtrl GuiControl isDecoy Sets this control to decoy mode GuiDecoyCtrlClass ConsoleClassObject GuiDirectoryFileListCtrl GuiListBoxCtrl getSelectedFile () Get the currently selected filename. @return The filename of the currently selected file getSelectedFiles () Get the list of selected files. @return A space separated list of selected files reload () Update the file list. setFilter ( string filter ) Set the file filter. @param filter Tab-delimited list of file name patterns. Only matched files will be displayed. setPath ( string path, string filter ) Set the search path and file filter. @param path Path in game directory from which to list files. @param filter Tab-delimited list of file name patterns. Only matched files will be displayed. fileFilter Tab-delimited list of file name patterns. Only matched files will be displayed. filePath Path in game directory from which to list files. GuiDirectoryFileListCtrlClass ConsoleClassObject GuiDragAndDropControl GuiControl startDragging ( int x=0, int y=0 ) Start the drag operation. @param offset The offset from the mouse pointer with which the drag control should position itself. deleteOnMouseUp If true, the control deletes itself when the left mouse button is released. If at this point, the drag&drop control still contains its payload, it will be deleted along with the control. GuiDragAndDropControlClass ConsoleClassObject GuiDynamicCtrlArrayControl GuiControl refresh () Recalculates the position and size of this control and all its children. autoCellSize When true, the cell size is set to the widest/tallest child control. colCount Number of columns the child controls have been arranged into. This value is calculated automatically when children are added, removed or resized; writing it directly has no effect. colSize Width of each column. If <i>autoCellSize</i> is set, this will be calculated automatically from the widest child control colSpacing Spacing between columns dynamicSize If true, the width or height of this control will be automatically calculated based on the number of child controls (width if <i>fillRowFirst</i> is false, height if <i>fillRowFirst</i> is true). fillRowFirst Controls whether rows or columns are filled first. If true, controls are added to the grid left-to-right (to fill a row); then rows are added top-to-bottom as shown below: <pre>1 2 3 4 5 6 7 8</pre> If false, controls are added to the grid top-to-bottom (to fill a column); then columns are added left-to-right as shown below: <pre>1 3 5 7 2 4 6 8</pre> frozen When true, the array will not update when new children are added or in response to child resize events. This is useful to prevent unnecessary resizing when adding, removing or resizing a number of child controls. padding Padding around the top, bottom, left, and right of this control. This reduces the area available for child controls. rowCount Number of rows the child controls have been arranged into. This value is calculated automatically when children are added, removed or resized; writing it directly has no effect. rowSize Height of each row. If <i>autoCellSize</i> is set, this will be calculated automatically from the tallest child control rowSpacing Spacing between rows GuiDynamicCtrlArrayControlClass ConsoleClassObject GuiEaseViewCtrl GuiControl axisColor ColorF axisColor ease EaseF ease easeColor ColorF easeColor easeWidth float easeWidth GuiEaseViewCtrlClass ConsoleClassObject GuiEditCtrl GuiControl addNewCtrl (GuiControl ctrl) addSelection selects a control. bringToFront clearGuides ( [ int axis ] ) Clear all currently set guide lines. clearSelection Clear selected controls list. deleteSelection () Delete the selected controls. fitIntoParents ( bool width=true, bool height=true ) Fit selected controls into their parents. getContentControl () Return the toplevel control edited inside the GUI editor. getCurrentAddSet Returns the set to which new controls will be added getMouseMode () Return the current mouse mode. getNumSelected () Return the number of controls currently selected. getSelection () Gets the set of GUI controls currently selected in the editor. getSelectionGlobalBounds () Returns global bounds of current selection as vector 'x y width height'. getTrash () Gets the GUI controls(s) that are currently in the trash. justify (int mode) loadSelection ( string fileName=null ) Load selection from file or clipboard. moveSelection (int dx, int dy) Move all controls in the selection by (dx,dy) pixels. pushToBack readGuides ( GuiControl ctrl [, int axis ] ) Read the guides from the given control. removeSelection deselects a control. saveSelection ( string fileName=null ) Save selection to file or clipboard. select (GuiControl ctrl) selectAll () selectChildren ( bool addToSelection=false ) Select children of currently selected controls. selectParents ( bool addToSelection=false ) Select parents of currently selected controls. setContentControl ( GuiControl ctrl ) Set the toplevel control to edit in the GUI editor. setCurrentAddSet (GuiControl ctrl) setSnapToGrid GuiEditCtrl.setSnapToGrid(gridsize) toggle Toggle activation. writeGuides ( GuiControl ctrl [, int axis ] ) Write the guides to the given control. drawBorderLines If true, lines will be drawn extending along the edges of selected objects. drawGuides If true, guides will be included in rendering. fullBoxSelection If true, rectangle selection will only select controls fully inside the drag rectangle. onAddNewCtrl( GuiControl control ) void onAddNewCtrl( GuiControl control ) onAddNewCtrlSet( SimSet set ) void onAddNewCtrlSet( SimSet set ) onAddSelected( GuiControl control ) void onAddSelected( GuiControl control ) onClearSelected() void onClearSelected() onControlInspectPostApply( GuiControl control ) void onControlInspectPostApply( GuiControl control ) onControlInspectPreApply( GuiControl control ) void onControlInspectPreApply( GuiControl control ) onDelete() void onDelete() onFitIntoParent( bool width, bool height ) void onFitIntoParent( bool width, bool height ) onHierarchyChanged() void onHierarchyChanged() onMouseModeChange() void onMouseModeChange() onPostEdit( SimSet selection ) void onPostEdit( SimSet selection ) onPostSelectionNudged( SimSet selection ) void onPostSelectionNudged( SimSet selection ) onPreEdit( SimSet selection ) void onPreEdit( SimSet selection ) onPreSelectionNudged( SimSet selection ) void onPreSelectionNudged( SimSet selection ) onRemoveSelected( GuiControl control ) void onRemoveSelected( GuiControl control ) onSelect( GuiControl control ) void onSelect( GuiControl control ) onSelectionCloned( SimSet selection ) void onSelectionCloned( SimSet selection ) onSelectionMoved( GuiControl control ) void onSelectionMoved( GuiControl control ) onSelectionResized( GuiControl control ) void onSelectionResized( GuiControl control ) onTrashSelection( SimSet selection ) void onTrashSelection( SimSet selection ) snapSensitivity Distance in pixels that edge and center snapping will work across. snapToCanvas If true, edge and center snapping will work against canvas (toplevel control). snapToCenters If true, selection centers will snap into alignment when moved or resized. snapToControls If true, edge and center snapping will work against controls. snapToEdges If true, selection edges will snap into alignment when moved or resized. snapToGuides If true, edge and center snapping will work against guides. GuiEditCtrlClass ConsoleClassObject GuiEditorRuler GuiControl editCtrl string editCtrl refCtrl string refCtrl GuiEditorRulerClass ConsoleClassObject GuiFadeinBitmapCtrl GuiBitmapCtrl click() @brief Informs the script level that this object received a Click event from the cursor or keyboard. @tsexample GuiFadeInBitmapCtrl::click(%this) ^{ ^^// Code to run when click occurs ^} @endtsexample @see GuiCore done Whether the fade cycle has finished running. fadeColor Color to fade in from and fade out to. fadeInEase Easing curve for fade-in. fadeInTime Milliseconds for the bitmap to fade in. fadeOutEase Easing curve for fade-out. fadeOutTime Milliseconds for the bitmap to fade out. onDone() @brief Informs the script level that this object has completed is fade cycle. @tsexample GuiFadeInBitmapCtrl::onDone(%this) ^{ ^^// Code to run when the fade cycle completes ^} @endtsexample @see GuiCore waitTime Milliseconds to wait after fading in before fading out the bitmap. GuiFadeinBitmapCtrlClass ConsoleClassObject GuiFileTreeCtrl GuiTreeViewCtrl getSelectedPath getSelectedPath() - returns the currently selected path in the tree reload () Reread the directory tree hierarchy. setSelectedPath setSelectedPath(path) - expands the tree to the specified path fileFilter Vector of file patterns. If not empty, only files matching the pattern will be shown in the control. rootPath Path in game directory that should be displayed in the control. GuiFileTreeCtrlClass ConsoleClassObject GuiFilterCtrl GuiControl getValue Return a tuple containing all the values in the filter.@internal identity Reset the filtering.@internal setValue (f1, f2, ...) Reset the filter to use the specified points, spread equidistantly across the domain.@internal controlPoints Total number of control points in the spline curve. filter Vector of control points. identity @internal showIdentity @internal GuiFilterCtrlClass ConsoleClassObject GuiFormCtrl GuiPanel getMenuID () Get the ID of this form's menu. @return The ID of the form menu setCaption ( string caption ) Sets the title of the form. @param caption Form caption caption string caption content string content contentLibrary string contentLibrary hasMenu bool hasMenu movable bool movable onResize() Called when the control is resized. GuiFormCtrlClass ConsoleClassObject GuiFrameSetCtrl GuiContainer addColumn () Add a new column. addRow () Add a new row. frameBorder ( int index, string state="dynamic" ) Override the <i>borderEnable</i> setting for this frame. @param index Index of the frame to modify @param state New borderEnable state: "on", "off" or "dynamic" frameMinExtent ( int index, int width, int height ) Set the minimum width and height for the frame. It will not be possible for the user to resize the frame smaller than this. @param index Index of the frame to modify @param width Minimum width in pixels @param height Minimum height in pixels frameMovable ( int index, string state="dynamic" ) Override the <i>borderMovable</i> setting for this frame. @param index Index of the frame to modify @param state New borderEnable state: "on", "off" or "dynamic" framePadding ( int index, RectSpacingI padding ) Set the padding for this frame. Padding introduces blank space on the inside edge of the frame. @param index Index of the frame to modify @param padding Frame top, bottom, left, and right padding getColumnCount () Get the number of columns. @return The number of columns getColumnOffset ( int index ) Get the horizontal offset of a column. @param index Index of the column to query @return Column offset in pixels getFramePadding ( int index ) Get the padding for this frame. @param index Index of the frame to query getRowCount () Get the number of rows. @return The number of rows getRowOffset ( int index ) Get the vertical offset of a row. @param index Index of the row to query @return Row offset in pixels removeColumn () Remove the last (rightmost) column. removeRow () Remove the last (bottom) row. setColumnOffset ( int index, int offset ) Set the horizontal offset of a column. Note that column offsets must always be in increasing order, and therefore this offset must be between the offsets of the colunns either side. @param index Index of the column to modify @param offset New column offset setRowOffset ( int index, int offset ) Set the vertical offset of a row. Note that row offsets must always be in increasing order, and therefore this offset must be between the offsets of the rows either side. @param index Index of the row to modify @param offset New row offset updateSizes () Recalculates child control sizes. autoBalance If true, row and column offsets are automatically scaled to match the new extents when the control is resized. borderColor Color of interior borders between cells. borderEnable Controls whether frame borders are enabled. Frames use this value unless overridden for that frame using <i>%ctrl.frameBorder(index)</i> borderMovable Controls whether borders can be dynamically repositioned with the mouse by the user. Frames use this value unless overridden for that frame using <i>%ctrl.frameMovable(index)</i> borderWidth Width of interior borders between cells in pixels. columns A vector of column offsets (determines the width of each column). fudgeFactor Offset for row and column dividers in pixels rows A vector of row offsets (determines the height of each row). GuiFrameSetCtrlClass ConsoleClassObject GuiGameListMenuCtrl GuiControl activateRow () Activates the current row. The script callback of the current row will be called (if it has one). addRow ( string label, string callback, int icon=-1, int yPad=0, bool useHighlightIcon=true, bool enabled=true ) Add a row to the list control. @param label The text to display on the row as a label. @param callback Name of a script function to use as a callback when this row is activated. @param icon [optional] Index of the icon to use as a marker. @param yPad [optional] An extra amount of height padding before the row. Does nothing on the first row. @param useHighlightIcon [optional] Does this row use the highlight icon?. @param enabled [optional] If this row is initially enabled. getRowCount () Gets the number of rows on the control. @return (int) The number of rows on the control. getRowLabel ( int row ) Gets the label displayed on the specified row. @param row Index of the row to get the label of. @return The label for the row. getSelectedRow () Gets the index of the currently selected row. @return Index of the selected row. isRowEnabled ( int row ) Determines if the specified row is enabled or disabled. @param row The row to set the enabled status of. @return True if the specified row is enabled. False if the row is not enabled or the given index was not valid. setRowEnabled ( int row, bool enabled ) Sets a row's enabled status according to the given parameters. @param row The index to check for validity. @param enabled Indicate true to enable the row or false to disable it. setRowLabel ( int row, string label ) Sets the label on the given row. @param row Index of the row to set the label on. @param label Text to set as the label of the row. setSelected ( int row ) Sets the selected row. Only rows that are enabled can be selected. @param row Index of the row to set as selected. callbackOnA Script callback when the 'A' button is pressed. 'A' inputs are Keyboard: A, Return, Space; Gamepad: A, Start callbackOnB Script callback when the 'B' button is pressed. 'B' inputs are Keyboard: B, Esc, Backspace, Delete; Gamepad: B, Back callbackOnX Script callback when the 'X' button is pressed. 'X' inputs are Keyboard: X; Gamepad: X callbackOnY Script callback when the 'Y' button is pressed. 'Y' inputs are Keyboard: Y; Gamepad: Y debugRender Enable debug rendering onChange() Called when the selected row changes. GuiGameListMenuCtrlClass ConsoleClassObject GuiGameListMenuProfile GuiControlProfile hitAreaLowerRight Position of the lower right corner of the row hit area (relative to row's top left corner) hitAreaUpperLeft Position of the upper left corner of the row hit area (relative to row's top left corner) iconOffset Offset from the row's top left corner at which to render the row icon rowSize The base size ("width height") of a row GuiGameListMenuProfileClass ConsoleClassObject GuiGameListOptionsCtrl GuiGameListMenuCtrl addRow ( string label, string options, bool wrapOptions, string callback, int icon=-1, int yPad=0, bool enabled=true ) Add a row to the list control. @param label The text to display on the row as a label. @param options A tab separated list of options. @param wrapOptions Specify true to allow options to wrap at each end or false to prevent wrapping. @param callback Name of a script function to use as a callback when this row is activated. @param icon [optional] Index of the icon to use as a marker. @param yPad [optional] An extra amount of height padding before the row. Does nothing on the first row. @param enabled [optional] If this row is initially enabled. getCurrentOption ( int row ) Gets the text for the currently selected option of the given row. @param row Index of the row to get the option from. @return A string representing the text currently displayed as the selected option on the given row. If there is no such displayed text then the empty string is returned. selectOption ( int row, string option ) Set the row's current option to the one specified @param row Index of the row to set an option on. @param option The option to be made active. @return True if the row contained the option and was set, false otherwise. setOptions ( int row, string optionsList ) Sets the list of options on the given row. @param row Index of the row to set options on.@param optionsList A tab separated list of options for the control. GuiGameListOptionsCtrlClass ConsoleClassObject GuiGameListOptionsProfile GuiGameListMenuProfile columnSplit Padding between the leftmost edge of the control, and the row's left arrow. rightPad Padding between the rightmost edge of the control and the row's right arrow. GuiGameListOptionsProfileClass ConsoleClassObject GuiGradientCtrl GuiControl getColor Get color value getColorCount Get color count actionOnMove bool actionOnMove baseColor ColorF baseColor displayMode GuiGradientPickMode displayMode pickColor ColorF pickColor showReticle bool showReticle swatchFactor int swatchFactor GuiGradientCtrlClass ConsoleClassObject GuiGradientSwatchCtrl GuiSwatchButtonCtrl GuiGradientSwatchCtrlClass ConsoleClassObject GuiGraphCtrl GuiControl addAutoPlot ( int plotId, string variable, int updateFrequency ) Sets up the given plotting curve to automatically plot the value of the @a variable with a frequency of @a updateFrequency. @param plotId Index of the plotting curve. Must be 0<=plotId<6. @param variable Name of the global variable. @param updateFrequency Frequency with which to add new data points to the plotting curve (in milliseconds). @tsexample // Plot FPS counter at 1 second intervals. %graph.addAutoPlot( 0, "fps::real", 1000 ); @endtsexample addDatum ( int plotId, float value ) Add a data point to the plot's curve. @param plotId Index of the plotting curve to which to add the data point. Must be 0<=plotId<6. @param value Value of the data point to add to the curve. @note Data values are added to the @b left end of the plotting curve. @note A maximum number of 200 data points can be added to any single plotting curve at any one time. If this limit is exceeded, data points on the right end of the curve are culled. getDatum ( int plotId, int index ) Get a data point on the given plotting curve. @param plotId Index of the plotting curve from which to fetch the data point. Must be 0<=plotId<6. @param index Index of the data point on the curve. @return The value of the data point or -1 if @a plotId or @a index are out of range. matchScale ( int plotID1, int plotID1, ... ) Set the scale of all specified plots to the maximum scale among them. @param plotID1 Index of plotting curve. @param plotID2 Index of plotting curve. removeAutoPlot ( int plotId ) Stop automatic variable plotting for the given curve. @param plotId Index of the plotting curve. Must be 0<=plotId<6. setGraphType ( int plotId, GuiGraphType graphType ) Change the charting type of the given plotting curve. @param plotId Index of the plotting curve. Must be 0<=plotId<6. @param graphType Charting type to use for the curve. @note Instead of calling this method, you can directly assign to #plotType. centerY Ratio of where to place the center coordinate of the graph on the Y axis. 0.5=middle height of control. This allows to account for graphs that have only positive or only negative data points, for example. plotColor Color to use for the plotting curves in the graph. plotInterval Interval between auto-plots of #plotVariable for the respective curve (in milliseconds). plotType Charting type of the plotting curves. plotVariable Name of the variable to automatically plot on the curves. If empty, auto-plotting is disabled for the respective curve. GuiGraphCtrlClass ConsoleClassObject GuiGroup SimGroup GuiHealthBarHud GuiControl damageFillColor As the health bar depletes, this color will represent the health loss amount. displayEnergy If true, display the energy value rather than the damage value. fillColor Standard color for the background of the control. frameColor Color for the control's frame. pulseRate Speed at which the control will pulse. pulseThreshold Health level the control must be under before the control will pulse. showFill If true, we draw the background color of the control. showFrame If true, we draw the frame of the control. GuiHealthBarHudClass ConsoleClassObject GuiIconButtonCtrl GuiButtonCtrl setBitmap ( string buttonFilename ) @brief Set the bitmap to use for the button portion of this control. @param param1 Parameter 1 description @tsexample // Define the button filename %buttonFilename = "pearlButton"; // Inform the GuiIconButtonCtrl control to update its main button graphic to the defined bitmap %thisGuiIconButtonCtrl.setBitmap(%buttonFilename); @endtsexample @see GuiControl @see GuiButtonCtrl autoSize If true, the text and icon will be automatically sized to the size of the control. buttonMargin Margin area around the button. iconBitmap Bitmap file for the icon to display on the button. iconLocation Where to place the icon on the control. Options are 0 (None), 1 (Left), 2 (Right), 3 (Center). makeIconSquare If true, will make sure the icon is square. sizeIconToButton If true, the icon will be scaled to be the same size as the button. textLocation Where to place the text on the control. Options are 0 (None), 1 (Bottom), 2 (Right), 3 (Top), 4 (Left), 5 (Center). textMargin Margin between the icon and the text. GuiIconButtonCtrlClass ConsoleClassObject GuiIdleCamFadeBitmapCtrl GuiBitmapCtrl fadeIn () @internal fadeOut () @internal done bool done fadeInTime int fadeInTime fadeOutTime int fadeOutTime GuiIdleCamFadeBitmapCtrlClass ConsoleClassObject GuiImageList SimObject clear () @brief Clears the imagelist @tsexample // Inform the GuiImageList control to clear itself. %isFinished = %thisGuiImageList.clear(); @endtsexample @return Returns true when finished. @see SimObject count () @brief Gets the number of images in the list. @tsexample // Request the number of images from the GuiImageList control. %imageCount = %thisGuiImageList.count(); @endtsexample @return Number of images in the control. @see SimObject getImage ( int index ) @brief Get a path to the texture at the specified index. @param index Index of the image in the list. @tsexample // Define the image index/n%index = "5"; // Request the image path location from the control. %imagePath = %thisGuiImageList.getImage(%index); @endtsexample @return File path to the image map for the specified index. @see SimObject getIndex ( string imagePath ) @brief Retrieves the imageindex of a specified texture in the list. @param imagePath Imagemap including filepath of image to search for @tsexample // Define the imagemap to search for %imagePath = "./game/client/data/images/thisImage"; // Request the index entry for the defined imagemap %imageIndex = %thisGuiImageList.getIndex(%imagePath); @endtsexample @return Index of the imagemap matching the defined image path. @see SimObject insert ( string imagePath ) @brief Insert an image into imagelist- returns the image index or -1 for failure. @param imagePath Imagemap, with path, to add to the list. @tsexample // Define the imagemap to add to the list %imagePath = "./game/client/data/images/thisImage"; // Request the GuiImageList control to add the defined image to its list. %imageIndex = %thisGuiImageList.insert(%imagePath); @endtsexample @return The index of the newly inserted imagemap, or -1 if the insertion failed. @see SimObject remove ( int index ) @brief Removes an image from the list by index. @param index Image index to remove. @tsexample // Define the image index. %imageIndex = "4"; // Inform the GuiImageList control to remove the image at the defined index. %wasSuccessful = %thisGuiImageList.remove(%imageIndex); @endtsexample @return True if the operation was successful, false if it was not. @see SimObject GuiImageListClass ConsoleClassObject GuiInputCtrl GuiMouseEventCtrl onInputEvent( string device, string action, bool state ) @brief Callback that occurs when an input is triggered on this control @param device The device type triggering the input, such as keyboard, mouse, etc @param action The actual event occuring, such as a key or button @param state True if the action is being pressed, false if it is being release GuiInputCtrlClass ConsoleClassObject GuiInspector GuiStackControl addInspect ( id object, (bool autoSync = true) ) Add the object to the list of objects being inspected. apply apply() - Force application of inspected object's attributes findByObject findByObject( SimObject ) - returns the id of an awake inspector that is inspecting the passed object if one exists. getInspectObject getInspectObject( int index=0 ) - Returns currently inspected object getNumInspectObjects () Return the number of objects currently being inspected. inspect Inspect(Object) refresh Reinspect the currently selected object. removeInspect ( id object ) Remove the object from the list of objects being inspected. setName setName(NewObjectName) setObjectField setObjectField( fieldname, data ) - Set a named fields value on the inspected object if it exists. This triggers all the usual callbacks that would occur if the field had been changed through the gui. dividerMargin int dividerMargin groupFilters Specify groups that should be shown or not. Specifying 'shown' implicitly does 'not show' all other groups. Example string: +name -otherName showCustomFields If false the custom fields Name, Id, and Source Class will not be shown. GuiInspectorClass ConsoleClassObject GuiInspectorCustomField GuiInspectorField GuiInspectorCustomFieldClass ConsoleClassObject GuiInspectorDatablockField GuiInspectorTypeMenuBase GuiInspectorDatablockFieldClass ConsoleClassObject GuiInspectorDynamicField GuiInspectorField renameField field.renameField(newDynamicFieldName); GuiInspectorDynamicFieldClass ConsoleClassObject GuiInspectorDynamicGroup GuiInspectorGroup addDynamicField obj.addDynamicField(); inspectGroup Refreshes the dynamic fields in the inspector. removeDynamicField GuiInspectorDynamicGroupClass ConsoleClassObject GuiInspectorField GuiControl apply ( string newValue, bool callbacks=true ) Set the field's value. Suppress callbacks for undo if callbacks=false. applyWithoutUndo () Set field value without recording undo (same as 'apply( value, false )'). getData () Return the value currently displayed on the field. getInspectedFieldName () Return the name of the field edited by this inspector field. getInspectedFieldType () Return the type of the field edited by this inspector field. getInspector () Return the GuiInspector to which this field belongs. reset () Reset to default value. GuiInspectorFieldClass ConsoleClassObject GuiInspectorGroup GuiRolloutCtrl GuiInspectorGroupClass ConsoleClassObject GuiInspectorTypeBitMask32 GuiInspectorField applyBit apply(); GuiInspectorTypeBitMask32Class ConsoleClassObject GuiInspectorTypeBitMask32Helper GuiInspectorField GuiInspectorTypeBitMask32HelperClass ConsoleClassObject GuiInspectorTypeCheckBox GuiInspectorField GuiInspectorTypeCheckBoxClass ConsoleClassObject GuiInspectorTypeColor GuiInspectorField GuiInspectorTypeColorClass ConsoleClassObject GuiInspectorTypeColorF GuiInspectorTypeColor GuiInspectorTypeColorFClass ConsoleClassObject GuiInspectorTypeColorI GuiInspectorTypeColor GuiInspectorTypeColorIClass ConsoleClassObject GuiInspectorTypeCommand GuiInspectorField GuiInspectorTypeCommandClass ConsoleClassObject GuiInspectorTypeCubemapName GuiInspectorTypeMenuBase GuiInspectorTypeCubemapNameClass ConsoleClassObject GuiInspectorTypeEaseF GuiInspectorField GuiInspectorTypeEaseFClass ConsoleClassObject GuiInspectorTypeEnum GuiInspectorTypeMenuBase GuiInspectorTypeEnumClass ConsoleClassObject GuiInspectorTypeFileName GuiInspectorField apply apply(newValue); GuiInspectorTypeFileNameClass ConsoleClassObject GuiInspectorTypeGuiProfile GuiInspectorTypeMenuBase GuiInspectorTypeGuiProfileClass ConsoleClassObject GuiInspectorTypeImageFileName GuiInspectorTypeFileName GuiInspectorTypeImageFileNameClass ConsoleClassObject GuiInspectorTypeMaterialName GuiInspectorField GuiInspectorTypeMaterialNameClass ConsoleClassObject GuiInspectorTypeMenuBase GuiInspectorField GuiInspectorTypeMenuBaseClass ConsoleClassObject GuiInspectorTypeName GuiInspectorField GuiInspectorTypeNameClass ConsoleClassObject GuiInspectorTypePrefabFilename GuiInspectorTypeFileName GuiInspectorTypePrefabFilenameClass ConsoleClassObject GuiInspectorTypeRectUV GuiInspectorField GuiInspectorTypeRectUVClass ConsoleClassObject GuiInspectorTypeS32 GuiInspectorField GuiInspectorTypeS32Class ConsoleClassObject GuiInspectorTypeSFXAmbienceName GuiInspectorDatablockField GuiInspectorTypeSFXAmbienceNameClass ConsoleClassObject GuiInspectorTypeSFXDescriptionName GuiInspectorDatablockField GuiInspectorTypeSFXDescriptionNameClass ConsoleClassObject GuiInspectorTypeSFXEnvironmentName GuiInspectorDatablockField GuiInspectorTypeSFXEnvironmentNameClass ConsoleClassObject GuiInspectorTypeSFXParameterName GuiInspectorTypeMenuBase GuiInspectorTypeSFXParameterNameClass ConsoleClassObject GuiInspectorTypeSFXSourceName GuiInspectorTypeMenuBase GuiInspectorTypeSFXSourceNameClass ConsoleClassObject GuiInspectorTypeSFXStateName GuiInspectorTypeMenuBase GuiInspectorTypeSFXStateNameClass ConsoleClassObject GuiInspectorTypeSFXTrackName GuiInspectorDatablockField GuiInspectorTypeSFXTrackNameClass ConsoleClassObject GuiInspectorTypeTerrainMaterialIndex GuiInspectorTypeMaterialName GuiInspectorTypeTerrainMaterialIndexClass ConsoleClassObject GuiInspectorTypeTerrainMaterialName GuiInspectorTypeMaterialName GuiInspectorTypeTerrainMaterialNameClass ConsoleClassObject GuiInspectorVariableField GuiInspectorField GuiInspectorVariableFieldClass ConsoleClassObject GuiInspectorVariableGroup GuiInspectorGroup GuiInspectorVariableGroupClass ConsoleClassObject GuiListBoxCtrl GuiControl addFilteredItem ( string newItem ) @brief Checks if there is an item with the exact text of what is passed in, and if so the item is removed from the list and adds that item's data to the filtered list. @param itemName Name of the item that we wish to add to the filtered item list of the GuiListBoxCtrl. @tsexample // Define the itemName that we wish to add to the filtered item list. %itemName = "This Item Name"; // Add the item name to the filtered item list. %thisGuiListBoxCtrl.addFilteredItem(%filteredItemName); @endtsexample @see GuiControl addItem ( string newItem, string color="" ) @brief Adds an item to the end of the list with an optional color. @param newItem New item to add to the list. @param color Optional color parameter to add to the new item. @tsexample // Define the item to add to the list. %newItem = "Gideon's Blue Coat"; // Define the optional color for the new list item. %color = "0.0 0.0 1.0"; // Inform the GuiListBoxCtrl object to add the item to the end of the list with the defined color. %thisGuiListBoxCtrl.addItem(%newItem,%color); @endtsexample @return If not void, return value and description @see GuiControl @hide clearItemColor ( int index ) @brief Removes any custom coloring from an item at the defined index id in the list. @param index Index id for the item to clear any custom color from. @tsexample // Define the index id %index = "4"; // Request the GuiListBoxCtrl object to remove any custom coloring from the defined index entry %thisGuiListBoxCtrl.clearItemColor(%index); @endtsexample @see GuiControl clearItems () @brief Clears all the items in the listbox. @tsexample // Inform the GuiListBoxCtrl object to clear all items from its list. %thisGuiListBoxCtrl.clearItems(); @endtsexample @see GuiControl clearSelection () @brief Sets all currently selected items to unselected. Detailed description @tsexample // Inform the GuiListBoxCtrl object to set all of its items to unselected./n%thisGuiListBoxCtrl.clearSelection(); @endtsexample @see GuiControl deleteItem ( int itemIndex ) @brief Removes the list entry at the requested index id from the control and clears the memory associated with it. @param itemIndex Index id location to remove the item from. @tsexample // Define the index id we want to remove from the list %itemIndex = "8"; // Inform the GuiListBoxCtrl object to remove the item at the defined index id. %thisGuiListBoxCtrl.deleteItem(%itemIndex); @endtsexample @see References doMirror () @brief Informs the GuiListBoxCtrl object to mirror the contents of the GuiListBoxCtrl stored in the mirrorSet field. @tsexample \ Inform the object to mirror the object located at %thisGuiListBox.mirrorSet %thisGuiListBox.doMirror(); @endtsexample @see GuiCore findItemText ( string findText, bool bCaseSensitive=false ) @brief Returns index of item with matching text or -1 if none found. @param findText Text in the list to find. @param isCaseSensitive If true, the search will be case sensitive. @tsexample // Define the text we wish to find in the list. %findText = "Hickory Smoked Gideon"/n/n// Define if this is a case sensitive search or not. %isCaseSensitive = "false"; // Ask the GuiListBoxCtrl object what item id in the list matches the requested text. %matchingId = %thisGuiListBoxCtrl.findItemText(%findText,%isCaseSensitive); @endtsexample @return Index id of item with matching text or -1 if none found. @see GuiControl getItemCount () @brief Returns the number of items in the list. @tsexample // Request the number of items in the list of the GuiListBoxCtrl object. %listItemCount = %thisGuiListBoxCtrl.getItemCount(); @endtsexample @return The number of items in the list. @see GuiControl getItemObject ( int index ) @brief Returns the object associated with an item. This only makes sense if you are mirroring a simset. @param index Index id to request the associated item from. @tsexample // Define the index id %index = "12"; // Request the item from the GuiListBoxCtrl object %object = %thisGuiListBoxCtrl.getItemObject(%index); @endtsexample @return The object associated with the item in the list. @see References getItemText ( int index ) @brief Returns the text of the item at the specified index. @param index Index id to return the item text from. @tsexample // Define the index id entry to request the text from %index = "12"; // Request the item id text from the GuiListBoxCtrl object. %text = %thisGuiListBoxCtrl.getItemText(%index); @endtsexample @return The text of the requested index id. @see GuiControl getLastClickItem () @brief Request the item index for the item that was last clicked. @tsexample // Request the item index for the last clicked item in the list %lastClickedIndex = %thisGuiListBoxCtrl.getLastClickItem(); @endtsexample @return Index id for the last clicked item in the list. @see GuiControl getSelCount () @brief Returns the number of items currently selected. @tsexample // Request the number of currently selected items %selectedItemCount = %thisGuiListBoxCtrl.getSelCount(); @endtsexample @return Number of currently selected items. @see GuiControl getSelectedItem () @brief Returns the selected items index or -1 if none selected. If multiple selections exist it returns the first selected item. @tsexample // Request the index id of the currently selected item %selectedItemId = %thisGuiListBoxCtrl.getSelectedItem(); @endtsexample @return The selected items index or -1 if none selected. @see GuiControl getSelectedItems () @brief Returns a space delimited list of the selected items indexes in the list. @tsexample // Request a space delimited list of the items in the GuiListBoxCtrl object. %selectionList = %thisGuiListBoxCtrl.getSelectedItems(); @endtsexample @return Space delimited list of the selected items indexes in the list @see GuiControl insertItem ( string text, int index ) @brief Inserts an item into the list at the specified index and returns the index assigned or -1 on error. @param text Text item to add. @param index Index id to insert the list item text at. @tsexample // Define the text to insert %text = "Secret Agent Gideon"; // Define the index entry to insert the text at %index = "14"; // In form the GuiListBoxCtrl object to insert the text at the defined index. %assignedId = %thisGuiListBoxCtrl.insertItem(%text,%index); @endtsexample @return If successful will return the index id assigned. If unsuccessful, will return -1. @see GuiControl removeFilteredItem ( string itemName ) @brief Removes an item of the entered name from the filtered items list. @param itemName Name of the item to remove from the filtered list. @tsexample // Define the itemName that you wish to remove. %itemName = "This Item Name"; // Remove the itemName from the GuiListBoxCtrl %thisGuiListBoxCtrl.removeFilteredItem(%itemName); @endtsexample @see GuiControl setCurSel ( int indexId ) @brief Sets the currently selected item at the specified index. @param indexId Index Id to set selected. @tsexample // Define the index id that we wish to select. %selectId = "4"; // Inform the GuiListBoxCtrl object to set the requested index as selected. %thisGuiListBoxCtrl.setCurSel(%selectId); @endtsexample @see GuiControl setCurSelRange ( int indexStart, int indexStop=999999 ) @brief Sets the current selection range from index start to stop. If no stop is specified it sets from start index to the end of the list @param indexStart Index Id to start selection. @param indexStop Index Id to end selection. @tsexample // Set start id %indexStart = "3"; // Set end id %indexEnd = "6"; // Request the GuiListBoxCtrl object to select the defined range. %thisGuiListBoxCtrl.setCurSelRange(%indexStart,%indexEnd); @endtsexample @see GuiControl setItemColor ( int index, ColorF color ) @brief Sets the color of a single list entry at the specified index id. @param index Index id to modify the color of in the list. @param color Color value to set the list entry to. @tsexample // Define the index id value %index = "5"; // Define the color value %color = "1.0 0.0 0.0"; // Inform the GuiListBoxCtrl object to change the color of the requested index %thisGuiListBoxCtrl.setItemColor(%index,%color); @endtsexample @see GuiControl setItemText ( int index, string newtext ) @brief Sets the items text at the specified index. @param index Index id to set the item text at. @param newtext Text to change the list item at index id to. @tsexample // Define the index id/n%index = "12"; // Define the text to set the list item to %newtext = "Gideon's Fancy Goggles"; // Inform the GuiListBoxCtrl object to change the text at the requested index %thisGuiListBoxCtrl.setItemText(%index,%newText); @endtsexample @see GuiControl setItemTooltip ( int index, string text ) @brief Set the tooltip text to display for the given list item. @param index Index id to change the tooltip text @param text Text for the tooltip. @tsexample // Define the index id %index = "12"; // Define the tooltip text %tooltip = "Gideon's goggles can see through space and time." // Inform the GuiListBoxCtrl object to set the tooltop for the item at the defined index id %thisGuiListBoxCtrl.setItemToolTip(%index,%tooltip); @endtsexample @see GuiControl setMultipleSelection ( bool allowMultSelections ) @brief Enable or disable multiple selections for this GuiListBoxCtrl object. @param allowMultSelections Boolean variable to set the use of multiple selections or not. @tsexample // Define the multiple selection use state. %allowMultSelections = "true"; // Set the allow multiple selection state on the GuiListBoxCtrl object. %thisGuiListBoxCtrl.setMultipleSelection(%allowMultSelections); @endtsexample @see GuiControl setSelected ( int index, bool setSelected=true ) @brief Sets the item at the index specified to selected or not. Detailed description @param index Item index to set selected or unselected. @param setSelected Boolean selection state to set the requested item index. @tsexample // Define the index %index = "5"; // Define the selection state %selected = "true" // Inform the GuiListBoxCtrl object of the new selection state for the requested index entry. %thisGuiListBoxCtrl.setSelected(%index,%selected); @endtsexample @see GuiControl allowMultipleSelections If true, will allow the selection of multiple items in the listbox. colorBullet If true, colored items will render a colored rectangular bullet next to the item text. fitParentWidth If true, the width of the listbox will match the width of its parent control. isObjectMirrored( string indexIdString ) @brief Checks if a list item at a defined index id is mirrored, and returns the result. @param indexIdString Index id of the list to check. @tsexample // Engine has requested of the script level to determine if a list entry is mirrored or not. GuiListBoxCtrl::isObjectMirrored(%this, %indexIdString) ^{ ^^// Perform code required to check and see if the list item at the index id is mirrored or not. ^^return %isMirrored; ^} @endtsexample @return A boolean value on if the list item is mirrored or not. @see GuiControl makeNameCallback A script snippet to control what is displayed in the list for a SimObject. Within this snippet, $ThisControl is bound to the guiListBoxCtrl and $ThisObject to the contained object in question. mirrorSet If populated with the name of another GuiListBoxCtrl, then this list box will mirror the contents of the mirrorSet listbox. onClearSelection() @brief Called whenever a selected item in the list is cleared. @tsexample // A selected item is cleared, causing the callback to occur. GuiListBoxCtrl::onClearSelection(%this) ^{ ^^// Code to run whenever a selected item is cleared ^} @endtsexample @see GuiControl onDeleteKey() @brief Called whenever the Delete key on the keyboard has been pressed while in this control. @tsexample // The delete key on the keyboard has been pressed while this control is in focus, causing the callback to occur. GuiListBoxCtrl::onDeleteKey(%this) ^{ ^^// Code to call whenever the delete key is pressed ^} @endtsexample @see GuiControl onDoubleClick() @brief Called whenever an item in the list has been double clicked. @tsexample // An item in the list is double clicked, causing the callback to occur. GuiListBoxCtrl::onDoubleClick(%this) ^{ ^^// Code to run whenever an item in the control has been double clicked ^} @endtsexample @see GuiControl onMouseDragged() @brief Called whenever the mouse is dragged across the control. @tsexample // Mouse is dragged across the control, causing the callback to occur. GuiListBoxCtrl::onMouseDragged(%this) ^{ ^^// Code to run whenever the mouse is dragged across the control ^} @endtsexample @see GuiControl onMouseUp( string itemHit, string mouseClickCount ) @brief Called whenever the mouse has previously been clicked down (onMouseDown) and has now been raised on the control. If an item in the list was hit during the click cycle, then the index id of the clicked object along with how many clicks occured are passed into the callback. Detailed description @param itemHit Index id for the list item that was hit @param mouseClickCount How many mouse clicks occured on this list item @tsexample // Mouse was previously clicked down, and now has been released, causing the callback to occur. GuiListBoxCtrl::onMouseUp(%this, %itemHit, %mouseClickCount) ^{ ^^// Code to call whenever the mouse has been clicked and released on the control ^} @endtsexample @see GuiControl onSelect( string index, string itemText ) @brief Called whenever an item in the list is selected. @param index Index id for the item in the list that was selected. @param itemText Text for the list item at the index that was selected. @tsexample // An item in the list is selected, causing the callback to occur GuiListBoxCtrl::onSelect(%this, %index, %itemText) ^{ ^^// Code to run whenever an item in the list is selected ^} @endtsexample @see GuiControl onUnSelect( string index, string itemText ) @brief Called whenever a selected item in the list has been unselected. @param index Index id of the item that was unselected @param itemText Text for the list entry at the index id that was unselected @tsexample // A selected item is unselected, causing the callback to occur GuiListBoxCtrl::onUnSelect(%this, %indexId, %itemText) ^{ ^^// Code to run whenever a selected list item is unselected ^} @endtsexample @see GuiControl GuiListBoxCtrlClass ConsoleClassObject GuiMaterialCtrl GuiContainer setMaterial ( string materialName ) Set the material to be displayed in the control. materialName filename materialName GuiMaterialCtrlClass ConsoleClassObject GuiMaterialPreview GuiTSCtrl deleteModel () Deletes the preview model. reset () Resets the viewport to default zoom, pan, rotate and lighting. setAmbientLightColor ( ColorF color ) Sets the color of the ambient light in the scene. setLightColor ( ColorF color ) Sets the color of the light in the scene. setModel ( string shapeName ) Sets the model to be displayed in this control @param shapeName Name of the model to display. setOrbitDistance ( float distance ) Sets the distance at which the camera orbits the object. Clamped to the acceptable range defined in the class by min and max orbit distances. @param distance The distance to set the orbit to (will be clamped). GuiMaterialPreviewClass ConsoleClassObject GuiMenuBar GuiTickCtrl addMenu ( string menuText, int menuId ) @brief Adds a new menu to the menu bar. @param menuText Text to display for the new menu item. @param menuId ID for the new menu item. @tsexample // Define the menu text %menuText = "New Menu"; // Define the menu ID. %menuId = "2"; // Inform the GuiMenuBar control to add the new menu %thisGuiMenuBar.addMenu(%menuText,%menuId); @endtsexample @see GuiTickCtrl addMenuItem ( string targetMenu="", string menuItemText="", int menuItemId=0, string accelerator=NULL, int checkGroup=-1 ) @brief Adds a menu item to the specified menu. The menu argument can be either the text of a menu or its id. @param menu Menu name or menu Id to add the new item to. @param menuItemText Text for the new menu item. @param menuItemId Id for the new menu item. @param accelerator Accelerator key for the new menu item. @param checkGroup Check group to include this menu item in. @tsexample // Define the menu we wish to add the item to %targetMenu = "New Menu"; or %menu = "4"; // Define the text for the new menu item %menuItemText = "Menu Item"; // Define the id for the new menu item %menuItemId = "3"; // Set the accelerator key to toggle this menu item with %accelerator = "n"; // Define the Check Group that this menu item will be in, if we want it to be in a check group. -1 sets it in no check group. %checkGroup = "4"; // Inform the GuiMenuBar control to add the new menu item with the defined fields %thisGuiMenuBar.addMenuItem(%menu,%menuItemText,%menuItemId,%accelerator,%checkGroup); @endtsexample @see GuiTickCtrl addSubmenuItem ( string menuTarget, string menuItem, string submenuItemText, int submenuItemId, string accelerator, int checkGroup ) @brief Adds a menu item to the specified menu. The menu argument can be either the text of a menu or its id. @param menuTarget Menu to affect a submenu in @param menuItem Menu item to affect @param submenuItemText Text to show for the new submenu @param submenuItemId Id for the new submenu @param accelerator Accelerator key for the new submenu @param checkGroup Which check group the new submenu should be in, or -1 for none. @tsexample // Define the menuTarget %menuTarget = "New Menu"; or %menuTarget = "3"; // Define the menuItem %menuItem = "New Menu Item"; or %menuItem = "5"; // Define the text for the new submenu %submenuItemText = "New Submenu Item"; // Define the id for the new submenu %submenuItemId = "4"; // Define the accelerator key for the new submenu %accelerator = "n"; // Define the checkgroup for the new submenu %checkgroup = "7"; // Request the GuiMenuBar control to add the new submenu with the defined information %thisGuiMenuBar.addSubmenuItem(%menuTarget,%menuItem,%submenuItemText,%submenuItemId,%accelerator,%checkgroup); @endtsexample @see GuiTickCtrl clearMenuItems ( string menuTarget ) @brief Removes all the menu items from the specified menu. @param menuTarget Menu to remove all items from @tsexample // Define the menuTarget %menuTarget = "New Menu"; or %menuTarget = "3"; // Inform the GuiMenuBar control to clear all menu items from the defined menu %thisGuiMenuBar.clearMenuItems(%menuTarget); @endtsexample @see GuiTickCtrl clearMenus ( int param1, int param2 ) @brief Clears all the menus from the menu bar. @tsexample // Inform the GuiMenuBar control to clear all menus from itself. %thisGuiMenuBar.clearMenus(); @endtsexample @see GuiTickCtrl clearSubmenuItems ( string menuTarget, string menuItem ) @brief Removes all the menu items from the specified submenu. @param menuTarget Menu to affect a submenu in @param menuItem Menu item to affect @tsexample // Define the menuTarget %menuTarget = "New Menu"; or %menuTarget = "3"; // Define the menuItem %menuItem = "New Menu Item"; or %menuItem = "5"; // Inform the GuiMenuBar to remove all submenu items from the defined menu item %thisGuiMenuBar.clearSubmenuItems(%menuTarget,%menuItem); @endtsexample @see GuiControl removeMenu ( string menuTarget ) @brief Removes the specified menu from the menu bar. @param menuTarget Menu to remove from the menu bar @tsexample // Define the menuTarget %menuTarget = "New Menu"; or %menuTarget = "3"; // Inform the GuiMenuBar to remove the defined menu from the menu bar %thisGuiMenuBar.removeMenu(%menuTarget); @endtsexample @see GuiTickCtrl removeMenuItem ( string menuTarget, string menuItemTarget ) @brief Removes the specified menu item from the menu. @param menuTarget Menu to affect the menu item in @param menuItem Menu item to affect @tsexample // Define the menuTarget %menuTarget = "New Menu"; or %menuTarget = "3"; // Define the menuItem %menuItem = "New Menu Item"; or %menuItem = "5"; // Request the GuiMenuBar control to remove the define menu item %thisGuiMenuBar.removeMenuItem(%menuTarget,%menuItem); @endtsexample @see GuiTickCtrl setCheckmarkBitmapIndex ( int bitmapindex ) @brief Sets the menu bitmap index for the check mark image. @param bitmapIndex Bitmap index for the check mark image. @tsexample // Define the bitmap index %bitmapIndex = "2"; // Inform the GuiMenuBar control of the proper bitmap index for the check mark image %thisGuiMenuBar.setCheckmarkBitmapIndex(%bitmapIndex); @endtsexample @see GuiTickCtrl setMenuBitmapIndex ( string menuTarget, int bitmapindex, bool bitmaponly, bool drawborder ) @brief Sets the bitmap index for the menu and toggles rendering only the bitmap. @param menuTarget Menu to affect @param bitmapindex Bitmap index to set for the menu @param bitmaponly If true, only the bitmap will be rendered @param drawborder If true, a border will be drawn around the menu. @tsexample // Define the menuTarget to affect %menuTarget = "New Menu"; or %menuTarget = "3"; // Set the bitmap index %bitmapIndex = "5"; // Set if we are only to render the bitmap or not %bitmaponly = "true"; // Set if we are rendering a border or not %drawborder = "true"; // Inform the GuiMenuBar of the bitmap and rendering changes %thisGuiMenuBar.setMenuBitmapIndex(%menuTarget,%bitmapIndex,%bitmapOnly,%drawBorder); @endtsexample @see GuiTickCtrl setMenuItemBitmap ( string menuTarget, string menuItemTarget, int bitmapIndex ) @brief Sets the specified menu item bitmap index in the bitmap array. Setting the item's index to -1 will remove any bitmap. @param menuTarget Menu to affect the menuItem in @param menuItem Menu item to affect @param bitmapIndex Bitmap index to set the menu item to @tsexample // Define the menuTarget %menuTarget = "New Menu"; or %menuTarget = "3"; // Define the menuItem" %menuItem = "New Menu Item"; or %menuItem = "2"; // Define the bitmapIndex %bitmapIndex = "6"; // Inform the GuiMenuBar control to set the menu item to the defined bitmap %thisGuiMenuBar.setMenuItemBitmap(%menuTarget,%menuItem,%bitmapIndex); @endtsexample @see GuiTickCtrl setMenuItemChecked ( string menuTarget, string menuItemTarget, bool checked ) @brief Sets the menu item bitmap to a check mark, which by default is the first element in the bitmap array (although this may be changed with setCheckmarkBitmapIndex()). Any other menu items in the menu with the same check group become unchecked if they are checked. @param menuTarget Menu to work in @param menuItem Menu item to affect @param checked Whether we are setting it to checked or not @tsexample @endtsexample @return If not void, return value and description @see References setMenuItemEnable ( string menuTarget, string menuItemTarget, bool enabled ) @brief sets the menu item to enabled or disabled based on the enable parameter. The specified menu and menu item can either be text or ids. Detailed description @param menuTarget Menu to work in @param menuItemTarget The menu item inside of the menu to enable or disable @param enabled Boolean enable / disable value. @tsexample // Define the menu %menu = "New Menu"; or %menu = "4"; // Define the menu item %menuItem = "New Menu Item"; or %menuItem = "2"; // Define the enabled state %enabled = "true"; // Inform the GuiMenuBar control to set the enabled state of the requested menu item %thisGuiMenuBar.setMenuItemEnable(%menu,%menuItme,%enabled); @endtsexample @see GuiTickCtrl setMenuItemSubmenuState ( string menuTarget, string menuItem, bool isSubmenu ) @brief Sets the given menu item to be a submenu. @param menuTarget Menu to affect a submenu in @param menuItem Menu item to affect @param isSubmenu Whether or not the menuItem will become a subMenu or not @tsexample // Define the menuTarget %menuTarget = "New Menu"; or %menuTarget = "3"; // Define the menuItem %menuItem = "New Menu Item"; or %menuItem = "5"; // Define whether or not the Menu Item is a sub menu or not %isSubmenu = "true"; // Inform the GuiMenuBar control to set the defined menu item to be a submenu or not. %thisGuiMenuBar.setMenuItemSubmenuState(%menuTarget,%menuItem,%isSubmenu); @endtsexample @see GuiTickCtrl setMenuItemText ( string menuTarget, string menuItemTarget, string newMenuItemText ) @brief Sets the text of the specified menu item to the new string. @param menuTarget Menu to affect @param menuItem Menu item in the menu to change the text at @param newMenuItemText New menu text @tsexample // Define the menuTarget %menuTarget = "New Menu"; or %menuTarget = "4"; // Define the menuItem %menuItem = "New Menu Item"; or %menuItem = "2"; // Define the new text for the menu item %newMenuItemText = "Very New Menu Item"; // Inform the GuiMenuBar control to change the defined menu item with the new text %thisGuiMenuBar.setMenuItemText(%menuTarget,%menuItem,%newMenuItemText); @endtsexample @see GuiTickCtrl setMenuItemVisible ( string menuTarget, string menuItemTarget, bool isVisible ) @brief Brief Description. Detailed description @param menuTarget Menu to affect the menu item in @param menuItem Menu item to affect @param isVisible Visible state to set the menu item to. @tsexample // Define the menuTarget %menuTarget = "New Menu"; or %menuTarget = "3"; // Define the menuItem %menuItem = "New Menu Item"; or %menuItem = "2"; // Define the visibility state %isVisible = "true"; // Inform the GuiMenuBarControl of the visibility state of the defined menu item %thisGuiMenuBar.setMenuItemVisible(%menuTarget,%menuItem,%isVisible); @endtsexample @see GuiTickCtrl setMenuMargins ( int horizontalMargin, int verticalMargin, int bitmapToTextSpacing ) @brief Sets the menu rendering margins: horizontal, vertical, bitmap spacing. Detailed description @param horizontalMargin Number of pixels on the left and right side of a menu's text. @param verticalMargin Number of pixels on the top and bottom of a menu's text. @param bitmapToTextSpacing Number of pixels between a menu's bitmap and text. @tsexample // Define the horizontalMargin %horizontalMargin = "5"; // Define the verticalMargin %verticalMargin = "5"; // Define the bitmapToTextSpacing %bitmapToTextSpacing = "12"; // Inform the GuiMenuBar control to set its margins based on the defined values. %thisGuiMenuBar.setMenuMargins(%horizontalMargin,%verticalMargin,%bitmapToTextSpacing); @endtsexample @see GuiTickCtrl setMenuText ( string menuTarget, string newMenuText ) @brief Sets the text of the specified menu to the new string. @param menuTarget Menu to affect @param newMenuText New menu text @tsexample // Define the menu to affect%menu = "New Menu"; or %menu = "3"; // Define the text to change the menu to %newMenuText = "Still a New Menu"; // Inform the GuiMenuBar control to change the defined menu to the defined text %thisGuiMenuBar.setMenuText(%menu,%newMenuText); @endtsexample @see GuiTickCtrl setMenuVisible ( string menuTarget, bool visible ) @brief Sets the whether or not to display the specified menu. @param menuTarget Menu item to affect @param visible Whether the menu item will be visible or not @tsexample // Define the menu to work with %menuTarget = "New Menu"; or %menuTarget = "4"; // Define if the menu should be visible or not %visible = "true"; // Inform the GuiMenuBar control of the new visibility state for the defined menu %thisGuiMenuBar.setMenuVisible(%menuTarget,%visible); @endtsexample @see GuiTickCtrl setSubmenuItemChecked ( string menuTarget, string menuItemTarget, string submenuItemText, bool checked ) @brief Sets the menu item bitmap to a check mark, which by default is the first element in the bitmap array (although this may be changed with setCheckmarkBitmapIndex()). Any other menu items in the menu with the same check group become unchecked if they are checked. @param menuTarget Menu to affect a submenu in @param menuItem Menu item to affect @param submenuItemText Text to show for submenu @param checked Whether or not this submenu item will be checked. @tsexample // Define the menuTarget %menuTarget = "New Menu"; or %menuTarget = "3"; // Define the menuItem %menuItem = "New Menu Item"; or %menuItem = "5"; // Define the text for the new submenu %submenuItemText = "Submenu Item"; // Define if this submenu item should be checked or not %checked = "true"; // Inform the GuiMenuBar control to set the checked state of the defined submenu item %thisGuiMenuBar.setSubmenuItemChecked(%menuTarget,%menuItem,%submenuItemText,%checked); @endtsexample @return If not void, return value and description @see References onMenuItemSelect( string menuId, string menuText, string menuItemId, string menuItemText ) @brief Called whenever an item in a menu is selected. @param menuId Index id of the menu which contains the selected menu item @param menuText Text of the menu which contains the selected menu item @param menuItemId Index id of the selected menu item @param menuItemText Text of the selected menu item @tsexample // A menu item has been selected, causing the callback to occur. GuiMenuBar::onMenuItemSelect(%this,%menuId,%menuText,%menuItemId,%menuItemText) { ^// Code to run when the callback occurs } @endtsexample @see GuiTickCtrl onMenuSelect( string menuId, string menuText ) @brief Called whenever a menu is selected. @param menuId Index id of the clicked menu @param menuText Text of the clicked menu @tsexample // A menu has been selected, causing the callback to occur. GuiMenuBar::onMenuSelect(%this,%menuId,%menuText) { ^// Code to run when the callback occurs } @endtsexample @see GuiTickCtrl onMouseInMenu( bool hasLeftMenu ) @brief Called whenever the mouse enters, or persists is in the menu. @param hasLeftMenu True if the mouse has left the menu, otherwise is false. @tsexample // Mouse enters or persists within the menu, causing the callback to occur. GuiMenuBar::onMouseInMenu(%this,%hasLeftMenu) { ^// Code to run when the callback occurs } @endtsexample @see GuiTickCtrl onSubmenuSelect( string submenuId, string submenuText ) @brief Called whenever a submenu is selected. @param submenuId Id of the selected submenu @param submenuText Text of the selected submenu @tsexample GuiMenuBar::onSubmenuSelect(%this,%submenuId,%submenuText) { ^// Code to run when the callback occurs } @endtsexample @see GuiTickCtrl padding Extra padding to add to the bounds of the control. GuiMenuBarClass ConsoleClassObject GuiMeshRoadEditorCtrl EditTSCtrl deleteNode deleteNode() getMode getNodeDepth getNodeNormal getNodePosition getNodeWidth getSelectedRoad matchTerrainToRoad regenerate setMode setMode( String mode ) setNodeDepth setNodeNormal setNodePosition setNodeWidth setSelectedRoad bottomMaterialName Default Material used by the Mesh Road Editor on bottom surface road creation. DefaultDepth float DefaultDepth DefaultNormal Point3F DefaultNormal DefaultWidth float DefaultWidth HoverNodeColor ColorI HoverNodeColor HoverSplineColor ColorI HoverSplineColor isDirty bool isDirty SelectedSplineColor ColorI SelectedSplineColor sideMaterialName Default Material used by the Mesh Road Editor on side surface road creation. topMaterialName Default Material used by the Mesh Road Editor on upper surface road creation. GuiMeshRoadEditorCtrlClass ConsoleClassObject GuiMessageVectorCtrl GuiControl attach ( MessageVector item ) @brief Push a line onto the back of the list. Detailed description @param param Description @tsexample // All messages are stored in this HudMessageVector, the actual // MainChatHud only displays the contents of this vector. new MessageVector(HudMessageVector); // Attach the MessageVector to the chat control chatHud.attach(HudMessageVector); @endtsexample @return Value detach () @brief Stop listing messages from the MessageVector previously attached to, if any. Detailed description @param param Description @tsexample // Deatch the MessageVector from HudMessageVector // HudMessageVector will no longer render the text chatHud.detach(); @endtsexample allowedMatches string allowedMatches lineContinuedIndex int lineContinuedIndex lineSpacing int lineSpacing matchColor ColorI matchColor maxColorIndex int maxColorIndex GuiMessageVectorCtrlClass ConsoleClassObject GuiMLTextCtrl GuiControl addText ( string text, bool reformat ) @brief Appends the text in the control with additional text. Also . @param text New text to append to the existing text. @param reformat If true, the control will also be visually reset. @tsexample // Define new text to add %text = "New Text to Add"; // Set reformat boolean %reformat = "true"; // Inform the control to add the new text %thisGuiMLTextCtrl.addText(%text,%reformat); @endtsexample @see GuiControl forceReflow () @brief Forces the text control to reflow the text after new text is added, possibly resizing the control. @tsexample // Define new text to add %newText = "BACON!"; // Add the new text to the control %thisGuiMLTextCtrl.addText(%newText); // Inform the GuiMLTextCtrl object to force a reflow to ensure the added text fits properly. %thisGuiMLTextCtrl.forceReflow(); @endtsexample @see GuiControl getText () @brief Returns the text from the control, including TorqueML characters. @tsexample // Get the text displayed in the control %controlText = %thisGuiMLTextCtrl.getText(); @endtsexample @return Text string displayed in the control, including any TorqueML characters. @see GuiControl scrollToBottom () @brief Scroll to the bottom of the text. @tsexample // Inform GuiMLTextCtrl object to scroll to its bottom %thisGuiMLTextCtrl.scrollToBottom(); @endtsexample @see GuiControl scrollToTag ( int tagID ) @brief Scroll down to a specified tag. Detailed description @param tagID TagID to scroll the control to @tsexample // Define the TagID we want to scroll the control to %tagId = "4"; // Inform the GuiMLTextCtrl to scroll to the defined TagID %thisGuiMLTextCtrl.scrollToTag(%tagId); @endtsexample @see GuiControl scrollToTop ( int param1, int param2 ) @brief Scroll to the top of the text. @tsexample // Inform GuiMLTextCtrl object to scroll to its top %thisGuiMLTextCtrl.scrollToTop(); @endtsexample @see GuiControl setAlpha ( float alphaVal ) @brief Sets the alpha value of the control. @param alphaVal n - 1.0 floating value for the alpha @tsexample // Define the alphe value %alphaVal = "0.5"; // Inform the control to update its alpha value. %thisGuiMLTextCtrl.setAlpha(%alphaVal); @endtsexample @see GuiControl setCursorPosition ( int newPos ) @brief Change the text cursor's position to a new defined offset within the text in the control. @param newPos Offset to place cursor. @tsexample // Define cursor offset position %position = "23"; // Inform the GuiMLTextCtrl object to move the cursor to the new position. %thisGuiMLTextCtrl.setCursorPosition(%position); @endtsexample @return Returns true if the cursor position moved, or false if the position was not changed. @see GuiControl setText ( string text ) @brief Set the text contained in the control. @param text The text to display in the control. @tsexample // Define the text to display %text = "Nifty Control Text"; // Set the text displayed within the control %thisGuiMLTextCtrl.setText(%text); @endtsexample @see GuiControl allowColorChars If true, the control will allow characters to have unique colors. deniedSound If the text will not fit in the control, the deniedSound is played. lineSpacing The number of blank pixels to place between each line. maxChars Maximum number of characters that the control will display. onResize( string width, string maxY ) @brief Called whenever the control size changes. @param width The new width value for the control @param maxY The current maximum allowed Y value for the control @tsexample // Control size changed, causing the callback to occur. GuiMLTextCtrl::onResize(%this,%width,%maxY) ^{ ^^// Code to call when the control size changes ^} @endtsexample @see GuiControl onURL( string url ) @brief Called whenever a URL was clicked on within the control. @param url The URL address that was clicked on. @tsexample // A URL address was clicked on in the control, causing the callback to occur. GuiMLTextCtrl::onUrl(%this,%url) ^{ ^^// Code to run whenever a URL was clicked on ^} @endtsexample @see GuiControl text Text to display in this control. useURLMouseCursor If true, the mouse cursor will turn into a hand cursor while over a link in the text. This is dependant on the markup language used by the GuiMLTextCtrl GuiMLTextCtrlClass ConsoleClassObject GuiMLTextEditCtrl GuiMLTextCtrl escapeCommand Script function to run whenever the 'escape' key is pressed when this control is in focus. GuiMLTextEditCtrlClass ConsoleClassObject GuiMouseEventCtrl GuiControl lockMouse Whether the control should lock the mouse between up and down button events. onMouseDown( U8 modifier, Point2I mousePoint, U8 mouseClickCount ) @brief Callback that occurs whenever the mouse is pressed down while in this control. @param modifier Key that was pressed during this callback. Values are: $EventModifier::RSHIFT $EventModifier::SHIFT $EventModifier::LCTRL $EventModifier::RCTRL $EventModifier::CTRL $EventModifier::CTRL $EventModifier::RALT $EventModifier::ALT @param mousePoint X/Y location of the mouse point @param mouseClickCount How many mouse clicks have occured for this event @tsexample // Mouse was pressed down in this control, causing the callback GuiMouseEventCtrl::onMouseDown(%this,%modifier,%mousePoint,%mouseClickCount) { ^// Code to call when a mouse event occurs. } @endtsexample @see GuiControl onMouseDragged( U8 modifier, Point2I mousePoint, U8 mouseClickCount ) @brief Callback that occurs whenever the mouse is dragged while in this control. @param modifier Key that was pressed during this callback. Values are: $EventModifier::RSHIFT $EventModifier::SHIFT $EventModifier::LCTRL $EventModifier::RCTRL $EventModifier::CTRL $EventModifier::CTRL $EventModifier::RALT $EventModifier::ALT @param mousePoint X/Y location of the mouse point @param mouseClickCount How many mouse clicks have occured for this event @tsexample // Mouse was dragged in this control, causing the callback GuiMouseEventCtrl::onMouseDragged(%this,%modifier,%mousePoint,%mouseClickCount) { ^// Code to call when a mouse event occurs. } @endtsexample @see GuiControl onMouseEnter( U8 modifier, Point2I mousePoint, U8 mouseClickCount ) @brief Callback that occurs whenever the mouse enters this control. @param modifier Key that was pressed during this callback. Values are: $EventModifier::RSHIFT $EventModifier::SHIFT $EventModifier::LCTRL $EventModifier::RCTRL $EventModifier::CTRL $EventModifier::CTRL $EventModifier::RALT $EventModifier::ALT @param mousePoint X/Y location of the mouse point @param mouseClickCount How many mouse clicks have occured for this event @tsexample // Mouse entered this control, causing the callback GuiMouseEventCtrl::onMouseEnter(%this,%modifier,%mousePoint,%mouseClickCount) { ^// Code to call when a mouse event occurs. } @endtsexample @see GuiControl onMouseLeave( U8 modifier, Point2I mousePoint, U8 mouseClickCount ) @brief Callback that occurs whenever the mouse leaves this control. @param modifier Key that was pressed during this callback. Values are: $EventModifier::RSHIFT $EventModifier::SHIFT $EventModifier::LCTRL $EventModifier::RCTRL $EventModifier::CTRL $EventModifier::CTRL $EventModifier::RALT $EventModifier::ALT @param mousePoint X/Y location of the mouse point @param mouseClickCount How many mouse clicks have occured for this event @tsexample // Mouse left this control, causing the callback GuiMouseEventCtrl::onMouseLeave(%this,%modifier,%mousePoint,%mouseClickCount) { ^// Code to call when a mouse event occurs. } @endtsexample @see GuiControl onMouseMove( U8 modifier, Point2I mousePoint, U8 mouseClickCount ) @brief Callback that occurs whenever the mouse is moved (without dragging) while in this control. @param modifier Key that was pressed during this callback. Values are: $EventModifier::RSHIFT $EventModifier::SHIFT $EventModifier::LCTRL $EventModifier::RCTRL $EventModifier::CTRL $EventModifier::CTRL $EventModifier::RALT $EventModifier::ALT @param mousePoint X/Y location of the mouse point @param mouseClickCount How many mouse clicks have occured for this event @tsexample // Mouse was moved in this control, causing the callback GuiMouseEventCtrl::onMouseMove(%this,%modifier,%mousePoint,%mouseClickCount) { ^// Code to call when a mouse event occurs. } @endtsexample @see GuiControl onMouseUp( U8 modifier, Point2I mousePoint, U8 mouseClickCount ) @brief Callback that occurs whenever the mouse is released while in this control. @param modifier Key that was pressed during this callback. Values are: $EventModifier::RSHIFT $EventModifier::SHIFT $EventModifier::LCTRL $EventModifier::RCTRL $EventModifier::CTRL $EventModifier::CTRL $EventModifier::RALT $EventModifier::ALT @param mousePoint X/Y location of the mouse point @param mouseClickCount How many mouse clicks have occured for this event @tsexample // Mouse was released in this control, causing the callback GuiMouseEventCtrl::onMouseUp(%this,%modifier,%mousePoint,%mouseClickCount) { ^// Code to call when a mouse event occurs. } @endtsexample @see GuiControl onRightMouseDown( U8 modifier, Point2I mousePoint, U8 mouseClickCount ) @brief Callback that occurs whenever the right mouse button is pressed while in this control. @param modifier Key that was pressed during this callback. Values are: $EventModifier::RSHIFT $EventModifier::SHIFT $EventModifier::LCTRL $EventModifier::RCTRL $EventModifier::CTRL $EventModifier::CTRL $EventModifier::RALT $EventModifier::ALT @param mousePoint X/Y location of the mouse point @param mouseClickCount How many mouse clicks have occured for this event @tsexample // Right mouse button was pressed in this control, causing the callback GuiMouseEventCtrl::onRightMouseDown(%this,%modifier,%mousePoint,%mouseClickCount) { ^// Code to call when a mouse event occurs. } @endtsexample @see GuiControl onRightMouseDragged( U8 modifier, Point2I mousePoint, U8 mouseClickCount ) @brief Callback that occurs whenever the mouse is dragged in this control while the right mouse button is pressed. @param modifier Key that was pressed during this callback. Values are: $EventModifier::RSHIFT $EventModifier::SHIFT $EventModifier::LCTRL $EventModifier::RCTRL $EventModifier::CTRL $EventModifier::CTRL $EventModifier::RALT $EventModifier::ALT @param mousePoint X/Y location of the mouse point @param mouseClickCount How many mouse clicks have occured for this event @tsexample // Right mouse button was dragged in this control, causing the callback GuiMouseEventCtrl::onRightMouseDragged(%this,%modifier,%mousePoint,%mouseClickCount) { ^// Code to call when a mouse event occurs. } @endtsexample @see GuiControl onRightMouseUp( U8 modifier, Point2I mousePoint, U8 mouseClickCount ) @brief Callback that occurs whenever the right mouse button is released while in this control. @param modifier Key that was pressed during this callback. Values are: $EventModifier::RSHIFT $EventModifier::SHIFT $EventModifier::LCTRL $EventModifier::RCTRL $EventModifier::CTRL $EventModifier::CTRL $EventModifier::RALT $EventModifier::ALT @param mousePoint X/Y location of the mouse point @param mouseClickCount How many mouse clicks have occured for this event @tsexample // Right mouse button was released in this control, causing the callback GuiMouseEventCtrl::onRightMouseUp(%this,%modifier,%mousePoint,%mouseClickCount) { ^// Code to call when a mouse event occurs. } @endtsexample @see GuiControl GuiMouseEventCtrlClass ConsoleClassObject GuiNoMouseCtrl GuiControl GuiNoMouseCtrlClass ConsoleClassObject GuiObjectView GuiTSCtrl getCameraSpeed () @brief Return the current multiplier for camera zooming and rotation. @tsexample // Request the current camera zooming and rotation multiplier value %multiplier = %thisGuiObjectView.getCameraSpeed(); @endtsexample @return Camera zooming / rotation multiplier value. @see GuiControl getModel () @brief Return the model displayed in this view. @tsexample // Request the displayed model name from the GuiObjectView object. %modelName = %thisGuiObjectView.getModel(); @endtsexample @return Name of the displayed model. @see GuiControl getMountedModel () @brief Return the name of the mounted model. @tsexample // Request the name of the mounted model from the GuiObjectView object %mountedModelName = %thisGuiObjectView.getMountedModel(); @endtsexample @return Name of the mounted model. @see GuiControl getMountSkin ( int param1, int param2 ) @brief Return the name of skin used on the mounted model. @tsexample // Request the skin name from the model mounted on to the main model in the control %mountModelSkin = %thisGuiObjectView.getMountSkin(); @endtsexample @return Name of the skin used on the mounted model. @see GuiControl getOrbitDistance () @brief Return the current distance at which the camera orbits the object. @tsexample // Request the current orbit distance %orbitDistance = %thisGuiObjectView.getOrbitDistance(); @endtsexample @return The distance at which the camera orbits the object. @see GuiControl getSkin () @brief Return the name of skin used on the primary model. @tsexample // Request the name of the skin used on the primary model in the control %skinName = %thisGuiObjectView.getSkin(); @endtsexample @return Name of the skin used on the primary model. @see GuiControl setCameraSpeed ( float factor ) @brief Sets the multiplier for the camera rotation and zoom speed. @param factor Multiplier for camera rotation and zoom speed. @tsexample // Set the factor value %factor = "0.75"; // Inform the GuiObjectView object to set the camera speed. %thisGuiObjectView.setCameraSpeed(%factor); @endtsexample @see GuiControl setLightAmbient ( ColorF color ) @brief Set the light ambient color on the sun object used to render the model. @param color Ambient color of sunlight. @tsexample // Define the sun ambient color value %color = "1.0 0.4 0.6"; // Inform the GuiObjectView object to set the sun ambient color to the requested value %thisGuiObjectView.setLightAmbient(%color); @endtsexample @see GuiControl setLightColor ( ColorF color ) @brief Set the light color on the sun object used to render the model. @param color Color of sunlight. @tsexample // Set the color value for the sun %color = "1.0 0.4 0.5"; // Inform the GuiObjectView object to change the sun color to the defined value %thisGuiObjectView.setLightColor(%color); @endtsexample @see GuiControl setLightDirection ( Point3F direction ) @brief Set the light direction from which to light the model. @param direction XYZ direction from which the light will shine on the model @tsexample // Set the light direction %direction = "1.0 0.2 0.4" // Inform the GuiObjectView object to change the light direction to the defined value %thisGuiObjectView.setLightDirection(%direction); @endtsexample @see GuiControl setModel ( string shapeName ) @brief Sets the model to be displayed in this control. @param shapeName Name of the model to display. @tsexample // Define the model we want to display %shapeName = "gideon.dts"; // Tell the GuiObjectView object to display the defined model %thisGuiObjectView.setModel(%shapeName); @endtsexample @see GuiControl setMount ( string shapeName, string mountNodeIndexOrName ) @brief Mounts the given model to the specified mount point of the primary model displayed in this control. Detailed description @param shapeName Name of the model to mount. @param mountNodeIndexOrName Index or name of the mount point to be mounted to. If index, corresponds to "mountN" in your shape where N is the number passed here. @tsexample // Set the shapeName to mount %shapeName = "GideonGlasses.dts" // Set the mount node of the primary model in the control to mount the new shape at %mountNodeIndexOrName = "3"; //OR: %mountNodeIndexOrName = "Face"; // Inform the GuiObjectView object to mount the shape at the specified node. %thisGuiObjectView.setMount(%shapeName,%mountNodeIndexOrName); @endtsexample @see GuiControl setMountedModel ( string shapeName ) @brief Sets the model to be mounted on the primary model. @param shapeName Name of the model to mount. @tsexample // Define the model name to mount %modelToMount = "GideonGlasses.dts"; // Inform the GuiObjectView object to mount the defined model to the existing model in the control %thisGuiObjectView.setMountedModel(%modelToMount); @endtsexample @see GuiControl setMountSkin ( string skinName ) @brief Sets the skin to use on the mounted model. @param skinName Name of the skin to set on the model mounted to the main model in the control @tsexample // Define the name of the skin %skinName = "BronzeGlasses"; // Inform the GuiObjectView Control of the skin to use on the mounted model %thisGuiObjectViewCtrl.setMountSkin(%skinName); @endtsexample @see GuiControl setOrbitDistance ( float distance ) @brief Sets the distance at which the camera orbits the object. Clamped to the acceptable range defined in the class by min and max orbit distances. Detailed description @param distance The distance to set the orbit to (will be clamped). @tsexample // Define the orbit distance value %orbitDistance = "1.5"; // Inform the GuiObjectView object to set the orbit distance to the defined value %thisGuiObjectView.setOrbitDistance(%orbitDistance); @endtsexample @see GuiControl setSeq ( string indexOrName ) @brief Sets the animation to play for the viewed object. @param indexOrName The index or name of the animation to play. @tsexample // Set the animation index value, or animation sequence name. %indexVal = "3"; //OR: %indexVal = "idle"; // Inform the GuiObjectView object to set the animation sequence of the object in the control. %thisGuiObjectVew.setSeq(%indexVal); @endtsexample @see GuiControl setSkin ( string skinName ) @brief Sets the skin to use on the model being displayed. @param skinName Name of the skin to use. @tsexample // Define the skin we want to apply to the main model in the control %skinName = "disco_gideon"; // Inform the GuiObjectView control to update the skin the to defined skin %thisGuiObjectView.setSkin(%skinName); @endtsexample @see GuiControl animSequence The animation sequence to play on the model. cameraSpeed Multiplier for mouse camera operations. lightAmbient Ambient color of the sunlight used to render the model. lightColor Diffuse color of the sunlight used to render the model. lightDirection Direction from which the model is illuminated. maxOrbitDiststance Minimum distance below which the camera will not zoom in further. minOrbitDiststance Maxiumum distance to which the camera can be zoomed out. mountedNode Name of node on primary model to which to mount the secondary shape. mountedShapeFile Optional shape file to mount on the primary model (e.g. weapon). mountedSkin Skin name used on mounted shape file. onMouseEnter() @brief Called whenever the mouse enters the control. @tsexample // The mouse has entered the control, causing the callback to occur GuiObjectView::onMouseEnter(%this) ^{ ^^// Code to run when the mouse enters this control ^} @endtsexample @see GuiControl onMouseLeave() @brief Called whenever the mouse leaves the control. @tsexample // The mouse has left the control, causing the callback to occur GuiObjectView::onMouseLeave(%this) ^{ ^^// Code to run when the mouse leaves this control ^} @endtsexample @see GuiControl orbitDiststance Distance from which to render the model. shapeFile The object model shape file to show in the view. skin The skin to use on the object model. GuiObjectViewClass ConsoleClassObject GuiPaneControl GuiControl setCollapsed ( bool collapse ) Collapse or un-collapse the control. @param collapse True to collapse the control, false to un-collapse it barBehindText Whether to draw the bitmapped pane bar behind the header text, too. caption Text label to display as the pane header. captionID String table text ID to use as caption string (overrides 'caption'). collapsable Whether the pane can be collapsed by clicking its header. GuiPaneControlClass ConsoleClassObject GuiPanel GuiContainer GuiPanelClass ConsoleClassObject GuiParticleGraphCtrl GuiControl addPlotPoint (int plotID, float x, float y, bool setAdded = true;) Add a data point to the given plot.@return changePlotPoint (int plotID, int i, float x, float y) Change a data point to the given plot and plot position. @param plotID The plot you want to access @param i The data point. @param x,y The plot position. @return No return value. clearAllGraphs () Clear all of the graphs.@return No return value clearGraph (int plotID) Clear the graph of the given plot.@return No return value getGraphColor (int plotID) Get the color of the graph passed.@return Returns the color of the graph as a string of RGB values formatted as "R G B" getGraphMax (int plotID) Get the maximum values of the graph ranges. @return Returns the maximum of the range formatted as "x-max y-max" getGraphMin (int plotID) Get the minimum values of the graph ranges. @return Returns the minimum of the range formatted as "x-min y-min" getGraphName (int plotID) Get the name of the graph passed. @return Returns the name of the plot getPlotIndex (int plotID, float x, float y) Gets the index of the point passed on the plotID passed (graph ID). @param plotID The plot you wish to check. @param x,y The coordinates of the point to get. @return Returns the index of the point. getPlotPoint (int plotID, int samples) Get a data point from the plot specified, samples from the start of the graph.@return The data point ID getSelectedPlot () Gets the selected Plot (a.k.a. graph). @return The plot's ID. getSelectedPoint () Gets the selected Point on the Plot (a.k.a. graph).@return The last selected point ID insertPlotPoint (int plotID, int i, float x, float y) Insert a data point to the given plot and plot position. @param plotID The plot you want to access @param i The data point. @param x,y The plot position. @return No return value. isExistingPoint (int plotID, int samples) @return Returns true or false whether or not the point in the plot passed is an existing point. resetSelectedPoint () This will reset the currently selected point to nothing.@return No return value. setAutoGraphMax (bool autoMax) Set whether the max will automatically be set when adding points (ie if you add a value over the current max, the max is increased to that value). @return No return value. setAutoRemove (bool autoRemove) Set whether or not a point should be deleted when you drag another one over it.@return No return value. setGraphHidden (int plotID, bool isHidden) Set whether the graph number passed is hidden or not.@return No return value. setGraphMax (int plotID, float maxX, float maxY) Set the max values of the graph of plotID.@param plotID The plot to modify @param maxX,maxY The maximum bound of the value range. @return No return value. setGraphMaxX (int plotID, float maxX) Set the max X value of the graph of plotID.@param plotID The plot to modify. @param maxX The maximum x value. @return No return Value. setGraphMaxY (int plotID, float maxY) Set the max Y value of the graph of plotID.@param plotID The plot to modify. @param maxY The maximum y value. @return No return Value. setGraphMin (int plotID, float minX, float minY) Set the min values of the graph of plotID. @param plotID The plot to modify @param minX,minY The minimum bound of the value range. @return No return value. setGraphMinX (int plotID, float minX) Set the min X value of the graph of plotID. @param plotID The plot to modify. @param minX The minimum x value. @return No return Value. setGraphMinY (int plotID, float minY) Set the min Y value of the graph of plotID.@param plotID The plot to modify. @param minY The minimum y value. @return No return Value. setGraphName (int plotID, string graphName) Set the name of the given plot. @param plotID The plot to modify. @param graphName The name to set on the plot. @return No return value. setPointXMovementClamped (bool clamped) Set whether the x position of the selected graph point should be clamped@return No return value. setRenderAll (bool renderAll) Set whether or not a position should be rendered on every point or just the last selected.@return No return value. setRenderGraphTooltip (bool renderGraphTooltip) Set whether or not to render the graph tooltip.@return No return value. setSelectedPlot (int plotID) Set the selected plot (a.k.a. graph).@return No return value setSelectedPoint (int point) Set the selected point on the graph. @return No return value GuiParticleGraphCtrlClass ConsoleClassObject GuiPopUpMenuCtrl GuiTextCtrl add (string name, int idNum, int scheme=0) addScheme (int id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL) changeTextById ( int id, string text ) clear Clear the popup list. clearEntry (S32 entry) findText (string text) Returns the position of the first entry containing the specified text. forceClose forceOnAction getSelected getText getTextById (int id) replaceText (bool doReplaceText) setEnumContent (string class, string enum) This fills the popup with a classrep's field enumeration type info. More of a helper function than anything. If console access to the field list is added, at least for the enumerated types, then this should go away.. setFirstSelected ([scriptCallback=true]) setNoneSelected setSelected (int id, [scriptCallback=true]) size Get the size of the menu - the number of entries in it. sort Sort the list alphabetically. sortID Sort the list by ID. bitmap filename bitmap bitmapBounds Point2I bitmapBounds maxPopupHeight int maxPopupHeight reverseTextList bool reverseTextList sbUsesNAColor bool sbUsesNAColor GuiPopUpMenuCtrlClass ConsoleClassObject GuiPopUpMenuCtrlEx GuiTextCtrl add (string name, int idNum, int scheme=0) addCategory ( string text ) @brief Add a category to the list. Acts as a separator between entries, allowing for sub-lists @param text Name of the new category addScheme ( int id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL ) @brief Create a new scheme and add it to the list of choices for when a new text entry is added. @param id Numerical id associated with this scheme @param fontColor The base text font color. Formatted as "Red Green Blue", each a numerical between 0 and 255. @param fontColorHL Color of text when being highlighted. Formatted as "Red Green Blue", each a numerical between 0 and 255. @param fontColorSel Color of text when being selected. Formatted as "Red Green Blue", each a numerical between 0 and 255. clear () @brief Clear the popup list. clearEntry (S32 entry) findText (string text) Returns the id of the first entry containing the specified text or -1 if not found.@param text String value used for the query @return Numerical ID of entry containing the text. forceClose () @brief Manually force this control to collapse and close. forceOnAction () @brief Manually for the onAction function, which updates everything in this control. getColorById @brief Get color of an entry's box @param id ID number of entry to query @return ColorI in the format of "Red Green Blue Alpha", each of with is a value between 0 - 255 getSelected () @brief Get the current selection of the menu. @return Returns the ID of the currently selected entry getText () @brief Get the. Detailed description @param param Description @tsexample // Comment code(); @endtsexample @return Returns current text in string format getTextById ( int id ) @brief Get the text of an entry based on an ID. @param id The ID assigned to the entry being queried @return String contained by the specified entry, NULL if empty or bad ID replaceText @brief Flag that causes each new text addition to replace the current entry @param True to turn on replacing, false to disable it setEnumContent @brief This fills the popup with a classrep's field enumeration type info. More of a helper function than anything. If console access to the field list is added, at least for the enumerated types, then this should go away. @param class Name of the class containing the enum @param enum Name of the enum value to acces setFirstSelected ([scriptCallback=true]) @hide setNoneSelected ( int param ) @brief Clears selection in the menu. setSelected (int id, [scriptCallback=true]) @hide setText ( string text ) @brief Set the current text to a specified value. @param text String containing new text to set size @brief Get the size of the menu @return Number of entries in the menu sort () @brief Sort the list alphabetically. sortID () @brief Sort the list by ID. bitmap File name of bitmap to use bitmapBounds Boundaries of bitmap displayed hotTrackCallback Whether to provide a 'onHotTrackItem' callback when a list item is hovered over maxPopupHeight Length of menu when it extends reverseTextList Reverses text list if popup extends up, instead of down sbUsesNAColor Deprecated@internal GuiPopUpMenuCtrlExClass ConsoleClassObject GuiProgressBitmapCtrl GuiTextCtrl setBitmap ( string filename ) Set the bitmap to use for rendering the progress bar. @param filename ~Path to the bitmap file. @note Directly assign to #bitmap rather than using this method. @see GuiProgressBitmapCtrl::setBitmap bitmap ~Path to the bitmap file to use for rendering the progress bar. If the profile assigned to the control already has a bitmap assigned, this property need not be set in which case the bitmap from the profile is used. GuiProgressBitmapCtrlClass ConsoleClassObject GuiProgressCtrl GuiTextCtrl GuiProgressCtrlClass ConsoleClassObject GuiRadioCtrl GuiCheckBoxCtrl GuiRadioCtrlClass ConsoleClassObject GuiRectHandles GuiControl handleColor Use given custom color for handles. handleRect RectF of handle's box. handleSize Size of handles in pixels. useCustomColor Use given custom color for handles. GuiRectHandlesClass ConsoleClassObject GuiRiverEditorCtrl EditTSCtrl deleteNode deleteNode() getMode getNodeDepth getNodeNormal getNodePosition getNodeWidth getSelectedRiver regenerate setMode setMode( String mode ) setNodeDepth setNodeNormal setNodePosition setNodeWidth setSelectedRiver DefaultDepth float DefaultDepth DefaultNormal Point3F DefaultNormal DefaultWidth float DefaultWidth HoverNodeColor ColorI HoverNodeColor HoverSplineColor ColorI HoverSplineColor isDirty bool isDirty SelectedSplineColor ColorI SelectedSplineColor GuiRiverEditorCtrlClass ConsoleClassObject GuiRoadEditorCtrl EditTSCtrl deleteNode deleteNode() deleteRoad getMode getNodePosition getNodeWidth getSelectedNode getSelectedRoad setMode setMode( String mode ) setNodePosition setNodeWidth setSelectedRoad DefaultWidth float DefaultWidth HoverNodeColor ColorI HoverNodeColor HoverSplineColor ColorI HoverSplineColor isDirty bool isDirty materialName Default Material used by the Road Editor on road creation. SelectedSplineColor ColorI SelectedSplineColor GuiRoadEditorCtrlClass ConsoleClassObject GuiRolloutCtrl GuiControl collapse () Collapse the rollout if it is currently expanded. This will make the rollout's child control invisible. @note The rollout will animate to collapsed state. To instantly collapse without animation, use instantCollapse(). expand () Expand the rollout if it is currently collapsed. This will make the rollout's child control visible. @note The rollout will animate to expanded state. To instantly expand without animation, use instantExpand(). instantCollapse () Instantly collapse the rollout without animation. To smoothly slide the rollout to collapsed state, use collapse(). instantExpand () Instantly expand the rollout without animation. To smoothly slide the rollout to expanded state, use expand(). isExpanded () Determine whether the rollout is currently expanded, i.e. whether the child control is visible. @return True if the rollout is expanded, false if not. sizeToContents () Resize the rollout to exactly fit around its child control. This can be used to manually trigger a recomputation of the rollout size. toggleCollapse () Toggle the current collapse state of the rollout. If it is currently expanded, then collapse it. If it is currently collapsed, then expand it. toggleExpanded ( bool instantly=false ) Toggle the current expansion state of the rollout If it is currently expanded, then collapse it. If it is currently collapsed, then expand it. @param instant If true, the rollout will toggle its state without animation. Otherwise, the rollout will smoothly slide into the opposite state. autoCollapseSiblings Whether to automatically collapse sibling rollouts. If this is true, the rollout will automatically collapse all sibling rollout controls when it is expanded. If this is false, the auto-collapse behavior can be triggered by CTRL (CMD on MAC) clicking the rollout header. CTRL/CMD clicking also works if this is false, in which case the auto-collapsing of sibling controls will be temporarily deactivated. caption Text label to display on the rollout header. clickCollapse Whether the rollout can be collapsed by clicking its header. defaultHeight Default height of the client area. This is used when no child control has been added to the rollout. expanded The current rollout expansion state. hideHeader Whether to render the rollout header. @note If this is false, the user cannot toggle the rollout state with the mouse. margin Margin to put around child control. onCollapsed() Called when the rollout is collapsed. onExpanded() Called when the rollout is expanded. onHeaderRightClick() Called when the user right-clicks on the rollout's header. This is useful for implementing context menus for rollouts. GuiRolloutCtrlClass ConsoleClassObject GuiScriptNotifyCtrl GuiControl onChildAdded Enables/disables onChildAdded callback onChildAdded( SimObjectId ID, SimObjectId childID ) Called when a child is added to this GUI. @param ID Unique object ID assigned when created (%this in script). @param childID Unique object ID of child being added. onChildRemoved Enables/disables onChildRemoved callback onChildRemoved( SimObjectId ID, SimObjectId childID ) Called when a child is removed from this GUI. @param ID Unique object ID assigned when created (%this in script). @param childID Unique object ID of child being removed. onChildResized Enables/disables onChildResized callback onChildResized( SimObjectId ID, SimObjectId childID ) Called when a child is of this GUI is being resized. @param ID Unique object ID assigned when created (%this in script). @param childID Unique object ID of child being resized. onGainFirstResponder Enables/disables onGainFirstResponder callback onGainFirstResponder( SimObjectId ID ) Called when this GUI gains focus. @param ID Unique object ID assigned when created (%this in script). onLoseFirstResponder Enables/disables onLoseFirstResponder callback onLoseFirstResponder( SimObjectId ID ) Called when this GUI loses focus. @param ID Unique object ID assigned when created (%this in script). onParentResized Enables/disables onParentResized callback onParentResized( SimObjectId ID ) Called when this GUI's parent is resized. @param ID Unique object ID assigned when created (%this in script). onResize Enables/disables onResize callback onResize( SimObjectId ID ) Called when this GUI is resized. @param ID Unique object ID assigned when created (%this in script). GuiScriptNotifyCtrlClass ConsoleClassObject GuiScrollCtrl GuiContainer computeSizes () Refresh sizing and positioning of child controls. getScrollPosition () Get the current coordinates of the scrolled content. @return The current position of the scrolled content. getScrollPositionX () Get the current X coordinate of the scrolled content. @return The current X coordinate of the scrolled content. getScrollPositionY () Get the current Y coordinate of the scrolled content.@return The current Y coordinate of the scrolled content. scrollToBottom () Scroll all the way to the bottom of the vertical scrollbar and the left of the horizontal bar. scrollToObject ( GuiControl control ) Scroll the control so that the given child @a control is visible. @param control A child control. scrollToTop () Scroll all the way to the top of the vertical and left of the horizontal scrollbar. setScrollPosition ( int x, int y ) Set the position of the scrolled content. @param x Position on X axis. @param y Position on y axis. childMargin Padding region to put around child contents. constantThumbHeight bool constantThumbHeight hScrollBar When to display the horizontal scrollbar. lockHorizScroll Horizontal scrolling not allowed if set. lockVertScroll Vertical scrolling not allowed if set. mouseWheelScrollSpeed Pixels/Tick - if not positive then mousewheel scrolling occurs instantly (like other scrolling). onScroll() Called each time the child controls are scrolled by some amount. vScrollBar When to display the vertical scrollbar. willFirstRespond bool willFirstRespond GuiScrollCtrlClass ConsoleClassObject GuiSeparatorCtrl GuiControl borderMargin int borderMargin caption Optional text label to display. invisible bool invisible leftMargin Left margin of text label. type Orientation of separator. GuiSeparatorCtrlClass ConsoleClassObject GuiShapeEdPreview EditTSCtrl addThread () Add a new thread (initially without any sequence set) computeShapeBounds () Compute the bounding box of the shape using the current detail and node transforms @return the bounding box "min.x min.y min.z max.x max.y max.z" fitToShape () Adjust the camera position and zoom to fit the shape within the view. getMeshHidden ( string name ) Return whether the named object is currently hidden getMountThreadDir ( int slot ) Get the playback direction of the sequence playing on this mounted shape @param slot mounted shape slot @return direction of the sequence (-1=reverse, 0=paused, 1=forward) getMountThreadPos ( int slot ) Get the playback position of the sequence playing on this mounted shape @param slot mounted shape slot @return playback position of the sequence (0-1) getMountThreadSequence ( int slot ) Get the name of the sequence playing on this mounted shape @param slot mounted shape slot @return name of the sequence (if any) getThreadCount () Get the number of threads @return the number of threads getThreadSequence () Get the name of the sequence assigned to the active thread mountShape ( string shapePath, string nodeName, string type, int slot ) Mount a shape onto the main shape at the specified node @param shapePath path to the shape to mount @param nodeName name of the node on the main shape to mount to @param type type of mounting to use (Object, Image or Wheel) @param slot mount slot refreshShape () Refresh the shape (used when the shape meshes or nodes have been added or removed) refreshThreadSequences () Refreshes thread sequences (in case of removed/renamed sequences removeThread ( int slot ) Removes the specifed thread @param slot index of the thread to remove setAllMeshesHidden ( bool hidden ) Show or hide all objects in the shape setMeshHidden ( string name, bool hidden ) Show or hide the named object in the shape setModel ( string shapePath ) Sets the model to be displayed in this control @param shapeName Name of the model to display. @return True if the model was loaded successfully, false otherwise. setMountNode ( int slot, string nodeName ) Set the node a shape is mounted to. @param slot mounted shape slot @param nodename name of the node to mount to setMountThreadDir ( int slot, float dir ) Set the playback direction of the shape mounted in the specified slot @param slot mounted shape slot @param dir playback direction (-1=backwards, 0=paused, 1=forwards) setMountThreadPos ( int slot, float pos ) Set the sequence position of the shape mounted in the specified slot @param slot mounted shape slot @param pos sequence position (0-1) setMountThreadSequence ( int slot, string name ) Set the sequence to play for the shape mounted in the specified slot @param slot mounted shape slot @param name name of the sequence to play setOrbitPos ( Point3F pos ) Set the camera orbit position @param pos Position in the form "x y z" setThreadSequence ( string name, float duration=0, float pos=0, bool play=false ) Sets the sequence to play for the active thread. @param name name of the sequence to play @param duration transition duration (0 for no transition) @param pos position in the new sequence to transition to @param play if true, the new sequence will play during the transition setTimeScale ( float scale ) Set the time scale of all threads @param scale new time scale value unmountAll () Unmount all shapes unmountShape ( int slot ) Unmount the shape in the specified slot @param slot mounted shape slot updateNodeTransforms () Refresh the shape node transforms (used when a node transform has been modified externally) activeThread Index of the active thread, or -1 if none colMeshes The number of collision meshes in the shape colPolys The total number of collision polygons (all meshes) in the shape currentDL The current detail level detailPolys Number of polygons in the current detail detailSize The size of the current detail editSun If true, dragging the gizmo will rotate the sun direction fixedDetail If false, the current detail is selected based on camera distance gridDimension Grid dimensions (number of rows and columns) in the form "rows cols" numBones The number of bones in the current detail level (skins only) numDrawCalls The number of draw calls in the current detail level numMaterials The number of materials in the current detail level numWeights The number of vertex weights in the current detail level (skins only) onThreadPosChanged( float pos, bool inTransition ) Called when the position of the active thread has changed, such as during playback. orbitDist The current distance from the camera to the model pixelSize The current pixel size of the model renderBounds Flag indicating whether to render the shape bounding box renderColMeshes Flag indicating whether to render the shape's collision geometry renderGhost Flag indicating whether to render the shape in 'ghost' mode (transparent) renderGrid Flag indicating whether to draw the grid renderMounts Flag indicating whether to render mounted objects renderNodes Flag indicating whether to render the shape nodes renderObjBox Flag indicating whether to render the selected object's bounding box selectedNode Index of the selected node, or -1 if none selectedObject Index of the selected object, or -1 if none sunAmbient Diffuse color for the sun sunAngleX X-axis rotation angle for the sun sunAngleZ Z-axis rotation angle for the sun sunDiffuse Ambient color for the sun threadDirection Playback direction of the active thread threadPingPong 'PingPong' mode of the active thread threadPos Current position of the active thread (0-1) GuiShapeEdPreviewClass ConsoleClassObject GuiShapeNameHud GuiControl distanceFade Visibility distance (how far the player must be from the ShapeBase object in focus) for this control to render. fillColor Standard color for the background of the control. frameColor Color for the control's frame. showFill If true, we draw the background color of the control. showFrame If true, we draw the frame of the control. textColor Color for the text on this control. verticalOffset Amount to vertically offset the control in relation to the ShapeBase object in focus. GuiShapeNameHudClass ConsoleClassObject GuiSliderCtrl GuiControl addSceneEventSliderMarker addSceneEventSliderMarker(F32 time,S32 uf_seqnum,S32 uf_frame,S32 uf_node,S32 uf_type,S32 uf_id) addSliderMarker addSliderMarker(U32 type,F32 time) addUltraframeSliderMarker addUltraframeSliderMarker(F32 time,S32 uf_seqnum,S32 uf_frame,S32 uf_node,S32 uf_type,S32 uf_id) clearSliderMarkers clearSliderMarkers() getValue () Get the current value of the slider based on the position of the thumb. @return Slider position (from range.x to range.y). isThumbBeingDragged () Returns true if the thumb is currently being dragged by the user. This method is mainly useful for scrubbing type sliders where the slider position is sync'd to a changing value. When the user is dragging the thumb, however, the sync'ing should pause and not get in the way of the user. removeSliderMarker removeSliderMarker(U32 type,F32 time) setValue ( float pos, bool doCallback=false ) Set position of the thumb on the slider. @param pos New slider position (from range.x to range.y) @param doCallback If true, the altCommand callback will be invoked onMouseDragged() Called when the left mouse button is dragged across the slider. range Min and max values corresponding to left and right slider position. snap Whether to snap the slider to tick marks. ticks Spacing between tick marks in pixels. 0=off. value The value corresponding to the current slider position. GuiSliderCtrlClass ConsoleClassObject GuiSpeedometerHud GuiBitmapCtrl center Center of the needle, offset from the GuiSpeedometerHud control top left corner color Color of the needle length Length of the needle from center to end maxAngle Angle (in radians) of the needle when the Vehicle speed is >= maxSpeed. An angle of 0 points right, 90 points up etc). maxSpeed Maximum Vehicle speed (in Torque units per second) to represent on the speedo (Vehicle speeds greater than this are clamped to maxSpeed). minAngle Angle (in radians) of the needle when the Vehicle speed is 0. An angle of 0 points right, 90 points up etc). tail Length of the needle from center to tail Width Width of the needle GuiSpeedometerHudClass ConsoleClassObject GuiSplitContainer GuiContainer fixedPanel Which (if any) side of the splitter to keep at a fixed size. fixedSize Width of the fixed panel specified by #fixedPanel (if any). orientation Whether to split between top and bottom (horizontal) or between left and right (vertical). splitPoint Point on control through which the splitter goes. Changed relatively if size of control changes. splitterSize Width of the splitter bar between the two sides. Default is 2. GuiSplitContainerClass ConsoleClassObject GuiStackControl GuiControl freeze ( bool freeze ) Prevents control from restacking - useful when adding or removing child controls @param freeze True to freeze the control, false to unfreeze it @tsexample %stackCtrl.freeze(true); // add controls to stack %stackCtrl.freeze(false); @endtsexample isFrozen () Return whether or not this control is frozen updateStack () Restack the child controls. changeChildPosition Determines whether to reposition child controls. If true, horizontally stacked children are aligned along the top edge of the stack control. Vertically stacked children are aligned along the left edge of the stack control. If false, horizontally stacked children retain their Y position, and vertically stacked children retain their X position. changeChildSizeToFit Determines whether to resize child controls. If true, horizontally stacked children keep their width, but have their height set to the stack control height. Vertically stacked children keep their height, but have their width set to the stack control width. If false, child controls are not resized. dynamicNonStackExtent Determines whether to resize the stack control along the non-stack axis (change height for horizontal stacking, change width for vertical stacking). No effect if dynamicSize is false. If true, the stack will be resized to the maximum of the child control widths/heights. If false, the stack will not be resized. dynamicPos Determines whether to reposition the stack along the stack axis when it is auto-resized. No effect if dynamicSize is false. If true, the stack will grow left for horizontal stacking, and grow up for vertical stacking. If false, the stack will grow right for horizontal stacking, and grow down for vertical stacking. dynamicSize Determines whether to resize the stack control along the stack axis (change width for horizontal stacking, change height for vertical stacking). If true, the stack width/height will be resized to the sum of the child control widths/heights. If false, the stack will not be resized. horizStacking Controls the type of horizontal stacking to use (<i>Left to Right</i> or <i>Right to Left</i>) padding Distance (in pixels) between stacked child controls. stackingType Determines the method used to position the child controls. vertStacking Controls the type of vertical stacking to use (<i>Top to Bottom</i> or <i>Bottom to Top</i>) GuiStackControlClass ConsoleClassObject GuiSwatchButtonCtrl GuiButtonBaseCtrl setColor ( string newColor ) Set the color of the swatch control. @param newColor The new color string given to the swatch control in float format "r g b a". @note It's also important to note that when setColor is called causes the control's altCommand field to be executed. color The foreground color of GuiSwatchButtonCtrl GuiSwatchButtonCtrlClass ConsoleClassObject GuiTabBookCtrl GuiContainer addPage ( string title="" ) Add a new tab page to the control. @param title Title text for the tab page header. getSelectedPage () Get the index of the currently selected tab page. @return Index of the selected tab page or -1 if no tab page is selected. selectPage ( int index ) Set the selected tab page. @param index Index of the tab page. allowReorder Whether reordering tabs with the mouse is allowed. defaultPage Index of page to select on first onWake() call (-1 to disable). frontTabPadding X offset of first tab page header. minTabWidth Minimum width allocated to a tab page header. onTabRightClick( String text, int index ) Called when the user right-clicks on a tab page header. @param text Text of the page header for the tab that is being selected. @param index Index of the tab page being selected. onTabSelected( String text, int index ) Called when a new tab page is selected. @param text Text of the page header for the tab that is being selected. @param index Index of the tab page being selected. selectedPage Index of currently selected page. tabHeight Height of tab page headers. tabMargin Spacing to put between individual tab page headers. tabPosition Where to place the tab page headers. GuiTabBookCtrlClass ConsoleClassObject GuiTabPageCtrl GuiTextCtrl select () Select this page in its tab book. fitBook Determines whether to resize this page when it is added to the tab book. If true, the page will be resized according to the tab book extents and <i>tabPosition</i> property. GuiTabPageCtrlClass ConsoleClassObject GuiTerrPreviewCtrl GuiControl getOrigin Return a Point2F containing the position of the origin. getRoot Return a Point2F representing the position of the root. getValue Returns a 4-tuple containing: root_x root_y origin_x origin_y reset Reset the view of the terrain. setOrigin (float x, float y) Set the origin of the view. setRoot Add the origin to the root and reset the origin. setValue Accepts a 4-tuple in the same form as getValue returns. @see GuiTerrPreviewCtrl::getValue() GuiTerrPreviewCtrlClass ConsoleClassObject GuiTextCtrl GuiContainer setText ( string text ) @brief Sets the text in the control. @param text Text to display in the control. @tsexample // Set the text to show in the control %text = "Gideon - Destroyer of World"; // Inform the GuiTextCtrl control to change its text to the defined value %thisGuiTextCtrl.setText(%text); @endtsexample @see GuiControl setTextID ( string textID ) @brief Maps the text ctrl to a variable used in localization, rather than raw text. @param textID Name of variable text should be mapped to @tsexample // Inform the GuiTextCtrl control of the textID to use %thisGuiTextCtrl.setTextID("STR_QUIT"); @endtsexample @see GuiControl@see Localization maxLength Defines the maximum length of the text. The default is 1024. text The text to show on the control. textID Maps the text of this control to a variable used in localization, rather than raw text. GuiTextCtrlClass ConsoleClassObject GuiTextEditCtrl GuiTextCtrl clearSelectedText () @brief Unselects all selected text in the control. @tsexample // Inform the control to unselect all of its selected text %thisGuiTextEditCtrl.clearSelectedText(); @endtsexample @see GuiControl forceValidateText () @brief Force a validation to occur. @tsexample // Inform the control to force a validation of its text. %thisGuiTextEditCtrl.forceValidateText(); @endtsexample @see GuiControl getCursorPos () @brief Returns the current position of the text cursor in the control. @tsexample // Acquire the cursor position in the control %position = %thisGuiTextEditCtrl.getCursorPost(); @endtsexample @return Text cursor position within the control. @see GuiControl getText () @brief Acquires the current text displayed in this control. @tsexample // Acquire the value of the text control. %text = %thisGuiTextEditCtrl.getText(); @endtsexample @return The current text within the control. @see GuiControl isAllTextSelected () @brief Checks to see if all text in the control has been selected. @tsexample // Check to see if all text has been selected or not. %allSelected = %thisGuiTextEditCtrl.isAllTextSelected(); @endtsexample @return True if all text in the control is selected, otherwise false. @see GuiControl selectAllText () @brief Selects all text within the control. @tsexample // Inform the control to select all of its text. %thisGuiTextEditCtrl.selectAllText(); @endtsexample @see GuiControl setCursorPos ( int position ) @brief Sets the text cursor at the defined position within the control. @param position Text position to set the text cursor. @tsexample // Define the cursor position %position = "12"; // Inform the GuiTextEditCtrl control to place the text cursor at the defined position %thisGuiTextEditCtrl.setCursorPos(%position); @endtsexample @see GuiControl setText ( string text ) @brief Sets the text in the control. @param text Text to place in the control. @tsexample // Define the text to display %text = "Text!" // Inform the GuiTextEditCtrl to display the defined text %thisGuiTextEditCtrl.setText(%text); @endtsexample @see GuiControl deniedSound If the attempted text cannot be entered, this sound effect will be played. escapeCommand Script command to be called when the Escape key is pressed. historySize How large of a history buffer to maintain. onReturn() @brief Called when the 'Return' or 'Enter' key is pressed. @tsexample // Return or Enter key was pressed, causing the callback to occur. GuiTextEditCtrl::onReturn(%this) ^{ ^^// Code to run when the onReturn callback occurs ^} @endtsexample @see GuiTextCtrl @see GuiControl onTabComplete( string val ) @brief Called if tabComplete is true, and the 'tab' key is pressed. @param val Input to mimick the '1' sent by the actual tab key button press. @tsexample // Tab key has been pressed, causing the callback to occur. GuiTextEditCtrl::onTabComplete(%this,%val) ^{ ^^//Code to run when the onTabComplete callback occurs ^} @endtsexample @see GuiTextCtrl @see GuiControl onValidate() @brief Called whenever the control is validated. @tsexample // The control gets validated, causing the callback to occur GuiTextEditCtrl::onValidated(%this) ^{ ^^// Code to run when the control is validated ^} @endtsexample @see GuiTextCtrl @see GuiControl password If true, all characters entered will be stored in the control, however will display as the character stored in passwordMask. passwordMask If 'password' is true, this is the character that will be used to mask the characters in the control. sinkAllKeyEvents If true, every key event will act as if the Enter key was pressed. tabComplete If true, when the 'tab' key is pressed, it will act as if the Enter key was pressed on the control. validate Script command to be called when the first validater is lost. GuiTextEditCtrlClass ConsoleClassObject GuiTextEditSliderBitmapCtrl GuiTextEditCtrl bitmap Unused focusOnMouseWheel If true, the control will accept giving focus to the user when the mouse wheel is used. format Character format type to place in the control. increment How far to increment the slider on each step. range Maximum vertical and horizontal range to allow in the control. GuiTextEditSliderBitmapCtrlClass ConsoleClassObject GuiTextEditSliderCtrl GuiTextEditCtrl focusOnMouseWheel If true, the control will accept giving focus to the user when the mouse wheel is used. format Character format type to place in the control. increment How far to increment the slider on each step. range Maximum vertical and horizontal range to allow in the control. GuiTextEditSliderCtrlClass ConsoleClassObject GuiTextListCtrl GuiArrayCtrl addRow ( int id=0, string text="", int index=-1 ) @brief Adds a new row at end of the list with the defined id and text. If index is used, then the new row is inserted at the row location of 'index'. @param id Id of the new row. @param text Text to display at the new row. @param index Index to insert the new row at. If not used, new row will be placed at the end of the list. @tsexample // Define the id %id = "4"; // Define the text to display %text = "Display Text" // Define the index (optional) %index = "2" // Inform the GuiTextListCtrl control to add the new row with the defined information. %rowIndex = %thisGuiTextListCtrl.addRow(%id,%text,%index); @endtsexample @return Returns the row index of the new row. If 'index' was defined, then this just returns the number of rows in the list. @see References clear () @brief Clear the list. @tsexample // Inform the GuiTextListCtrl control to clear its contents %thisGuiTextListCtrl.clear(); @endtsexample @see GuiControl clearSelection () @brief Set the selection to nothing. @tsexample // Deselect anything that is currently selected %thisGuiTextListCtrl.clearSelection(); @endtsexample @see GuiControl findTextIndex ( string needle ) @brief Find needle in the list, and return the row number it was found in. @param needle Text to find in the list. @tsexample // Define the text to find in the list %needle = "Text To Find"; // Request the row number that contains the defined text to find %rowNumber = %thisGuiTextListCtrl.findTextIndex(%needle); @endtsexample @return Row number that the defined text was found in, @see GuiControl getRowId ( int index ) @brief Get the row ID for an index. @param index Index to get the RowID at @tsexample // Define the index %index = "3"; // Request the row ID at the defined index %rowId = %thisGuiTextListCtrl.getRowId(%index); @endtsexample @return RowId at the defined index. @see GuiControl getRowNumById ( int id ) @brief Get the row number for a specified id. @param id Id to get the row number at @tsexample // Define the id %id = "4"; // Request the row number from the GuiTextListCtrl control at the defined id. %rowNumber = %thisGuiTextListCtrl.getRowNumById(%id); @endtsexample @see GuiControl getRowText ( int index ) @brief Get the text of the row with the specified index. @param index Row index to acquire the text at. @tsexample // Define the row index %index = "5"; // Request the text from the row at the defined index %rowText = %thisGuiTextListCtrl.getRowText(%index); @endtsexample @return Text at the defined row index. @see GuiControl getRowTextById ( int id ) @brief Get the text of a row with the specified id. @tsexample // Define the id %id = "4"; // Inform the GuiTextListCtrl control to return the text at the defined row id %rowText = %thisGuiTextListCtrl.getRowTextById(%id); @endtsexample @return Row text at the requested row id. @see GuiControl getSelectedId () @brief Get the ID of the currently selected item. @tsexample // Acquire the ID of the selected item in the list. %id = %thisGuiTextListCtrl.getSelectedId(); @endtsexample @return The id of the selected item in the list. @see GuiControl getSelectedRow () @brief Returns the selected row index (not the row ID). @tsexample // Acquire the selected row index %rowIndex = %thisGuiTextListCtrl.getSelectedRow(); @endtsexample @return Index of the selected row @see GuiControl isRowActive ( int rowNum ) @brief Check if the specified row is currently active or not. @param rowNum Row number to check the active state. @tsexample // Define the row number %rowNum = "5"; // Request the active state of the defined row number from the GuiTextListCtrl control. %rowActiveState = %thisGuiTextListCtrl.isRowActive(%rowNum); @endtsexample @return Active state of the defined row number. @see GuiControl removeRow ( int index ) @brief Remove a row from the table, based on its index. @param index Row index to remove from the list. @tsexample // Define the row index %index = "4"; // Inform the GuiTextListCtrl control to remove the row at the defined row index %thisGuiTextListCtrl.removeRow(%index); @endtsexample @see GuiControl removeRowById ( int id ) @brief Remove row with the specified id. @param id Id to remove the row entry at @tsexample // Define the id %id = "4"; // Inform the GuiTextListCtrl control to remove the row at the defined id %thisGuiTextListCtrl.removeRowById(%id); @endtsexample @see GuiControl rowCount () @brief Get the number of rows. @tsexample // Get the number of rows in the list %rowCount = %thisGuiTextListCtrl.rowCount(); @endtsexample @return Number of rows in the list. @see GuiControl scrollVisible ( int rowNum ) @brief Scroll so the specified row is visible @param rowNum Row number to make visible @tsexample // Define the row number to make visible %rowNum = "4"; // Inform the GuiTextListCtrl control to scroll the list so the defined rowNum is visible. %thisGuiTextListCtrl.scrollVisible(%rowNum); @endtsexample @see GuiControl setRowActive ( int rowNum, bool active ) @brief Mark a specified row as active/not. @param rowNum Row number to change the active state. @param active Boolean active state to set the row number. @tsexample // Define the row number %rowNum = "4"; // Define the boolean active state %active = "true"; // Informthe GuiTextListCtrl control to set the defined active state at the defined row number. %thisGuiTextListCtrl.setRowActive(%rowNum,%active); @endtsexample @see GuiControl setRowById ( int id, string text ) @brief Sets the text at the defined id. @param id Id to change. @param text Text to use at the Id. @tsexample // Define the id %id = "4"; // Define the text %text = "Text To Display"; // Inform the GuiTextListCtrl control to display the defined text at the defined id %thisGuiTextListCtrl.setRowById(%id,%text); @endtsexample @see GuiControl setSelectedById ( int id ) @brief Finds the specified entry by id, then marks its row as selected. @param id Entry within the text list to make selected. @tsexample // Define the id %id = "5"; // Inform the GuiTextListCtrl control to set the defined id entry as selected %thisGuiTextListCtrl.setSelectedById(%id); @endtsexample @see GuiControl setSelectedRow ( int rowNum ) @briefSelects the specified row. @param rowNum Row number to set selected. @tsexample // Define the row number to set selected %rowNum = "4"; %guiTextListCtrl.setSelectedRow(%rowNum); @endtsexample @see GuiControl sort ( int columnId, bool increasing=true ) @brief Performs a standard (alphabetical) sort on the values in the specified column. @param columnId Column ID to perform the sort on. @param increasing If false, sort will be performed in reverse. @tsexample // Define the columnId %id = "1"; // Define if we are increasing or not %increasing = "false"; // Inform the GuiTextListCtrl to perform the sort operation %thisGuiTextListCtrl.sort(%id,%increasing); @endtsexample @see GuiControl sortNumerical ( int columnID, bool increasing=true ) @brief Perform a numerical sort on the values in the specified column. Detailed description @param columnId Column ID to perform the sort on. @param increasing If false, sort will be performed in reverse. @tsexample // Define the columnId %id = "1"; // Define if we are increasing or not %increasing = "false"; // Inform the GuiTextListCtrl to perform the sort operation %thisGuiTextListCtrl.sortNumerical(%id,%increasing); @endtsexample @see GuiControl clipColumnText If true, text exceeding a column's given width will get clipped. columns A vector of column offsets. The number of values determines the number of columns in the table. fitParentWidth If true, the width of this control will match the width of its parent. onDeleteKey( string id ) @brief Called when the delete key has been pressed. @param id Id of the selected item in the list @tsexample // The delete key was pressed while the GuiTextListCtrl was in focus, causing the callback to occur. GuiTextListCtrl::onDeleteKey(%this,%id) ^{ ^^// Code to run when the delete key is pressed ^} @endtsexample @see GuiControl onSelect( string cellid, string text ) @brief Called whenever an item in the list is selected. @param cellid The ID of the cell that was selected @param text The text in the selected cel @tsexample // A cel in the control was selected, causing the callback to occur GuiTextListCtrl::onSelect(%this,%callid,%text) ^{ ^^// Code to run when a cel item is selected ^} @endtsexample @see GuiControl GuiTextListCtrlClass ConsoleClassObject GuiTheoraCtrl GuiControl getCurrentTime () Get the current playback time. @return The elapsed playback time in seconds. isPlaybackDone () Test whether the video has finished playing. @return True if the video has finished playing, false otherwise. pause () Pause playback of the video. If the video is not currently playing, the call is ignored. While stopped, the control displays the last frame. play () Start playing the video. If the video is already playing, the call is ignored. setFile ( string filename ) Set the video file to play. If a video is already playing, playback is stopped and the new video file is loaded. @param filename The video file to load. stop () Stop playback of the video. The next call to play() will then start playback from the beginning of the video. While stopped, the control renders empty with just the background color. backgroundColor Fill color when video is not playing. matchVideoSize Whether to automatically match control extents to the video size. playOnWake Whether to start playing video when control is woken up. renderDebugInfo If true, displays an overlay on top of the video with useful debugging information. stopOnSleep Whether to stop video when control is set to sleep. If this is not set to true, the video will be paused when the control is put to sleep. This is because there is no support for seeking in the video stream in the player backend and letting the time source used to synchronize video (either audio or a raw timer) get far ahead of frame decoding will cause possibly very long delays when the control is woken up again. theoraFile Theora video file to play. transcoder The routine to use for Y'CbCr to RGB conversion. GuiTheoraCtrlClass ConsoleClassObject GuiTickCtrl GuiControl setProcessTicks ( [tick = true] ) This will set this object to either be processing ticks or not GuiTickCtrlClass ConsoleClassObject GuiToggleButtonCtrl GuiButtonCtrl GuiToggleButtonCtrlClass ConsoleClassObject GuiToolboxButtonCtrl GuiButtonCtrl setHoverBitmap ( filepath name ) sets the bitmap that shows when the button is disabled setLoweredBitmap ( filepath name ) sets the bitmap that shows when the button is disabled setNormalBitmap ( filepath name ) sets the bitmap that shows when the button is active hoverBitmap filename hoverBitmap loweredBitmap filename loweredBitmap normalBitmap filename normalBitmap GuiToolboxButtonCtrlClass ConsoleClassObject GuiTreeViewCtrl GuiArrayCtrl addChildSelectionByValue addChildSelectionByValue(TreeItemId parent, value) addSelection ( id object, (bool isLastSelection = true) ) selects an item buildIconTable (builds an icon table) buildVisibleTree Build the visible tree clear () empty tree clearSelection (clears selection) deleteSelection (deletes the selected items) editItem (TreeItemId item, string newText, string newValue) expandItem (TreeItemId item, bool expand=true) findChildItemByName ( int parent, string name ) Return the ID of the child that matches the given name or 0. findItemByName (find item by name and returns the mId) findItemByObjectId (find item by object id and returns the mId) findItemByValue (find item by value and returns the mId) getChild (TreeItemId item) getFirstRootItem Get id for root item. getItemCount getItemText (TreeItemId item) getItemValue (TreeItemId item) getNextSibling (TreeItemId item) getParent (TreeItemId item) getPrevSibling (TreeItemId item) getSelectedItem ( int index=0 ) Return the selected item at the given index. getSelectedItemList returns a space seperated list of mulitple item ids getSelectedItemsCount getSelectedObject ( int index=0 ) Return the currently selected SimObject at the given index in inspector mode or -1 getSelectedObjectList Returns a space sperated list of all selected object ids. getTextToRoot (TreeItemId item,Delimiter=none) gets the text from the current node to the root, concatenating at each branch upward, with a specified delimiter optionally hideSelection ( [bool state] ) set hidden state of objects in selection insertItem (TreeItemId parent, name, value, icon, normalImage=0, expandedImage=0) isItemSelected ( TreeItemId id ) Check if the given item is selected within the tree. isParentItem ( int id ) Returns true if the given item contains child items. lockSelection (locks selections) markItem (TreeItemId item, bool mark=true) moveItemDown (TreeItemId item) moveItemUp (TreeItemId item) onRenameValidate For internal use. open (SimSet obj, bool okToEdit=true) Set the root of the tree view to the specified object, or to the root set. removeAllChildren removeAllChildren(TreeItemId parent) removeChildSelectionByValue removeChildSelectionByValue(TreeItemId parent, value) removeItem (TreeItemId item) removeSelection (deselects an item) scrollVisible (TreeItemId item) scrollVisibleByObjectId (show item by object id. returns true if sucessful.) selectItem (TreeItemId item, bool select=true) setDebug ( bool value=true ) Enable/disable debug output. setItemImages ( int id, int normalImage, int expandedImage ) Sets the normal and expanded images to show for the given item. setItemTooltip ( int id, string text ) Set the tooltip to show for the given item. showItemRenameCtrl ( TreeItemId id ) Show the rename text field for the given item (only one at a time). sort ( int parent, bool traverseHierarchy=false, bool parentsFirst=false, bool caseSensitive=true ) Sorts all items of the given parent (or root). With 'hierarchy', traverses hierarchy. toggleHideSelection () Toggle hidden state of objects in selection. toggleLockSelection () Toggle locked state of objects in selection. canRenameObjects If true clicking on a selected item ( that is an object and not the root ) will allow you to rename it. clearAllOnSingleSelection bool clearAllOnSingleSelection compareToObjectID bool compareToObjectID deleteObjectAllowed bool deleteObjectAllowed destroyTreeOnSleep If true, the entire tree item hierarchy is deleted when the control goes to sleep. dragToItemAllowed bool dragToItemAllowed fullRowSelect bool fullRowSelect itemHeight int itemHeight mouseDragging bool mouseDragging multipleSelections If true, multiple items can be selected concurrently. renameInternal If true then object renaming operates on the internalName rather than the object name. showClassNameForUnnamedObjects If true, class names will be used as object names for unnamed objects. showClassNames If true, item text labels for objects will include class names. showInternalNames If true, item text labels for obje ts will include internal names. showObjectIds If true, item text labels for objects will include object IDs. showObjectNames If true, item text labels for objects will include object names. showRoot If true, the root item is shown in the tree. tabSize int tabSize textOffset int textOffset tooltipOnWidthOnly bool tooltipOnWidthOnly useInspectorTooltips bool useInspectorTooltips GuiTreeViewCtrlClass ConsoleClassObject GuiTSCtrl GuiContainer calculateViewDistance ( float radius ) Given the camera's current FOV, get the distance from the camera's viewpoint at which the given radius will fit in the render area. @param radius Radius in world-space units which should fit in the view. @return The distance from the viewpoint at which the given radius would be fully visible. getWorldToScreenScale () Get the ratio between world-space units and pixels. @return The amount of world-space units covered by the extent of a single pixel. project ( Point3F worldPosition ) Transform world-space coordinates to screen-space (x, y, depth) coordinates. @param worldPosition The world-space position to transform to screen-space. @return The unproject ( Point3F screenPosition ) Transform 3D screen-space coordinates (x, y, depth) to world space. This method can be, for example, used to find the world-space position relating to the current mouse cursor position. @param screenPosition The x/y position on the screen plus the depth from the screen-plane outwards. @return The world-space position corresponding to the given screen-space coordinates. cameraZRot Z rotation angle of camera. forceFOV The vertical field of view in degrees or zero to use the normal camera FOV. reflectPriority The share of the per-frame reflection update work this control's rendering should run. The reflect update priorities of all visible GuiTSCtrls are added together and each control is assigned a share of the per-frame reflection update time according to its percentage of the total priority value. GuiTSCtrlClass ConsoleClassObject GuiVariableInspector GuiInspector loadVars loadVars( searchString ) GuiVariableInspectorClass ConsoleClassObject GuiWindowCollapseCtrl GuiWindowCtrl GuiWindowCollapseCtrlClass ConsoleClassObject GuiWindowCtrl GuiContainer attach ( GuiWindowCtrl bottomWindow, GuiWindowCtrl topWindow ) Attach @a bottomWindow to @topWindow so that @a bottomWindow moves along with @a topWindow when it is dragged. @param bottomWindow @param topWindow attachTo ( GuiWindowCtrl window ) selectWindow () Bring the window to the front. setCollapseGroup ( bool state ) Set the window's collapsing state. toggleCollapseGroup () Toggle the window collapsing. canClose Whether the window has a close button. canCollapse Whether the window can be collapsed by clicking its title bar. canMaximize Whether the window has a maximize button. canMinimize Whether the window has a minimize button. canMove Whether the window can be moved by dragging its titlebar. closeCommand Script code to execute when the window is closed. edgeSnap If true, the window will snap to the edges of other windows when moved close to them. onClose() Called when the close button has been pressed. onCollapse() Called when the window is collapsed by clicking its title bar. onMaximize() Called when the window has been maximized. onMinimize() Called when the window has been minimized. onRestore() Called when the window is restored from minimized, maximized, or collapsed state. resizeHeight Whether the window can be resized vertically. resizeWidth Whether the window can be resized horizontally. text Text label to display in titlebar. GuiWindowCtrlClass ConsoleClassObject HoverVehicle Vehicle HoverVehicleClass ConsoleClassObject HoverVehicleData VehicleData brakingActivationSpeed Maximum speed below which a braking force is applied. @see brakingForce brakingForce Force generated by braking. The vehicle is considered to be braking if it is moving, but the throttle is off, and no left or right thrust is being applied. This force is only applied when the vehicle's velocity is less than brakingActivationSpeed. dragForce Drag force factor that acts opposite to the vehicle velocity. Also used to determnine the vehicle's maxThrustSpeed. @see mainThrustForce dustTrailEmitter Emitter to generate particles for the vehicle's dust trail. The trail of dust particles is generated only while the vehicle is moving. dustTrailFreqMod Number of dust trail particles to generate based on vehicle speed. The vehicle's speed is divided by this value to determine how many particles to generate each frame. Lower values give a more dense trail, higher values a more sparse trail. dustTrailOffset "X Y Z" offset from the vehicle's origin from which to generate dust trail particles. By default particles are emitted directly beneath the origin of the vehicle model. engineSound Looping engine sound. The volume is dynamically adjusted based on the current thrust level. floatingGravMag Scale factor applied to the vehicle gravitational force when the vehicle is floating. @see stabLenMin floatingThrustFactor Scalar applied to the vehicle's thrust force when the vehicle is floating. @note The floatingThrustFactor must be between 0.0 and 1.0 (inclusive). floatSound Looping sound played while the vehicle is floating. @see stabMinLen forwardJetEmitter Emitter to generate particles for forward jet thrust. Forward jet thrust particles are emitted from model nodes JetNozzle0 and JetNozzle1. gyroDrag Damping torque that acts against the vehicle's current angular momentum. jetSound Looping sound played when the vehicle is jetting. mainThrustForce Force generated by thrusting the vehicle forward. Also used to determine the maxThrustSpeed: @tsexample maxThrustSpeed = (mainThrustForce + strafeThrustForce) / dragForce; @endtsexample normalForce Force generated in the ground normal direction when the vehicle is not floating (within stabalizer length from the ground). @see stabLenMin pitchForce Pitch (rotation about the X-axis) force applied when steering in the y-axis direction. restorativeForce Force generated to stabalize the vehicle (return it to neutral pitch/roll) when the vehicle is floating (more than stabalizer length from the ground. @see stabLenMin reverseThrustForce Force generated by thrusting the vehicle backward. rollForce Roll (rotation about the Y-axis) force applied when steering in the x-axis direction. stabDampingConstant Damping spring force acting against changes in the stabalizer length. @see stabLenMin stabLenMax Length of the base stabalizer when travelling at maximum speed (maxThrustSpeed). @see stabLenMin @see mainThrustForce stabLenMin Length of the base stabalizer when travelling at minimum speed (0). Each tick, the vehicle performs 2 raycasts (from the center back and center front of the vehicle) to check for contact with the ground. The base stabalizer length determines the length of that raycast; if neither raycast hit the ground, the vehicle is floating, stabalizer spring and ground normal forces are not applied. <img src="images/hoverVehicle_forces.png"> @see stabSpringConstant stabSpringConstant Value used to generate stabalizer spring force. The force generated depends on stabilizer compression, that is how close the vehicle is to the ground proportional to current stabalizer length. @see stabLenMin steeringForce Yaw (rotation about the Z-axis) force applied when steering in the x-axis direction.about the vehicle's Z-axis) strafeThrustForce Force generated by thrusting the vehicle to one side. Also used to determine the vehicle's maxThrustSpeed. @see mainThrustForce triggerTrailHeight Maximum height above surface to emit dust trail particles. If the vehicle is less than triggerTrailHeight above a static surface with a material that has 'showDust' set to true, the vehicle will emit particles from the dustTrailEmitter. turboFactor Scale factor applied to the vehicle's thrust force when jetting. vertFactor Scalar applied to the vertical portion of the velocity drag acting on the vehicle. For the horizontal (X and Y) components of velocity drag, a factor of 0.25 is applied when the vehicle is floating, and a factor of 1.0 is applied when the vehicle is not floating. This velocity drag is multiplied by the vehicle's dragForce, as defined above, and the result is subtracted from it's movement force. @note The vertFactor must be between 0.0 and 1.0 (inclusive). HoverVehicleDataClass ConsoleClassObject HTTPObject TCPObject get ( string Address, string requirstURI, string query ) @brief Send a GET command to a server to send or retrieve data. @param Address HTTP web address to send this get call to. Be sure to include the port at the end (IE: "www.torquepowered.com:80"). @param requirstURI Specific location on the server to access (IE: "index.php".) @param query Optional. Actual data to transmit to the server. Can be anything required providing it sticks with limitations of the HTTP protocol. @tsexample // Create an HTTP object for communications %httpObj = new HTTPObject(); // Specify a URL to transmit to %url = "www.TorquePowered.com"; // Specify a URI to communicate with %URI = "/index.php"; // Specify a query to send. %query = ""; // Send the GET command to the server %httpObj.get(%url,%URI,%query); @endtsexample post ( string Address, string requirstURI, string query, string post ) @brief Send POST command to a server to send or retrieve data. @param Address HTTP web address to send this get call to. Be sure to include the port at the end (IE: "www.torquepowered.com:80"). @param requirstURI Specific location on the server to access (IE: "index.php".) @param query Actual data to transmit to the server. Can be anything required providing it sticks with limitations of the HTTP protocol. @param post Submission data to be processed. @tsexample // Create an HTTP object for communications %httpObj = new HTTPObject(); // Specify a URL to transmit to %url = "www.TorquePowered.com"; // Specify a URI to communicate with %URI = "/index.php"; // Specify a query to send. %query = ""; // Specify the submission data. %post = ""; // Send the POST command to the server %httpObj.POST(%url,%URI,%query,%post); @endtsexample HTTPObjectClass ConsoleClassObject InspectorFieldUndoAction UndoAction arrayIndex string arrayIndex fieldName string fieldName fieldValue string fieldValue inspectorGui GuiInspector inspectorGui objectId int objectId InspectorFieldUndoActionClass ConsoleClassObject InteriorInstance SceneObject changeMaterial ( string mapTo, Material oldMat, Material newMat ) @brief Change one of the materials on the shape. This method changes materials per mapTo with others. The material that is being replaced is mapped to unmapped_mat as a part of this transition. @note Warning, right now this only sort of works. It doesn't do a live update like it should. @param mapTo The name of the material target to remap (from getTargetName) @param oldMat The old Material that was mapped @param newMat The new Material to map @tsexample // remap the first material in the shape %mapTo = %interiorObject.getTargetName( 0 ); %interiorObject.changeMaterial( %mapTo, 0, MyMaterial ); @endtsexample exportToCollada ( bool bakeTransform ) @brief Exports the Interior to a Collada file @param bakeTransform Bakes the InteriorInstance's transform into the vertex positions @tsexample // Export to COLLADA, do not bakeTransform %interiorObject.exportToCollada(0); @endtsexample getModelFile () @brief Get the interior file name @return The name of the interior's model file in .DIF. @tsexample %interiorObject.getModelFile(); @endtsexample getNumDetailLevels () @brief Get the number of detail levels interior was created with @tsexample %numLODs = %interiorObject.getNumDetailLevels(); echo(%numLODs); @endtsexample getTargetCount ( int detailLevel ) @brief Get the number of materials used by interior @param^detailLevel Interior level of detail to scan @return The number of materials used by the interior at a specified detail level @tsexample // Find materials used at first level of detail %targetCount = %interiorObject.getTargetCount(1); echo(%targetCount); @endtsexample getTargetName ( int detailLevel, int targetNum ) @brief Get the name of the indexed shape material @param^detailLevel Target LOD @param^targetNum Index mapped to the target @return The name of the target (material) at the specified detail level and index @tsexample // First level of detail, top of the index map %targetName = %interiorObject.getTargetName(1, 0); echo(%targetName); @endtsexample setAlarmMode ( string alarmMode ) @brief This sets the alarm mode of the interior The alarm mode is used when debugging bad geometry for an interior. When on, the the bad verties will be rendered a different color. @param alarmMode If true the interior will be in an alarm state next frame. Options are 'On' or 'Off'. @tsexample // Turn on alarm mode debugging for interior %interiorObject.setAlarmMode("On"); @endtsexample setDetailLevel ( int level ) @brief Manually changes the current detail level, rather than automatically via view distance @param level Detail level to force. @tsexample %interiorObject.setDetailLevel(2); @endtsexample setSkinBase ( string basename ) @brief Changes the skin (material) of the interior This is a legacy function and should be deprecated. Use InteriorInstace::changeMaterial instead @param basename Name of the new skin or material @tsexample // Switch skin to another material %interiorObject.setSkinBase("wall.stucco"); @endtsexample interiorFile Path and filename of the Interior file (.DIF) to load for this InteriorInstance. showTerrainInside Enables rendering a TerrainBlock when inside an interior zone. InteriorInstanceClass ConsoleClassObject Item ShapeBase getLastStickyNormal () @brief Get the normal of the surface on which the object is stuck. @return Returns The XYZ position of where this Item is stuck. @tsexample // Acquire the position where this Item is currently stuck %stuckPosition = %item.getLastStickPos(); @endtsexample getLastStickyPos () @brief Get the position on the surface on which this Item is stuck. @return Returns The XYZ position of where this Item is stuck. @tsexample // Acquire the position where this Item is currently stuck %stuckPosition = %item.getLastStickPos(); @endtsexample isRotating () @brief Is the object still rotating? @return True if the object is still rotating, false if it is not. @tsexample // Query the item on if it is or is not rotating. %isRotating = %itemData.isRotating(); @endtsexample isStatic () @brief Is the object static (ie, non-movable)? @return True if the object is static, false if it is not. @tsexample // Query the item on if it is or is not static. %isStatic = %itemData.isStatic(); @endtsexample setCollisionTimeout ( int ignoreColObj=NULL ) @brief Temporarily disable collisions against a specific ShapeBase object. @param objectID ShapeBase object ID to disable collisions against. @return Returns true if the ShapeBase object requested could be found, false if it could not. @tsexample // Set the ShapeBase Object ID to disable collisions against %ignoreColObj = %player.getID(); // Inform this Item object to ignore collisions temproarily against the %ignoreColObj. %item.setCollisionTimeout(%ignoreColObj); @endtsexample onEnterLiquid( string objID, string waterCoverage, string liquidType ) Informs an Item object that it has entered liquid, along with information about the liquid type. @param objID Object ID for this Item object. @param waterCoverage How much coverage of water this Item object has. @param liquidType The type of liquid that this Item object has entered. @see Item, ItemData, waterObject onLeaveLiquid( string objID, string liquidType ) Informs an Item object that it has left a liquid, along with information about the liquid type. @param objID Object ID for this Item object. @param liquidType The type of liquid that this Item object has left. @see Item, ItemData, waterObject onStickyCollision( string objID ) Informs the Item object that it is now sticking to another object. @param objID Object ID this Item object. @see Item, ItemData rotate If true, the object will automatically rotate around its Z axis. static If true, the object is not moving in the world (and will not be updated through the network). ItemClass ConsoleClassObject ItemData ShapeBaseData dynamicType An integer value which, if speficied, is added to the value retured by getType(). elasticity A floating-point value specifying how 'bouncy' this ItemData is. friction A floating-point value specifying how much velocity is lost to impact and sliding friction. gravityMod Floating point value to multiply the existing gravity with for just this ItemData. lightColor Color value to make this light. Example: "1.0,1.0,1.0" lightOnlyStatic If true, this ItemData will only cast a light if the Item for this ItemData has a Static value of true. lightRadius Distance from the center point of this ItemData for the light to affect LightTime Time value for the light of this ItemData, used to control the pulse speed of the PulsingLight LightType. lightType Type of light to apply to this ItemData. Options are NoLight, ConstantLight, PulsingLight. Default is NoLight. maxVelocity Maximum velocity that this ItemData is able to move. sticky If true, ItemData will 'stick' to any surface it collides with. ItemDataClass ConsoleClassObject LangTable SimObject addLanguage (string filename, [string languageName]) @brief Adds a language to the table @param filename Name and path to the language file @param languageName Optional name to assign to the new language entry @return True If file was successfully found and language created getCurrentLanguage () @brief Get the ID of the current language table @return Numerical ID of the current language table getLangName (int language) @brief Return the readable name of the language table @param language Numerical ID of the language table to access @return String containing the name of the table, NULL if ID was invalid or name was never specified getNumLang () @brief Used to find out how many languages are in the table @return Size of the vector containing the languages, numerical getString (string filename) @brief Grabs a string from the specified table If an invalid is passed, the function will attempt to to grab from the default table @param filename Name of the language table to access @return Text from the specified language table, "" if ID was invalid and default table is not set setCurrentLanguage (int language) @brief Sets the current language table for grabbing text @param language ID of the table setDefaultLanguage (int language) @brief Sets the default language table @param language ID of the table LangTableClass ConsoleClassObject LevelInfo NetObject advancedLightmapSupport Enable expanded support for mixing static and dynamic lighting (more costly) canvasClearColor The color used to clear the background before the scene or any GUIs are rendered. decalBias NearPlane bias used when rendering Decal and DecalRoad. This should be tuned to the visibleDistance in your level. fogAtmosphereHeight A height in meters for altitude fog falloff. fogColor The default color for the scene fog. fogDensity The 0 to 1 density value for the exponential fog falloff. fogDensityOffset An offset from the camera in meters for moving the start of the fog effect. nearClip Closest distance from the camera's position to render the world. soundAmbience The global ambient sound environment. soundDistanceModel The distance attenuation model to use. visibleDistance Furthest distance fromt he camera's position to render the world. LevelInfoClass ConsoleClassObject LightAnimData SimDataBlock brightnessA The value of the A key in the keyframe sequence. brightnessKeys The keyframe sequence encoded into a string where characters from A to Z define a position between the two animation values. brightnessPeriod The animation time for keyframe sequence. brightnessSmooth If true the transition between keyframes will be smooth. brightnessZ The value of the Z key in the keyframe sequence. colorA The value of the A key in the keyframe sequence. colorKeys The keyframe sequence encoded into a string where characters from A to Z define a position between the two animation values. colorPeriod The animation time for keyframe sequence. colorSmooth If true the transition between keyframes will be smooth. colorZ The value of the Z key in the keyframe sequence. offsetA The value of the A key in the keyframe sequence. offsetKeys The keyframe sequence encoded into a string where characters from A to Z define a position between the two animation values. offsetPeriod The animation time for keyframe sequence. offsetSmooth If true the transition between keyframes will be smooth. OffsetZ The value of the Z key in the keyframe sequence. rotA The value of the A key in the keyframe sequence. rotKeys The keyframe sequence encoded into a string where characters from A to Z define a position between the two animation values. rotPeriod The animation time for keyframe sequence. rotSmooth If true the transition between keyframes will be smooth. rotZ The value of the Z key in the keyframe sequence. LightAnimDataClass ConsoleClassObject LightBase SceneObject pauseAnimation Stops the light animation. playAnimation ( [LightAnimData anim] ) Plays a light animation on the light. If no LightAnimData is passed the existing one is played.@hide setLightEnabled ( bool state ) @brief Toggles the light on and off @param state Turns the light on (true) or off (false) @tsexample // Disable the light CrystalLight.setLightEnabled(false); // Renable the light CrystalLight.setLightEnabled(true); @endtsexample animate Toggles animation for the light on and off animationPeriod The length of time in seconds for a single playback of the light animation animationPhase The phase used to offset the animation start time to vary the animation of nearby lights. animationType Datablock containing light animation information (LightAnimData) attenuationRatio The proportions of constant, linear, and quadratic attenuation to use for the falloff for point and spot lights. brightness Adjusts the lights power, 0 being off completely. castShadows Enables/disabled shadow casts by this light. color Changes the base color hue of the light. cookie A custom pattern texture which is projected from the light. fadeStartDistance Start fading shadows out at this distance. 0 = auto calculate this distance. flareScale Globally scales all features of the light flare flareType Datablock containing light flare information (LightFlareData) includeLightmappedGeometryInShadow This light should render lightmapped geometry during its shadow-map update (ignored if 'representedInLightmap' is false) isEnabled Enables/Disables the object rendering and functionality in the scene. lastSplitTerrainOnly This toggles only terrain being rendered to the last split of a PSSM shadow map. logWeight The logrithmic PSSM split distance factor. numSplits The logrithmic PSSM split distance factor. overDarkFactor The ESM shadow darkening factor priority Used for sorting of lights by the light manager. Priority determines if a light has a stronger effect than, those with a lower value representedInLightmap This light is represented in lightmaps (static light, default: false) shadowDarkenColor The color that should be used to multiply-blend dynamic shadows onto lightmapped geometry (ignored if 'representedInLightmap' is false) shadowDistance The distance from the camera to extend the PSSM shadow. shadowSoftness float shadowSoftness shadowType The type of shadow to use on this light. texSize The texture size of the shadow map. LightBaseClass ConsoleClassObject LightDescription SimDataBlock apply () @brief Force an inspectPostApply call for the benefit of tweaking via the console Normally this functionality is only exposed to objects via the World Editor, once changes have been made. Exposing apply to script allows you to make changes to it on the fly without the World Editor. @note This is intended for debugging and tweaking, not for game play @tsexample // Change a property of the light description RocketLauncherLightDesc.brightness = 10; // Make it so RocketLauncherLightDesc.apply(); @endtsexample animationPeriod The length of time in seconds for a single playback of the light animation animationPhase The phase used to offset the animation start time to vary the animation of nearby lights. animationType Datablock containing light animation information (LightAnimData) attenuationRatio The proportions of constant, linear, and quadratic attenuation to use for the falloff for point and spot lights. brightness Adjusts the lights power, 0 being off completely. castShadows Enables/disabled shadow casts by this light. color Changes the base color hue of the light. cookie A custom pattern texture which is projected from the light. fadeStartDistance Start fading shadows out at this distance. 0 = auto calculate this distance. flareScale Globally scales all features of the light flare flareType Datablock containing light flare information (LightFlareData) includeLightmappedGeometryInShadow This light should render lightmapped geometry during its shadow-map update (ignored if 'representedInLightmap' is false) lastSplitTerrainOnly This toggles only terrain being rendered to the last split of a PSSM shadow map. logWeight The logrithmic PSSM split distance factor. numSplits The logrithmic PSSM split distance factor. overDarkFactor The ESM shadow darkening factor range Controls the size (radius) of the light representedInLightmap This light is represented in lightmaps (static light, default: false) shadowDarkenColor The color that should be used to multiply-blend dynamic shadows onto lightmapped geometry (ignored if 'representedInLightmap' is false) shadowDistance The distance from the camera to extend the PSSM shadow. shadowSoftness float shadowSoftness shadowType The type of shadow to use on this light. texSize The texture size of the shadow map. LightDescriptionClass ConsoleClassObject LightFlareData SimDataBlock apply () Intended as a helper to developers and editor scripts. Force trigger an inspectPostApply elementDist Where this element appears along the flare beam. elementRect A rectangle specified in pixels of the flareTexture image. elementRotate Defines if this element orients to point along the flare beam or if it is always upright. elementScale Size scale applied to this element. elementTint Used to modulate this element's color if elementUseLightColor is false. @see elementUseLightColor elementUseLightColor If true this element's color is modulated by the light color. If false, elementTint will be used. @see elementTint flareEnabled Allows the user to disable this flare globally for any lights referencing it. flareTexture The texture / sprite sheet for this flare. occlusionRadius Radius in world units to test for occlusion if supported by hardware, disable by setting radius non-positive. overallScale Size scale applied to all elements of the flare. renderReflectPass If false this flare does not render in reflections. If true then elements with a distance of zero (eg. directly over the light source) will render into reflections. LightFlareDataClass ConsoleClassObject Lightning GameBase strikeObject ( int id=NULL ) Creates a LightningStrikeEvent which strikes a specific object. @tsexample // Define a ShapeBase ID %shapeBaseID = 4566; // Tell the lightning object to create a LightningStrikeEvent which hits a specific target. %lightning.strikeObject(%shapeBaseID); @endtsexample strikeRandomPoint () Creates a LightningStrikeEvent which attempts to strike a random target in range of the Lightning object. @tsexample // Tell the lightning object to create a LightningStrikeEvent which will hit a target if one is available. %lightning.strikeRandomPoint(); @endtsexample warningFlashes () Adds a new LightningStrikeEvent to all clients. @tsexample // Tell the lightning object to create a LightningStrikeEvent on all connected clients. %lightning.warningFlashes(); @endtsexample applyDamage( Point3F hitPosition, Point3F hitNormal, SceneObject hitObject ) Informs an object that it was hit by lightning and needs to take damage. @param Lightning object. @param Object that was hit. @param Position the lightning bolt hit in the world. @param Range that the lightning bolt struck. @see Lightning, LightningData boltStartRadius The radius in which a lightning bolt can occur from the center of the LightningData object. chanceToHitTarget Percentage change between 0.0f and 1.0f that the lightning bolt will hit something. color Color to blend the StrikeTextures in LightningData with. fadeColor Color to blend the StrikeTextures in LightningData with when the bolt is fading away. strikeRadius Radius in which a lightning bolt may occur from the center of the Lightning object. strikesPerMinute Number of lightning strikes to perform per minute. strikeWidth Width of a lightning bolt. useFog Boolean, determines the useage of fog on the lightning bolts. LightningClass ConsoleClassObject LightningData GameBaseData strikeSound Sound profile to play on a lightning strike. strikeTextures List of textures to use during a lightning strike. thunderSounds List of thunder sound effects to play. LightningDataClass ConsoleClassObject LightningStrikeEvent LightningStrikeEventClass ConsoleClassObject Marker SceneObject msToNext Milliseconds to next marker in sequence. seqNum Marker position in sequence of markers on this path. smoothingType Path smoothing at this marker/knot. "Linear"means no smoothing, while "Spline" means to smooth. type Type of this marker/knot. A "normal" knot will have a smooth camera translation/rotation effect. "Position Only"will do the same for translations, leaving rotation un-touched. Lastly, a "Kink" means the rotation will take effect immediately for an abrupt rotation change. MarkerClass ConsoleClassObject Material SimObject dumpInstances Dumps a formatted list of the currently allocated material instances for this material to the console. flush Flushes all material instances that use this material. getAnimFlags getFilename Get filename of material isAutoGenerated Returns true if this Material was automatically generated by MaterialList::mapMaterials() reload Reloads all material instances that use this material. setAutoGenerated setAutoGenerated(bool isAutoGenerated): Set whether or not the Material is autogenerated. alphaRef The alpha reference value for alpha testing. Must be between 0 to 255. @see alphaTest alphaTest Enables alpha test when rendering the material. @see alphaRef animFlags The types of animation to play on this material. baseTex For backwards compatibility. @see diffuseMap bumpAtlas @internal bumpTex For backwards compatibility. @see normalMap castShadows If set to false the lighting system will not cast shadows from this material. cellIndex @internal cellLayout @internal cellSize @internal colorMultiply For backwards compatibility. @see diffuseColor cubemap The name of a CubemapData for environment mapping. customFootstepSound The sound to play when the player walks over the material. If this is set, it overrides #footstepSoundId. This field is useful for directly assigning custom footstep sounds to materials without having to rely on the PlayerData sound assignment. @warn Be aware that materials are client-side objects. This means that the SFXTracks assigned to materials must be client-side, too. customImpactSound The sound to play when the player impacts on the surface with a velocity equal or greater than PlayerData::groundImpactMinSpeed. If this is set, it overrides #impactSoundId. This field is useful for directly assigning custom impact sounds to materials without having to rely on the PlayerData sound assignment. @warn Be aware that materials are client-side objects. This means that the SFXTracks assigned to materials must be client-side, too. detailMap A typically greyscale detail texture additively blended into the material. detailNormalMap A second normal map texture applied at the detail scale. You can use the DXTnm format only when per-pixel specular highlights are disabled. detailNormalMapStrength Used to scale the strength of the detail normal map when blended with the base normal map. detailScale The scale factor for the detail map. detailTex For backwards compatibility. @see detailMap diffuseColor This color is multiplied against the diffuse texture color. If no diffuse texture is present this is the material color. diffuseMap The diffuse color texture map. doubleSided Disables backface culling casing surfaces to be double sided. Note that the lighting on the backside will be a mirror of the front side of the surface. dynamicCubemap Enables the material to use the dynamic cubemap from the ShapeBase object its applied to. effectColor If #showDust is true, this is the set of colors to use for the ParticleData of the dust emitter. @see ParticleData::colors emissive Enables emissive lighting for the material. envMap The name of an environment map cube map to apply to this material. envTex For backwards compatibility. @see envMap footstepSoundId What sound to play from the PlayerData sound list when the player walks over the material. -1 (default) to not play any sound. The IDs are: - 0: PlayerData::FootSoftSound - 1: PlayerData::FootHardSound - 2: PlayerData::FootMetalSound - 3: PlayerData::FootSnowSound - 4: PlayerData::FootShallowSound - 5: PlayerData::FootWadingSound - 6: PlayerData::FootUnderwaterSound - 7: PlayerData::FootBubblesSound - 8: PlayerData::movingBubblesSound - 9: PlayerData::waterBreathSound - 10: PlayerData::impactSoftSound - 11: PlayerData::impactHardSound - 12: PlayerData::impactMetalSound - 13: PlayerData::impactSnowSound - 14: PlayerData::impactWaterEasy - 15: PlayerData::impactWaterMedium - 16: PlayerData::impactWaterHard - 17: PlayerData::exitingWater glow Enables rendering this material to the glow buffer. impactSoundId What sound to play from the PlayerData sound list when the player impacts on the surface with a velocity equal or greater than PlayerData::groundImpactMinSpeed. For a list of IDs, see #footstepSoundId lightMap The lightmap texture used with pureLight. mapTo Used to map this material to the material name used by TSShape. minnaertConstant The Minnaert shading constant value. Must be greater than 0 to enable the effect. normalMap The normal map texture. You can use the DXTnm format only when per-pixel specular highlights are disabled, or a specular map is in use. overlayMap A secondary diffuse color texture map which will use the second texcoord of a mesh. overlayTex For backwards compatibility. @see overlayMap parallaxScale Enables parallax mapping and defines the scale factor for the parallax effect. Typically this value is less than 0.4 else the effect breaks down. pixelSpecular This enables per-pixel specular highlights controlled by the alpha channel of the normal map texture. Note that if pixel specular is enabled the DXTnm format will not work with your normal map, unless you are also using a specular map. planarReflection @internal rotPivotOffset The piviot position in UV coordinates to center the rotation animation. rotSpeed The speed to rotate the texture in degrees per second when rotation animation is enabled. scrollDir The scroll direction in UV space when scroll animation is enabled. scrollSpeed The speed to scroll the texture in UVs per second when scroll animation is enabled. sequenceFramePerSec The number of frames per second for frame based sequence animations if greater than zero. sequenceSegmentSize The size of each frame in UV units for sequence animations. showDust Whether to emit dust particles from a shape moving over the material. This is, for example, used by vehicles or players to decide whether to show dust trails. showFootprints Whether to show player footprint decals on this material. @see PlayerData::decalData specular The color of the specular highlight when not using a specularMap. specularMap The specular map texture. The RGB channels of this texture provide a per-pixel replacement for the 'specular' parameter on the material. If this texture contains alpha information, the alpha channel of the texture will be used as the gloss map. This provides a per-pixel replacement for the 'specularPower' on the material specularPower The intensity of the specular highlight when not using a specularMap. subSurface Enables the subsurface scattering approximation. subSurfaceColor The color used for the subsurface scattering approximation. subSurfaceRolloff The 0 to 1 rolloff factor used in the subsurface scattering approximation. toneMap The tonemap texture used with pureLight. translucent If true this material is translucent blended. translucentBlendOp The type of blend operation to use when the material is translucent. translucentZWrite If enabled and the material is translucent it will write into the depth buffer. useAnisotropic Use anisotropic filtering for the textures of this stage. vertColor If enabled, vertex colors are premultiplied with diffuse colors. vertLit If true the vertex color is used for lighting. waveAmp The wave amplitude when wave animation is enabled. waveFreq The wave frequency when wave animation is enabled. waveType The type of wave animation to perform when wave animation is enabled. MaterialClass ConsoleClassObject MaterialSet SimSet MECreateUndoAction UndoAction addObject ( SimObject obj ) MECreateUndoActionClass ConsoleClassObject MEDeleteUndoAction UndoAction deleteObject ( SimObject obj ) MEDeleteUndoActionClass ConsoleClassObject MenuBar SimSet attachToCanvas (GuiCanvas, pos) insert (object, pos) insert object at position removeFromCanvas () MenuBarClass ConsoleClassObject MeshRoad SceneObject postApply () Intended as a helper to developers and editor scripts. Force trigger an inspectPostApply. This will transmit material and other fields ( not including nodes ) to client objects. regenerate () Intended as a helper to developers and editor scripts. Force MeshRoad to recreate its geometry. setNodeDepth ( int idx, float meters ) Intended as a helper to developers and editor scripts. Sets the depth in meters of a particular node. bottomMaterial Material for the bottom surface of the road. breakAngle Angle in degrees - MeshRoad will subdivide the spline if its curve is greater than this threshold. Node Do not modify, for internal use. sideMaterial Material for the left, right, front, and back surfaces of the road. textureLength The length in meters of textures mapped to the MeshRoad. topMaterial Material for the upper surface of the road. widthSubdivisions Subdivide segments widthwise this many times when generating vertices. MeshRoadClass ConsoleClassObject Message SimObject addReference () Increment the reference count for this message freeReference () Decrement the reference count for this message getType () Get message type (script class name or C++ class name if no script defined class) onAdd() Script callback when a message is first created and registered. @tsexample function Message::onAdd(%this) { ^// Perform on add code here } @endtsexample onRemove() Script callback when a message is deleted. @tsexample function Message::onRemove(%this) { ^// Perform on remove code here } @endtsexample MessageClass ConsoleClassObject MessageForwarder ScriptMsgListener toQueue Name of queue to forward to MessageForwarderClass ConsoleClassObject MessageVector SimObject clear () Clear all messages in the vector @tsexample HudMessageVector.clear(); @endtsexample deleteLine ( int deletePos ) Delete the line at the specified position. @param deletePos Position in the vector containing the line to be deleted @tsexample // Delete the first line (index 0) in the vector... HudMessageVector.deleteLine(0); @endtsexample @return False if deletePos is greater than the number of lines in the current vector dump (string filename, string header=NULL) Dump the message vector to a file, optionally prefixing a header.@hide getLineIndexByTag ( int tag ) Scan through the vector, returning the line number of the first line that matches the specified tag; else returns -1 if no match was found. @param tag Numerical value assigned to a message when it was added or inserted @tsexample // Locate a line of text tagged with the value "1", then delete it. %taggedLine = HudMessageVector.getLineIndexByTag(1); HudMessageVector.deleteLine(%taggedLine); @endtsexample @return Line with matching tag, other wise -1 getLineTag ( int pos ) Get the tag of a specified line. @param pos Position in vector to grab tag from @tsexample // Remove all lines that do not have a tag value of 1. while( HudMessageVector.getNumLines()) { %tag = HudMessageVector.getLineTag(1); if(%tag != 1) %tag.delete(); HudMessageVector.popFrontLine(); } @endtsexample @return Tag value of a given line, if the position is greater than the number of lines return 0 getLineText ( int pos ) Get the text at a specified line. @param pos Position in vector to grab text from @tsexample // Print a line of text at position 1. %text = HudMessageVector.getLineText(1); echo(%text); @endtsexample @return Text at specified line, if the position is greater than the number of lines return "" getLineTextByTag ( int tag ) Scan through the lines in the vector, returning the first line that has a matching tag. @param tag Numerical value assigned to a message when it was added or inserted @tsexample // Locate text in the vector tagged with the value "1", then print it %taggedText = HudMessageVector.getLineTextByTag(1); echo(%taggedText); @endtsexample @return Text from a line with matching tag, other wise "" getNumLines () Get the number of lines in the vector. @tsexample // Find out how many lines have been stored in HudMessageVector %chatLines = HudMessageVector.getNumLines(); echo(%chatLines); @endtsexample insertLine ( int insertPos, string msg, int tag ) Push a line onto the back of the list. @param msg Text that makes up the message @param tag Numerical value associated with this message, useful for searching. @tsexample // Add the message... HudMessageVector.insertLine(1, "Hello World", 0); @endtsexample @return False if insertPos is greater than the number of lines in the current vector popBackLine () Pop a line from the back of the list; destroys the line. @tsexample HudMessageVector.popBackLine(); @endtsexample @return False if there are no lines to pop (underflow), true otherwise popFrontLine () Pop a line from the front of the vector, destroying the line. @tsexample HudMessageVector.popFrontLine(); @endtsexample @return False if there are no lines to pop (underflow), true otherwise pushBackLine ( string msg, int tag ) Push a line onto the back of the list. @param msg Text that makes up the message @param tag Numerical value associated with this message, useful for searching. @tsexample // Add the message... HudMessageVector.pushBackLine("Hello World", 0); @endtsexample pushFrontLine ( string msg, int tag ) Push a line onto the front of the vector. @param msg Text that makes up the message @param tag Numerical value associated with this message, useful for searching. @tsexample // Add the message... HudMessageVector.pushFrontLine("Hello World", 0); @endtsexample MessageVectorClass ConsoleClassObject MirrorSubObject SceneObject MirrorSubObjectClass ConsoleClassObject MissionArea NetObject getArea () Returns 4 fields: starting x, starting y, extents x, extents y setArea (int x, int y, int width, int height) @brief - Defines the size of the MissionArea param x Starting X coordinate position for MissionArea param y Starting Y coordinate position for MissionArea param width New width of the MissionArea param height New height of the MissionArea area Four corners (X1, X2, Y1, Y2) that makes up the level's boundaries flightCeiling Represents the top of the mission area, used by FlyingVehicle. MissionArea must be named "GlobalMissionArea" for this to be used. flightCeilingRange Distance from ceiling before FlyingVehicle thrust is cut off. MissionArea must be named "GlobalMissionArea" for this to be used. MissionAreaClass ConsoleClassObject MissionAreaEditor GuiBitmapCtrl centerWorld Realign the world so that the mission area is centered. This method moves every SceneObject (including terrain) in the world so that the center of the world is the center of the mission area. getArea Return a 4-tuple: area_x area_y area_width are_height setArea (int x, int y, int w, int h) Set the mission area to the specified co-ordinates/extents. updateTerrain Update the terrain bitmap that is rendered as background in the control. cameraColor ColorI cameraColor defaultObjectColor ColorI defaultObjectColor enableEditing bool enableEditing enableMirroring bool enableMirroring handleFillColor ColorI handleFillColor handleFrameColor ColorI handleFrameColor mirrorArrowColor ColorI mirrorArrowColor mirrorIndex int mirrorIndex mirrorLineColor ColorI mirrorLineColor missionBoundsColor ColorI missionBoundsColor renderCamera bool renderCamera squareBitmap bool squareBitmap waterObjectColor ColorI waterObjectColor MissionAreaEditorClass ConsoleClassObject MissionMarker ShapeBase MissionMarkerClass ConsoleClassObject MissionMarkerData ShapeBaseData MissionMarkerDataClass ConsoleClassObject MoreAdvancedComponent SimComponent MoreAdvancedComponentClass ConsoleClassObject NetConnection SimGroup checkMaxRate () @brief Ensures that all configured packet rates and sizes meet minimum requirements. This method is normally only called when a NetConnection class is first constructed. It need only be manually called if the global variables that set the packet rate or size have changed. @note If $pref::Net::PacketRateToServer, $pref::Net::PacketRateToClient or $pref::Net::PacketSize have been changed since a NetConnection has been created, this method must be called on all connections for them to follow the new rates or size. clearPaths () @brief On the server, resets the connection to indicate that mod paths have not been transmitted. Typically when a mission has ended on the server, all connected clients are informed of this change and their connections are reset back to a starting state. This method resets a connection on the server to indicate that mod paths have not been transmitted. @tsexample // Inform the clients for (%clientIndex = 0; %clientIndex < ClientGroup.getCount(); %clientIndex++) { // clear ghosts and paths from all clients %cl = ClientGroup.getObject(%clientIndex); %cl.endMission(); %cl.resetGhosting(); %cl.clearPaths(); } @endtsexample connect ( string remoteAddress ) @brief Connects to the remote address. Attempts to connect with another NetConnection on the given address. Typically once connected, a game's information is passed along from the server to the client, followed by the player entering the game world. The actual procedure is dependent on the NetConnection subclass that is used. i.e. GameConnection. @param remoteAddress The address to connect to in the form of IP:&lt;address&gt;:&lt;port&rt; although the <i>IP:</i> portion is optional. The <i>address</i> portion may be in the form of w.x.y.z or as a host name, in which case a DNS lookup will be performed. You may also substitue the word <i>broadcast</i> for the address to broadcast the connect request over the local subnet. @see NetConnection::connectLocal() to connect to a server running within the same process as the client. connectLocal () @brief Connects with the server that is running within the same process as the client. @returns An error text message upon failure, or an empty string when successful. @see See @ref local_connections for a description of local connections and their use. See NetConnection::connect() to connect to a server running in another process (on the same machine or not). getAddress () @brief Returns the far end network address for the connection. The address will be in one of the following forms: - <b>IP:Broadcast:&lt;port&gt;</b> for broadcast type addresses - <b>IP:&lt;address&gt;:&lt;port&gt;</b> for IP addresses - <b>local</b> when connected locally (server and client running in same process getGhostID ( int realID ) @brief On server or client, convert a real id to the ghost id for this connection. Torque's network ghosting system only exchanges ghost ID's between the server and client. Use this method on the server or client to discover an object's ghost ID based on its real SimObject ID. @param realID The real SimObject ID of the object. @returns The ghost ID of the object for this connection, or -1 if it could not be resolved. @see @ref ghosting_scoping for a description of the ghosting system. getGhostsActive () @brief Returns the number of active ghosts on the connection. getPacketLoss () @brief Returns the percentage of packets lost per tick. @note This method is not yet hooked up. getPing () @brief Returns the average round trip time (in ms) for the connection. The round trip time is recalculated every time a notify packet is received. Notify packets are used to information the connection that the far end successfully received the sent packet. resolveGhostID ( int ghostID ) @brief On the client, convert a ghost ID from this connection to a real SimObject ID. Torque's network ghosting system only exchanges ghost ID's between the server and client. Use this method on the client to discover an object's local SimObject ID when you only have a ghost ID. @param ghostID The ghost ID of the object as sent by the server. @returns The SimObject ID of the object, or 0 if it could not be resolved. @tsexample %object = ServerConnection.resolveGhostID( %ghostId ); @endtsexample @see @ref ghosting_scoping for a description of the ghosting system. resolveObjectFromGhostIndex ( int ghostID ) @brief On the server, convert a ghost ID from this connection to a real SimObject ID. Torque's network ghosting system only exchanges ghost ID's between the server and client. Use this method on the server to discover an object's local SimObject ID when you only have a ghost ID. @param ghostID The ghost ID of the object as sent by the server. @returns The SimObject ID of the object, or 0 if it could not be resolved. @tsexample %object = %client.resolveObjectFromGhostIndex( %ghostId ); @endtsexample @see @ref ghosting_scoping for a description of the ghosting system. setSimulatedNetParams ( float packetLoss, int delay ) @brief Simulate network issues on the connection for testing. @param packetLoss The fraction of packets that will be lost. Ranges from 0.0 (no loss) to 1.0 (complete loss) @param delay Delays packets being transmitted by simulating a particular ping. This is an absolute integer, measured in ms. transmitPaths () @brief Sent by the server during phase 2 of the mission download to update mod paths. Mod paths on the client need to be in sync with the server prior to objects being ghosted. This is typically done during the standard mission start phase 2 when following Torque's example mission startup sequence. @tsexample function serverCmdMissionStartPhase2Ack(%client, %seq, %playerDB) { // Make sure to ignore calls from a previous mission load if (%seq != $missionSequence || !$MissionRunning) return; if (%client.currentPhase != 1.5) return; %client.currentPhase = 2; // Set the player datablock choice %client.playerDB = %playerDB; // Update mod paths, this needs to get there before the objects. %client.transmitPaths(); // Start ghosting objects to the client %client.activateGhosting(); } @endtsexample NetConnectionClass ConsoleClassObject NetObject SimObject clearScopeToClient ( NetConnection client ) @brief Undo the effects of a scopeToClient() call. @param client The connection to remove this object's scoping from getClientObject () @brief Returns a pointer to the client object when on a local connection. Short-Circuit-Networking: this is only valid for a local-client / singleplayer situation. @tsexample // Psuedo-code, some values left out for this example %node = new ParticleEmitterNode(){}; %clientObject = %node.getClientObject(); if(isObject(%clientObject) ^%clientObject.setTransform("0 0 0"); @endtsexample @return The ID of client object getGhostID () @brief Get the ghost index of this object from the server. @tsexample %ghostID = LocalClientConnection.getGhostId( %serverObject ); @endtsexample @return The index of this ghost in the GhostManager on the server getServerObject () @brief Returns a pointer to the client object when on a local connection. Short-Circuit-Netorking: this is only valid for a local-client / singleplayer situation. @tsexample // Psuedo-code, some values left out for this example %node = new ParticleEmitterNode(){}; %serverObject = %node.getServerObject(); if(isObject(%serverObject) ^%serverObject.setTransform("0 0 0"); @endtsexample @return The ID of server object isClientObject () @brief Called to check if an object resides on the clientside. @return True if the object resides on the client, false otherwise. isServerObject () @brief Checks if an object resides on the server. @return True if the object resides on the server, false otherwise. scopeToClient ( NetConnection client ) @brief Cause the NetObject to be forced as scoped on the specified NetConnection. @param client The connection this object will always be scoped to @tsexample // Called to create new cameras in TorqueScript // %this - The active GameConnection // %spawnPoint - The spawn point location where we creat the camera function GameConnection::spawnCamera(%this, %spawnPoint) { ^// If this connection's camera exists ^if(isObject(%this.camera)) ^{ ^^// Add it to the mission group to be cleaned up later ^^MissionCleanup.add( %this.camera ); ^^// Force it to scope to the client side ^^%this.camera.scopeToClient(%this); ^} } @endtsexample setScopeAlways () @brief Always scope this object on all connections. The object is marked as ScopeAlways and is immediately ghosted to all active connections. This function has no effect if the object is not marked as Ghostable. NetObjectClass ConsoleClassObject NetStringEvent NetStringEventClass ConsoleClassObject OpenFileDialog FileDialog MultipleFiles True/False whether multiple files may be selected and returned or not MustExist True/False whether the file returned must exist or not OpenFileDialogClass ConsoleClassObject OpenFolderDialog OpenFileDialog fileMustExist File that must in selected folder for it to be valid OpenFolderDialogClass ConsoleClassObject ParticleData SimDataBlock reload () Reloads this particle. @tsexample // Get the editor's current particle %particle = PE_ParticleEditor.currParticle // Change a particle value %particle.setFieldValue(%propertyField,%value); // Reload it %particle.reload(); @endtsexample animateTexture If true, allow the particle texture to be an animated sprite. animTexFrames A list of frames and / or frame ranges to use for particle animation if animateTexture is true. Example: "0-16 20 19 18 17 31-21". animTexName Texture file to use for this particle if animateTexture is true. animTexTiling The number of frames, in the rows and columns, stored in animTexName. Maximum of 256 frames can be stored in a single animTexName when using animTexTiling. Entered as "Columns / Rows". eg. "4 4". colors Color values to set the particles, rgba. Up to 4 allowed. Will transition through colors based on values set in the times value. Example: colors[0] = "0.6 1.0 1.0 0.5". constantAcceleration Amount to continously accelerate this particle by. dragCoefficient Particle physics drag amount. framesPerSec If animateTexture is true, this defines the frames per second of the sprite animation. gravityCoefficient Strength of gravity on the particles. inheritedVelFactor Amount to allow the velocity inherited from the emitter to effect the velocity of these particles. lifetimeMS Time in milliseconds before this particle is destroyed. lifetimeVarianceMS Variance in lifetime of particle between 0 milliseconds and n. sizes Sizes to set the particles. Up to 4 allowed. Will transition through sizes based on values set in the times value. spinRandomMax Maximum allowed spin speed of this particle, between spinRandomMin and n. spinRandomMin Minimum allowed spin speed of this particle, between n and spinRandomMax. spinSpeed Speed at which to spin the particle. textureCoords 4 dimensional array defining the 4 locational points, in F32 (where 0.0 is top / left and 1.0 is bottom / right) of the textureName to use for this particle. TextureName Texture file to use for this particle. times Times to transition between colors and sizes. Up to 4 allowed. Values are 0.0 - 1.0, and corrispond to the life of the particle where 0 is first created and 1 is end of lifespace. useInvAlpha If true, will invert the colors of this particle. windCoefficient Strength of wind on the particles. ParticleDataClass ConsoleClassObject ParticleEmitter GameBase ParticleEmitterClass ConsoleClassObject ParticleEmitterData GameBaseData reload () Reloads this emitter @tsexample // Get the editor's current particle emitter %emitter = PE_EmitterEditor.currEmitter // Change a field value %emitter.setFieldValue(%propertyField,%value); // Reload this emitter %emitter.reload(); @endtsexample alignDirection The direction aligned particles should face, defined as the 3 F32 values of X Y Z. alignParticles If true, particles always face along a particular axis. ambientFactor Used to generate the final particle color by interpolating between the particle color and the particle color multiplied by the ambient color. blendStyle Pre-defined blend factor setting. Use integer value. BlendNormal = 1, BlendAdditive = 2, BlendSubtractive = 3, BlendPremultAlpha = 4, BlendGreyscale = 5. ejectionOffset Z offset from emitter point to eject from. ejectionPeriodMS Time, in Milliseconds, between particle ejection. ejectionVelocity Ejection velocity. highResOnly This particle system should not use the mixed-resolution renderer. If your particle system has large amounts of overdraw, consider disabling this option. lifetimeMS Lifetime of particles. lifetimeVarianceMS Varience in lifetime from 0 milliseconds to n. orientOnVelocity If true, Particles will face the screen at the start. orientParticles If true, Particles will always face the screen. overrideAdvance If false, particles emitted in the same frame have their positions adjusted. If true, adjustment is skipped and particles will clump together. particles Used to load particle data directly from a string. periodVarianceMS Varience in ejection period between 0 milliseconds and n. phiReferenceVel Reference angle, from the verticle plane, to eject from. phiVariance Varience from the reference angle, from 0 to n. reverseOrder If true, reverses draw order of particles. softnessDistance For soft particles, the distance (in meters) where particles will be faded based on the difference in depth between the particle and the scene geometry. sortParticles If true, particles are sorted back-to-front. TextureName Emitter texture file to override particle textures. thetaMax Maximum angle, from the horizontal plane, to eject from. thetaMin Minimum angle, from the horizontal plane, to eject from. useEmitterColors If true, will use emitter specified colors instead of datablock colors. useEmitterSizes If true, will use emitter specified sizes instead of datablock sizes. velocityVariance Variance for velocity between 0 and n. ParticleEmitterDataClass ConsoleClassObject ParticleEmitterNode GameBase setEmitterDataBlock ( ParticleEmitterData emitterDatablock=0 ) Assigns the datablock for this emitter. @param datablockID Numerical reference to datablock ID @tsexample // Get the editor's current particle emitter %emitter = PE_EmitterEditor.currEmitter // Assign a new datablock value %emitter.setEmitterDatablock(%emitterDatablock); @endtsexample active Boolean which sets and determines if this EmitterNode is active or not. emitter Particle emitter datablock to use. velocity Velocity to use when spawning the particles. ParticleEmitterNodeClass ConsoleClassObject ParticleEmitterNodeData GameBaseData timeMultiple Time multiplier for particle emitter nodes. ParticleEmitterNodeDataClass ConsoleClassObject Path SimGroup getPathId () @brief Returns the PathID (not the object ID) of this path. @return PathID (not the object ID) of this path. @tsexample // Acquire the PathID of this path object. %pathID = %thisPath.getPathId(); @endtsexample isLooping If this is true, the loop is closed, otherwise it is open. PathCamera ShapeBase popFront () Removes the knot at the front of the camera's path. @tsexample // Remove the first knot in the camera's path. %pathCamera.popFront(); @endtsexample pushBack ( string transform="1.0 1.0 1.0 1.0 1.0 1.0 1.0", float speed=1.0, string type="Normal", string path="Linear" ) Adds a new knot to the back of a path camera's path. @param transform Transform vector for the new knot. (Pos_X Pos_Y Pos_Z Rot_X Rot_Y Rot_Z Angle) @param speed Speed setting for this knot. @param type Knot type (Normal, Position Only, Kink). @param path Path type (Linear, Spline). @tsexample // Transform vector for new knot. (Pos_X Pos_Y Pos_Z Rot_X Rot_Y Rot_Z Angle) %transform = "15.0 5.0 5.0 1.4 1.0 0.2 1.0" // Speed setting for knot. %speed = "1.0" // Knot type. (Normal, Position Only, Kink) %type = "Normal"; // Path Type. (Linear, Spline) %path = "Linear"; // Inform the path camera to add a new knot to the back of its path %pathCamera.pushBack(%transform,%speed,%type,%path); @endtsexample pushFront ( string transform="1.0 1.0 1.0 1.0 1.0 1.0 1.0", float speed=1.0, string type="Normal", string path="Linear" ) Adds a new knot to the front of a path camera's path. @param transform Transform vector for the new knot. (Pos_X Pos_Y Pos_Z Rot_X Rot_Y Rot_Z Angle) @param speed Speed setting for this knot. @param type Knot type (Normal, Position Only, Kink). @param path Path type (Linear, Spline). @tsexample // Transform vector for new knot. (Pos_X,Pos_Y,Pos_Z,Rot_X,Rot_Y,Rot_Z,Angle) %transform = "15.0 5.0 5.0 1.4 1.0 0.2 1.0" // Speed setting for knot. %speed = "1.0"; // Knot type. (Normal, Position Only, Kink) %type = "Normal"; // Path Type. (Linear, Spline) %path = "Linear"; // Inform the path camera to add a new knot to the front of its path %pathCamera.pushFront(%transform, %speed, %type, %path); @endtsexample reset ( float speed=1.0f ) Reset this path camera to the start of its path, and apply a new movement speed. @param speed Speed for the camera to move along its path after being reset. @tsexample //Determine the new movement speed of this camera. If not set, the speed will default to 1.0. %speed = "0.50"; // Inform the path camera to jump to the start of its path at the new speed value. %pathCamera.reset(%speed); setPosition ( float position=0.0f ) Set the current position of the camera along the path. @param position Position along the path, from 0.0 - 1.0, to place the camera. @tsexample // Set the camera on a position along its path from 0.0 - 1.0. %position = "0.35"; // Pop the pathCamera to its new position along the path. %pathCamera.setPosition(%position); @endtsexample setState ( string newState="forward" ) Set the movement state for this path camera. @param newState New movement state type for this camera. Forward, Backward or Stop. @tsexample // Set the state type (forward, backward, stop). %state = "forward"; // Inform the pathCamera to change its movement state to the defined value. %pathCamera.setState(%state); @endtsexample setTarget ( float position=1.0f ) Set the movement target for this camera along its path. @param position Position target, between 0.0 and 1.0, for the camera to move to along its path. @tsexample // Set the position target, between 0.0 and 1.0, for this camera to move to. %position = "0.50"; // Inform the pathCamera of the new target position it will move to. %pathCamera.setTarget(%position); @endtsexample onNode( string node ) Informs the script level that this path camera has arrived at a specific node in its path. @param Node Unique ID assigned to this node. @see PathCameraData PathCameraClass ConsoleClassObject PathCameraData ShapeBaseData PathCameraDataClass ConsoleClassObject PathClass ConsoleClassObject PathedInterior GameBase setPathPosition setTargetPosition basePosition MatrixPosition basePosition baseRotation MatrixRotation baseRotation baseScale Point3F baseScale interiorIndex int interiorIndex interiorResource filename interiorResource PathedInteriorClass ConsoleClassObject PathedInteriorData GameBaseData StartSound SFXProfile StartSound StopSound SFXProfile StopSound SustainSound SFXProfile SustainSound PathedInteriorDataClass ConsoleClassObject PathManagerEvent PathManagerEventClass ConsoleClassObject PersistenceManager SimObject clearAll () Clears all the tracked objects without saving them. deleteObjectsFromFile ( fileName ) Delete all of the objects that are created from the given file. getDirtyObject ( index ) Returns the ith dirty object. getDirtyObjectCount () Returns the number of dirty objects. hasDirty () Returns true if the manager has dirty objects to save. isDirty (SimObject object) Returns true if the SimObject is on the dirty list. listDirty () Prints the dirty list to the console. removeDirty (SimObject object) Remove a SimObject from the dirty list. removeField (SimObject object, string fieldName) Remove a specific field from an object declaration. removeObjectFromFile (SimObject object, [filename]) Remove an existing SimObject from a file (can optionally specify a different file than the one it was created in. saveDirty () Saves all of the SimObject's on the dirty list to their respective files. saveDirtyObject (SimObject object) Save a dirty SimObject to it's file. setDirty (SimObject object, [filename]) Mark an existing SimObject as dirty (will be written out when saveDirty() is called). PersistenceManagerClass ConsoleClassObject PfxVis clear () @hide hide () @hide onWindowClosed ( GuiWindowCtrl ) @hide open ( PostEffect, [bool clear = false] ) @hide show () @hide physGroundSequenceData GameBaseData DeltaVector Point3F DeltaVector FlexBodyData fxFlexBodyData FlexBodyData GroundNode1 int GroundNode1 GroundNode2 int GroundNode2 GroundNode3 int GroundNode3 GroundNode4 int GroundNode4 GroundNode5 int GroundNode5 GroundNode6 int GroundNode6 GroundNode7 int GroundNode7 GroundNode8 int GroundNode8 SequenceName string SequenceName SequenceNum int SequenceNum Time1 float Time1 Time2 float Time2 Time3 float Time3 Time4 float Time4 Time5 float Time5 Time6 float Time6 Time7 float Time7 Time8 float Time8 TimeScale float TimeScale physGroundSequenceDataClass ConsoleClassObject PhysicalZone SceneObject activate () Activate the physical zone's effects. @tsexample // Activate effects for a specific physical zone. %thisPhysicalZone.activate(); @endtsexample @ingroup Datablocks deactivate () Deactivate the physical zone's effects. @tsexample // Deactivate effects for a specific physical zone. %thisPhysicalZone.deactivate(); @endtsexample @ingroup Datablocks appliedForce Three-element floating point value representing forces in three axes to apply to objects entering PhysicalZone. gravityMod Gravity in PhysicalZone. Multiplies against standard gravity. polyhedron The polyhedron type is really a quadrilateral and consists of a cornerpoint followed by three vectors representing the edges extending from the corner. velocityMod Multiply velocity of objects entering zone by this value every tick. PhysicalZoneClass ConsoleClassObject PhysicsDebris GameBase PhysicsDebrisClass ConsoleClassObject PhysicsDebrisData GameBaseData preload angularDamping Larger values cause rotational velocity to decay over time more quickly. angularSleepThreshold Angular velocity threshold below which the shape may be put to sleep to save simulation time. buoyancyDensity The density of this shape for purposes of calculating buoyancy forces. The result of a particular value is relative to the density of the WaterObject it is within. castShadows Enable/Disable rendering into shadows. friction Friction of each physical body, slowing motion when in contact with a surface. Lifetime Base time in seconds that debris persists after time of creation. lifetimeVariance Range of variation randomly applied to lifetime when debris is created. linearDamping Larger values cause linear velocity to decay over time more quickly linearSleepThreshold Linear velocity threshold below which the shape may be put to sleep to save simulation time. mass Mass of each physical body. Restitution Bounciness of each physical body in response to collisions. Normal range is zero to one. shapeFile Path to the shape file. StaticFriction Friction of each physical body, resisting motion when starting at rest. waterDampingScale While the shape is in water linear and angular dampening will be scaled by this value. It is expected that this value will usually be greater than one. PhysicsDebrisDataClass ConsoleClassObject PhysicsForce SceneObject attach ( Point3F start, Point3F direction, float maxDist ) Performs a physics ray cast and attracts the hit dynamic physics body to the force position. @ingroup Physics detach ( Point3F force=Point3F::Zero ) Releases the attached physics body with an optional push force. @ingroup Physics isAttached () Returns true if there is a physics body attached. @ingroup Physics PhysicsForceClass ConsoleClassObject PhysicsShape GameBase destroy () Disables rendering and physical simulation of the shape and spawns the explosion, debri, and destroyedShape if any are specified. Note that this does not actually delete the PhysicsShape. isDestroyed () Returns true if the shape is currently destroyed. restore () Restore to un-destroyed state: enables rendering and physical simulation. playAmbient Enables automatic playing of the animation named "ambient" (if it exists) when the PhysicsShape is loaded. PhysicsShapeClass ConsoleClassObject PhysicsShapeData GameBaseData angularDamping Larger values cause rotational velocity to decay over time more quickly. angularSleepThreshold Angular velocity threshold below which the shape may be put to sleep to save simulation time. buoyancyDensity The density of this shape for purposes of calculating buoyancy forces. The result of a particular value is relative to the density of the WaterObject it is within. Debris Name of a PhysicsDebrisData to spawn when destroyed (optional). destroyedShape Name of a PhysicsShapeData to spawn when destroyed (optional). Explosion Name of a ExplosionData to spawn when destroyed (optional). friction Friction of the shape slowing motion when in contact with a surface. linearDamping Larger values cause linear velocity to decay over time more quickly linearSleepThreshold Linear velocity threshold below which the shape may be put to sleep to save simulation time. mass Mass of the shape. Set mass to zero to create as a kinematic. Restitution Bounciness of the shape in response to collisions. Normal range is zero to one. shapeName Path to the shape file. simType Controls whether this shape is simulated on the server, client, or both physics simulations. StaticFriction Friction of the shape resisting motion when starting at rest. waterDampingScale While the shape is in water linear and angular dampening will be scaled by this value. It is expected that this value will usually be greater than one. PhysicsShapeDataClass ConsoleClassObject physInteriorInstance InteriorInstance physInteriorInstanceClass ConsoleClassObject physTerrainBlock TerrainBlock physExtent Point2I physExtent physStart Point2I physStart physTerrainBlockClass ConsoleClassObject Player fxFlexBody checkDismountPoint ( Point3F oldPos, Point3F pos ) Check if it is safe (space is free) to dismount at this position. @param oldPos the player's current position @param pos the dismount position to check @return true if the dismount position is clear, false if not clearControlObject () Release the object we are controlling. getControlObject () Get the current object we are controlling. @return ID of the ShapeBase object we control, or 0 if not controlling an object. getDamageLocation ( Point3F pos ) Get the named damage location and modifier for a given position. The player object can differentiate 'hit' locations based on a pre-defined set of datablock settings. You may modify these settings, to vary the percentage of area given over to any body region. <img src="images/player_damageloc.png"> @note Input positions do not need to be on or even near the player. The engine will calculate which body location and modifier best fit any position relative to the player. @note This method will not return an accurate location when the player is prone. @param pos a position for which to retrieve a body region on this player. @return a string containing two words (space separated strings), where the first is a location and the second is a modifier. Posible locations:<ul><li>legs</li><li>torso</li><li>head</li></ul> Head modifiers:<ul><li>left_back</li><li>middle_back</li><li>right_back</li><li>left_middle</li><li>middle_middle</li><li>right_middle</li><li>left_front</li><li>middle_front</li><li>right_front</li></ul> Legs/Torso modifiers:<ul><li>front_left</li><li>front_right</li><li>back_left</li><li>back_right</li></ul> @see PlayerData::boxHeadPercentage @see PlayerData::boxTorsoPercentage getState () Get the name of the current state. @return the current state; one of: "Move", "Recover", "Mounted", "Dead" setActionThread ( string name, bool hold=false, bool fsp=true ) Set the main action sequence to play for this player. @param name name of the action sequence to set @param hold false to get a callback at the end of the sequence (animationDone) or true to prevent the callback @param fsp true if first person, false otherwise @return true if succesful, false if failed setArmThread ( string name ) Set the sequence that controls the player's arms (dynamically adjusted to match look direction). @param name name of the sequence to play on the player's arms. @param true if successful, false if failed. setControlObject ( ShapeBase obj ) Set the object to be controlled by this player @param ShapeBase object to control with this player @return true if the object is valid, false if not PlayerClass ConsoleClassObject PlayerData fxFlexBodyData airControl Amount of movement control the player has when in the air. animationDone( Player obj ) Called on the server when a scripted animation completes. @param obj the Player object boundingBox Size of the bounding box used by the player for collision. Dimensions are given as "width depth height". boxHeadBackPercentage Percentage of the player's bounding box depth that represents the back side of the head. Used when computing the damage location. @see Player::getDamageLocation boxHeadFrontPercentage Percentage of the player's bounding box depth that represents the front side of the head. Used when computing the damage location. @see Player::getDamageLocation boxHeadLeftPercentage Percentage of the player's bounding box width that represents the left side of the head. Used when computing the damage location. @see Player::getDamageLocation boxHeadPercentage Percentage of the player's bounding box height that represents the head. Used when computing the damage location. @see Player::getDamageLocation boxHeadRightPercentage Percentage of the player's bounding box width that represents the right side of the head. Used when computing the damage location. @see Player::getDamageLocation boxTorsoPercentage Percentage of the player's bounding box height that represents the torso. Used when computing the damage location. @see Player::getDamageLocation bubbleEmitTime Time in seconds to generate bubble particles after entering the water. crouchBoundingBox Collision bounding box used when the player is crouching. @see boundingBox crouchForce Force used to accelerate the player when crouching. DecalData Decal to place on the ground for player footsteps. decalOffset Distance from the center of the model to the right foot (used to place footstep decals either side of the player center. doDismount( Player obj ) Called to dismount the player from a vehicle. @param obj the Player object dustEmitter Emitter used to generate dust particles. Currently unused. exitingWater Sound to play when exiting the water with velocity >= exitSplashSoundVelocity. exitSplashSoundVelocity Minimum velocity when leaving the water for the exitingWater sound to play. FootBubblesSound Sound to play when walking in water and coverage equals 1.0 (fully underwater). FootHardSound Sound to play when walking on a surface with Material footstepSoundId 1. FootMetalSound Sound to play when walking on a surface with Material footstepSoundId 2. footPuffEmitter Emitter used to generate footpuffs (particles created as the player walks along the ground). footPuffNumParts Number of footpuff particles to generate each step. footPuffRadius Particle creation radius for footpuff particles. FootShallowSound Sound to play when walking in water and coverage is less than footSplashHeight. FootSnowSound Sound to play when walking on a surface with Material footstepSoundId 3. FootSoftSound Sound to play when walking on a surface with Material footstepSoundId 0. footstepSplashHeight Water coverage level to choose between FootShallowSound and FootWadingSound. FootUnderwaterSound Sound to play when walking in water and coverage equals 1.0 (fully underwater). FootWadingSound Sound to play when walking in water and coverage is less than 1, but > footSplashHeight. groundImpactMinSpeed Minimum falling impact speed to apply damage and initiate the camera shaking effect. groundImpactShakeAmp Amplitude of the camera shake effect after falling. groundImpactShakeDuration Duration (in seconds) of the camera shake effect after falling. groundImpactShakeFalloff Falloff factor of the camera shake effect after falling. groundImpactShakeFreq Frequency of the camera shake effect after falling. hardSplashSoundVelocity Minimum velocity when entering the water for the impactWaterHard sound to play. @see impactWaterHard horizMaxSpeed Maximum horizontal speed. @note This limit is only enforced if the player's horizontal speed exceeds horizResistSpeed. horizResistFactor Factor of resistence once horizResistSpeed has been reached. horizResistSpeed Horizontal speed at which resistence will take place. impactHardSound Sound to play after falling on a surface with Material footstepSoundId 1. impactMetalSound Sound to play after falling on a surface with Material footstepSoundId 2. impactSnowSound Sound to play after falling on a surface with Material footstepSoundId 3. impactSoftSound Sound to play after falling on a surface with Material footstepSoundId 0. impactWaterEasy Sound to play when entering the water with velocity < mediumSplashSoundVelocity. impactWaterHard Sound to play when entering the water with velocity >= hardSplashSoundVelocity. impactWaterMedium Sound to play when entering the water with velocity >= mediumSplashSoundVelocity and < hardSplashSoundVelocity. jetJumpEnergyDrain Energy level drained each time the player jet jumps. jetJumpForce Force used to accelerate the player when a jet jump is initiated. jetJumpSurfaceAngle Angle from vertical in degrees where the player can jet jump. jetMaxJumpSpeed Maximum vertical speed before the player can no longer jet jump. jetMinJumpEnergy Minimum energy level required to jet jump. jetMinJumpSpeed Minimum speed needed to jet jump. jumpDelay Delay time in ticks between jumps. jumpEnergyDrain Energy level drained each time the player jumps. jumpForce Force used to accelerate the player when a jump is initiated. jumpSurfaceAngle Angle from vertical in degrees where the player can jump. jumpTowardsNormal Controls the direction of the jump impulse. When false, jumps are always in the vertical (+Z) direction. When true jumps are in the direction of the ground normal. maxBackwardSpeed Maximum backward speed when running. maxCrouchBackwardSpeed Maximum backward speed when crouching. maxCrouchForwardSpeed Maximum forward speed when crouching. maxCrouchSideSpeed Maximum sideways speed when crouching. maxForwardSpeed Maximum forward speed when running. maxFreelookAngle Minimum (-ve) and maximum (+ve) left/right angle (in radians) the player can look in freelook mode. maxJumpSpeed Maximum vertical speed before the player can no longer jump. maxLookAngle Highest angle (in radians) the player can look. maxProneBackwardSpeed Maximum backward speed when prone (laying down). maxProneForwardSpeed Maximum forward speed when prone (laying down). maxProneSideSpeed Maximum sideways speed when prone (laying down). maxSideSpeed Maximum sideways speed when running. maxStepHeight Maximum height the player can step up. The player will automatically step onto changes in ground height less than maxStepHeight. The player will collide with ground height changes greater than this. maxTimeScale Maximum time scale for action animations. Action animations are automatically scaled to match the ground velocity; this field limits the maximum time scale. maxUnderwaterBackwardSpeed Maximum backward speed when underwater. maxUnderwaterForwardSpeed Maximum forward speed when underwater. maxUnderwaterSideSpeed Maximum sideways speed when underwater. mediumSplashSoundVelocity Minimum velocity when entering the water for the impactWaterMedium sound to play. @see impactWaterMedium minImpactSpeed Minimum impact speed to apply falling damage. This field also sets the minimum speed for the onImpact callback to be invoked. minJumpEnergy Minimum energy level required to jump. minJumpSpeed Minimum speed needed to jump. minLookAngle Lowest angle (in radians) the player can look. minRunEnergy Minimum energy level required to run or swim. movingBubblesSound Sound to play when in water and coverage equals 1.0 (fully underwater). Note that unlike FootUnderwaterSound, this sound plays even if the player is not moving around in the water. onEnterLiquid( Player obj, float coverage, string type ) Called when the player enters liquid. @param obj the Player object @param coverage percentage of the player's bounding box covered by the liquid @param type type of liquid the player has entered onEnterMissionArea( Player obj ) Called when the player enters the mission area. @param obj the Player object onLeaveLiquid( Player obj, string type ) Called when the player leaves liquid. @param obj the Player object @param type type of liquid the player has left onLeaveMissionArea( Player obj ) Called when the player leaves the mission area. @param obj the Player object onStartSwim( Player obj ) Called when the player starts swimming. @param obj the Player object onStopSwim( Player obj ) Called when the player stops swimming. @param obj the Player object physicsPlayerType Specifies the type of physics used by the player. pickupRadius Radius around the player to collide with Items in the scene (on server). proneBoundingBox Collision bounding box used when the player is prone (laying down). @see boundingBox proneForce Force used to accelerate the player when prone (laying down). recoverDelay Number of ticks for the player to recover from falling. recoverRunForceScale Scale factor applied to runForce while in the recover state. This can be used to temporarily slow the player's movement after a fall. renderFirstPerson Flag controlling whether to render the player shape in first person view. runEnergyDrain Energy value drained each tick that the player is moving. The player will not be able to move when his energy falls below minRunEnergy. runForce Force used to accelerate the player when running. runSurfaceAngle Maximum angle from vertical in degrees the player can run up. Splash SplashData datablock used to create splashes when the player moves through water. splashAngle Maximum angle (in degrees) from pure vertical movement in water to generate splashes. splashEmitter Emitters used to generate splash particles. splashFreqMod Multipled by speed to determine the number of splash particles to generate. splashVelEpsilon Minimum speed to generate splash particles. splashVelocity Minimum velocity when moving through water to generate splashes. swimBoundingBox Collision bounding box used when the player is swimming. @see boundingBox swimForce Force used to accelerate the player when swimming. upMaxSpeed Maximum upwards speed. @note This limit is only enforced if the player's upward speed exceeds upResistSpeed. upResistFactor Factor of resistence once upResistSpeed has been reached. upResistSpeed Upwards speed at which resistence will take place. waterBreathSound Sound to play when in water and coverage equals 1.0 (fully underwater). Note that unlike FootUnderwaterSound, this sound plays even if the player is not moving around in the water. PlayerDataClass ConsoleClassObject PointLight LightBase radius Controls the falloff of the light emission PointLightClass ConsoleClassObject PopupMenu SimObject attachToMenuBar (GuiCanvas, pos, title) checkItem (pos, checked) checkRadioItem (firstPos, lastPos, checkPos) enableItem (pos, enabled) getItemCount () insertItem (pos[, title][, accelerator]) insertSubMenu (pos, title, subMenu) isItemChecked (pos) removeFromMenuBar () removeItem (pos) setItem (pos, title[, accelerator]) showPopup (Canvas,[x, y]) barTitle the title of this menu when attached to a menu bar isPopup true if this is a pop-up/context menu. defaults to false. PopupMenuClass ConsoleClassObject Portal Zone PortalClass ConsoleClassObject PostEffect SimGroup clearShaderMacros () Remove all shader macros. disable () Disables the effect. dumpShaderDisassembly () Dumps this PostEffect shader's disassembly to a temporary text file. @return Full path to the dumped file or an empty string if failed. enable () Enables the effect. getAspectRatio () @return Width over height of the backbuffer. isEnabled () @return True if the effect is enabled. reload () Reloads the effect shader and textures. removeShaderMacro ( string key ) Remove a shader macro. This will usually be called within the preProcess callback. @param key Macro to remove. setShaderConst ( string name, string value ) Sets the value of a uniform defined in the shader. This will usually be called within the setShaderConsts callback. Array type constants are not supported. @param name Name of the constanst, prefixed with '$'. @param value Value to set, space seperate values with more than one element. @tsexample function MyPfx::setShaderConsts( %this ) { // example float4 uniform %this.setShaderConst( "$colorMod", "1.0 0.9 1.0 1.0" ); // example float1 uniform %this.setShaderConst( "$strength", "3.0" ); // example integer uniform %this.setShaderConst( "$loops", "5" );} @endtsexample setShaderMacro ( string key, string value="" ) Adds a macro to the effect's shader or sets an existing one's value. This will usually be called within the onAdd or preProcess callback. @param key lval of the macro.@param value rval of the macro, or may be empty.@tsexample function MyPfx::onAdd( %this ) { %this.setShaderMacro( "NUM_SAMPLES", "10" ); %this.setShaderMacro( "HIGH_QUALITY_MODE" ); // In the shader looks like... // #define NUM_SAMPLES 10 // #define HIGH_QUALITY_MODE } @endtsexample toggle () Toggles the effect between enabled / disabled. @return True if effect is enabled. allowReflectPass Is this effect processed during reflection render passes. isEnabled Is the effect on. onAdd() Called when this object is first created and registered. onDisabled() Called when this effect becomes disabled. oneFrameOnly Allows you to turn on a PostEffect for only a single frame. onEnabled() Called when this effect becomes enabled. If the user returns false from this callback the effect will not be enabled. @return True to allow this effect to be enabled. onThisFrame Allows you to turn on a PostEffect for only a single frame. preProcess() Called when an effect is processed but before textures are bound. This allows the user to change texture related paramaters or macros at runtime. @tsexample function SSAOPostFx::preProcess( %this ) { if ( $SSAOPostFx::quality !$= %this.quality ) { %this.quality = mClamp( mRound( $SSAOPostFx::quality ), 0, 2 ); %this.setShaderMacro( "QUALITY", %this.quality ); } %this.targetScale = $SSAOPostFx::targetScale; } @endtsexample @see setShaderConst @see setShaderMacro renderBin Name of a renderBin, used if renderTime is PFXBeforeBin or PFXAfterBin. renderPriority PostEffects are processed in DESCENDING order of renderPriority if more than one has the same renderBin/Time. renderTime When to process this effect during the frame. setShaderConsts() Called immediate before processing this effect. This is the user's chance to set the value of shader uniforms (constants). @see setShaderConst shader Name of a GFXShaderData for this effect. skip Skip processing of this PostEffect and its children even if its parent is enabled. Parent and sibling PostEffects in the chain are still processed. stateBlock Name of a GFXStateBlockData for this effect. target String identifier of this effect's target texture. @see PFXTextureIdentifiers targetClear Describes when the target texture should be cleared. targetClearColor Color to which the target texture is cleared before rendering. targetFormat Format of the target texture, not applicable if writing to the backbuffer. targetScale If targetSize is zero this is used to set a relative size from the current target. targetSize If non-zero this is used as the absolute target size. texture Input textures to this effect ( samplers ). @see PFXTextureIdentifiers PostEffectClass ConsoleClassObject Precipitation GameBase modifyStorm ( float percentage=1.0f, float length=5.0f ) Adjusts the droplet count and overall length of the Precipitation effect. @tsexample // The percentage, from 0.0f to 1.0f, of the drops to display at once. %percentage = 0.5; // The length of time for the Precipitation effect to last. Will be multiplied by 1000 to get the milliseconds. %length = 5.0; // Set the percentage and time by calling the method. %Precipitation.modifyStorm(%percentage , %length); @endtsexample setPercentage ( float percentage=1.0f ) Sets how many drops are present at once. @tsexample // The percentage, from 0.0f to 1.0f, of the drops to display at once. %percentage = 0.5f; // Set the percentage by calling the method. %Precipitation.setPercentage(%percentage); @endtsexample setTurbulence ( float max=1.0f, float speed=5.0f, float seconds=5.0 ) This is used to smoothly change the turbulence over a desired time period. Setting ms to zero will cause the change to be instantaneous. Setting max zero will disable turbulence. @tsexample //Set the turbulence value. Set to 0 to disable turbulence. %turbulence = 0.5; // The speed of the turbulance effect. %speed = 5.0; // The length of time for the turbulence to last. Will be multiplied by 1000 to get the milliseconds. %seconds = 5.0; // Set the percentage and time by calling the method. %Precipitation.setTurbulence(%turbulence , %speed , %seconds); @endtsexample animateSplashes Check to enable splash animation on collision. boxHeight Height of precipitation box. boxWidth Width of precipitation box. doCollision Allow collision with world objects. dropAnimateMS If greater than zero, will animate the drops from the frames in the texture. dropSize Size of each drop of precipitation. This will scale the texture. fadeDist The distance at which fading of the drops begins. fadeDistEnd The distance at which fading of the particles ends. followCam Enables system to follow the camera or stay where it is placed. glowIntensity Set to 0 to disable the glow or or use it to control the intensity of each channel. hitPlayers Allow collision on player objects. hitVehicles Allow collision on vechiles. maxMass Maximum mass of a drop. maxSpeed Maximum speed that a drop will fall. maxTurbulence Radius at which precipitation drops spiral when turbulence is enabled. minMass Minimum mass of a drop. minSpeed Minimum speed that a drop will fall. numDrops Number of drops allowed to exists in the precipitation box at any one time. reflect This enables the precipitation to be rendered during reflection passes. This is expensive. rotateWithCamVel Enables drops to rotate to face camera. splashMS Life of splashes in millisecons. splashSize Size of each splash animation for when a drop collides. turbulenceSpeed Speed at which precipitation drops spiral when turbulence is enabled. useLighting Check to enable shading of the drops and splashes by the sun color. useTrueBillboards Check to make drops true (non axis-aligned) billboards. useTurbulence Check to enable turubulence. This causes precipitation drops to spiral while falling. useWind Check to have the Sky property windSpeed affect precipitation. PrecipitationClass ConsoleClassObject PrecipitationData GameBaseData dropShader The name of the shader used for raindrops. dropsPerSide How many drops are on a side of the raindrop texture. dropTexture Texture filename for drop particles. soundProfile SFXProfile effect to play. splashesPerSide How many splash are on a side of the splash texture. splashShader The name of the shader used for raindrops. splashTexture Texture filename for splash particles. PrecipitationDataClass ConsoleClassObject Prefab SceneObject fileName (.prefab) File describing objects within this prefab. onLoad( SimGroup children ) Called when the prefab file is loaded and children objects are created. @param children SimGroup containing all children objects. PrefabClass ConsoleClassObject Projectile GameBase presimulate ( float seconds=1.0f ) Updates velocity and position, and performs collision testing. @param seconds Amount of time, in seconds, since the simulation began, to start the simulation at. @tsexample // Tell the projectile object to process a simulation event, and provide the amount of time in seconds that has passed since the simulation began. %seconds = 2000; %projectile.presimulate(%seconds); @endtsexample initialPosition Initial starting position for this projectile. InitialVelocity Initial starting velocity for this projectile. sourceObject The object that fires this projectile. If this projectile was fired by a WeaponImage, it will be the object that owns the WeaponImage, usually the player. sourceSlot Which weapon slot on the sourceObject that this projectile originates from. ProjectileClass ConsoleClassObject ProjectileData GameBaseData armingDelay The time in milliseconds before the projectile is armed and will cause damage or explode on impact. bounceElasticity float bounceElasticity bounceFriction float bounceFriction decal DecalData decal Explosion ExplosionData Explosion fadeDelay The time in milliseconds when the projectile begins to fade out. Must be less than the lifetime to have an effect. gravityMod float gravityMod impactForce float impactForce isBallistic bool isBallistic Lifetime The time in milliseconds before the projectile is removed from the simulation. lightDesc LightDescription lightDesc muzzleVelocity float muzzleVelocity onCollision( Projectile proj, SceneObject col, float fade, Point3F pos, Point3F normal ) Called when a projectile collides with another object. @param proj The projectile colliding. @param col The object hit by the projectile. @param fade The current fadeValue of the projectile, affects its visibility. @param pos The collision position. @param normal The collision normal. @see Projectile, ProjectileData onExplode( Projectile proj, Point3F pos, float fade ) Called when a projectile explodes. @param proj The projectile exploding. @param pos The position of the explosion. @param fade The currently fadeValue of the projectile, affects its visibility. @see Projectile, ProjectileData ParticleEmitter ParticleEmitterData ParticleEmitter particleWaterEmitter ParticleEmitterData particleWaterEmitter projectileShapeName filename projectileShapeName scale Point3F scale sound SFXTrack sound Splash SplashData Splash velInheritFactor float velInheritFactor waterExplosion ExplosionData waterExplosion ProjectileDataClass ConsoleClassObject RadialImpulseEvent send ( string inPosition="1.0 1.0 1.0", float radius=10.0f, float magnitude=20.0f ) Apply a radial impulse to any SceneObjects in the area of effect. This event is performed server-side AND client-side. @param position Center point for this radial impulse. @param radius Distance from the position for this radial impulse to affect. @param magnitude The force applied to objects within the radius from the position of this radial impulse effect. @tsexample // Define the Position %position = "10.0 15.0 10.0"; // Define the Radius %radius = "25.0"; // Define the Magnitude %magnitude = "30.0" // Create a globalRadialImpulse physics effect. RadialImpulseEvent::send(%position,%radius,%magnitude); @endtsexample RadialImpulseEventClass ConsoleClassObject ReflectorDesc SimDataBlock detailAdjust Scale applied to lod calculation of objects rendering into this reflection ( modulates $pref::TS::detailAdjust ). farDist Far plane distance to use when rendering reflections. maxRateMs If less than maxRateMs has elapsed since this relfection was last updated, then do not update it again. This 'skip' can be disabled by setting maxRateMs to zero. nearDist Near plane distance to use when rendering this reflection. Adjust this to limit self-occlusion artifacts. objectTypeMask Object types which render into this reflection. priority Priority for updating this reflection, relative to others. texSize Size in pixels of the (square) reflection texture. For a cubemap this value is interpreted as size of each face. useOcclusionQuery If available on the device use HOQs to determine if the reflective object is visible before updating its reflection. ReflectorDescClass ConsoleClassObject RemoteCommandEvent RemoteCommandEventClass ConsoleClassObject RenderBinManager SimObject getBinType () Returns the bin type string. binType Sets the render bin type which limits what render instances are added to this bin. processAddOrder Defines the order for adding instances in relation to other bins. renderOrder Defines the order for rendering in relation to other bins. RenderBinManagerClass ConsoleClassObject RenderClothExample SceneObject clearShowVerts postApply setShowVerts updateMaterial ClothAttachmentResponseCoefficient float ClothAttachmentResponseCoefficient ClothAttachmentTearFactor float ClothAttachmentTearFactor ClothBending bool ClothBending ClothBendingStiffness float ClothBendingStiffness ClothCollisionResponseCoefficient float ClothCollisionResponseCoefficient ClothCollisionTwoWay bool ClothCollisionTwoWay ClothDamping bool ClothDamping ClothDampingCoefficient float ClothDampingCoefficient ClothDensity float ClothDensity ClothDisableCollision bool ClothDisableCollision ClothFriction float ClothFriction ClothFromFluidResponseCoefficient float ClothFromFluidResponseCoefficient ClothGravity bool ClothGravity ClothMinAdhereVelocity float ClothMinAdhereVelocity ClothPressure float ClothPressure ClothRelativeGridSpacing float ClothRelativeGridSpacing ClothSleepLinearVelocity float ClothSleepLinearVelocity ClothSolverIterations int ClothSolverIterations ClothStatic bool ClothStatic ClothStretchingStiffness float ClothStretchingStiffness ClothTearFactor float ClothTearFactor ClothThickness float ClothThickness ClothToFluidResponseCoefficient float ClothToFluidResponseCoefficient ClothVisualization bool ClothVisualization ClothWakeUpCounter float ClothWakeUpCounter height float height LockBottom bool LockBottom LockLeft bool LockLeft LockLowerLeft bool LockLowerLeft LockLowerRight bool LockLowerRight LockRight bool LockRight LockTop bool LockTop LockUpperLeft bool LockUpperLeft LockUpperRight bool LockUpperRight Material string Material NumParticlesX int NumParticlesX NumParticlesY int NumParticlesY Width float Width RenderClothExampleClass ConsoleClassObject RenderFormatToken RenderPassStateToken aaLevel Anti-ailiasing level for the this token. 0 disables, -1 uses adapter default. copyEffect This PostEffect will be run when the render target is changed to the format specified by this token. It is used to copy/format data into the token rendertarget depthFormat Sets the depth/stencil buffer format for this token. format Sets the color buffer format for this token. resolveEffect This PostEffect will be run when the render target is changed back to the format active prior to this token. It is used to copy/format data from the token rendertarget to the backbuffer. RenderFormatTokenClass ConsoleClassObject RenderGlowMgr RenderTexTargetBinManager RenderGlowMgrClass ConsoleClassObject RenderImposterMgr RenderBinManager RenderImposterMgrClass ConsoleClassObject RenderMeshExample SceneObject postApply () A utility method for forcing a network update. Material The name of the material used to render the mesh. RenderMeshExampleClass ConsoleClassObject RenderMeshMgr RenderBinManager RenderMeshMgrClass ConsoleClassObject RenderObjectExample SceneObject RenderObjectExampleClass ConsoleClassObject RenderObjectMgr RenderBinManager RenderObjectMgrClass ConsoleClassObject RenderOcclusionMgr RenderBinManager RenderOcclusionMgrClass ConsoleClassObject RenderParticleMgr RenderTexTargetBinManager RenderParticleMgrClass ConsoleClassObject RenderPassManager SimObject addManager ( RenderBinManager renderBin ) Add as a render bin manager to the pass. getManager ( int index ) Returns the render bin manager at the index or null if the index is out of range. getManagerCount () Returns the total number of bin managers. removeManager ( RenderBinManager renderBin ) Removes a render bin manager. RenderPassManagerClass ConsoleClassObject RenderPassStateBin RenderBinManager stateToken RenderPassStateToken stateToken RenderPassStateBinClass ConsoleClassObject RenderPassStateToken SimObject disable () @brief Disables the token. enable () @brief Enables the token. toggle () @brief Toggles the token from enabled to disabled or vice versa. enabled Enables or disables this token. RenderPassStateTokenClass ConsoleClassObject RenderPrePassMgr RenderTexTargetBinManager RenderPrePassMgrClass ConsoleClassObject RenderShapeExample SceneObject shapeFile The path to the DTS shape file. RenderShapeExampleClass ConsoleClassObject RenderTerrainMgr RenderBinManager RenderTerrainMgrClass ConsoleClassObject RenderTexTargetBinManager RenderBinManager RenderTexTargetBinManagerClass ConsoleClassObject RenderTranslucentMgr RenderBinManager RenderTranslucentMgrClass ConsoleClassObject RigidShape ShapeBase freezeSim ( bool isFrozen ) @brief Enables or disables the physics simulation on the RigidShape object. @param isFrozen Boolean frozen state to set the object. @tsexample // Define the frozen state. %isFrozen = "true"; // Inform the object of the defined frozen state %thisRigidShape.freezeSim(%isFrozen); @endtsexample @see ShapeBaseData reset () @brief Clears physic forces from the shape and sets it at rest. @tsexample // Inform the RigidShape object to reset. %thisRigidShape.reset(); @endtsexample @see ShapeBaseData onEnterLiquid( string objId, string waterCoverage, string liquidType ) @brief Called whenever this RigidShape object enters liquid. @param objId The ID of the rigidShape object. @param waterCoverage Amount of water coverage the RigidShape has. @param liquidType Type of liquid that was entered. @tsexample // The RigidShape object falls in a body of liquid, causing the callback to occur. RigidShape::onEnterLiquid(%this,%objId,%waterCoverage,%liquidType) ^{ ^^// Code to run whenever this callback occurs. ^} @endtsexample @see ShapeBase onLeaveLiquid( string objId, string liquidType ) @brief Called whenever the RigidShape object exits liquid. @param objId The ID of the RigidShape object. @param liquidType Type if liquid that was exited. @tsexample // The RigidShape object exits in a body of liquid, causing the callback to occur. RigidShape::onLeaveLiquid(%this,%objId,%liquidType) ^{ ^^// Code to run whenever this callback occurs. ^} @endtsexample @see ShapeBase RigidShapeClass ConsoleClassObject RigidShapeData ShapeBaseData bodyFriction How much friction this object has. Lower values will cause the object to appear to be more slippery. bodyRestitution The percentage of kinetic energy kept by this object in a collision. cameraDecay Scalar rate at which the third person camera offset decays, per tick. cameraLag Scalar amount by which the third person camera lags the object, relative to the object's linear velocity. cameraOffset The vertical offset of the object's camera. cameraRoll Specifies whether the camera's rotation matrix, and the render eye transform are multiplied during camera updates. collisionTol Collision distance tolerance. contactTol Contact velocity tolerance. dragForce Used to simulate the constant drag acting on the object dustEmitter Array of pointers to ParticleEmitterData datablocks which will be used to emit particles at object/terrain contact point. dustHeight Height of dust effects. dustTrailEmitter Particle emitter used to create a dust trail for the moving object. exitingWater The AudioProfile will be used to produce sounds when emerging from water. exitSplashSoundVelocity The minimum velocity at which the exit splash sound will be played when emerging from water. hardImpactSound Sound to play when body impacts with at least hardImpactSpeed. hardImpactSpeed Minimum speed at which the object must be travelling for the hard impact sound to be played. hardSplashSoundVelocity The minimum velocity at which the hard splash sound will be played when impacting water. impactWaterEasy The AudioProfile will be used to produce sounds when a soft impact with water occurs. impactWaterHard The AudioProfile will be used to produce sounds when a hard impact with water occurs. impactWaterMedium The AudioProfile will be used to produce sounds when a medium impact with water occurs. integration Number of physics steps to process per tick. massBox Size of inertial box. massCenter Center of mass for rigid body. maxDrag Maximum drag available to this object. mediumSplashSoundVelocity The minimum velocity at which the medium splash sound will be played when impacting water. minDrag Minimum drag available to this object. minImpactSpeed Minimum collision speed to classify collision as impact (triggers onImpact on server object). minRollSpeed float minRollSpeed softImpactSound Sound to play when body impacts with at least softImageSpeed but less than hardImpactSpeed. softImpactSpeed Minimum speed at which this object must be travelling for the soft impact sound to be played. softSplashSoundVelocity The minimum velocity at which the soft splash sound will be played when impacting water. splashEmitter Array of pointers to ParticleEmitterData datablocks which will generate splash effects. splashFreqMod The simulated frequency modulation of a splash generated by this object. Multiplied along with speed and time elapsed when determining splash emition rate. splashVelEpsilon The threshold speed at which we consider the object's movement to have stopped when updating splash effects. triggerDustHeight Maximum height from the ground at which the object will generate dust. vertFactor The scalar applied to the vertical portion of the velocity drag acting on a object. waterWakeSound The AudioProfile will be used to produce sounds when a water wake is displayed. RigidShapeDataClass ConsoleClassObject River WaterObject regenerate () Intended as a helper to developers and editor scripts. Force River to recreate its geometry. setBatchSize ( float meters ) Intended as a helper to developers and editor scripts. BatchSize is not currently used. setMaxDivisionSize ( float meters ) Intended as a helper to developers and editor scripts. @see SubdivideLength field. setMetersPerSegment ( float meters ) Intended as a helper to developers and editor scripts. @see SegmentLength field. setNodeDepth ( int idx, float meters ) Intended as a helper to developers and editor scripts. Sets the depth in meters of a particular node. FlowMagnitude Magnitude of the force vector applied to dynamic objects within the River. LowLODDistance Segments of the river at this distance in meters or greater will render as a single unsubdivided without undulation effects. Node For internal use, do not modify. SegmentLength Divide the River lengthwise into segments of this length in meters. These geometric volumes are used for spacial queries like determining containment. SubdivideLength For purposes of generating the renderable geometry River segments are further subdivided such that no quad is of greater width or length than this distance in meters. RiverClass ConsoleClassObject RootGroup SimGroup SaveFileDialog FileDialog OverwritePrompt True/False whether the dialog should prompt before accepting an existing file name SaveFileDialogClass ConsoleClassObject ScatterSky SceneObject applyChanges () Apply a full network update of all fields to all clients. ambientScale Modulates the ambient color of sunlight. attenuationRatio The proportions of constant, linear, and quadratic attenuation to use for the falloff for point and spot lights. azimuth The horizontal angle of the sun measured clockwise from the positive Y world axis. This field is networked. brightness The brightness of the ScatterSky's light object. castShadows Enables/disables shadows cast by objects due to ScatterSky light. cookie A custom pattern texture which is projected from the light. elevation The elevation angle of the sun above or below the horizon. This field is networked. exposure Controls the contrast of the sky and sun during daytime. fadeStartDistance Start fading shadows out at this distance. 0 = auto calculate this distance. flareScale Changes the size and intensity of the flare. flareType Datablock for the flare produced by the ScatterSky. fogScale Modulates the fog color. Note that this overrides the LevelInfo.fogColor property, so you should not use LevelInfo.fogColor if the level contains a ScatterSky object. includeLightmappedGeometryInShadow This light should render lightmapped geometry during its shadow-map update (ignored if 'representedInLightmap' is false) lastSplitTerrainOnly This toggles only terrain being rendered to the last split of a PSSM shadow map. logWeight The logrithmic PSSM split distance factor. mieScattering Affects the size and intensity of light scattering around the sun. moonAzimuth The horizontal angle of the moon measured clockwise from the positive Y world axis. This is not animated by time or networked. moonElevation The elevation angle of the moon above or below the horizon. This is not animated by time or networked. moonEnabled Enable or disable rendering of the moon sprite during night. moonLightColor Color of light cast by the directional light during night. moonMat Material for the moon sprite. moonScale Controls size the moon sprite renders, specified as a fractional amount of the screen height. nightColor The ambient color during night. Also used for the sky color if useNightCubemap is false. nightCubemap Cubemap visible during night. nightFogColor The fog color during night. numSplits The logrithmic PSSM split distance factor. overDarkFactor The ESM shadow darkening factor rayleighScattering Controls how blue the atmosphere is during the day. representedInLightmap This light is represented in lightmaps (static light, default: false) shadowDarkenColor The color that should be used to multiply-blend dynamic shadows onto lightmapped geometry (ignored if 'representedInLightmap' is false) shadowDistance The distance from the camera to extend the PSSM shadow. shadowSoftness float shadowSoftness shadowType The type of shadow to use on this light. skyBrightness Global brightness and intensity applied to the sky and objects in the level. sunScale Modulates the directional color of sunlight. texSize The texture size of the shadow map. useNightCubemap Transition to the nightCubemap during night. If false we use nightColor. ScatterSkyClass ConsoleClassObject SceneObject NetObject getEulerRotation () Get Euler rotation of object. @return the orientation of the object in the form of rotations around the X, Y and Z axes in degrees. getForwardVector () Get the direction this object is facing. @return a vector indicating the direction this object is facing. @note This is the object's y axis. getMountedObject ( int slot ) Get the object mounted at a particular slot. @param slot mount slot index to query @return ID of the object mounted in the slot, or 0 if no object. getMountedObjectCount () Get the number of objects mounted to us. @return the number of mounted objects. getMountedObjectNode ( int slot ) Get the mount node index of the object mounted at a particular slot. @param slot mount slot index to query @return index of the mount node used by the object mounted in this slot. getMountNodeObject ( int node ) Get the object mounted at a particular node. @param node mount node to query @return ID of the first object mounted at the node, or 0 if none found. getObjectBox () Get the object's bounding box (relative to the object's origin). @return six fields, two Point3Fs, containing the min and max points of the objectbox. getObjectMount () Get the object we are mounted to. @return the SceneObject ID of the object we're mounted to, or 0 if not mounted. getPosition () Get the object's world position. @return the current world position of the object getRightVector () Get the right vector of the object. @return a vector indicating the right direction of this object.@note This is the object's x axis. getScale () Get the object's scale. @return object scale as a Point3F getTransform () Get the object's transform. @return the current transform of the object getUpVector () Get the up vector of the object. @return a vector indicating the up direction of this object.@note This is the object's z axis. getWorldBox () Get the object's world bounding box. @return six fields, two Point3Fs, containing the min and max points of the worldbox. getWorldBoxCenter () Get the center of the object's world bounding box. @return the center of the world bounding box for this object. isGlobalBounds () Check if this object has a global bounds set. If global bounds are set to be true, then the object is assumed to have an infinitely large bounding box for collision and rendering purposes. @return true if the object has a global bounds. isMounted () Check if we are mounted to another object. @return true if mounted to another object, false if not mounted. mountObject ( SceneObject objB, int slot, TransformF txfm=MatrixF::Identity ) Mount objB to this object at the desired slot with optional transform. @param objB Object to mount onto us @param slot Mount slot ID @param txfm (optional) mount offset transform @return true if successful, false if failed (objB is not valid) setScale ( Point3F scale ) Set the object's scale. @param scale object scale to set setTransform ( TransformF txfm ) Set the object's transform (orientation and position).@param txfm object transform to set unmount () Unmount from the currently mounted object if any. unmountObject ( SceneObject target ) Unmount an object from ourselves. @param target object to unmount @return true if successful, false if failed isRenderEnabled Disables rendering on this instance. @see isRenderable isSelectionEnabled Disables editor selection of this instance. @see isSelectable mountNode Node we are mounted to. mountPID PersistentID of object we are mounted to. mountPos Position we are mounted at ( object space of our mount object ). mountRot Rotation we are mounted at ( object space of our mount object ). position Object world position. rotation Object world orientation. scale Object world scale. SceneObjectClass ConsoleClassObject ScopeAlwaysShape StaticShape ScopeAlwaysShapeClass ConsoleClassObject ScriptGroup SimGroup onAdd( SimObjectId ID ) Called when this ScriptGroup is added to the system. @param ID Unique object ID assigned when created (%this in script). onRemove( SimObjectId ID ) Called when this ScriptObject is removed from the system. @param ID Unique object ID assigned when created (%this in script). ScriptGroupClass ConsoleClassObject ScriptMsgListener SimObject onAdd() Script callback when a listener is first created and registered. @tsexample function ScriptMsgListener::onAdd(%this) { ^// Perform on add code here } @endtsexample onAddToQueue( string queue ) @brief Callback for when the listener is added to a queue The default implementation of onAddToQueue() and onRemoveFromQueue() provide tracking of the queues this listener is added to through the mQueues member. Overrides of onAddToQueue() or onRemoveFromQueue() should ensure they call the parent implementation in any overrides. @param queue The name of the queue that the listener added to @see onRemoveFromQueue() onMessageObjectReceived( string queue, Message msg ) Called when a message object (not just the message data) is passed to a listener. @param queue The name of the queue the message was dispatched to @param msg The message object @return false to prevent other listeners receiving this message, true otherwise @see Message @see onMessageReceived onMessageReceived( string queue, string event, string data ) Called when the listener has received a message. @param queue The name of the queue the message was dispatched to @param event The name of the event (function) that was triggered @param data The data (parameters) for the message @return false to prevent other listeners receiving this message, true otherwise onRemove() Script callback when a listener is deleted. @tsexample function ScriptMsgListener::onRemove(%this) { ^// Perform on remove code here } @endtsexample onRemoveFromQueue( string queue ) @brief Callback for when the listener is removed from a queue The default implementation of onAddToQueue() and onRemoveFromQueue() provide tracking of the queues this listener is added to through the mQueues member. Overrides of onAddToQueue() or onRemoveFromQueue() should ensure they call the parent implementation in any overrides. @param queue The name of the queue that the listener was removed from @see onAddToQueue() ScriptMsgListenerClass ConsoleClassObject ScriptObject SimObject onAdd( SimObjectId ID ) Called when this ScriptObject is added to the system. @param ID Unique object ID assigned when created (%this in script). onRemove( SimObjectId ID ) Called when this ScriptObject is removed from the system. @param ID Unique object ID assigned when created (%this in script). ScriptObjectClass ConsoleClassObject SetMissionCRCEvent SetMissionCRCEventClass ConsoleClassObject Settings SimObject beginGroup settingObj.beginGroup(groupName, fromStart = false); clearGroups settingObj.clearGroups(); endGroup settingObj.endGroup(); findFirstValue settingObj.findFirstValue(); findNextValue settingObj.findNextValue(); getCurrentGroups settingObj.getCurrentGroups(); read %success = settingObj.read(); remove settingObj.remove(settingName, includeDefaults = false); setDefaultValue settingObj.setDefaultValue(settingName, value); setValue settingObj.setValue(settingName, value); value settingObj.value(settingName, defaultValue); write %success = settingObj.write(); file The file path and name to be saved to and loaded from. SettingsClass ConsoleClassObject SFXAmbience SimDataBlock dopplerFactor The factor to apply to the doppler affect in this space. Defaults to 0.5. @ref SFXSource_doppler environment Reverb environment active in the ambience zone. @ref SFX_reverb rolloffFactor The rolloff factor to apply to distance-based volume attenuation in this space. Defaults to 1.0. @note This applies to the logarithmic distance model only. @ref SFXSource_volume soundTrack Sound track to play in the ambience zone. states States to activate when the ambient zone is entered. When the ambient sound state is entered, all states associated with the state will be activated (given that they are not disabled) and deactivated when the space is exited again. SFXAmbienceClass ConsoleClassObject SFXAmbienceSet SimSet SFXController SFXSource getCurrentSlot () Get the index of the playlist slot currently processed by the controller. @return The slot index currently being played. @see SFXPlayList setCurrentSlot ( int index ) Set the index of the playlist slot to play by the controller. This can be used to seek in the playlist. @param index Index of the playlist slot. trace If true, the controller logs its operation to the console. This is a non-networked field that will work locally only. SFXControllerClass ConsoleClassObject SFXDescription SimDataBlock coneInsideAngle Inner sound cone angle in degrees. This value determines the angle of the inner volume cone that protrudes out in the direction of a sound. Within this cone, the sound source retains full volume that is unaffected by sound cone settings (though still affected by distance attenuation.) Valid values are from 0 to 360. Must be less than coneOutsideAngle. Default is 360. Only for 3D sounds. @ref SFXSource_cones coneOutsideAngle Outer sound cone angle in degrees. This value determines the angle of the outer volume cone that protrudes out in the direction of a sound and surrounds the inner volume cone. Within this cone, volume will linearly interpolate from the outer cone hull inwards to the inner coner hull starting with the base volume scaled by coneOutsideVolume and ramping up/down to the full base volume. Valid values are from 0 to 360. Must be >= coneInsideAngle. Default is 360. Only for 3D sounds. @ref SFXSource_cones coneOutsideVolume Determines the volume scale factor applied the a source's base volume level outside of the outer cone. In the outer cone, starting from outside the inner cone, the scale factor smoothly interpolates from 1.0 (within the inner cone) to this value. At the moment, the allowed range is 0.0 (silence) to 1.0 (no attenuation) as amplification is only supported on XAudio2 but not on the other devices. Only for 3D sound. @ref SFXSource_cones fadeInEase Easing curve for fade-in transition. Volume fade-ins will interpolate volume along this curve. @ref SFXSource_fades fadeInTime Number of seconds to gradually fade in volume from zero when playback starts. Must be >= 0. @ref SFXSource_fades fadeLoops Fade each cycle of a loop in and/or out; otherwise only fade-in first cycle. By default, volume fading is applied to the beginning and end of the playback range, i.e. a fade-in segment is placed at the beginning of the sound and a fade-out segment is paced at the end of a sound. However, when looping playback, this may be undesirable as each iteration of the sound will then have a fade-in and fade-out effect. To set up looping sounds such that a fade-in is applied only when the sound is first started (or playback resumed) and a fade-out is only applied when the sound is explicitly paused or stopped, set this field to true. Default is false. @ref SFXSource_fades fadeOutEase Easing curve for fade-out transition. Volume fade-outs will interpolate volume along this curve. @ref SFXSource_fades fadeOutTime Number of seconds to gradually fade out volume down to zero when playback is stopped or paused. Must be >=0. @ref SFXSource_fades is3D If true, sounds played with this description will have a position and orientation in space. Unlike a non-positional sound, a 3D sound will have its volume attenuated depending on the distance to the listener in space. The farther the sound moves away from the listener, the less audible it will be. Non-positional sounds, in contrast, will remain at their original volume regardless of where the listener is. @note Whether a sound is positional or non-positional cannot be changed once the sound was created so this field determines up front which is the case for a given sound. @ref SFX_3d @ref SFXSource_volume isLooping If true, the sound will be played in an endless loop. Default is false. isStreaming If true, incrementally stream sounds; otherwise sounds are loaded in full. @ref SFX_streaming maxDistance The distance at which attenuation stops. In the linear distance model, the attenuated volume will be zero at this distance. In the logarithmic model, attenuation will simply stop at this distance and the sound will keep its attenuated volume from there on out. As such, it primarily functions as a cutoff factor to exponential distance attentuation to limit the number of voices relevant to updates. Only applies to 3D sounds. @see LevelInfo::soundDistanceModel @ref SFX_3d @ref SFXSource_volume parameters Names of the parameters to which sources using this description will automatically be linked. Individual parameters are identified by their #internalName. @ref SFX_interactive pitch Pitch shift to apply to playback. The pitch assigned to a sound determines the speed at which it is played back. A pitch shift of 1 plays the sound at its default speed. A greater shift factor speeds up playback and a smaller shift factor slows it down. Must be >0. Default is 1. priority Priority level for virtualization of sounds (1 = base level). When there are more concurrently active sounds than supported by the audio mixer, some of the sounds need to be culled. Which sounds are culled first depends primarily on total audibility of individual sounds. However, the priority of invidual sounds may be decreased or decreased through this field. @ref SFXSound_virtualization referenceDistance Distance at which volume attenuation begins. Up to this distance, the sound retains its base volume. In the linear distance model, the volume will linearly from this distance onwards up to maxDistance where it reaches zero. In the logarithmic distance model, the reference distance determine how fast the sound volume decreases with distance. Each referenceDistance steps (scaled by the rolloff factor), the volume halves. A rule of thumb is that for sounds that require you to be close to hear them in the real world, set the reference distance to small values whereas for sounds that are widely audible set it to larger values. Only applies to 3D sounds. @see LevelInfo::soundDistanceModel @ref SFX_3d @ref SFXSource_volume reverbAirAbsorptionFactor Multiplies SFXEnvironment::airAbsorptionHR. @note SUPPORTED: EAX Only @see http://www.atc.creative.com/algorithms/eax20.pdf reverbDirect Direct path level (at low and mid frequencies). @note SUPPORTED: EAX/I3DL2/FMODSFX @see http://www.atc.creative.com/algorithms/eax20.pdf reverbDirectHF Relative direct path level at high frequencies. @note SUPPORTED: EAX/I3DL2 @see http://www.atc.creative.com/algorithms/eax20.pdf reverbDopplerFactor Per-source doppler factor. @note SUPPORTED: EAX Only @see http://www.atc.creative.com/algorithms/eax20.pdf reverbExclusion Main exclusion control (attenuation at high frequencies). @note SUPPORTED: EAX Only @see http://www.atc.creative.com/algorithms/eax20.pdf reverbExclusionLFRatio Exclusion low-frequency level re. main control. @note SUPPORTED: EAX Only @see http://www.atc.creative.com/algorithms/eax20.pdf reverbFlags Bitfield combination of per-sound reverb flags. @see REVERB_DIRECTHFAUTO @see REVERB_ROOMAUTO @see REVERB_ROOMHFAUTO @see REVERB_INSTANCE0 @see REVERB_INSTANCE1 @see REVERB_INSTANCE2 @see REVERB_INSTANCE3 reverbObstruction Main obstruction control (attenuation at high frequencies). @note SUPPORTED: EAX/I3DL2 @see http://www.atc.creative.com/algorithms/eax20.pdf reverbObstructionLFRatio Obstruction low-frequency level re. main control. @note SUPPORTED: EAX/I3DL2 @see http://www.atc.creative.com/algorithms/eax20.pdf reverbOcclusion Main occlusion control (attenuation at high frequencies).@note SUPPORTED: EAX/I3DL2 @see http://www.atc.creative.com/algorithms/eax20.pdf reverbOcclusionDirectRatio Relative occlusion control for direct path. @note SUPPORTED: EAX Only @see http://www.atc.creative.com/algorithms/eax20.pdf reverbOcclusionLFRatio Occlusion low-frequency level re. main control. @note SUPPORTED: EAX/I3DL2 @see http://www.atc.creative.com/algorithms/eax20.pdf reverbOcclusionRoomRatio Relative occlusion control for room effect. @note SUPPORTED: EAX Only @see http://www.atc.creative.com/algorithms/eax20.pdf reverbOutsideVolumeHF Outside sound cone level at high frequencies. @note SUPPORTED: EAX Only @see http://www.atc.creative.com/algorithms/eax20.pdf reverbReverbRolloffFactor Per-source logarithmic falloff factor. @note SUPPORTED: EAX Only @see http://www.atc.creative.com/algorithms/eax20.pdf reverbRoom Room effect level (at low and mid frequencies). @note SUPPORTED: EAX/I3DL2/FMODSFX @see http://www.atc.creative.com/algorithms/eax20.pdf reverbRoomHF Relative room effect level at high frequencies. @note SUPPORTED: EAX/I3DL2 @see http://www.atc.creative.com/algorithms/eax20.pdf reverbRoomRolloffFactor Room effect falloff factor. @note SUPPORTED: EAX/I3DL2 @see http://www.atc.creative.com/algorithms/eax20.pdf rolloffFactor Scale factor to apply to logarithmic distance attenuation curve. If -1, the global rolloff setting is used. @note Per-sound rolloff is only supported on OpenAL and FMOD at the moment. With other divices, the global rolloff setting is used for all sounds. @see LevelInfo::soundDistanceModel scatterDistance Bounds on random displacement of 3D sound positions. When a 3D sound is created and given its initial position in space, this field is used to determine the amount of randomization applied to the actual position given to the sound system. The randomization uses the following scheme:@verbatim x += rand( - scatterDistance[ 0 ], scatterDistance[ 0 ] ); y += rand( - scatterDistance[ 1 ], scatterDistance[ 1 ] ); z += rand( - scatterDistance[ 2 ], scatterDistance[ 2 ] ); @endverbatim sourceGroup Group that sources playing with this description should be put into. When a sound source is allocated, it will be made a child of the source group that is listed in its description. This group will then modulate several properties of the sound as it is played. For example, one use of groups is to segregate sounds so that volume levels of different sound groups such as interface audio and game audio can be controlled independently. @ref SFXSource_hierarchies streamPacketSize Number of seconds of sample data per single streaming packet. This field allows to fine-tune streaming for individual sounds. The streaming system processes streamed sounds in batches called packets. Each packet will contain a set amount of sample data determined by this field. The greater its value, the more sample data each packet contains, the more work is done per packet. @note This field only takes effect when Torque's own sound system performs the streaming. When FMOD is used, this field is ignored and streaming is performed by FMOD. @ref SFX_streaming streamReadAhead Number of sample packets to read and buffer in advance. This field determines the number of packets that the streaming system will try to keep buffered in advance. As such it determines the number of packets that can be consumed by the sound device before the playback queue is running dry. Greater values thus allow for more lag in the streaming pipeline. @note This field only takes effect when Torque's own sound system performs the streaming. When FMOD is used, this field is ignored and streaming is performed by FMOD. @ref SFX_streaming useCustomReverb If true, use the reverb properties defined here on sounds. By default, sounds will be assigned a generic reverb profile. By setting this flag to true, a custom reverb setup can be defined using the "Reverb" properties that will then be assigned to sounds playing with the description. @ref SFX_reverb useHardware Whether the sound is allowed to be mixed in hardware. If true, the sound system will try to allocate the voice for the sound directly on the sound hardware for mixing by the hardware mixer. Be aware that a hardware mixer may not provide all features available to sounds mixed in software. @note This flag currently only takes effect when using FMOD. @note Generally, it is preferable to let sounds be mixed in software. volume Base volume level for the sound. This will be the starting point for volume attenuation on the sound. The final effective volume of a sound will be dependent on a number of parameters. Must be between 0 (mute) and 1 (full volume). Default is 1. @ref SFXSource_volume SFXDescriptionClass ConsoleClassObject SFXDescriptionSet SimSet SFXEmitter SceneObject getSource () Get the sound source object from the emitter. @return The sound source used by the emitter or null.@note This method will return null when called on the server-side SFXEmitter object. Only client-side ghosts actually hold on to %SFXSources. play () Manually start playback of the emitter's sound. If this is called on the server-side object, the play command will be related to all client-side ghosts. stop () Manually stop playback of the emitter's sound. If this is called on the server-side object, the stop command will be related to all client-side ghosts. coneInsideAngle Angle of inner volume cone of 3D sound in degrees. @note This field is ignored if #useTrackDescriptionOnly is true. @see SFXDescription::coneInsideAngle coneOutsideAngle Angle of outer volume cone of 3D sound in degrees @note This field is ignored if #useTrackDescriptionOnly is true. @see SFXDescription::coneOutsideAngle coneOutsideVolume Volume scale factor of outside of outer volume 3D sound cone. @note This field is ignored if #useTrackDescriptionOnly is true. @see SFXDescription::coneOutsideVolume fadeInTime Number of seconds to gradually fade in volume from zero when playback starts. @note This field is ignored if #useTrackDescriptionOnly is true. @see SFXDescription::fadeInTime fadeOutTime Number of seconds to gradually fade out volume down to zero when playback is stopped or paused. @note This field is ignored if #useTrackDescriptionOnly is true. @see SFXDescription::fadeOutTime fileName The sound file to play. Use @b either this property @b or #track. If both are assigned, #track takes precendence. The primary purpose of this field is to avoid the need for the user to define SFXTrack datablocks for all sounds used in a level. is3D Whether to play #fileName as a positional (3D) sound or not. If a #track is assigned, the value of this field is ignored. @see SFXDescription::is3D isLooping Whether to play #fileName in an infinite loop. If a #track is assigned, the value of this field is ignored. @see SFXDescription::isLooping isStreaming Whether to use streamed playback for #fileName. If a #track is assigned, the value of this field is ignored. @see SFXDescription::isStreaming @ref SFX_streaming maxDistance Distance at which to stop volume attenuation of the 3D sound. @note This field is ignored if #useTrackDescriptionOnly is true. @see SFXDescription::maxDistance pitch Pitch shift to apply to the sound. Default is 1 = play at normal speed. @note This field is ignored if #useTrackDescriptionOnly is true. @see SFXDescription::pitch playOnAdd Whether playback of the emitter's sound should start as soon as the emitter object is added to the level. If this is true, the emitter will immediately start to play when the level is loaded. referenceDistance Distance at which to start volume attenuation of the 3D sound. @note This field is ignored if #useTrackDescriptionOnly is true. @see SFXDescription::referenceDistance scatterDistance Bounds on random offset to apply to initial 3D sound position. @note This field is ignored if #useTrackDescriptionOnly is true. @see SFXDescription::scatterDistance sourceGroup The SFXSource to which to assign the sound of this emitter as a child. @note This field is ignored if #useTrackDescriptionOnly is true. @see SFXDescription::sourceGroup track The track which the emitter should play. @note If assigned, this field will take precedence over a #fileName that may also be assigned to the emitter. useTrackDescriptionOnly If this is true, all fields except for #playOnAdd and #track are ignored on the emitter object. This is useful to prevent fields in the #track's description from being overridden by emitter fields. volume Volume level to apply to the sound. @note This field is ignored if #useTrackDescriptionOnly is true. @see SFXDescription::volume SFXEmitterClass ConsoleClassObject SFXEnvironment SimDataBlock airAbsorptionHF Change in level per meter at high frequencies. decayHFRatio High-frequency to mid-frequency decay time ratio. decayLFRatio Low-frequency to mid-frequency decay time ratio. decayTime Reverberation decay time at mid frequencies. density Value that controls the modal density in the late reverberation decay. diffusion Value that controls the echo density in the late reverberation decay. echoDepth Echo depth. echoTime Echo time. envDiffusion Environment diffusion. envSize Environment size in meters. flags A bitfield of reverb flags. @see REVERB_DECAYTIMESCALE @see REVERB_REFLECTIONSSCALE @see REVERB_REFLECTIONSDELAYSCALE @see REVERB_REVERBSCALE @see REVERB_REVERBDELAYSCALE @see REVERB_DECAYHFLIMIT @see REVERB_ECHOTIMESCALE @see REVERB_MODULATIONTIMESCALE @see REVERB_CORE0 @see REVERB_CORE1 @see REVERB_HIGHQUALITYREVERB @see REVERB_HIGHQUALITYDPL2REVERB HFReference Reference high frequency in Hertz. LFReference Reference low frequency in Hertz. modulationDepth Modulation depth. modulationTime Modulation time. reflections Early reflections level relative to room effect. reflectionsDelay Initial reflection delay time. reflectionsPan Early reflections panning vector. reverb Late reverberation level relative to room effect. reverbDelay Late reverberation delay time relative to initial reflection. reverbPan Late reverberation panning vector. room Room effect level at mid-frequencies. roomHF Relative room effect level at high frequencies. roomLF Relative room effect level at low frequencies. roomRolloffFactor Logarithmic distance attenuation rolloff scale factor for reverb room size effect. SFXEnvironmentClass ConsoleClassObject SFXEnvironmentSet SimSet SFXFMODEvent SFXTrack fmodGroup DO NOT MODIFY!! fmodName DO NOT MODIFY!! fmodParameterRanges DO NOT MODIFY!! fmodParameterValues DO NOT MODIFY!! SFXFMODEventClass ConsoleClassObject SFXFMODEventGroup SimDataBlock freeData () Release the resource data for this group and its subgroups. @see SFXFMODProject_resources isDataLoaded () Test whether the resource data for this group has been loaded. @return True if the resource data for this group is currently loaded. loadData ( bool loadStreams=true, bool loadSamples=true ) Load the resource data for this group, if it has not already been loaded (either directly or indirectly through a parent group). This method works recursively and thus data for direct and indirect child groups to this group will be loaded as well. @param loadStreams Whether to open streams. @param loadSamples Whether to load sample banks. @return True if the data has been successfully loaded; false otherwise. @see SFXFMODProject_resources fmodGroup DO NOT MODIFY!! fmodName DO NOT MODIFY!! fmodProject DO NOT MODIFY!! SFXFMODEventGroupClass ConsoleClassObject SFXFMODEventSource SFXSource SFXFMODEventSourceClass ConsoleClassObject SFXFMODProject SimDataBlock fileName The compiled .fev file from FMOD Designer. mediaPath Path to the media files; if unset, defaults to project directory. SFXFMODProjectClass ConsoleClassObject SFXParameter SimObject getParameterName () Get the name of the parameter. @return The paramete name. reset () Reset the parameter's value to its default. @see SFXParameter::defaultValue channel Channel that the parameter controls. This controls which property of the sources it is attached to the parameter controls. defaultValue Value to which the parameter is initially set. When the parameter is first added to the system, #value will be set to #defaultValue. description Textual description of the parameter. Primarily for use in the Audio Parameters dialog of the editor to allow for easier identification of parameters. onUpdate() Called when the sound system triggers an update on the parameter. This occurs periodically during system operation. range Permitted range for #value. Minimum and maximum allowed value for the parameter. Both inclusive. For all but the User0-3 channels, this property is automatically set up by SFXParameter. value Current value of the audio parameter. All attached sources are notified when this value changes. SFXParameterClass ConsoleClassObject SFXParameterGroup SimGroup SFXPlayList SFXTrack delayTimeIn Seconds to wait after moving into slot before #transitionIn. delayTimeInVariance Bounds on randomization of #delayTimeIn. @ref SFXPlayList_randomization delayTimeOut Seconds to wait before moving out of slot after #transitionOut. delayTimeOutVariance Bounds on randomization of #delayTimeOut. @ref SFXPlayList_randomization fadeTimeIn Seconds to fade sound in (-1 to use the track's own fadeInTime.) @see SFXDescription::fadeTimeIn fadeTimeInVariance Bounds on randomization of #fadeInTime. @ref SFXPlayList_randomization fadeTimeOut Seconds to fade sound out (-1 to use the track's own fadeOutTime.) @see SFXDescription::fadeTimeOut fadeTimeOutVariance Bounds on randomization of #fadeOutTime @ref SFXPlayList_randomization loopMode Behavior when description has looping enabled. The loop mode determines whether the list will loop over a single slot or loop over all the entire list of slots being played. @see SFXDescription::isLooping maxDistance @c maxDistance to apply to 3D sounds in this slot (<1 to use @c maxDistance of track's own description). @see SFXDescription::maxDistance maxDistanceVariance Bounds on randomization of #maxDistance. @ref SFXPlayList_randomization numSlotsToPlay Number of slots to play. Up to a maximum of 16, this field determines the number of slots that are taken from the list for playback. Only slots that have a valid #track assigned will be considered for this. pitchScale Scale factor to apply to pitch of sounds played on this list slot. This value will scale the actual pitch set on the track assigned to the slot, i.e. a value of 0.5 will cause the track to play at half its assigned speed. pitchScaleVariance Bounds on randomization of #pitchScale. @ref SFXPlayList_randomization random Slot playback order randomization pattern. By setting this field to something other than "NotRandom" to order in which slots of the playlist are processed can be changed from sequential to a random pattern. This allows to to create more varied playback patterns. Defaults to "NotRandom". referenceDistance @c referenceDistance to set for 3D sounds in this slot (<1 to use @c referenceDistance of track's own description). @see SFXDescription::referenceDistance referenceDistanceVariance Bounds on randomization of #referenceDistance. @ref SFXPlayList_randomization repeatCount Number of times to loop this slot. replay Behavior when an already playing sound is encountered on this slot from a previous cycle. Each slot can have an arbitrary number of sounds playing on it from previous cycles. This field determines how SFXController will handle these sources. state State that must be active for this slot to play. @ref SFXPlayList_states stateMode Behavior when assigned state is deactivated while slot is playing. @ref SFXPlayList_states trace Enable/disable execution tracing for this playlist (local only). If this is true, SFXControllers attached to the list will automatically run in trace mode. track Track to play in this slot. This must be set for the slot to be considered for playback. Other settings for a slot will not take effect except this field is set. transitionIn Behavior when moving into this slot. After the delayIn time has expired (if any), this slot determines what the controller will do before actually playing the slot. transitionOut Behavior when moving out of this slot. After the #detailTimeOut has expired (if any), this slot determines what the controller will do before moving on to the next slot. volumeScale Scale factor to apply to volume of sounds played on this list slot. This value will scale the actual volume level set on the track assigned to the slot, i.e. a value of 0.5 will cause the track to play at half-volume. volumeScaleVariance Bounds on randomization of #volumeScale. @ref SFXPlayList_randomization SFXPlayListClass ConsoleClassObject SFXProfile SFXTrack getSoundDuration () Return the length of the sound data in seconds. @return The length of the sound data in seconds or 0 if the sound referenced by the profile could not be found. fileName %Path to the sound file. If the extension is left out, it will be inferred by the sound system. This allows to easily switch the sound format without having to go through the profiles and change the filenames there, too. preload Whether to preload sound data when the profile is added to system. @note This flag is ignored by streamed sounds. @ref SFXProfile_loading SFXProfileClass ConsoleClassObject SFXSound SFXSource getDuration () Get the total play time (in seconds) of the sound data attached to the sound. @return @note Be aware that for looped sounds, this will not return the total playback time of the sound. getPosition () Get the current playback position in seconds. @return The current play cursor offset. isReady () Test whether the sound data associated with the sound has been fully loaded and is ready for playback. For streamed sounds, this will be false during playback when the stream queue for the sound is starved and waiting for data. For buffered sounds, only an initial loading phase will potentially cause isReady to return false. @return True if the sound is ready for playback. setPosition ( float position ) Set the current playback position in seconds. If the source is currently playing, playback will jump to the new position. If playback is stopped or paused, playback will resume at the given position when play() is called. @param position The new position of the play cursor (in seconds). SFXSoundClass ConsoleClassObject SFXSource SimGroup addMarker ( String name, float pos ) Add a notification marker called @a name at @a pos seconds of playback. @param name Symbolic name for the marker that will be passed to the onMarkerPassed() callback. @param pos Playback position in seconds when the notification should trigger. Note that this is a soft limit and there may be a delay between the play cursor actually passing the position and the callback being triggered. @note For looped sounds, the marker will trigger on each iteration. @tsexample // Create a new source. $source = sfxCreateSource( AudioMusicLoop2D, "art/sound/backgroundMusic" ); // Assign a class to the source. $source.class = "BackgroundMusic"; // Add a playback marker at one minute into playback. $source.addMarker( "first", 60 ); // Define the callback function. This function will be called when the playback position passes the one minute mark. function BackgroundMusic::onMarkerPassed( %this, %markerName ) { if( %markerName $= "first" ) echo( "Playback has passed the 60 seconds mark." ); } // Play the sound. $source.play(); @endtsexample addParameter ( SFXParameter parameter ) Attach @a parameter to the source, Once attached, the source will react to value changes of the given @a parameter. Attaching a parameter will also trigger an initial read-out of the parameter's current value. @param parameter The parameter to attach to the source. getAttenuatedVolume () Get the final effective volume level of the source. This method returns the volume level as it is after source group volume modulation, fades, and distance-based volume attenuation have been applied to the base volume level. @return The effective volume of the source. @ref SFXSource_volume getFadeInTime () Get the fade-in time set on the source. This will initially be SFXDescription::fadeInTime. @return The fade-in time set on the source in seconds. @see SFXDescription::fadeInTime @ref SFXSource_fades getFadeOutTime () Get the fade-out time set on the source. This will initially be SFXDescription::fadeOutTime. @return The fade-out time set on the source in seconds. @see SFXDescription::fadeOutTime @ref SFXSource_fades getParameter ( int index ) Get the parameter at the given index. @param index Index of the parameter to fetch. Must be 0<=index<=getParameterCount(). @return The parameter at the given @a index or null if @a index is out of range. @tsexample // Print the name ofo each parameter attached to %source. %numParams = %source.getParameterCount(); for( %i = 0; %i < %numParams; %i ++ ) echo( %source.getParameter( %i ).getParameterName() ); @endtsexample @see getParameterCount getParameterCount () Get the number of SFXParameters that are attached to the source. @return The number of parameters attached to the source. @tsexample // Print the name ofo each parameter attached to %source. %numParams = %source.getParameterCount(); for( %i = 0; %i < %numParams; %i ++ ) echo( %source.getParameter( %i ).getParameterName() ); @endtsexample @see getParameter @see addParameter getPitch () Get the pitch scale of the source. Pitch determines the playback speed of the source (default: 1). @return The current pitch scale factor of the source. @see setPitch @see SFXDescription::pitch getStatus () Get the current playback status. @return Te current playback status getVolume () Get the current base volume level of the source. This is not the final effective volume that the source is playing at but rather the starting volume level before source group modulation, fades, or distance-based volume attenuation are applied. @return The current base volume level. @see setVolume @see SFXDescription::volume @ref SFXSource_volume isPaused () Test whether the source is currently paused. @return True if the source is in paused state, false otherwise. @see pause @see getStatus @see SFXStatus isPlaying () Test whether the source is currently playing. @return True if the source is in playing state, false otherwise. @see play @see getStatus @see SFXStatus isStopped () Test whether the source is currently stopped. @return True if the source is in stopped state, false otherwise. @see stop @see getStatus @see SFXStatus pause ( float fadeOutTime=-1.f ) Pause playback of the source. @param fadeOutTime Seconds for the sound to fade down to zero volume. If -1, the SFXDescription::fadeOutTime set in the source's associated description is used. Pass 0 to disable a fade-out effect that may be configured on the description. Be aware that if a fade-out effect is used, the source will not immediately to paused state but will rather remain in playing state until the fade-out time has expired.. play ( float fadeInTime=-1.f ) Start playback of the source. If the sound data for the source has not yet been fully loaded, there will be a delay after calling play and playback will start after the data has become available. @param fadeInTime Seconds for the sound to reach full volume. If -1, the SFXDescription::fadeInTime set in the source's associated description is used. Pass 0 to disable a fade-in effect that may be configured on the description. removeParameter ( SFXParameter parameter ) Detach @a parameter from the source. Once detached, the source will no longer react to value changes of the given @a parameter. If the parameter is not attached to the source, the method will do nothing. @param parameter The parameter to detach from the source. setCone ( float innerAngle, float outerAngle, float outsideVolume ) Set up the 3D volume cone for the source. @param innerAngle Angle of the inner sound cone in degrees (@ref SFXDescription::coneInsideAngle). Must be 0<=innerAngle<=360. @param outerAngle Angle of the outer sound cone in degrees (@ref SFXDescription::coneOutsideAngle). Must be 0<=outerAngle<=360. @param outsideVolume Volume scale factor outside of outer cone (@ref SFXDescription::coneOutsideVolume). Must be 0<=outsideVolume<=1. @note This method has no effect on the source if the source is not 3D. setFadeTimes ( float fadeInTime, float fadeOutTime ) Set the fade time parameters of the source. @param fadeInTime The new fade-in time in seconds. @param fadeOutTime The new fade-out time in seconds. @see SFXDescription::fadeInTime @see SFXDescription::fadeOutTime @ref SFXSource_fades setPitch ( float pitch ) Set the pitch scale of the source. Pitch determines the playback speed of the source (default: 1). @param pitch The new pitch scale factor. @see getPitch @see SFXDescription::pitch setTransform ( vector position [, vector direction ] ) Set the position and orientation of a 3D sound source. @hide setVolume ( float volume ) Set the base volume level for the source. This volume will be the starting point for source group volume modulation, fades, and distance-based volume attenuation. @param volume The new base volume level for the source. Must be 0>=volume<=1. @see getVolume @ref SFXSource_volume stop ( float fadeOutTime=-1.f ) Stop playback of the source. @param fadeOutTime Seconds for the sound to fade down to zero volume. If -1, the SFXDescription::fadeOutTime set in the source's associated description is used. Pass 0 to disable a fade-out effect that may be configured on the description. Be aware that if a fade-out effect is used, the source will not immediately transtion to stopped state but will rather remain in playing state until the fade-out time has expired. description The playback configuration that determines the initial sound properties and setup. Any SFXSource must have an associated SFXDescription. onParameterValueChange( SFXParameter parameter ) Called when a parameter attached to the source changes value. This callback will be triggered before the value change has actually been applied to the source. @param parameter The parameter that has changed value. @note This is also triggered when the parameter is first attached to the source. onStatusChange( SFXStatus newStatus ) Called when the playback status of the source changes. @param newStatus The new playback status. statusCallback Name of function to call when the status of the source changes. The source that had its status changed is passed as the first argument to the function and the new status of the source is passed as the second argument. SFXSourceClass ConsoleClassObject SFXSourceSet SimSet SFXState SimDataBlock activate () Increase the activation count on the state. If the state isn't already active and it is not disabled, the state will be activated. @see isActive @see deactivate deactivate () Decrease the activation count on the state. If the count reaches zero and the state was not disabled, the state will be deactivated. @see isActive @see activate disable () Increase the disabling count of the state. If the state is currently active, it will be deactivated. @see isDisabled enable () Decrease the disabling count of the state. If the disabling count reaches zero while the activation count is still non-zero, the state will be reactivated again. @see isDisabled isActive () Test whether the state is currently active. This is true when the activation count is >0 and the disabling count is =0. @return True if the state is currently active. @see activate isDisabled () Test whether the state is currently disabled. This is true when the disabling count of the state is non-zero. @return True if the state is disabled. @see disable excludedStates States that will automatically be disabled when this state is activated. @ref SFXState_activation includedStates States that will automatically be activated when this state is activated. @ref SFXState_activation onActivate() Called when the state goes from inactive to active. onDeactivate() called when the state goes from active to deactive. SFXStateClass ConsoleClassObject SFXStateSet SimSet SFXTrack SimDataBlock description Playback setup description for this track. If unassigned, the description named "AudioEffects" will automatically be assigned to the track. If this description is not defined, track creation will fail. parameters Parameters to automatically attach to SFXSources created from this track. Individual parameters are identified by their #internalName. SFXTrackClass ConsoleClassObject SFXTrackSet SimSet sgMissionLightingFilterSet SimSet ShaderData SimObject reload () @brief Rebuilds all the vertex and pixel shaders instances created from this ShaderData. @tsexample // Rebuild the shader instances from ShaderData CloudLayerShader CloudLayerShader.reload(); @endtsexample defines A semicolon, tab, or newline delimited string of case sensitive defines that are passed to the shader compiler DXPixelShaderFile Indicates a filename that contains a DirectX pixel shader program. It must contain only one program and no vertex shader, just the pixel shader. It can be either an HLSL or assembly level shader. The former must have a filename extension of .hlsl, otherwise it assumes it is an assembly file. DXVertexShaderFile Indicates a filename that contains a DirectX vertex shader program. It must contain only one program and no pixel shader, just the vertex shader.It can be either an HLSL or assembly level shader. The former must have a filename extension of .hlsl, otherwise it assumes it is an assembly file. OGLPixelShaderFile Indicates a filename that contains a DirectX pixel shader program. It must contain only one program and no vertex shader, just the pixel shader. OGLVertexShaderFile Indicates a filename that contains an OpenGL vertex shader program. It must contain only one program and no pixel shader, just the vertex shader. pixVersion This indicates what target level of shader should be compiled. Valid numbers at the time of this writing are 1.1, 1.4, 2.0, and 3.0. The shader will not run properly if your hardware does not support the level of shader you have compiled. useDevicePixVersion True to use the maximum pixel shader version offered by the graphics card, rather than manually specifying the version in script. ShaderDataClass ConsoleClassObject ShapeBase GameBase applyDamage ( float amount ) Increment the current damage level by the specified amount. @param amount value to add to current damage level applyImpulse ( Point3F pos, Point3F vec ) Apply an impulse to the object. @param pos world position of the impulse @param vec impulse momentum (velocity * mass) @return true applyRepair ( float amount ) Repair damage by the specified amount. Note that the damage level is only reduced by repairRate per tick, so it may take several ticks for the total repair to complete. @param amount total repair value (subtracted from damage level over time) canCloak () Check if this object can cloak. @return true changeMaterial ( string mapTo, Material oldMat, Material newMat ) Change one of the materials on the shape. This method changes materials per mapTo with others. The material that is being replaced is mapped to unmapped_mat as a part of this transition. @note Warning, right now this only sort of works. It doesn't do a live update like it should. @param mapTo the name of the material target to remap (from getTargetName) @param oldMat the old Material that was mapped @param newMat the new Material to map @tsexample // remap the first material in the shape %mapTo = %obj.getTargetName( 0 ); %obj.changeMaterial( %mapTo, 0, MyMaterial ); @endtsexample dumpMeshVisibility () Print a list of visible and hidden meshes in the shape to the console for debugging purposes. getAIRepairPoint () Get the position at which the AI should stand to repair things. If the shape defines a node called "AIRepairNode", this method will return the current world position of that node, otherwise "0 0 0". @return the AI repair position getCameraFov () Returns the vertical field of view in degrees for this object if used as a camera. @return current FOV getControllingClient () Get the client (if any) that controls this object. @return the ID of the controlling GameConnection, or 0 if this object is not controlled by any client. getControllingObject () Get the object (if any) that controls this object. @return the ID of the controlling ShapeBase object, or 0 if this object is not controlled by another object. getDamageFlash () Get the damage flash level. @return flash level @see setDamageFlash getDamageLevel () Get the object's current damage level. @return damage level getDamagePercent () Get the object's current damage level as a percentage of maxDamage. @return damageLevel / datablock.maxDamage getDamageState () Get the object's damage state. @return the damage state; one of "Enabled", "Disabled", "Destroyed" getEnergyLevel () Get the object's current energy level. @return energy level getEnergyPercent () Get the object's current energy level as a percentage of maxEnergy. @return energyLevel / datablock.maxEnergy getEyePoint () Get the position of the 'eye' for this object. If the object model has a node called 'eye', this method will return that node's current world position, otherwise it will return the object's current world position. @return the eye position for this object @see getEyeVector @see getEyeTransform getEyeTransform () Get the 'eye' transform for this object. If the object model has a node called 'eye', this method will return that node's current transform, otherwise it will return the object's current transform. @return the eye transform for this object @see getEyeVector @see getEyePoint getEyeVector () Get the forward direction of the 'eye' for this object. If the object model has a node called 'eye', this method will return that node's current forward direction vector, otherwise it will return the object's current forward direction vector. @return the eye vector for this object @see getEyePoint @see getEyeTransform getImageAltTrigger ( int slot ) Get the alt trigger state of the Image mounted in the specified slot. @param slot Image slot to query @return the Image's current alt trigger state getImageAmmo ( int slot ) Get the ammo state of the Image mounted in the specified slot. @param slot Image slot to query @return the Image's current ammo state getImageLoaded ( int slot ) Get the loaded state of the Image mounted in the specified slot. @param slot Image slot to query @return the Image's current loaded state getImageSkinTag ( int slot ) Get the skin tag ID for the Image mounted in the specified slot. @param slot Image slot to query @return the skinTag value passed to mountImage when the image was mounted) getImageState ( int slot ) Get the name of the current state of the Image in the specified slot. @param slot Image slot to query @return name of the current Image state, or "Error" if slot is invalid getImageTrigger ( int slot ) Get the trigger state of the Image mounted in the specified slot. @param slot Image slot to query @return the Image's current trigger state getLookAtPoint ( float distance=2000, int typeMask=0xFFFFFFFF ) Get the world position this object is looking at. Casts a ray from the eye and returns information about what the ray hits. @param distance maximum distance of the raycast @param typeMask typeMask of objects to include for raycast collision testing @return look-at information as "Object HitX HitY HitZ [Material]" or empty string for no hit @tsexample %lookat = %obj.getLookAtPoint(); echo( "Looking at: " @ getWords( %lookat, 1, 3 ) ); @endtsexample getModelFile () Get the model filename used by this shape. @return the shape filename getMountedImage ( int slot ) Get the Image mounted in the specified slot. @param slot Image slot to query @return ID of the ShapeBaseImageData datablock mounted in the slot, or 0 if no Image is mounted there. getMountSlot ( ShapeBaseImageData image ) Get the first slot the given datablock is mounted to on this object. @param image ShapeBaseImageData datablock to query @return index of the first slot the Image is mounted in, or -1 if the Image is not mounted in any slot on this object. getMuzzlePoint ( int slot ) Get the muzzle position of the Image mounted in the specified slot. If the Image shape contains a node called 'muzzlePoint', then the muzzle position is the position of that node in world space. If no such node is specified, the slot's mount node is used instead. @param slot Image slot to query @return the muzzle position, or "0 0 0" if the slot is invalid getMuzzleVector ( int slot ) Get the muzzle vector of the Image mounted in the specified slot. If the Image shape contains a node called 'muzzlePoint', then the muzzle vector is the forward direction vector of that node's transform in world space. If no such node is specified, the slot's mount node is used instead. If the correctMuzzleVector and firstPerson flags are set in the Image, the muzzle vector is computed to point at whatever object is right in front of the object's 'eye' node. @param slot Image slot to query @return the muzzle vector, or "0 1 0" if the slot is invalid getPendingImage ( int slot ) Get the Image that will be mounted next in the specified slot. Calling mountImage when an Image is already mounted does one of two things: <ol><li>Mount the new Image immediately, the old Image is discarded and whatever state it was in is ignored.</li><li>If the current Image state does not allow Image changes, the new Image is marked as pending, and will not be mounted until the current state completes. eg. if the user changes weapons, you may wish to ensure that the current weapon firing state plays to completion first.</li></ol> This command retrieves the ID of the pending Image (2nd case above). @param slot Image slot to query @return ID of the pending ShapeBaseImageData datablock, or 0 if none. getRechargeRate () Get the current recharge rate. @return the recharge rate (per tick) getRepairRate () Get the per-tick repair amount. @return the current value to be subtracted from damage level each tick @see setRepairRate getShapeName () Get the name of the shape. @note This is the name of the shape object that is sent to the client, not the DTS or DAE model filename. @return the name of the shape getSkinName () Get the name of the skin applied to this shape. @return the name of the skin getSlotTransform ( int slot ) Get the transform of the specified mount slot. @param slot Image slot to query @return the mount transform getStopThreadPos (int slot) getTargetCount () Get the number of materials in the shape. @return the number of materials in the shape. getTargetName ( int index ) Get the name of the indexed shape material. @param index index of the material to get (valid range is 0 - getTargetCount()-1). @return the name of the indexed material. getThreadDir (int slot) getThreadPos (int slot) getThreadSequence (int slot) getThreadSequenceName (int slot) getThreadSpeed (int slot) getThreadStartPos (int slot) getThreadState (int slot) getVelocity () Get the object's current velocity. @return the current velocity getWhiteOut () Get the white-out level. @return white-out level @see setWhiteOut isCloaked () Check if this object is cloaked. @return true if cloaked, false if not isDestroyed () Check if the object is in the Destroyed damage state. @return true if damage state is "Destroyed", false if not isDisabled () Check if the object is in the Disabled or Destroyed damage state. @return true if damage state is not "Enabled", false if it is isEnabled () Check if the object is in the Enabled damage state. @return true if damage state is "Enabled", false if not isHidden () Check if the object is hidden. @return true if the object is hidden, false if visible. isImageFiring ( int slot ) Check if the current Image state is firing. @param slot Image slot to query @return true if the current Image state in this slot has the 'stateFire' flag set. isImageMounted ( ShapeBaseImageData image ) Check if the given datablock is mounted to any slot on this object. @param image ShapeBaseImageData datablock to query @return true if the Image is mounted to any slot, false otherwise. mountImage ( ShapeBaseImageData image, int slot, bool loaded=true, string skinTag="" ) Mount a new Image. @param image the Image to mount @param slot Image slot to mount into (valid range is 0 - 3) @param loaded initial loaded state for the Image @param skinTag tagged string to reskin the mounted Image @return true if successful, false if failed @tsexample %player.mountImage( PistolImage, 1 ); %player.mountImage( CrossbowImage, 0, false ); %player.mountImage( RocketLauncherImage, 0, true, 'blue' ); @endtsexample pauseThread ( int slot ) Pause an animation thread. If restarted using playThread, the animation will resume from the paused position. @param slot thread slot to stop @return true if successful, false if failed @see playThread playAudio ( int slot, SFXTrack track ) Attach a sound to this shape and start playing it. @param slot audio slot index for the sound (valid range is 0 - 3) @param track SFXTrack to play @return true if the sound was attached successfully, false if failed playThread ( int slot, string name="" ) Start a new animation thread, or restart one that has been paused or stopped. @param slot thread slot to play. Valid range is 0 - 3) @param name name of the animation sequence to play in this slot. If not specified, the paused or stopped thread in this slot will be resumed. @return true if successful, false if failed @tsexample %obj.playThread( 0, "ambient" ); // Play the ambient sequence in slot 0 %obj.setThreadTimeScale( 0, 0.5 ); // Play at half-speed %obj.pauseThread( 0 ); // Pause the sequence %obj.playThread( 0 ); // Resume playback %obj.playThread( 0, "spin" ); // Replace the sequence in slot 0 @endtsexample replayThread (int slot, [float forcePos] ) setAllMeshesHidden ( bool hide ) Set the hidden state on all the shape meshes. @param hide new hidden state for all meshes setCameraFov ( float fov ) Set the vertical field of view in degrees for this object if used as a camera. @param fov new FOV value setCloaked ( bool cloak ) Set the cloaked state of this object. When an object is cloaked it is not rendered. @param cloak true to cloak the object, false to uncloak setDamageFlash ( float level ) Set the damage flash level. Damage flash may be used as a postfx effect to flash the screen when the client is damaged. @note Currently not implemented. @param level flash level (0-1) setDamageLevel ( float level ) Set the object's current damage level. @param level new damage level setDamageState ( string state ) Set the object's damage state. @param state should be one of "Enabled", "Disabled", "Destroyed" @return true if successful, false if failed setDamageVector ( Point3F vec ) Set the damage direction vector. Currently this is only used to initialise the explosion if this object is blown up. @param vec damage direction vector @tsexample %obj.setDamageVector( "0 0 1" ); @endtsexample setEnergyLevel ( float level ) Set this object's current energy level. @param level new energy level setHidden ( bool show ) Add or remove this object from the scene. When removed from the scene, the object will not be processed or rendered. @param show false to hide the object, true to re-show it setImageAltTrigger ( int slot, bool state ) Set the alt trigger state of the Image mounted in the specified slot. @param slot Image slot to modify @param state new alt trigger state for the Image @return the Image's new alt trigger state setImageAmmo ( int slot, bool state ) Set the ammo state of the Image mounted in the specified slot. @param slot Image slot to modify @param state new ammo state for the Image @return the Image's new ammo state setImageLoaded ( int slot, bool state ) Set the loaded state of the Image mounted in the specified slot. @param slot Image slot to modify @param state new loaded state for the Image @return the Image's new loaded state setImageTrigger ( int slot, bool state ) Set the trigger state of the Image mounted in the specified slot. @param slot Image slot to modify @param state new trigger state for the Image @return the Image's new trigger state setInvincibleMode ( float time, float speed ) Setup the invincible effect. This effect is used for HUD feedback to the user that they are invincible. @note Currently not implemented @param time duration in seconds for the invincible effect @param speed speed at which the invincible effect progresses setMeshHidden ( string name, bool hide ) Set the hidden state on the named shape mesh. @param name name of the mesh to hide/show @param hide new hidden state for the mesh setRechargeRate ( float rate ) Set the recharge rate. The recharge rate is added to the object's current energy level each tick, up to the maxEnergy level set in the ShapeBaseData datablock. @param rate the recharge rate (per tick) setRepairRate ( float rate ) Set amount to repair damage by each tick. Note that this value is separate to the repairRate field in ShapeBaseData. This value will be subtracted from the damage level each tick, whereas the ShapeBaseData field limits how much of the applyRepair value is subtracted each tick. Both repair types can be active at the same time. @param rate value to subtract from damage level each tick (must be > 0) setShapeName ( string name ) Set the name of this shape. @note This is the name of the shape object that is sent to the client, not the DTS or DAE model filename. @param name new name for the shape setSkinName ( string name ) Apply a new skin to this shape. @param name name of the skin to apply setThreadDir ( int slot, bool fwd ) Set the playback direction of an animation thread. @param slot thread slot to modify @param fwd true to play the animation forwards, false to play backwards @return true if successful, false if failed @see playThread setThreadPos (int slot, float Position) setThreadSequence (int slot, int sequence) setThreadSpeed (int slot, int Speed) setThreadStartPos (int slot, float startPos) setThreadState (int slot, int state) setThreadStopPos (int slot, float stopPos) setThreadTimeScale ( int slot, float scale ) Set the playback time scale of an animation thread. @param slot thread slot to modify @param scale new thread time scale (1=normal speed, 0.5=half speed etc) @return true if successful, false if failed @see playThread setVelocity ( Point3F vel ) Set the object's velocity. @param vel new velocity for the object @return true setWhiteOut ( float level ) Set the white-out level. White-out may be used as a postfx effect to brighten the screen in response to a game event. @note Currently not implemented. @param level flash level (0-1) startFade ( int time, int delay, bool fadeOut ) Fade the object in or out without removing it from the scene. A faded out object is still in the scene and can still be collided with, so if you want to disable collisions for this shape after it fades out use setHidden to temporarily remove this shape from the scene. @note Items have the ability to light their surroundings. When an Item with an active light is fading out, the light it emits is correspondingly reduced until it goes out. Likewise, when the item fades in, the light is turned-up till it reaches it's normal brightntess. @param time duration of the fade effect in ms @param delay delay in ms before the fade effect begins @param fadeOut true to fade-out to invisible, false to fade-in to full visibility stopAudio ( int slot ) Stop a sound started with playAudio. @param slot audio slot index (started with playAudio) @return true if the sound was stopped successfully, false if failed stopThread ( int slot ) Stop an animation thread. If restarted using playThread, the animation will start from the beginning again. @param slot thread slot to stop @return true if successful, false if failed @see playThread unmountImage ( int slot ) Unmount the mounted Image in the specified slot. @param slot Image slot to unmount @return true if successful, false if failed ShapeBaseClass ConsoleClassObject ShapeBaseData GameBaseData checkDeployPos ( TransformF txfm ) Check if there is the space at the given transform is free to spawn into. @param txfm deploy transform to check @return true if the space is free, false if there is already something in the way. getDeployTransform ( Point3F pos, Point3F normal ) Get a transform (suitable for use with setTransform). @param pos desired transform position @param dir desired UP direction @return the deploy transform aiAvoidThis If set, AI's will try to walk around this object. @note There is currently no AI code that takes advantage of this. cameraDefaultFov The default camera vertical FOV in degrees. cameraMaxDist The maximum distance from the camera to the object. Used when computing a custom camera transform for this object. @see observeThroughObject cameraMaxFov The maximum camera vertical FOV allowed in degrees. cameraMinDist The minimum distance from the camera to the object. Used when computing a custom camera transform for this object. @see observeThroughObject cameraMinFov The minimum camera vertical FOV allowed in degrees. computeCRC If true, verify that the CRC of the client's shape model matches the server's CRC for the shape model when loaded by the client. cubeReflectorDesc string cubeReflectorDesc Debris %Debris to generate when this shape is blown up. debrisShapeName The DTS or DAE model to use for auto-generated breakups. @note may not be functional. density Shape density. Used when computing buoyancy when in water. destroyedLevel Damage level above which the object is destroyed. When the damage level increases above this value, the object damage state is set to "Destroyed". disabledLevel Damage level above which the object is disabled. Currently unused. drag Drag factor. Reduces velocity of moving objects. Explosion %Explosion to generate when this shape is blown up. firstPersonOnly Flag controlling whether the view from this object is first person only. inheritEnergyFromMount Flag controlling whether to manage our own energy level, or to use the energy level of the object we are mounted to. isInvincible Invincible flag; when invincible, the object cannot be damaged or repaired. mass Shape mass. Used in simulation of moving objects. maxDamage Maximum damage level for this object. maxEnergy Maximum energy level for this object. observeThroughObject Observe this object through its camera transform and default fov. If true, when this object is the camera it can provide a custom camera transform and FOV (instead of the default eye transform). onCollision( ShapeBase obj, SceneObject collObj, VectorF vec, float len ) Called when we collide with another object. @param obj the ShapeBase object @param collObj the object we collided with @param vec collision impact vector @param len length of the impact vector onDamage( ShapeBase obj, float delta ) Called when the object is damaged. @param obj the ShapeBase object @param obj the ShapeBase object @param delta the amount of damage received. onDestroyed( ShapeBase obj, string lastState ) Called when the object damage state changes to Destroyed. @param obj the ShapeBase object @param lastState the previous damage state onDisabled( ShapeBase obj, string lastState ) Called when the object damage state changes to Disabled. @param obj the ShapeBase object @param lastState the previous damage state onEnabled( ShapeBase obj, string lastState ) Called when the object damage state changes to Enabled. @param obj the ShapeBase object @param lastState the previous damage state onEndSequence( ShapeBase obj, int slot ) Called when a thread playing a non-cyclic sequence reaches the end of the sequence. @param obj the ShapeBase object @param slot thread slot that finished playing onForceUncloak( ShapeBase obj, string reason ) Called when the object is forced to uncloak. @param obj the ShapeBase object @param reason string describing why the object was uncloaked onImpact( ShapeBase obj, SceneObject collObj, VectorF vec, float len ) Called when we collide with another object. @param obj the ShapeBase object @param collObj the object we collided with @param vec collision impact vector @param len length of the impact vector onTrigger( ShapeBase obj, int index, bool state ) Called when a trigger input changes state. @param obj the ShapeBase object @param index index of the trigger that changed @param state new state of the trigger renderWhenDestroyed Whether to render the shape when it is in the "Destroyed" damage state. repairRate Rate at which damage is repaired in damage units/sec. This value is subtracted from the damage level until it reaches 0. shadowEnable Enable shadows for this shape (currently unused, shadows are always enabled). shadowMaxVisibleDistance Maximum distance at which shadow is visible (currently unused). shadowProjectionDistance Maximum height above ground to project shadow. If the object is higher than this no shadow will be rendered. shadowSize Size of the shadow texture (must be power of 2). shadowSphereAdjust Scalar applied to the radius of spot shadows (initial radius is based on the shape bounds but can be adjusted with this field). shapeFile The DTS or DAE model to use for this object. underwaterExplosion %Explosion to generate when this shape is blown up underwater. useEyePoint Flag controlling whether the client uses this object's eye point to view from. ShapeBaseDataClass ConsoleClassObject ShapeBaseImageData GameBaseData accuFire Flag to control whether the Image's aim is automatically converged with the crosshair. Currently unused. camShakeAmp Amplitude of the camera shaking effect. @see shakeCamera camShakeFreq Frequency of the camera shaking effect. @see shakeCamera casing DebrisData datablock to use for ejected casings. @see stateEjectShell cloakable Whether this Image can be cloaked. Currently unused. computeCRC If true, verify that the CRC of the client's Image matches the server's CRC for the Image when loaded by the client. correctMuzzleVector Flag to adjust the aiming vector to the eye's LOS point. @see getMuzzleVector emap Whether to enable environment mapping on this Image. eyeOffset "X Y Z" translation offset from the ShapeBase model's eye node. Only affects 1st person POV. eyeRotation "X Y Z ANGLE" rotation offset from the ShapeBase model's eye node. Only affects 1st person POV. firstPerson This flag must be set for the adjusted LOS muzzle vector to be computed. @see getMuzzleVector lightBrightness Brightness of the light this Image emits. Only valid for WeaponFireLight. lightColor The color of light this Image emits. lightDuration Duration in SimTime of Pulsing and WeaponFire type lights. lightRadius Radius of the light this Image emits. lightType The type of light this Image emits. mass Mass of this Image. This is added to the total mass of the ShapeBase object. maxConcurrentSounds Maximum number of sounds this Image can play at a time. Any value <= 0 indicates that it can play an infinite number of sounds. minEnergy Minimum Image energy for it to be operable. mountPoint Mount node # to mount this Image to. This should correspond to a mount# node on the ShapeBase derived object we are mounting to. offset "X Y Z" translation offset from this Image's <i>mountPoint</i> node to attach to. Defaults to "0 0 0". ie. attach this Image's <i>mountPoint</i> node to the ShapeBase model's mount# node. onMount( ShapeBase obj, int slot, float dt ) Called when the Image is first mounted to the object. @param obj object that this Image has been mounted to @param slot Image mount slot @param dt time remaining in this Image update onUnmount( ShapeBase obj, int slot, float dt ) Called when the Image is unmounted from the object. @param obj object that this Image has been unmounted from @param slot Image mount slot @param dt time remaining in this Image update Projectile The projectile fired by this Image rotation "X Y Z ANGLE" rotation offset from this Image's <i>mountPoint</i> node to attach to. Defaults to "0 0 0". ie. attach this Image's <i>mountPoint</i> node to the ShapeBase model's mount# node. shakeCamera Flag indicating whether the camera should shake when this Image fires. @note Camera shake only works properly if the player is in control of the one and only shapeBase object in the scene which fires an Image that uses camera shake. shapeFile The DTS or DAE model to use for this Image. shellExitDir Vector direction to eject shell casings. shellExitVariance Variance (in degrees) from the shellExitDir vector. shellVelocity Speed at which to eject casings. stateAllowImageChange If false, other Images will temporarily be blocked from mounting while the state machine is executing the tasks in this state. For instance, if we have a rocket launcher, the player shouldn't be able to switch out <i>while</i> firing. So, you'd set stateAllowImageChange to false in firing states, and true the rest of the time. stateDirection Direction of the animation to play in this state. True is forward, false is backward. stateEjectShell If true, a shell casing will be ejected in this state. stateEmitter Emitter to generate particles in this state (from muzzle point or specified node). @see stateEmitterNode stateEmitterNode Name of the node to emit particles from. @see stateEmitter stateEmitterTime How long (in seconds) to emit particles on entry to this state. stateEnergyDrain Amount of energy to subtract from the Image in this state. Energy is drained at stateEnergyDrain units/sec as long as we are in this state. stateFire The first state with this set to true is the state entered by the client when it receives the 'fire' event. stateIgnoreLoadedForReady If set to true, and both ready and loaded transitions are true, the ready transition will be taken instead of the loaded transition. A state is 'ready' if pressing the fire trigger in that state would transition to the fire state. stateLoadedFlag Set the loaded state of the Image. <ul><li>IgnoreLoaded: Don't change Image loaded state.</li><li>Loaded: Set Image loaded state to true.</li><li>NotLoaded: Set Image loaded state to false.</li></ul> stateName Name of this state. stateRecoil Type of recoil sequence to play on the ShapeBase object on entry to this state. <ul><li>NoRecoil: Do not play a recoil sequence.</li><li>LightRecoil: Play the light_recoil sequence.</li><li>MediumRecoil: Play the medium_recoil sequence.</li><li>HeavyRecoil: Play the heavy_recoil sequence.</li></ul> stateScaleAnimation If true, the timeScale of the stateSequence animation will be adjusted such that the sequence plays for stateTimeoutValue seconds. stateScript Method to execute on entering this state. Scoped to this image class name, then ShapeBaseImageData. The script callback function takes the same arguments as the onMount callback. stateSequence Name of the sequence to play on entry to this state. stateSequenceRandomFlash If true, a random frame from the muzzle flash sequence will be displayed each frame. The name of the muzzle flash sequence is the same as stateSequence, with "_vis" at the end. stateSound Sound to play on entry to this state. stateSpinThread Controls how fast the 'spin' animation sequence will be played in this state. <ul><li>Ignore: No change to the spin sequence.</li><li>Stop: Stops the spin sequence at its current position.</li><li>SpinUp: Increase spin sequence timeScale from 0 (on state entry) to 1 (after stateTimeoutValue seconds).</li><li>SpinDown: Decrease spin sequence timeScale from 1 (on state entry) to 0 (after stateTimeoutValue seconds).</li><li>FullSpeed: Resume the spin sequence playback at its current position with timeScale=1.</li></ul> stateTimeoutValue Time in seconds to wait before transitioning to stateTransitionOnTimeout. stateTransitionOnAltTriggerDown Name of the state to transition to when the alt trigger state of the Image changes to false (alt fire button up). stateTransitionOnAltTriggerUp Name of the state to transition to when the alt trigger state of the Image changes to true (alt fire button down). stateTransitionOnAmmo Name of the state to transition to when the ammo state of the Image changes to true. stateTransitionOnLoaded Name of the state to transition to when the loaded state of the Image changes to 'Loaded'. stateTransitionOnNoAmmo Name of the state to transition to when the ammo state of the Image changes to false. stateTransitionOnNoTarget Name of the state to transition to when the Image loses a target. stateTransitionOnNotLoaded Name of the state to transition to when the loaded state of the Image changes to 'Empty'. stateTransitionOnNotWet Name of the state to transition to when the Image exits the water. stateTransitionOnTarget Name of the state to transition to when the Image gains a target. stateTransitionOnTimeout Name of the state to transition to when we have been in this state for stateTimeoutValue seconds. stateTransitionOnTriggerDown Name of the state to transition to when the trigger state of the Image changes to false (fire button released). stateTransitionOnTriggerUp Name of the state to transition to when the trigger state of the Image changes to true (fire button down). stateTransitionOnWet Name of the state to transition to when the Image enters the water. stateWaitForTimeout If false, this state ignores stateTimeoutValue and transitions immediately if other transition conditions are met. useRemainderDT If true, allow multiple timeout transitions to occur within a single tick (useful if states have a very small timeout). usesEnergy Flag indicating whether this Image uses energy instead of ammo. ShapeBaseImageDataClass ConsoleClassObject Sim2DAudioEvent Sim2DAudioEventClass ConsoleClassObject Sim3DAudioEvent Sim3DAudioEventClass ConsoleClassObject SimComponent NetObject addComponents %obj.addComponents( %compObjName, %compObjName2, ... ); Adds additional components to current list. @param Up to 62 component names @return Returns true on success, false otherwise. getComponent (idx) Get the component corresponding to the given index. @param idx An integer index value corresponding to the desired component. @return The id of the component at the given index as an integer getComponentCount () Get the current component count @return The number of components in the list as an integer getIsTemplate () Check whether SimComponent is currently a template @return true if is a template and false if not isEnabled () Check whether SimComponent is currently enabled @return true if enabled and false if not removeComponents %obj.removeComponents( %compObjName, %compObjName2, ... ); Removes components by name from current list. @param objNamex Up to 62 component names @return Returns true on success, false otherwise. setEnabled (enabled) Sets or unsets the enabled flag @param enabled Boolean value @return No return value setIsTemplate (template) Sets or unsets the template flag @param template Boolean value @return No return value Template Places the object in a component set for later use in new levels. SimComponentClass ConsoleClassObject SimDataBlock SimObject SimDataBlockClass ConsoleClassObject SimDataBlockEvent SimDataBlockEventClass ConsoleClassObject SimGroup SimSet SimGroupClass ConsoleClassObject SimObject assignFieldsFrom ( SimObject fromObject ) Copy fields from another object onto this one. The objects must be of same type. Everything from the object will overwrite what's in this object; extra fields in this object will remain. This includes dynamic fields. @param fromObject The object from which to copy fields. assignPersistentId () Assign a persistent ID to the object if it does not already have one. call ( string method, string args... ) Dynamically call a method on an object. @param method Name of method to call. @param args Zero or more arguments for the method. @return The result of the method call. clone () Create a copy of this object. @return An exact duplicate of this object. deepClone () Create a copy of this object and all its subobjects. @return An exact duplicate of this object and all objects it references. delete () Delete and remove the object. dump ( bool detailed=false ) Dump a description of all fields and methods defined on this object to the console. @param detailed Whether to print detailed information about members. dumpClassHierarchy () Dump the native C++ class hierarchy of this object's C++ class to the console. dumpGroupHierarchy () Dump the hierarchy of this object up to RootGroup to the console. dumpMethods () List the methods defined on this object. @return An ArrayObject populated with (name,description) pairs of all methods defined on the object. getCanSave () Get whether the object will be included in saves. @return True if the object will be saved; false otherwise. getClassName () Get the name of the C++ class which the object is an instance of. @return The name of the C++ class of the object. getClassNamespace () Get the name of the class namespace assigned to this object. @return The name of the 'class' namespace. getClassObject () Return the meta-object corresponding to the SimObject's class. @return The meta-object of this object. getDynamicField ( int index ) Get a value of a dynamic field by index. @param index The index of the dynamic field. @return The value of the dynamic field at the given index or "". getDynamicFieldCount () Get the number of dynamic fields defined on the object. @return The number of dynamic fields defined on the object. getField ( int index ) Retrieve the value of a static field by index. @param index The index of the static field. @return The value of the static field with the given index or "". getFieldCount () Get the number of static fields on the object. @return The number of static fields defined on the object. getFieldType ( string fieldName ) Get the console type code of the given field. @return The numeric type code for the underlying console type of the given field. getFieldValue ( string fieldName, int index=-1 ) Return the value of the given field on this object. @param fieldName The name of the field. If it includes a field index, the index is parsed out. @param index Optional parameter to specify the index of an array field separately. @return The value of the given field or "" if undefined. getFilename () Returns the filename the object is attached to. @return The name of the file the object is associated with; usually the file the object was loaded from. getGroup () Get the group that this object is contained in. @note If not assigned to particular SimGroup, an object belongs to RootGroup. @return The SimGroup object to which the object belongs. getId () Get the underlying unique numeric ID of the object. @note Object IDs are unique only during single engine runs. @return The unique numeric ID of the object. getInternalName () Get the internal name of the object. @return The internal name of the object. getName () Get the global name of the object. @return The global name assigned to the object. getSuperClassNamespace () Get the name of the superclass namespace assigned to this object. @return The name of the 'superClass' namespace. getType () Return the type mask for this object. @return The numeric type mask for the object. isChildOfGroup ( SimGroup group ) Test whether the object belongs directly or indirectly to the given group. @param group The SimGroup object. @return True if the object is a child of the given group or a child of a group that the given group is directly or indirectly a child to. isEditorOnly () Return true if the object is only used by the editor. @return True if this object exists only for the sake of editing. isExpanded () Get whether the object has been marked as expanded. (in editor) @return True if the object is marked expanded. isInNamespaceHierarchy ( string name ) Test whether the namespace of this object is a direct or indirect child to the given namespace. @param name The name of a namespace. @return True if the given namespace name is within the namespace hierarchy of this object. isMemberOfClass ( string className ) Test whether this object is a member of the specified class. @param className Name of a native C++ class. @return True if this object is an instance of the given C++ class or any of its super classes. isMethod ( string methodName ) Test whether the given method is defined on this object. @param The name of the method. @return True if the object implements the given method. isNameChangeAllowed () Get whether this object may be renamed. @return True if this object can be renamed; false otherwise. isSelected () Get whether the object has been marked as selected. (in editor) @return True if the object is currently selected. save ( string fileName, bool selectedOnly=false, string preAppendString="" ) Save out the object to the given file. @param fileName The name of the file to save to.@param selectedOnly If true, only objects marked as selected will be saved out. @param preAppendString Text which will be preprended directly to the object serialization. @param True on success, false on failure. schedule ( float time, string method, string args... ) Delay an invocation of a method. @param time The number of milliseconds after which to invoke the method. This is a soft limit. @param method The method to call. @param args The arguments with which to call the method. @return The numeric ID of the created schedule. Can be used to cancel the call. setCanSave ( bool value=true ) Set whether the object will be included in saves. @param value If true, the object will be included in saves; if false, it will be excluded. setClassNamespace ( string name ) Assign a class namespace to this object. @param name The name of the 'class' namespace for this object. setEditorOnly ( bool value=true ) Set/clear the editor-only flag on this object. @param value If true, the object is marked as existing only for the editor. setFieldType ( string fieldName, string type ) Set the console type code for the given field. @param fieldName The name of the dynamic field to change to type for. @param type The name of the console type. @note This only works for dynamic fields. Types of static fields cannot be changed. setFieldValue ( string fieldName, string value, int index=-1 ) Set the value of the given field on this object. @param fieldName The name of the field to assign to. If it includes an array index, the index will be parsed out. @param value The new value to assign to the field. @param index Optional argument to specify an index for an array field. @return True. setFilename ( string fileName ) Sets the object's file name and path @param fileName The name of the file to associate this object with. setHidden ( bool value=true ) Hide/unhide the object. @param value If true, the object will be hidden; if false, the object will be unhidden. setInternalName ( string newInternalName ) Set the internal name of the object. @param newInternalName The new internal name for the object. setIsExpanded ( bool state=true ) Set whether the object has been marked as expanded. (in editor) @param state True if the object is to be marked expanded; false if not. setIsSelected ( bool state=true ) Set whether the object has been marked as selected. (in editor) @param state True if object is to be marked selected; false if not. setLocked ( bool value=true ) Lock/unlock the object in the editor. @param value If true, the object will be locked; if false, the object will be unlocked. setName ( string newName ) Set the global name of the object. @param newName The new global name to assign to the object. @note If name changing is disallowed on the object, the method will fail with a console error. setNameChangeAllowed ( bool value=true ) Set whether this object can be renamed from its first name. @param value If true, renaming is allowed for this object; if false, trying to change the name of the object will generate a console error. setSuperClassNamespace ( string name ) Assign a superclass namespace to this object. @param name The name of the 'superClass' namespace for this object. canSave Whether the object can be saved out. If false, the object is purely transient in nature. canSaveDynamicFields True if dynamic fields (added at runtime) should be saved. Defaults to true. class Script class of object. className Script class of object. hidden Whether the object is visible. internalName Optional name that may be used to lookup this object within a SimSet. locked Whether the object can be edited. name Optional global name of this object. parentGroup Group hierarchy parent of the object. persistentId The universally unique identifier for the object. superClass Script super-class of object. SimObjectClass ConsoleClassObject SimPersistSet SimSet resolvePersistentIds () Try to bind unresolved persistent IDs in the set. SimPersistSetClass ConsoleClassObject SimpleComponent SimComponent SimpleComponentClass ConsoleClassObject SimpleMessageEvent SimpleMessageEventClass ConsoleClassObject SimpleNetObject NetObject msg ( NetConnection con, string message ) @brief Send a SimpleNetObject message to the specified connection. @param con The unique ID of the connection to transmit to @param message The string containing the message to transmit setMessage ( string msg ) @brief Sets the internal message variable. @param msg The new message to send @return Value SimpleNetObjectClass ConsoleClassObject SimResponseCurve SimObject addPoint addPoint( F32 value, F32 time ) clear clear() getValue getValue( F32 time ) SimResponseCurveClass ConsoleClassObject SimSet SimObject acceptsAsChild ( SimObject obj ) Test whether the given object may be added to the set. @param obj The object to test for potential membership. @return True if the object may be added to the set, false otherwise. add ( SimObject objects... ) Add the given objects to the set. @param objects The objects to add to the set. bringToFront ( SimObject obj ) Make the given object the first object in the set. @param obj The object to bring to the frontmost position. Must be contained in the set. callOnChildren ( string method, string args... ) Call a method on all objects contained in the set. @param method The name of the method to call. @param args The arguments to the method. clear () Remove all objects from the set. deleteAllObjects () Delete all objects in the set. findObjectByInternalName ( string internalName, bool searchChildren=false ) Find an object in the set by its internal name. @param internalName The internal name of the object to look for. @param searchChildren If true, SimSets contained in the set will be recursively searched for the object. @return The object with the given internal name or 0 if no match was found. getCount () Get the number of objects contained in the set. @return The number of objects contained in the set. getFullCount () Get the number of direct and indirect child objects contained in the set. @return The number of objects contained in the set as well as in other sets contained directly or indirectly in the set. getObject ( int index ) Get the object at the given index. @param index The object index. @return The object at the given index or -1 if index is out of range. getObjectIndex ( SimObject obj ) Return the index of the given object in this set. @param obj The object for which to return the index. Must be contained in the set. @return The index of the object or -1 if the object is not contained in the set. getRandom () Return a random object from the set. @return A randomly selected object from the set or NULL if the set is empty. isMember ( SimObject obj ) Test whether the given object belongs to the set. @param obj The object. @return True if the object is contained in the set; false otherwise. listObjects () Dump a list of all objects contained in the set to the console. pushToBack ( SimObject obj ) Make the given object the last object in the set. @param obj The object to bring to the last position. Must be contained in the set. remove ( SimObject objects... ) Remove the given objects from the set. @param objects The objects to remove from the set. reorderChild ( SimObject child1, SimObject child2 ) Make sure child1 is ordered right before child2 in the set. @param child1 The first child. The object must already be contained in the set. @param child2 The second child. The object must already be contained in the set. sort ( string callbackFunction ) Sort the objects in the set using the given comparison function. @param callbackFunction Name of a function that takes two object arguments A and B and returns -1 if A is less, 1 if B is less, and 0 if both are equal. onObjectAdded( SimObject object ) Called when an object is added to the set. @param object The object that was added. onObjectRemoved( SimObject object ) Called when an object is removed from the set. @param object The object that was removed. SimSetClass ConsoleClassObject SimXMLDocument SimObject addComment (string comment) @brief Add the given comment as a child of current stack element. @param comment String containing the comment. addData (string text) @brief Add the given text as a child of current stack element. @param text String containing the data. addHeader () @brief Add XML header to document. addNewElement (string name) @brief Create new element as child of current stack element and push new element on to stack. @param name String containing name of new element. addText (string text) @brief Add the given text as a child of current stack element. @param text String containing the text. attribute (string attri) @brief Get string attribute from top element on element stack. @param attri String containing attribute to query. attributeExists (string attribute) @brief Get true if named attribute exists. @param attribute Name of attribute being queried for. @param True if the attribute exists. attributeF32 (string attri) @brief Get float attribute from top element on element stack. @param attri String containing attribute to query. attributeS32 (string attri) @brief Get int attribute from top element on element stack. @param attri String containing attribute to query. clear () @brief Clear contents of XML document. clearError () @brief Clear error description. elementValue Get element value if it exists (string). firstAttribute () @brief Obtain the name of the current element's first attribute. @return String containing the name getData () @brief Gets the text from the current stack element. @return String containing the data from current stack element. getErrorDesc Get current error description. getText () @brief Gets the text from the current stack element. @return String containing the text in the current element. lastAttribute () @brief Obtain the name of the current element's last attribute. @return String containing the name. loadFile (string FileName) @brief Load file from given filename.@param FileName Name and path of XML document nextAttribute () @brief Get the name of the next attribute for the current element after a call to firstAttribute(). @return String containing the name. nextSiblingElement (string name) @brief Set top element on stack to next element with given name. @param name String containing name to set next sibling. parse (string xmlString) @brief Create document from XML string. @param xmlString Line from XML. popElement () @brief Pop last element off of stack. prevAttribute () @brief Get the name of the previous attribute for the current element after a call to lastAttribute(). @return String containing the name. pushChildElement (S32 index) @brief Push the child element at the given index onto stack. @param index Numerical index of element being pushed. pushFirstChildElement (string name) @brief Push first child element with given name onto stack. @param name String containing name of the child element. pushNewElement Create new element as child of current stack element and push new element on to stack. readComment (S32 index) @brief Returns the comment at the specified index. @param index Index number to query @return String containing the comment. removeText () @brief Remove any text on the current stack element. reset () @brief Set this to default state at construction. saveFile () @brief Save file to given filename. @return True if file saves successfully setAttribute (string attribute, string value) @brief Set attribute of top stack element to given value. @param attribute Name of attribute being changed @param value New value to assign to attribute setObjectAttributes (string objectID) @brief Set attribute of top stack element to given value. @param objectID Unique ID of SimObject being modified. SimXMLDocumentClass ConsoleClassObject SkyBox SceneObject postApply drawBottom If false the bottom of the skybox is not rendered. fogBandHeight The height (0-1) of the fog band from the horizon to the top of the SkyBox. Material The name of a cubemap material for the sky box. SkyBoxClass ConsoleClassObject SpawnSphere MissionMarker spawnObject ([string additionalProps]) Spawns the object based on the SpawnSphere's class, datablock, properties, and script settings. Allows you to pass in extra properties.@hide autoSpawn Flag to spawn object as soon as SpawnSphere is created, true to enable or false to disabled indoorWeight Deprecated onAdd( int objectId ) Called when the SpawnSphere is being created. @param objectId The unique SimObjectId generated when SpawnSphere is created outdoorWeight Deprecated radius Determines the size of the sphere in which the object will spawn spawnClass Class assigned to object when created, such as Player, or AIPlayer spawnDatablock Predefined datablock assigned to the object when created spawnProperties String containing ; delimited properties that are set at the time of spawning SpawnScript Command to execute when spawning an object. New object id is stored in $SpawnObject. Max 255 characters. sphereWeight Deprecated SpawnSphereClass ConsoleClassObject Splash GameBase SplashClass ConsoleClassObject SplashData GameBaseData acceleration Constant acceleration value to place upon the splash effect. colors Color values to set the splash effect, rgba. Up to 4 allowed. Will transition through colors based on values set in the times value. Example: colors[0] = "0.6 1.0 1.0 0.5". delayMS Time to delay, in milliseconds, before actually starting this effect. delayVariance Time variance for delayMS. ejectionAngle Rotational angle to create a splash ring. ejectionFreq Frequency in which to emit splash rings. emitter List of particle emitters to create at the point of this Splash effect. Explosion ExplosionData object to create at the creation position of this splash effect. height Height for the splash to reach. lifetimeMS Lifetime for this effect, in milliseconds. lifetimeVariance Time variance for lifetimeMS. numSegments Number of ejection points in the splash ring. ringLifetime Lifetime, in milliseconds, for a splash ring. scale The scale of this splashing effect, defined as the F32 points X, Y, Z. soundProfile SFXProfile effect to play. startRadius Starting radius size of a splash ring. texFactor Factor in which to apply the texture to the splash ring, 0.0f - 1.0f. texture Imagemap file to use as the texture for the splash effect. texWrap Amount to wrap the texture around the splash ring, 0.0f - 1.0f. times Times to transition through the splash effect. Up to 4 allowed. Values are 0.0 - 1.0, and corrispond to the life of the particle where 0 is first created and 1 is end of lifespace. velocity Velocity for the splash effect to travel. Width Width for the X and Y coordinates to create this effect within. SplashDataClass ConsoleClassObject SpotLight LightBase innerAngle float innerAngle outerAngle float outerAngle range float range SpotLightClass ConsoleClassObject SQLiteObject SimObject clearResult (int resultSet) Clears memory used by the specified result set, and deletes the result set. closeDatabase Closes the active database. endOfResult (int resultSet) Checks to see if the internal pointer for the specified result set is at the end, indicating there are no more rows left to read. EOF (int resultSet) Same as endOfResult(). EOR (int resultSet) Same as endOfResult(). escapeString (string) Escapes the given string, making it safer to pass into a query. firstRow (int resultSet) Moves the result set's row pointer to the very first row in the result set. getColumn (resultSet column) Returns the value of the specified column (Column can be specified by name or index) in the current row of the specified result set. If the call fails, the returned string will indicate the error. getColumnIndex (resultSet columnName) Looks up the specified column name in the specified result set, and returns the columns index number. A return value of 0 indicates the lookup failed for some reason (usually this indicates you specified a column name that doesn't exist or is spelled wrong). getColumnName (resultSet columnIndex) Looks up the specified column index in the specified result set, and returns the column's name. A return value of an empty string indicates the lookup failed for some reason (usually this indicates you specified a column index that is invalid or exceeds the number of columns in the result set). Columns are index starting with 1 not 0 getRow (int resultSet) Returns what row the result set's row pointer is currently on. lastRow (int resultSet) Moves the result set's row pointer to the very last row in the result set. nextRow (int resultSet) Moves the result set's row pointer to the next row. numColumns (int resultSet) Returns the number of columns in the result set. numRows (int resultSet) Returns the number of rows in the result set. openDatabase (const char* filename) Opens the database specifed by filename. Returns true or false. previousRow (int resultSet) Moves the result set's row pointer to the previous row query (const char* sql, int mode) Performs an SQL query on the open database and returns an identifier to a valid result set. mode is currently unused, and is reserved for future use. setRow (int resultSet int row) Moves the result set's row pointer to the row specified. Row indices start at 1 not 0. SQLiteObjectClass ConsoleClassObject StaticShape ShapeBase getPoweredState @internal setPoweredState (bool isPowered) @internal StaticShapeClass ConsoleClassObject StaticShapeData ShapeBaseData dynamicType An integer value which, if speficied, is added to the value retured by getType(). noIndividualDamage Deprecated @internal StaticShapeDataClass ConsoleClassObject StreamObject SimObject copyFrom (StreamObject other) getPosition () @brief Gets the position in the stream The easiest way to visualize this is to think of a cursor in a text file. If you have moved the cursor by five characters, the current position is 5. If you move ahead 10 more characters, the position is now 15. For StreamObject, when you read in the line the position is increased by the number of characters parsed, the null terminator, and a newline. @tsexample // Create a file stream object for reading %fsObject = new FileStreamObject(); // Open a file for reading // This file contains two lines of text repeated: // Hello World // Hello World %fsObject.open("./test.txt", "read"); // Read in the first line %line = %fsObject.readLine(); // Get the position of the stream %position = %fsObject.getPosition(); // Print the current position // Should be 13, 10 for the words, 1 for the space, 1 for the null terminator, and 1 for the newline echo(%position); // Always remember to close a file stream when finished %fsObject.close(); @endtsexample @return Number of bytes which stream has parsed so far, null terminators and newlines are included getStatus () @brief Gets a printable string form of the status @tsexample // Create a file stream object for reading %fsObject = new FileStreamObject(); // Open a file for reading %fsObject.open("./test.txt", "read"); // Get the status and print it %status = %fsObject.getStatus(); echo(%status); // Always remember to close a file stream when finished %fsObject.close(); @endtsexample @return String containing status constant, one of the following: ^OK - Stream is active and no file errors ^IOError - Something went wrong during read or writing the stream ^EOS - An unsupported operation used. Always w/ accompanied by AssertWarn ^IllegalCall - Tried to operate on a closed stream (or detached filter) ^UnknownError - Catchall for an error of some kind ^Invalid - Entire stream is invalid getStreamSize () @brief Gets the size of the stream The size is dependent on the type of stream being used. If it is a file stream, returned value will be the size of the file. If it is a memory stream, it will be the size of the allocated buffer. @tsexample // Create a file stream object for reading %fsObject = new FileStreamObject(); // Open a file for reading // This file contains the following two lines: // HelloWorld // HelloWorld %fsObject.open("./test.txt", "read"); // Found out how large the file stream is // Then print it to the console // Should be 22 %streamSize = %fsObject.getStreamSize(); echo(%streamSize); // Always remember to close a file stream when finished %fsObject.close(); @endtsexample @return Size of stream, in bytes isEOF () @brief Tests if the stream has reached the end of the file This is an alternative name for isEOS. Both functions are interchangeable. This simply exists for those familiar with some C++ file I/O standards. @tsexample // Create a file stream object for reading %fsObject = new FileStreamObject(); // Open a file for reading %fsObject.open("./test.txt", "read"); // Keep reading until we reach the end of the file while( !%fsObject.isEOF() ) { %line = %fsObject.readLine(); echo(%line); } // Made it to the end echo("Finished reading file"); // Always remember to close a file stream when finished %fsObject.close(); @endtsexample @return True if the parser has reached the end of the file, false otherwise @hide isEOS () @brief Tests if the stream has reached the end of the file This is an alternative name for isEOF. Both functions are interchangeable. This simply exists for those familiar with some C++ file I/O standards. @tsexample // Create a file stream object for reading %fsObject = new FileStreamObject(); // Open a file for reading %fsObject.open("./test.txt", "read"); // Keep reading until we reach the end of the file while( !%fsObject.isEOS() ) { %line = %fsObject.readLine(); echo(%line); } // Made it to the end echo("Finished reading file"); // Always remember to close a file stream when finished %fsObject.close(); @endtsexample @return True if the parser has reached the end of the file, false otherwise readLine () @brief Read a line from the stream. Emphasis on *line*, as in you cannot parse individual characters or chunks of data. There is no limitation as to what kind of data you can read. @tsexample // Create a file stream object for reading // This file contains the following two lines: // HelloWorld // HelloWorld %fsObject = new FileStreamObject(); %fsObject.open("./test.txt", "read"); // Read in the first line %line = %fsObject.readLine(); // Print the line we just read echo(%line); // Always remember to close a file stream when finished %fsObject.close(); @endtsexample @return String containing the line of data that was just read readLongString (maxLength) readString () @brief This function should be deprecated@hide readSTString ([caseSensitive = false]) setPosition ( int newPosition ) @brief Gets the position in the stream The easiest way to visualize this is to think of a cursor in a text file. If you have moved the cursor by five characters, the current position is 5. If you move ahead 10 more characters, the position is now 15. For StreamObject, when you read in the line the position is increased by the number of characters parsed, the null terminator, and a newline. Using setPosition allows you to skip to specific points of the file. @tsexample // Create a file stream object for reading %fsObject = new FileStreamObject(); // Open a file for reading // This file contains the following two lines: // 11111111111 // Hello World %fsObject.open("./test.txt", "read"); // Skip ahead by 12, which will bypass the first line entirely %fsObject.setPosition(12); // Read in the next line %line = %fsObject.readLine(); // Print the line just read in, should be "Hello World" echo(%line); // Always remember to close a file stream when finished %fsObject.close(); @endtsexample @return Number of bytes which stream has parsed so far, null terminators and newlines are included writeLine ( string line ) @brief Write a line to the stream, if it was opened for writing. There is no limit as to what kind of data you can write. Any format and data is allowable, not just text. Be careful of what you write, as whitespace, current values, and literals will be preserved. @param line The data we are writing out to file.@tsexample // Create a file stream %fsObject = new FileStreamObject(); // Open the file for writing // If it does not exist, it is created. If it does exist, the file is cleared %fsObject.open("./test.txt", "write"); // Write a line to the file %fsObject.writeLine("Hello World"); // Write another line to the file %fsObject.writeLine("Documentation Rocks!"); // Always remember to close a file stream when finished %fsObject.close(); @endtsexample writeLongString (maxLength, string) writeString (string, [maxLength = 255]) StreamObjectClass ConsoleClassObject Sun SceneObject animate animate( F32 duration, F32 startAzimuth, F32 endAzimuth, F32 startElevation, F32 endElevation ) apply ambient Color shading applied to surfaces not in direct contact with light source, such as in the shadows or interiors. attenuationRatio The proportions of constant, linear, and quadratic attenuation to use for the falloff for point and spot lights. azimuth The horizontal angle of the sun measured clockwise from the positive Y world axis. brightness Adjust the Sun's global contrast/intensity castShadows Enables/disables shadows cast by objects due to Sun light color Color shading applied to surfaces in direct contact with light source. cookie A custom pattern texture which is projected from the light. coronaEnabled Enable or disable rendering of the corona sprite. coronaMaterial Texture for the corona sprite. coronaScale Controls size the corona sprite renders, specified as a fractional amount of the screen height. coronaTint Modulates the corona sprite color ( if coronaUseLightColor is false ). coronaUseLightColor Modulate the corona sprite color by the color of the light ( overrides coronaTint ). elevation The elevation angle of the sun above or below the horizon. fadeStartDistance Start fading shadows out at this distance. 0 = auto calculate this distance. flareScale Changes the size and intensity of the flare. flareType Datablock for the flare produced by the Sun includeLightmappedGeometryInShadow This light should render lightmapped geometry during its shadow-map update (ignored if 'representedInLightmap' is false) lastSplitTerrainOnly This toggles only terrain being rendered to the last split of a PSSM shadow map. logWeight The logrithmic PSSM split distance factor. numSplits The logrithmic PSSM split distance factor. overDarkFactor The ESM shadow darkening factor representedInLightmap This light is represented in lightmaps (static light, default: false) shadowDarkenColor The color that should be used to multiply-blend dynamic shadows onto lightmapped geometry (ignored if 'representedInLightmap' is false) shadowDistance The distance from the camera to extend the PSSM shadow. shadowSoftness float shadowSoftness shadowType The type of shadow to use on this light. texSize The texture size of the shadow map. SunClass ConsoleClassObject TCPGroup SimGroup TCPObject SimObject connect ( string address ) Connect to the given address. @param address Server address to connect to. @tsexample // Set the address. %address = "www.TorquePowered.com"; // Inform this TCPObject to connect to the specified address. %thisTCPObj.connect(%address); @endtsexample @ingroup Platform disconnect () Disconnect from whatever this TCPObject is currently connected to, if anything. @tsexample // Inform this TCPObject to disconnect from anything it is currently connected to. %thisTCPObj.disconnect(); @endtsexample @ingroup Platform listen ( int port ) Start listening on the specified port for connections. @param port Port for this TCPObject to start listening for connections on. @tsexample // Set the port number list %portNumber = 80; // Inform this TCPObject to start listening at the specified port. %thisTCPObj.send(%portNumber); @endtsexample @ingroup Platform send ( string data ) Transmits the data string to the server. @param data The data string to send back to the server. @tsexample // Set the command data %data = ""GET " @ $RSSFeed::serverURL @ " HTTP/1.0 Host: " @ $RSSFeed::serverName @ "\nUser-Agent: " @ $RSSFeed::userAgent @ "\n\r\n\r\n"" // Send the command back to the active server. %thisTCPObj.send(%data); @endtsexample @ingroup Platform onConnected() Called whenever a connection is established with a server. onConnectFailed() Called whenever a connection has failed to be established with a server. onConnectionRequest( string address, string ID ) Called whenever a connection request is made. @param address Server address to connect to. @param ID Connection ID onDisconnect() Called whenever the TCPObject disconnects from whatever it is currently connected to. onDNSFailed() Called whenever the DNS has failed to resolve. onDNSResolved() Called whenever the DNS has been resolved. onLine( string line ) Called whenever a line of data is sent from the server connected to this TCPObject to the game client. @param line Data sent from the server. TCPObjectClass ConsoleClassObject TerrainBlock SceneObject createNew TerrainBlock.create( String terrainName, U32 resolution, String materialName, bool genNoise ) exportHeightMap (string filename, [string format]) export the terrain block's heightmap to a bitmap file (default: png) exportLayerMaps (string filePrefix, [string format]) export the terrain block's layer maps to bitmap files (default: png) import ( String terrainName, String heightMap, F32 metersPerPixel, F32 heightScale, String materials, String opacityLayers ) save ( string fileName ) @brief Saves the terrain block's terrain file to the specified file name. @param fileName Name and path of file to save terrain data to. @return True if file save was successful, false otherwise baseTexSize Size of base texture size per meter. lightMapSize Light map dimensions in pixels. screenError Not yet implemented. squareSize Indicates the spacing between points on the XY plane on the terrain. terrainFile The source terrain data file. TerrainBlockClass ConsoleClassObject TerrainEditor EditTSCtrl addMaterial ( string matName ) Adds a new material. attachTerrain (TerrainBlock terrain) clearSelection getActionName (int num) getActiveTerrain getBrushPos Returns a Point2I. getBrushPressure () getBrushSize () getBrushSoftness () getBrushType () getCurrentAction getMaterialCount Returns the current material count. getMaterialIndex ( string name ) Returns the index of the material with the given name or -1. getMaterialName ( int index ) Returns the name of the material at the given index. getMaterials () gets the list of current terrain materials. getNumActions getNumTextures getSlopeLimitMaxAngle getSlopeLimitMinAngle getTerrainBlock (S32 index) getTerrainBlockCount () getTerrainBlocksMaterialList () gets the list of current terrain materials for all terrain blocks. getTerrainUnderWorldPoint (x/y/z) Gets the terrain block that is located under the given world point. @param x/y/z The world coordinates (floating point values) you wish to query at. These can be formatted as either a string ("x y z") or separately as (x, y, z) @return Returns the ID of the requested terrain block (0 if not found). markEmptySquares mirrorTerrain processAction (string action=NULL) removeMaterial ( int index ) Remove the material at the given index. reorderMaterial ( int index, int order ) Reorder material at the given index to the new position, changing the order in which it is rendered / blended. resetSelWeights (bool clear) setAction (string action_name) setBrushPos (int x, int y) setBrushPressure (float pressure) setBrushSize (int w [, int h]) setBrushSoftness (float softness) setBrushType (string type) One of box, ellipse, selection. setSlopeLimitMaxAngle setSlopeLimitMinAngle setTerraformOverlay (bool overlayEnable) sets the terraformer current heightmap to draw as an overlay over the current terrain. updateMaterial ( int index, string matName ) Changes the material name at the index. adjustHeightMouseScale float adjustHeightMouseScale adjustHeightVal float adjustHeightVal borderFillColor ColorI borderFillColor borderFrameColor ColorI borderFrameColor borderHeight float borderHeight borderLineMode bool borderLineMode isDirty bool isDirty isMissionDirty bool isMissionDirty materialGroup int materialGroup maxBrushSize Point2I maxBrushSize noiseFactor float noiseFactor paintIndex int paintIndex processUsesBrush bool processUsesBrush renderBorder bool renderBorder renderSolidBrush bool renderSolidBrush renderVertexSelection bool renderVertexSelection scaleVal float scaleVal selectionHidden bool selectionHidden setHeightVal float setHeightVal smoothFactor float smoothFactor softSelectDefaultFilter string softSelectDefaultFilter softSelectFilter string softSelectFilter softSelectRadius float softSelectRadius TerrainEditorClass ConsoleClassObject TerrainMaterial SimObject detailDistance Changes how far camera can see the detail map rendering on the material detailMap Detail map for the material detailSize Used to scale the detail map to the material square detailStrength Exponentially sharpens or lightens the detail map rendering on the material diffuseMap Base texture for the material diffuseSize Used to scale the diffuse map to the material square normalMap Bump map for the material parallaxScale Used to scale the height from the normal map to give some self occlusion effect (aka parallax) to the terrain material useSideProjection Makes that terrain material project along the sides of steep slopes instead of projected downwards TerrainMaterialClass ConsoleClassObject TerrainMaterialSet SimSet TerrainSmoothAction UndoAction smooth ( TerrainBlock obj, F32 factor, U32 steps ) TerrainSmoothActionClass ConsoleClassObject TimeOfDay SceneObject addTimeOfDayEvent addTimeOfDayEvent( triggerElevation, identifierString ) animate ( time, speed ) setDayLength setDayLength( time ) setPlay setPlay( bool ) setTimeOfDay setTimeOfDay( time ) axisTilt The angle in degrees between global equator and tropic. azimuthOverride float azimuthOverride dayLength The length of a virtual day in real world seconds. dayScale Scalar applied to time that elapses while the sun is up. nightScale Scalar applied to time that elapses while the sun is down. play True when the TimeOfDay object is operating. startTime float startTime time Current time of day. TimeOfDayClass ConsoleClassObject Trigger GameBase getNumObjects getObject (int idx) enterCommand The command to execute when an object enters this trigger. Object id stored in %obj. Maximum 1023 characters. leaveCommand The command to execute when an object leaves this trigger. Object id stored in %obj. Maximum 1023 characters. onAdd( int objectId ) Called when the Trigger is being created. @param objectId the object id of the Trigger being created onRemove( int objectId ) Called when the before the Trigger is deleted. @param objectId the object id of the Trigger being deleted polyhedron The polyhedron type is really a quadrilateral and consists of a cornerpoint followed by three vectors representing the edges extending from the corner. tickCommand The command to execute while an object is inside this trigger. Maximum 1023 characters. TriggerClass ConsoleClassObject TriggerData GameBaseData clientSide Forces Trigger callbacks to only be called on clients. onEnterTrigger( Trigger trigger, GameBase obj ) Called when an object enters the volume of the Trigger instance using this TriggerData. @param trigger the Trigger instance whose volume the object entered @param obj the object that entered the volume of the Trigger instance onLeaveTrigger( Trigger trigger, GameBase obj ) Called when an object leaves the volume of the Trigger instance using this TriggerData. @param trigger the Trigger instance whose volume the object left @param obj the object that left the volume of the Trigger instance onTickTrigger( Trigger trigger ) Called every tickPeriodMS number of milliseconds as specified in the TriggerData whenever one or more objects are inside the volume of the trigger. @param trigger the Trigger instance whose volume the object is inside tickPeriodMS Time in milliseconds between calls to TriggerData::onTickTrigger(). TriggerDataClass ConsoleClassObject TSForestItemData ForestItemData TSForestItemDataClass ConsoleClassObject TSShapeConstructor SimObject addCollisionDetail ( int size, string type, string target, int depth=4, float merge=30, float concavity=30, int maxVerts=32, float boxMaxError=0, float sphereMaxError=0, float capsuleMaxError=0 ) Autofit a mesh primitive or set of convex hulls to the shape geometry. Hulls may optionally be converted to boxes, spheres and/or capsules based on their volume. @param size size for this detail level @param type one of: box, sphere, capsule, 10-dop x, 10-dop y, 10-dop z, 18-dop, 26-dop, convex hulls. See the Shape Editor documentation for more details about these types. @param target geometry to fit collision mesh(es) to; either "bounds" (for the whole shape), or the name of an object in the shape @param depth maximum split recursion depth (hulls only) @param merge volume % threshold used to merge hulls together (hulls only) @param concavity volume % threshold used to detect concavity (hulls only) @param maxVerts maximum number of vertices per hull (hulls only) @param boxMaxError max % volume difference for a hull to be converted to a box (hulls only) @param sphereMaxError max % volume difference for a hull to be converted to a sphere (hulls only) @param capsuleMaxError max % volume difference for a hull to be converted to a capsule (hulls only) @return true if successful, false otherwise @tsexample %this.addCollisionDetail( "ColConvex", "bounds", 4, 20, 30, 32, 50, 50, 50, "Col-1" ); @endtsexample addImposter ( int size, int equatorSteps, int polarSteps, int dl, int dim, bool includePoles, float polarAngle ) Add (or edit) an imposter detail level to the shape. If the shape already contains an imposter detail level, this command will simply change the imposter settings @param size size of the imposter detail level @param equatorSteps defines the number of snapshots to take around the equator. Imagine the object being rotated around the vertical axis, then a snapshot taken at regularly spaced intervals. @param polarSteps defines the number of snapshots taken between the poles (top and bottom), at each equator step. eg. At each equator snapshot, snapshots are taken at regular intervals between the poles. @param dl the detail level to use when generating the snapshots. Note that this is an array index rather than a detail size. So if an object has detail sizes of: 200, 150, and 40, then setting dl to 1 will generate the snapshot using detail size 150. @param dim defines the size of the imposter images in pixels. The larger the number, the more detailed the billboard will be. @param includePoles flag indicating whether to include the "pole" snapshots. ie. the views from the top and bottom of the object. @param polar_angle if pole snapshots are active (includePoles is true), this parameter defines the camera angle (in degrees) within which to render the pole snapshot. eg. if polar_angle is set to 25 degrees, then the snapshot taken at the pole (looking directly down or up at the object) will be rendered when the camera is within 25 degrees of the pole. @return true if successful, false otherwise @tsexample %this.addImposter( 2, 4, 0, 0, 64, false, 0 ); %this.addImposter( 2, 4, 2, 0, 64, true, 10 ); // this command would edit the existing imposter detail level @endtsexample addMesh ( string meshName, string srcShape, string srcMesh ) Add geometry from another DTS or DAE shape file into this shape. Any materials required by the source mesh are also copied into this shape.<br> @param meshName full name (object name + detail size) of the new mesh. If no detail size is present at the end of the name, a value of 2 is used.<br>An underscore before the number at the end of the name will be interpreted as a negative sign. eg. "MyMesh_4" will be interpreted as "MyMesh-4". @param srcShape name of a shape file (DTS or DAE) that contains the mesh @param srcMesh the full name (object name + detail size) of the mesh to copy from the DTS/DAE file into this shape</li>@return true if successful, false otherwise @tsexample %this.addMesh( "ColMesh-1", "./collision.dts", "ColMesh", "Col-1" ); %this.addMesh( "SimpleShape10", "./testShape.dae", "MyMesh2", ); @endtsexample addNode ( string name, string parentName, TransformF txfm=TransformF::Identity, bool isWorld=false ) Add a new node. @param name name for the new node (must not already exist) @param parentName name of an existing node to be the parent of the new node. If empty (""), the new node will be at the root level of the node hierarchy. @param txfm (optional) transform string of the form: "pos.x pos.y pos.z rot.x rot.y rot.z rot.angle]" @param isworld (optional) flag to set the local-to-parent or the global transform. If false, or not specified, the position and orientation are treated as relative to the node's parent. @return true if successful, false otherwise @tsexample %this.addNode( "Nose", "Bip01 Head", "0 2 2 0 0 1 0" ); %this.addNode( "myRoot", "", "0 0 4 0 0 1 1.57" ); %this.addNode( "Nodes", "Bip01 Head", "0 2 0 0 0 1 0", true ); @endtsexample addPrimitive ( string meshName, string type, string params, TransformF txfm, string nodeName ) Add a new mesh primitive to the shape. @param meshName full name (object name + detail size) of the new mesh. If no detail size is present at the end of the name, a value of 2 is used.<br>An underscore before the number at the end of the name will be interpreted as a negative sign. eg. "MyMesh_4" will be interpreted as "MyMesh-4". @param type one of: "box", "sphere", "capsule" @param params mesh primitive parameters: <ul><li>for box: "size_x size_y size_z"</li><li>for sphere: "radius"</li><li>for capsule: "height radius"</li></ul></ul> @param txfm local transform offset from the node for this mesh @param nodeName name of the node to attach the new mesh to (will change the object's node if adding a new mesh to an existing object) @return true if successful, false otherwise @tsexample %this.addMesh( "Box4", "box", "2 4 2", "0 2 0 0 0 1 0", "eye" ); %this.addMesh( "Sphere256", "sphere", "2", "0 0 0 0 0 1 0", "root" ); %this.addMesh( "MyCapsule-1", "capsule", "2 5", "0 0 2 0 0 1 0", "base01" ); @endtsexample addSequence ( string source, string name, int start=0, int end=-1 ) Add a new sequence to the shape. @param source the name of an existing sequence, or the name of a DTS or DAE shape or DSQ sequence file. When the shape file contains more than one sequence, the desired sequence can be specified by appending the name to the end of the shape file. eg. "myShape.dts run" would select the "run" sequence from the "myShape.dts" file. @param name name of the new sequence @param start (optional) first frame to copy. Defaults to 0, the first frame in the sequence. @param end (optional) last frame to copy. Defaults to -1, the last frame in the sequence. @return true if successful, false otherwise @tsexample %this.addSequence( "./testShape.dts ambient", "ambient" ); %this.addSequence( "./myPlayer.dae run", "run" ); %this.addSequence( "./player_look.dsq", "look", 0, -1 ); // start to end %this.addSequence( "walk", "walk_shortA", 0, 4 ); // start to frame 4 %this.addSequence( "walk", "walk_shortB", 4, -1 ); // frame 4 to end @endtsexample addTrigger ( string name, int keyframe, int state ) Add a new trigger to the sequence. @param name name of the sequence to modify @param keyframe keyframe of the new trigger @param state of the new trigger @return true if successful, false otherwise @tsexample %this.addTrigger( "walk", 3, 1 ); %this.addTrigger( "walk", 5, -1 ); @endtsexample dumpShape ( string filename="" ) Dump the shape hierarchy to the console or to a file. Useful for reviewing the result of a series of construction commands. @param filename Destination filename. If not specified, dump to console. @tsexample %this.dumpShape(); // dump to console %this.dumpShape( "./dump.txt" ); // dump to file @endtsexample getBounds () Get the bounding box for the shape. @return Bounding box "minX minY minZ maxX maxY maxZ" getDetailLevelCount () Get the total number of detail levels in the shape. @return the number of detail levels in the shape getDetailLevelIndex ( int size ) Get the index of the detail level with a given size. @param size size of the detail level to lookup @return index of the detail level with the desired size, or -1 if no suchdetail exists @tsexample if ( %this.getDetailLevelSize( 32 ) == -1 ) echo( "Error: This shape does not have a detail level at size 32" );@endtsexample getDetailLevelName ( int index ) Get the name of the indexed detail level. @param index detail level index (valid range is 0 - getDetailLevelCount()-1) @return the detail level name @tsexample // print the names of all detail levels in the shape %count = %this.getDetailLevelCount(); for ( %i = 0; %i < %count; %i++ ) echo( %i SPC %this.getDetailLevelName( %i ) ); @endtsexample getDetailLevelSize ( int index ) Get the size of the indexed detail level. @param index detail level index (valid range is 0 - getDetailLevelCount()-1) @return the detail level size @tsexample // print the sizes of all detail levels in the shape %count = %this.getDetailLevelCount(); for ( %i = 0; %i < %count; %i++ ) echo( "Detail" @ %i @ " has size " @ %this.getDetailLevelSize( %i ) ); @endtsexample getImposterDetailLevel () Get the index of the imposter (auto-billboard) detail level (if any). @return imposter detail level index, or -1 if the shape does not useimposters. getImposterSettings ( int index ) Get the settings used to generate imposters for the indexed detail level. @param index index of the detail level to query (does not need to be an imposter detail level @return string of the form: "valid eqSteps pSteps dl dim poles angle", where:<dl><dt>valid</dt><dd>1 if this detail level generates imposters, 0 otherwise</dd><dt>eqSteps</dt><dd>number of steps around the equator</dd><dt>pSteps</dt><dd>number of steps between the poles</dd><dt>dl</dt><dd>index of the detail level used to generate imposters</dd><dt>dim</dt><dd>size (in pixels) of each imposter image</dd><dt>poles</dt><dd>1 to include pole images, 0 otherwise</dd><dt>angle</dt><dd>angle at which to display pole images</dd></dl> @tsexample // print the imposter detail level settings %index = %this.getImposterDetailLevel(); if ( %index != -1 ) echo( "Imposter settings: " @ %this.getImposterSettings( %index ) ); @endtsexample getMeshCount ( string name ) Get the number of meshes (detail levels) for the specified object. @param name name of the object to query @return the number of meshes for this object. @tsexample %count = %this.getMeshCount( "SimpleShape" ); @endtsexample getMeshMaterial ( string name ) Get the name of the material attached to a mesh. Note that only the first material used by the mesh is returned. @param name full name (object name + detail size) of the mesh to query return name of the material attached to the mesh (suitable for use with the Material mapTo field) @tsexample echo( "Mesh material is " @ %this.sgetMeshMaterial( "SimpleShape128" ) ); @endtsexample getMeshName ( string name, int index ) Get the name of the indexed mesh (detail level) for the specified object. @param name name of the object to query @param index index of the mesh (valid range is 0 - getMeshCount()-1) @return the mesh name. @tsexample // print the names of all meshes in the shape %objCount = %this.getObjectCount(); for ( %i = 0; %i < %objCount; %i++ ) { %objName = %this.getObjectName( %i ); %meshCount = %this.getMeshCount( %objName ); for ( %j = 0; %j < %meshCount; %j++ ) echo( %this.getMeshName( %objName, %j ) ); } @endtsexample getMeshSize ( string name, int index ) Get the detail level size of the indexed mesh for the specified object. @param name name of the object to query @param index index of the mesh (valid range is 0 - getMeshCount()-1) @return the mesh detail level size. @tsexample // print sizes for all detail levels of this object %objName = "trunk"; %count = %this.getMeshCount( %objName ); for ( %i = 0; %i < %count; %i++ ) echo( %this.getMeshSize( %objName, %i ) ); @endtsexample getMeshType ( string name ) Get the display type of the mesh. @param name name of the mesh to query @return the string returned is one of:<dl><dt>normal</dt><dd>a normal 3D mesh</dd><dt>billboard</dt><dd>a mesh that always faces the camera</dd><dt>billboardzaxis</dt><dd>a mesh that always faces the camera in the Z-axis</dd></dl> @tsexample echo( "Mesh type is " @ %this.getMeshType( "SimpleShape128" ) ); @endtsexample getNodeChildCount ( string name ) Get the number of children of this node. @param name name of the node to query. @return the number of child nodes. @tsexample %count = %this.getNodeChildCount( "Bip01 Pelvis" ); @endtsexample getNodeChildName ( string name, int index ) Get the name of the indexed child node. @param name name of the parent node to query. @param index index of the child node (valid range is 0 - getNodeChildName()-1). @return the name of the indexed child node. @tsexample function dumpNode( %shape, %name, %indent ) { echo( %indent @ %name ); %count = %shape.getNodeChildCount( %name ); for ( %i = 0; %i < %count; %i++ ) dumpNode( %shape, %shape.getNodeChildName( %name, %i ), %indent @ " " ); } function dumpShape( %shape ) { // recursively dump node hierarchy %count = %shape.getNodeCount(); for ( %i = 0; %i < %count; %i++ ) { // dump top level nodes %name = %shape.getNodeName( %i ); if ( %shape.getNodeParentName( %name ) $= ) dumpNode( %shape, %name, "" ); } } @endtsexample getNodeCount () Get the total number of nodes in the shape. @return the number of nodes in the shape. @tsexample %count = %this.getNodeCount(); @endtsexample getNodeIndex ( string name ) Get the index of the node. @param name name of the node to lookup. @return the index of the named node, or -1 if no such node exists. @tsexample // get the index of Bip01 Pelvis node in the shape %index = %this.getNodeIndex( "Bip01 Pelvis" ); @endtsexample getNodeName ( int index ) Get the name of the indexed node. @param index index of the node to lookup (valid range is 0 - getNodeCount()-1). @return the name of the indexed node, or "" if no such node exists. @tsexample // print the names of all the nodes in the shape %count = %this.getNodeCount(); for (%i = 0; %i < %count; %i++) echo(%i SPC %this.getNodeName(%i)); @endtsexample getNodeObjectCount ( string name ) Get the number of geometry objects attached to this node. @param name name of the node to query. @return the number of attached objects. @tsexample %count = %this.getNodeObjectCount( "Bip01 Head" ); @endtsexample getNodeObjectName ( string name, int index ) Get the name of the indexed object. @param name name of the node to query. @param index index of the object (valid range is 0 - getNodeObjectCount()-1). @return the name of the indexed object. @tsexample // print the names of all objects attached to the node %count = %this.getNodeObjectCount( "Bip01 Head" ); for ( %i = 0; %i < %count; %i++ ) echo( %this.getNodeObjectName( "Bip01 Head", %i ) ); @endtsexample getNodeParentName ( string name ) Get the name of the node's parent. If the node has no parent (ie. it is at the root level), return an empty string. @param name name of the node to query. @return the name of the node's parent, or "" if the node is at the root level @tsexample echo( "Bip01 Pelvis parent = " @ %this.getNodeParentName( "Bip01 Pelvis ") ); @endtsexample getNodeTransform ( string name, bool isWorld=false ) Get the base (ie. not animated) transform of a node. @param name name of the node to query. @param isWorld true to get the global transform, false (or omitted) to get the local-to-parent transform. @return the node transform in the form "pos.x pos.y pos.z rot.x rot.y rot.z rot.angle". @tsexample %ret = %this.getNodeTransform( "mount0" ); %this.setNodeTransform( "mount4", %ret ); @endtsexample getObjectCount () Get the total number of objects in the shape. @return the number of objects in the shape. @tsexample %count = %this.getObjectCount(); @endtsexample getObjectIndex ( string name ) Get the index of the first object with the given name. @param name name of the object to get. @return the index of the named object. @tsexample %index = %this.getObjectIndex( "Head" ); @endtsexample getObjectName ( int index ) Get the name of the indexed object. @param index index of the object to get (valid range is 0 - getObjectCount()-1). @return the name of the indexed object. @tsexample // print the names of all objects in the shape %count = %this.getObjectCount(); for ( %i = 0; %i < %count; %i++ ) echo( %i SPC %this.getObjectName( %i ) ); @endtsexample getObjectNode ( string name ) Get the name of the node this object is attached to. @param name name of the object to get. @return the name of the attached node, or an empty string if this object is not attached to a node (usually the case for skinned meshes). @tsexample echo( "Hand is attached to " @ %this.getObjectNode( "Hand" ) ); @endtsexample getSequenceBlend ( string name ) Get information about blended sequences. @param name name of the sequence to query @return TAB delimited string of the form: "isBlend blendSeq blendFrame", where:<dl><dt>blend_flag</dt><dd>a boolean flag indicating whether this sequence is a blend</dd><dt>blend_seq_name</dt><dd>the name of the sequence that contains the reference frame (empty for blend sequences embedded in DTS files)</dd><dt>blend_seq_frame</dt><dd>the blend reference frame (empty for blend sequences embedded in DTS files)</dd></dl> @note Note that only sequences set to be blends using the setSequenceBlend command will contain the blendSeq and blendFrame information. @tsexample %blendData = %this.getSequenceBlend( "look" ); if ( getField( %blendData, 0 ) ) echo( "look is a blend, reference: " @ getField( %blendData, 1 ) ); @endtsexample getSequenceCount () Get the total number of sequences in the shape. @return the number of sequences in the shape getSequenceCyclic ( string name ) Check if this sequence is cyclic (looping). @param name name of the sequence to query @return true if this sequence is cyclic, false if not @tsexample if ( !%this.getSequenceCyclic( "ambient" ) ) error( "ambient sequence is not cyclic!" ); @endtsexample getSequenceFrameCount ( string name ) Get the number of keyframes in the sequence. @param name name of the sequence to query @return number of keyframes in the sequence @tsexample echo( "Run has " @ %this.getSequenceFrameCount( "run" ) @ " keyframes" ); @endtsexample getSequenceGroundSpeed ( string name ) Get the ground speed of the sequence. @note Note that only the first 2 ground frames of the sequence are examined; the speed is assumed to be constant throughout the sequence. @param name name of the sequence to query @return string of the form: "trans.x trans.y trans.z rot.x rot.y rot.z" @tsexample %speed = VectorLen( getWords( %this.getSequenceGroundSpeed( "run" ), 0, 2 ) ); echo( "Run moves at " @ %speed @ " units per frame" ); @endtsexample getSequenceIndex ( string name ) Find the index of the sequence with the given name. @param name name of the sequence to lookup @return index of the sequence with matching name, or -1 if not found @tsexample // Check if a given sequence exists in the shape if ( %this.getSequenceIndex( "walk" ) == -1 ) echo( "Could not find 'walk' sequence" ); @endtsexample getSequenceName ( int index ) Get the name of the indexed sequence. @param index index of the sequence to query (valid range is 0 - getSequenceCount()-1) @return the name of the sequence @tsexample // print the name of all sequences in the shape %count = %this.getSequenceCount(); for ( %i = 0; %i < %count; %i++ ) echo( %i SPC %this.getSequenceName( %i ) ); @endtsexample getSequencePriority ( string name ) Get the priority setting of the sequence. @param name name of the sequence to query @return priority value of the sequence getSequenceSource ( string name ) Get information about where the sequence data came from. For example, whether it was loaded from an external DSQ file. @param name name of the sequence to query @return TAB delimited string of the form: "from reserved start end total", where:<dl><dt>from</dt><dd>the source of the animation data, such as the path to a DSQ file, or the name of an existing sequence in the shape. This field will be empty for sequences already embedded in DTS or DAE file.</dd><dt>reserved</dt><dd>reserved value</dd><dt>start</dt><dd>the first frame in the source sequence used to create this sequence</dd><dt>end</dt><dd>the last frame in the source sequence used to create this sequence</dd><dt>total</dt><dd>the total number of frames in the source sequence</dd></dl> @tsexample // print the source for the walk animation echo( "walk source:" SPC getField( %this.getSequenceSource( "walk" ), 0 ) ); @endtsexample getTargetCount () Get the number of materials in the shape. @return the number of materials in the shape. @tsexample %count = %this.getTargetCount(); @endtsexample getTargetName ( int index ) Get the name of the indexed shape material. @param index index of the material to get (valid range is 0 - getTargetCount()-1). @return the name of the indexed material. @tsexample %count = %this.getTargetCount(); for ( %i = 0; %i < %count; %i++ ) echo( "Target " @ %i @ ": " @ %this.getTargetName( %i ) ); @endtsexample getTrigger ( string name, int index ) Get information about the indexed trigger @param name name of the sequence to query @param index index of the trigger (valid range is 0 - getTriggerCount()-1) @return string of the form "frame state" @tsexample // print all triggers in the sequence %count = %this.getTriggerCount( "back" ); for ( %i = 0; %i < %count; %i++ ) echo( %i SPC %this.getTrigger( "back", %i ) ); @endtsexample getTriggerCount ( string name ) Get the number of triggers in the specified sequence. @param name name of the sequence to query @return number of triggers in the sequence removeDetailLevel ( int index ) Remove the detail level (including all meshes in the detail level) @param size size of the detail level to remove @return true if successful, false otherwise @tsexample %this.removeDetailLevel( 2 ); @endtsexample removeImposter () Remove the imposter detail level (if any) from the shape. @return true if successful, false otherwise removeMesh ( string name ) Remove a mesh from the shape. If all geometry is removed from an object, the object is also removed. @param name full name (object name + detail size) of the mesh to remove @return true if successful, false otherwise @tsexample %this.removeMesh( "SimpleShape128" ); @endtsexample removeNode ( string name ) Remove a node from the shape. The named node is removed from the shape, including from any sequences that use the node. Child nodes and objects attached to the node are re-assigned to the node's parent. @param name name of the node to remove. @return true if successful, false otherwise. @tsexample %this.removeNode( "Nose" ); @endtsexample removeObject ( string name ) Remove an object (including all meshes for that object) from the shape. @param name name of the object to remove. @return true if successful, false otherwise. @tsexample // clear all objects in the shape %count = %this.getObjectCount(); for ( %i = %count-1; %i >= 0; %i-- ) %this.removeObject( %this.getObjectName(%i) ); @endtsexample removeSequence ( string name ) Remove the sequence from the shape. @param name name of the sequence to remove @return true if successful, false otherwise removeTrigger ( string name, int keyframe, int state ) Remove a trigger from the sequence. @param name name of the sequence to modify @param keyframe keyframe of the trigger to remove @param state of the trigger to remove @return true if successful, false otherwise @tsexample %this.removeTrigger( "walk", 3, 1 ); @endtsexample renameDetailLevel ( string oldName, string newName ) Rename a detail level. @note Note that detail level names must be unique, so this command will fail if there is already a detail level with the desired name @param oldName current name of the detail level @param newName new name of the detail level @return true if successful, false otherwise @tsexample %this.renameDetailLevel( "detail-1", "collision-1" ); @endtsexample renameNode ( string oldName, string newName ) Rename a node. @note Note that node names must be unique, so this command will fail if there is already a node with the desired name @param oldName current name of the node @param newName new name of the node @return true if successful, false otherwise @tsexample %this.renameNode( "Bip01 L Hand", "mount5" ); @endtsexample renameObject ( string oldName, string newName ) Rename an object. @note Note that object names must be unique, so this command will fail if there is already an object with the desired name @param oldName current name of the object @param newName new name of the object @return true if successful, false otherwise @tsexample %this.renameObject( "MyBox", "Box" ); @endtsexample renameSequence ( string oldName, string newName ) Rename a sequence. @note Note that sequence names must be unique, so this command will fail if there is already a sequence with the desired name @param oldName current name of the sequence @param newName new name of the sequence @return true if successful, false otherwise @tsexample %this.renameSequence( "walking", "walk" ); @endtsexample saveShape ( string filename ) Save the shape (with all current changes) to a new DTS file. @param filename Destination filename. @tsexample %this.saveShape( "./myShape.dts" ); @endtsexample setBounds ( Box3F bbox ) Set the shape bounds to the given bounding box. @param Bounding box "minX minY minZ maxX maxY maxZ" @return true if successful, false otherwise setDetailLevelSize ( int index, int newSize ) Change the size of a detail level.@note Note that detail levels are always sorted in decreasing size order, so this command may cause detail level indices to change. @param index index of the detail level to modify @param newSize new size for the detail level @return new index for this detail level @tsexample %this.setDetailLevelSize( 2, 256 ); @endtsexample setMeshMaterial ( string meshName, string matName ) Set the name of the material attached to the mesh. @param meshName full name (object name + detail size) of the mesh to modify @param matName name of the material to attach. This could be the base name of the diffuse texture (eg. "test_mat" for "test_mat.jpg"), or the name of a Material object already defined in script. @return true if successful, false otherwise @tsexample // set the mesh material %this.setMeshMaterial( "SimpleShape128", "test_mat" ); @endtsexample setMeshSize ( string name, int size ) Change the detail level size of the named mesh. @param name full name (object name + current size ) of the mesh to modify @param size new detail level size @return true if successful, false otherwise. @tsexample %this.setMeshSize( "SimpleShape128", 64 ); @endtsexample setMeshType ( string name, string type ) Set the display type for the mesh. @param name full name (object name + detail size) of the mesh to modify @param type the new type for the mesh: "normal", "billboard" or "billboardzaxis" @return true if successful, false otherwise @tsexample // set the mesh to be a billboard %this.setMeshType( "SimpleShape64", "billboard" ); @endtsexample setNodeParent ( string name, string parentName ) Set the parent of a node. @param name name of the node to modify @param parentName name of the parent node to set (use "" to move the node to the root level) @return true if successful, false if failed @tsexample %this.setNodeParent( "Bip01 Pelvis", "start01" ); @endtsexample setNodeTransform ( string name, TransformF txfm, bool isWorld=false ) Set the base transform of a node. That is, the transform of the node when in the root (not-animated) pose. @param name name of the node to modify @param txfm transform string of the form: "pos.x pos.y pos.z rot.x rot.y rot.z rot.angle" @param isworld (optional) flag to set the local-to-parent or the global transform. If false, or not specified, the position and orientation are treated as relative to the node's parent. @return true if successful, false otherwise @tsexample %this.setNodeTransform( "mount0", "0 0 1 0 0 1 0" ); %this.setNodeTransform( "mount0", "0 0 0 0 0 1 1.57" ); %this.setNodeTransform( "mount0", "1 0 0 0 0 1 0", true ); @endtsexample setObjectNode ( string objName, string nodeName ) Set the node an object is attached to. When the shape is rendered, the object geometry is rendered at the node's current transform. @param objName name of the object to modify @param nodeName name of the node to attach the object to @return true if successful, false otherwise @tsexample %this.setObjectNode( "Hand", "Bip01 LeftHand" ); @endtsexample setSequenceBlend ( string name, bool blend, string blendSeq, int blendFrame ) Mark a sequence as a blend or non-blend. A blend sequence is one that will be added on top of any other playing sequences. This is done by storing the animated node transforms relative to a reference frame, rather than as absolute transforms. @param name name of the sequence to modify @param blend true to make the sequence a blend, false for a non-blend @param blendSeq the name of the sequence that contains the blend reference frame @param blendFrame the reference frame in the blendSeq sequence @return true if successful, false otherwise @tsexample %this.setSequenceBlend( "look", true, "root", 0 ); @endtsexample setSequenceCyclic ( string name, bool cyclic ) Mark a sequence as cyclic or non-cyclic. @param name name of the sequence to modify @param cyclic true to make the sequence cyclic, false for non-cyclic @return true if successful, false otherwise @tsexample %this.setSequenceCyclic( "ambient", true ); %this.setSequenceCyclic( "shoot", false ); @endtsexample setSequenceGroundSpeed ( string name, Point3F transSpeed, Point3F rotSpeed=Point3F::Zero ) Set the translation and rotation ground speed of the sequence. The ground speed of the sequence is set by generating ground transform keyframes. The ground translational and rotational speed is assumed to be constant for the duration of the sequence. Existing ground frames for the sequence (if any) will be replaced. @param name name of the sequence to modify @param transSpeed translational speed (trans.x trans.y trans.z) in Torque units per frame @param rotSpeed (optional) rotational speed (rot.x rot.y rot.z) in radians per frame. Default is "0 0 0" @return true if successful, false otherwise @tsexample %this.setSequenceGroundSpeed( "run", "5 0 0" ); %this.setSequenceGroundSpeed( "spin", "0 0 0", "4 0 0" ); @endtsexample setSequencePriority ( string name, float priority ) Set the sequence priority. @param name name of the sequence to modify @param priority new priority value @return true if successful, false otherwise writeChangeSet () Write the current change set to a TSShapeConstructor script file. The name of the script file is the same as the model, but with .cs extension. eg. myShape.cs for myShape.dts or myShape.dae. adjustCenter Translate COLLADA model on import so the origin is at the center. No effect for DTS files. adjustFloor Translate COLLADA model on import so origin is at the (Z axis) bottom of the model. No effect for DTS files. This can be used along with adjustCenter to have the origin at the center of the bottom of the model. @see adjustCenter alwaysImport TAB separated patterns of nodes to import even if in neverImport list. No effect for DTS files. Torque allows unwanted nodes in COLLADA (.dae) files to to be ignored during import. This field contains a TAB separated list of patterns to match node names. Any node that matches one of the patterns in the list will <b>always</b> be imported, even if it also matches the neverImport list @see neverImport @tsexample singleton TSShapeConstructor(MyShapeDae) { baseShape = "./myShape.dae"; alwaysImport = "mount*" TAB "eye"; neverImport = "*-PIVOT"; } @endtsexample alwaysImportMesh TAB separated patterns of meshes to import even if in neverImportMesh list. No effect for DTS files. Torque allows unwanted meshes in COLLADA (.dae) files to to be ignored during import. This field contains a TAB separated list of patterns to match mesh names. Any mesh that matches one of the patterns in the list will <b>always</b> be imported, even if it also matches the neverImportMesh list @see neverImportMesh @tsexample singleton TSShapeConstructor(MyShapeDae) { baseShape = "./myShape.dae"; alwaysImportMesh = "body*" TAB "armor" TAB "bounds"; neverImportMesh = "*-dummy"; } @endtsexample baseShape Specifies the path to the DTS or DAE file to be operated on by this object. Since the TSShapeConstructor script must be in the same folder as the DTS or DAE file, it is recommended to use a relative path so that the shape and script files can be copied to another location without having to modify the path. forceUpdateMaterials Forces update of the materials.cs file in the same folder as the COLLADA (.dae) file, even if Materials already exist. No effect for DTS files. Normally only Materials that are not already defined are written to materials.cs. ignoreNodeScale Ignore <scale> elements inside COLLADA <node>s. No effect for DTS files. This field is a workaround for certain exporters that generate bad node scaling, and is not usually required. lodType Control how the COLLADA (.dae) importer interprets LOD in the model. No effect for DTS files. Set to one of the following values: <dl><dt>DetectDTS</dt><dd>The default value. Instructs the importer to search for a 'baseXXX->startXXX' node hierarchy at the root level. If found, the importer acts as if ''TrailingNumber'' was set. Otherwise, all geometry is imported at a single detail size.</dd><dt>SingleSize</dt><dd>All geometry is imported at a fixed detail size. Numbers at the end of geometry node's are ignored.</dd><dt>TrailingNumber</dt><dd>Numbers at the end of geometry node's name are interpreted as the detail size (similar to DTS exporting). Geometry instances with the same base name but different trailing number are grouped into the same object.</dd><dt>DEFAULT</dt><dd>The default value. Use the value in the .dae file (defaults to Z_AXIS if the <up_axis> element is not present).</dd></dl> matNamePrefix Prefix to apply to all material map names in the COLLADA (.dae) file. No effect for DTS files. This field is useful to avoid material name clashes for exporters that generate generic material names like "texture0" or "material1". neverImport TAB separated patterns of nodes to ignore on loading. No effect for DTS files. Torque allows unwanted nodes in COLLADA (.dae) files to to be ignored during import. This field contains a TAB separated list of patterns to match node names. Any node that matches one of the patterns in the list will not be imported (unless it matches the alwaysImport list. @see alwaysImport neverImportMesh TAB separated patterns of meshes to ignore on loading. No effect for DTS files. Torque allows unwanted meshes in COLLADA (.dae) files to to be ignored during import. This field contains a TAB separated list of patterns to match mesh names. Any mesh that matches one of the patterns in the list will not be imported (unless it matches the alwaysImportMesh list. @see alwaysImportMesh onLoad() Called immediately after the DTS or DAE file has been loaded; before the shape data is available to any other object (StaticShape, Player etc). This is where you should put any post-load commands to modify the shape in-memory such as addNode, renameSequence etc. onUnload() Called when the DTS or DAE resource is flushed from memory. Not normally required, but may be useful to perform cleanup. sequence Legacy method of adding sequences to a DTS or DAE shape after loading. @tsexample singleton TSShapeConstructor(MyShapeDae) { baseShape = "./myShape.dae"; sequence = "../anims/root.dae root"; sequence = "../anims/walk.dae walk"; sequence = "../anims/jump.dsq jump"; } @endtsexample singleDetailSize Sets the detail size when lodType is set to SingleSize. No effect otherwise, and no effect for DTS files. @see lodType unit Override the <unit> element in the COLLADA (.dae) file. No effect for DTS files. COLLADA (.dae) files usually contain a <unit> element that indicates the 'real world' units that the model is described in. It means you can work in sensible and meaningful units in your modeling app.<br> For example, if you were modeling a small object like a cup, it might make sense to work in inches (1 MAX unit = 1 inch), but if you were modeling a building, it might make more sense to work in feet (1 MAX unit = 1 foot). If you export both models to COLLADA, T3D will automatically scale them appropriately. 1 T3D unit = 1 meter, so the cup would be scaled down by 0.0254, and the building scaled down by 0.3048, given them both the correct scale relative to each other.<br> Omit the field or set to -1 to use the value in the .dae file (1.0 if the <unit> element is not present) upAxis Override the <up_axis> element in the COLLADA (.dae) file. No effect for DTS files. Set to one of the following values: <dl><dt>X_AXIS</dt><dd>Positive X points up. Model will be rotated into Torque's coordinate system (Z up).</dd><dt>Y_AXIS</dt><dd>Positive Y points up. Model will be rotated into Torque's coordinate system (Z up).</dd><dt>Z_AXIS</dt><dd>Positive Z points up. No rotation will be applied to the model.</dd><dt>DEFAULT</dt><dd>The default value. Use the value in the .dae file (defaults to Z_AXIS if the <up_axis> element is not present).</dd></dl> TSShapeConstructorClass ConsoleClassObject TSStatic SceneObject changeMaterial ( string mapTo="", Material oldMat=NULL, Material newMat=NULL ) Change one of the materials on the shape. This method changes materials per mapTo with others. The material that is being replaced is mapped to unmapped_mat as a part of this transition. @note Warning, right now this only sort of works. It doesn't do a live update like it should. @param mapTo the name of the material target to remap (from getTargetName) @param oldMat the old Material that was mapped @param newMat the new Material to map @tsexample // remap the first material in the shape %mapTo = %obj.getTargetName( 0 ); %obj.changeMaterial( %mapTo, 0, MyMaterial ); @endtsexample getModelFile () Get the model filename used by this shape. @return the shape filename @tsexample // Acquire the model filename used on this shape. %modelFilename = %obj.getModelFile(); @endtsexample getTargetCount () Get the number of materials in the shape. @return the number of materials in the shape. getTargetName ( int index=0 ) Get the name of the indexed shape material. @param index index of the material to get (valid range is 0 - getTargetCount()-1). @return the name of the indexed material. allowPlayerStep Allow a Player to walk up sloping polygons in the TSStatic (based on the collisionType). collisionType The type of mesh data to use for collision queries. decalType The type of mesh data used to clip decal polygons against. forceDetail Forces rendering to a particular detail level. meshCulling Enables detailed culling of meshes within the TSStatic. Should only be used with large complex shapes like buildings which contain many submeshes. originSort Enables translucent sorting of the TSStatic by its origin instead of the bounds. playAmbient Enables automatic playing of the animation named "ambient" (if it exists) when the TSStatic is loaded. renderNormals Debug rendering mode shows the normals for each point in the TSStatic's mesh. shapeName Path and filename of the model file (.DTS, .DAE) to use for this TSStatic. TSStaticClass ConsoleClassObject UndoAction SimObject addToManager action.addToManager([undoManager]) redo () Reo action contained in undo. undo () Undo action contained in undo. actionName A brief description of the action, for UI representation of this undo/redo action. UndoActionClass ConsoleClassObject UndoManager SimObject clearAll Clears the undo manager. getNextRedoName UndoManager.getNextRedoName(); getNextUndoName UndoManager.getNextUndoName(); getRedoAction (index) getRedoCount getRedoName (index) getUndoAction (index) getUndoCount getUndoName (index) popCompound ( bool discard=false ) Pop the current CompoundUndoAction off the stack. pushCompound ( string name="" ) Push a CompoundUndoAction onto the compound stack for assembly. redo UndoManager.redo(); undo UndoManager.undo(); numLevels Number of undo & redo levels. UndoManagerClass ConsoleClassObject UndoScriptAction UndoAction UndoScriptActionClass ConsoleClassObject Vehicle ShapeBase disableMove When this flag is set, the vehicle will ignore throttle changes. VehicleBlocker SceneObject Dimensions Point3F Dimensions VehicleBlockerClass ConsoleClassObject VehicleClass ConsoleClassObject VehicleData ShapeBaseData bodyFriction Collision friction coefficient. How well this object will slide against objects it collides with. bodyRestitution Collision 'bounciness'. Normally in the range 0 (not bouncy at all) to 1 (100% bounciness). cameraDecay How quickly the camera moves back towards the vehicle when stopped. @see cameraLag. cameraLag How much the camera lags behind the vehicle depending on vehicle speed. Increasing this value will make the camera fall further behind the vehicle as it accelerates away. @see cameraDecay. cameraOffset Vertical (Z axis) height of the camera above the vehicle. cameraRoll If true, the camera will roll with the vehicle. If false, the camera will always have the positive Z axis as up. collDamageMultiplier Damage to this vehicle after a collision (multiplied by collision velocity). Currently unused. collDamageThresholdVel Minimum collision velocity to cause damage to this vehicle. Currently unused. collisionTol Minimum distance between objects for them to be considered as colliding. contactTol Maximum relative velocity between objects for collisions to be resolved as contacts. Velocities greater than this are handled as collisions. damageEmitter Array of particle emitters used to generate damage (dust, smoke etc) effects. @see damageEmitterOffset damageEmitterOffset "x y z" offsets used to emit particles for each of the active damageEmitters. @tsexample // damage levels damageLevelTolerance[0] = 0.5; damageEmitter[0] = SmokeEmitter; // emit offsets (used for all active damage level emitters damageEmitterOffset[0] = "0.5 3 1"; damageEmitterOffset[1] = "-0.5 3 1"; numDmgEmitterAreas = 2; @endtsexample damageLevelTolerance Damage level (as a percentage of maxDamage) above which to begin emitting particles from the associated damageEmitter. @see damageEmitterOffset dustEmitter Dust particle emitter. @see triggerDustHeight @see dustHeight dustHeight Height above ground at which to emit particles from the dustEmitter. exitingWater Sound to play when exiting the water. exitSplashSoundVelocity Minimum velocity when leaving the water for the exitingWater sound to play. hardImpactSound Sound to play on a 'hard' impact. This sound is played if the impact speed >= hardImpactSpeed. @see hardImpactSpeed hardImpactSpeed Minimum collision speed for the hardImpactSound to be played. hardSplashSoundVelocity Minimum velocity when entering the water for the imapactWaterHard sound to play. @see impactWaterHard impactWaterEasy Sound to play when entering the water with speed >= softSplashSoundVelocity and < mediumSplashSoundVelocity. impactWaterHard Sound to play when entering the water with speed >= hardSplashSoundVelocity. impactWaterMedium Sound to play when entering the water with speed >= mediumSplashSoundVelocity and < hardSplashSoundVelocity. integration Number of integration steps per tick. Increase this to improve simulation stability (also increases simulation processing time). jetEnergyDrain Energy amount to drain for each tick the vehicle is jetting. Once the vehicle's energy level reaches 0, it will no longer be able to jet. jetForce Additional force applied to the vehicle when it is jetting. For WheeledVehicles, the force is applied in the forward direction. For FlyingVehicles, the force is applied in the thrust direction. massBox Define the box used to estimate the vehicle's moment of inertia. Currently only used by WheeledVehicle, other vehicle types use a unit sphere to compute inertia. massCenter Defines the vehicle's center of mass (offset from the origin of the model). maxDrag Maximum drag coefficient. Currently unused. maxSteeringAngle Maximum yaw (horizontal) and pitch (vertical) steering angle in radians. mediumSplashSoundVelocity Minimum velocity when entering the water for the imapactWaterMedium sound to play. @see impactWaterMedium minDrag Minimum drag coefficient. Currently only used by FlyingVehicle. minImpactSpeed Minimum collision speed for the onImpact callback to be invoked. minJetEnergy Minimum vehicle energy level to begin jetting. minRollSpeed Unused numDmgEmitterAreas Number of damageEmitterOffset values to use for each damageEmitter. @see damageEmitterOffset onEnterLiquid( Vehicle obj, float coverage, string type ) Called when the vehicle enters liquid. @param obj the Vehicle object @param coverage percentage of the vehicle's bounding box covered by the liquid @param type type of liquid the vehicle has entered onLeaveLiquid( Vehicle obj, string type ) Called when the vehicle leaves liquid. @param obj the Vehicle object @param type type of liquid the vehicle has left softImpactSound Sound to play on a 'soft' impact. This sound is played if the impact speed is < hardImpactSpeed and >= softImpactSpeed. @see softImpactSpeed softImpactSpeed Minimum collision speed for the softImpactSound to be played. softSplashSoundVelocity Minimum velocity when entering the water for the imapactWaterEasy sound to play. @see impactWaterEasy splashEmitter Array of particle emitters used to generate splash effects. splashFreqMod Number of splash particles to generate based on vehicle speed. This value is multiplied by the current speed to determine how many particles to generate each frame. splashVelEpsilon Minimum speed when moving through water to generate splash particles. triggerDustHeight Maximum height above surface to emit dust particles. If the vehicle is less than triggerDustHeight above a static surface with a material that has 'showDust' set to true, the vehicle will emit particles from the dustEmitter. waterWakeSound Looping sound to play while moving through the water. VehicleDataClass ConsoleClassObject WaterBlock WaterObject gridElementSize Spacing between vertices in the WaterBlock mesh gridSize Duplicate of gridElementSize for backwards compatility WaterBlockClass ConsoleClassObject WaterObject SceneObject baseColor Changes color of water fog. clarity Relative opacity or transparency of the water surface. cubemap Cubemap used instead of reflection texture if fullReflect is off. density Affects buoyancy of an object, thus affecting the Z velocity of a player (jumping, falling, etc. depthGradientMax Depth in world units, the max range of the color gradient texture. depthGradientTex 1D texture defining the base water color by depth distortEndDist Max distance that distortion algorithm is performed. The lower, the more distorted the effect. distortFullDepth Determines the scaling down of distortion in shallow water. distortStartDist Determines start of distortion effect where water surface intersects the camera near plane. foamAmbientLerp float foamAmbientLerp foamDir Point2F foamDir foamMaxDepth float foamMaxDepth foamOpacity float foamOpacity foamRippleInfluence float foamRippleInfluence foamSpeed float foamSpeed foamTex Diffuse texture for foam in shallow water (advanced lighting only) foamTexScale applied to the surface. fresnelBias Extent of fresnel affecting reflection fogging. fresnelPower Measures intensity of affect on reflection based on fogging. fullReflect Enables dynamic reflection rendering. liquidType Liquid type of WaterBlock, such as water, ocean, lava Currently only Water is defined and used. overallFoamOpacity float overallFoamOpacity overallRippleMagnitude Master variable affecting entire surface overallWaveMagnitude Master variable affecting entire body of water's undulation reflectDetailAdjust scale up or down the detail level for objects rendered in a reflection reflectivity Overall scalar to the reflectivity of the water surface. reflectMaxRateMs Affects the sort time of reflected objects. reflectNormalUp always use z up as the reflection normal reflectPriority Affects the sort order of reflected objects. reflectTexSize The texture size used for reflections (square) rippleDir Modifies the direction of ripples on the surface. rippleMagnitude Intensifies the vertext modification of the surface. rippleSpeed Modifies speed of surface ripples. rippleTex Normal map used to simulate small surface ripples rippleTexScale Intensifies the affect of the normal map applied to the surface. soundAmbience Ambient sound environment when listener is submerged. specularColor Color used for specularity on the water surface ( sun only ). specularPower Power used for specularity on the water surface ( sun only ). underwaterColor Changes the color shading of objects beneath the water surface. useOcclusionQuery turn off reflection rendering when occluded (delayed). viscosity Affects drag force applied to an object submerged in this container. waterFogDensity Intensity of underwater fogging. waterFogDensityOffset Delta, or limit, applied to waterFogDensity. waveDir Direction waves flow toward shores. waveMagnitude Height of water undulation. waveSpeed Speed of water undulation. wetDarkening The refract color intensity scaled at wetDepth. wetDepth The depth in world units at which full darkening will be received, giving a wet look to objects underwater. whiteCapAmount Visibility of foam in deeper / non-shore water. WaterObjectClass ConsoleClassObject WaterPlane WaterObject gridElementSize Duplicate of gridElementSize for backwards compatility gridSize Spacing between vertices in the WaterBlock mesh WaterPlaneClass ConsoleClassObject WayPoint MissionMarker markerName Unique name representing this waypoint team Unique numerical ID assigned to this waypoint, or set of waypoints WayPointClass ConsoleClassObject WayPointSet SimSet WheeledVehicle Vehicle getWheelCount () Get the number of wheels on this vehicle. @return the number of wheels (equal to the number of hub nodes defined in the model) setWheelPowered ( int wheel, bool powered ) Set whether the wheel is powered (has torque applied from the engine). A rear wheel drive car for example would set the front wheels to false, and the rear wheels to true. @param wheel index of the wheel to set @param powered flag indicating whether to power the wheel or not @return true if successful, false if failed setWheelSpring ( int wheel, WheeledVehicleSpring spring ) Set the WheeledVehicleSpring datablock for this wheel. @param wheel index of the wheel to set @param spring WheeledVehicleSpring datablock @return true if successful, false if failed @tsexample %obj.setWheelSpring( 0, FrontSpring ); @endtsexample setWheelSteering ( int wheel, float steering ) Set how much the wheel is affected by steering. The steering factor controls how much the wheel is rotated by the vehicle steering. For example, most cars would have their front wheels set to 1.0, and their rear wheels set to 0 since only the front wheels should turn. Negative values will turn the wheel in the opposite direction to the steering angle. @param wheel index of the wheel to set @param steering steering factor from -1 (full inverse) to 1 (full) @return true if successful, false if failed setWheelTire ( int wheel, WheeledVehicleTire tire ) Set the WheeledVehicleTire datablock for this wheel. @param wheel index of the wheel to set @param tire WheeledVehicleTire datablock @return true if successful, false if failed @tsexample %obj.setWheelTire( 0, FrontTire ); @endtsexample WheeledVehicleClass ConsoleClassObject WheeledVehicleData VehicleData brakeTorque Torque applied when braking. This controls how fast the vehicle will stop when the brakes are applied. engineBrake Braking torque applied by the engine when the throttle and brake are both 0. This controls how quickly the vehicle will coast to a stop. engineSound Looping engine sound. The pitch is dynamically adjusted based on the current engine RPM engineTorque Torque available from the engine at 100% throttle. This controls vehicle acceleration. ie. how fast it will reach maximum speed. jetSound Looping sound played when the vehicle is jetting. maxWheelSpeed Maximum linear velocity of each wheel. This caps the maximum speed of the vehicle. squealSound Looping sound played while any of the wheels is slipping. The volume is dynamically adjusted based on how much the wheels are slipping. tireEmitter ParticleEmitterData datablock used to generate particles from each wheel when the vehicle is moving and the wheel is in contact with the ground. WheelImpactSound Sound played when the wheels impact the ground. Currently unused. WheeledVehicleDataClass ConsoleClassObject WheeledVehicleSpring SimDataBlock antiSwayForce Force applied to equalize extension of the spring on the opposite wheel. This force helps to keep the suspension balanced when opposite wheels are at different heights. damping Force applied to slow changes to the extension of this spring. Increasing this makes the suspension stiffer which can help stabilise bouncy vehicles. force Maximum spring force (when compressed to minimum length, 0) .Increasing this will make the vehicle suspension ride higher (for a given vehicle mass), and also make the vehicle more bouncy when landing jumps. length Maximum spring length. ie. how far the wheel can extend from the root hub position. WheeledVehicleSpringClass ConsoleClassObject WheeledVehicleTire SimDataBlock kineticFriction Tire friction when the wheel is slipping (no traction). lateralDamping Damping force applied against lateral forces generated by the tire. @see lateralForce lateralForce Tire force perpendicular to the direction of movement. Lateral force can in simple terms be considered left/right steering force. WheeledVehicles are acted upon by forces generated by their tires and the lateralForce measures the magnitude of the force exerted on the vehicle when the tires are deformed along the x-axis. With real wheeled vehicles, tires are constantly being deformed and it is the interplay of deformation forces which determines how a vehicle moves. In Torque's simulation of vehicle physics, tire deformation obviously can't be handled with absolute realism, but the interplay of a vehicle's velocity, its engine's torque and braking forces, and its wheels' friction, lateral deformation, lateralDamping, lateralRelaxation, longitudinal deformation, longitudinalDamping, and longitudinalRelaxation forces, along with its wheels' angular velocity are combined to create a robust real-time physical simulation. For this field, the larger the value supplied for the lateralForce, the larger the effect steering maneuvers can have. In Torque tire forces are applied at a vehicle's wheel hubs. lateralRelaxation Relaxing force applied against lateral forces generated by the tire. The lateralRelaxation force measures how strongly the tire effectively un-deforms. @see lateralForce longitudinalDamping Damping force applied against longitudinal forces generated by the tire. @see longitudinalForce longitudinalForce Tire force in the direction of movement. Longitudinal force can in simple terms be considered forward/backward movement force. WheeledVehicles are acted upon by forces generated by their tires and the longitudinalForce measures the magnitude of the force exerted on the vehicle when the tires are deformed along the y-axis. For this field, the larger the value, the larger the effect acceleration/deceleration inputs have. @see lateralForce longitudinalRelaxation Relaxing force applied against longitudinal forces generated by the tire. The longitudinalRelaxation force measures how strongly the tire effectively un-deforms. @see longitudinalForce mass The mass of the wheel. Currently unused. radius The radius of the wheel. The radius is determined from the bounding box of the shape provided in the shapefile field, and does not need to be specified in script. The tire should be built with its hub axis along the object's Y-axis. Restitution Tire restitution. Currently unused. shapeFile The path to the shape to use for the wheel. StaticFriction Tire friction when the wheel is not slipping (has traction). WheeledVehicleTireClass ConsoleClassObject WorldEditor EditTSCtrl addUndoState alignByAxis (int axis) Align all selected objects along the given axis. alignByBounds (int boundsAxis) Align all selected objects against the given bounds axis. canPasteSelection clearIgnoreList clearSelection colladaExportSelection ( String path ) Export the combined geometry of all selected objects to the specified path in collada format. copySelection cutSelection dropSelection ( bool skipUndo = false ) explodeSelectedPrefab () Replace selected Prefab objects with a SimGroup containing all children objects defined in the .prefab. getActiveSelection () Return the currently active WorldEditorSelection object. getSelectedObject (int index) getSelectionCentroid getSelectionExtent getSelectionRadius getSelectionSize () Return the number of objects currently selected in the editor. getSoftSnap getSoftSnap() Is soft snapping always on? getSoftSnapAlignment () Get the soft snap alignment. getSoftSnapBackfaceTolerance getSoftSnapBackfaceTolerance() The fraction of the soft snap radius that backfaces may be included. getSoftSnapSize getSoftSnapSize() Get the absolute size to trigger a soft snap. getTerrainSnapAlignment () Get the terrain snap alignment. hideObject (Object obj, bool hide) hideSelection (bool hide) ignoreObjClass (string class_name, ...) invalidateSelectionCentroid lockSelection (bool lock) makeSelectionPrefab ( string filename ) Save selected objects to a .prefab file and replace them in the level with a Prefab object. mountRelative ( Object A, Object B ) pasteSelection redirectConsole ( int objID ) resetSelectedRotation resetSelectedScale selectObject (SimObject obj) setActiveSelection ( id set ) Set the currently active WorldEditorSelection object. setSoftSnap setSoftSnap(bool) Allow soft snapping all of the time. setSoftSnapAlignment ( WorldEditor::AlignmentType type ) Set the soft snap alignment. setSoftSnapBackfaceTolerance setSoftSnapBackfaceTolerance(F32 with range of 0..1) The fraction of the soft snap radius that backfaces may be included. setSoftSnapSize setSoftSnapSize(F32) Set the absolute size to trigger a soft snap. setTerrainSnapAlignment ( WorldEditor::AlignmentType alignment ) Set the terrain snap alignment. softSnapDebugRender softSnapDebugRender(bool) Toggle soft snapping debug rendering. softSnapRender softSnapRender(bool) Render the soft snapping bounds. softSnapRenderTriangle softSnapRenderTriangle(bool) Render the soft snapped triangle. softSnapSizeByBounds softSnapSizeByBounds(bool) Use selection bounds size as soft snap bounds. transformSelection transformSelection(...) Transform selection by given parameters. unselectObject (SimObject obj) boundingBoxCollision bool boundingBoxCollision defaultHandle filename defaultHandle dragRectColor ColorI dragRectColor dropAtBounds bool dropAtBounds dropAtScreenCenterMax float dropAtScreenCenterMax dropAtScreenCenterScalar float dropAtScreenCenterScalar dropBelowCameraOffset float dropBelowCameraOffset dropType WorldEditorDropType dropType faceSelectColor ColorI faceSelectColor fadeIcons Whether object icons should fade out with distance to camera pos. fadeIconsDist Distance from camera pos at which to start fading out icons. gridSnap If true, transform operations will snap to the grid. isDirty bool isDirty lockedHandle filename lockedHandle objectMeshCollision bool objectMeshCollision objectsUseBoxCenter bool objectsUseBoxCenter objectTextColor ColorI objectTextColor objMouseOverColor ColorI objMouseOverColor objMouseOverSelectColor ColorI objMouseOverSelectColor objSelectColor ColorI objSelectColor objTextFormat string objTextFormat popupBackgroundColor ColorI popupBackgroundColor popupTextColor ColorI popupTextColor renderObjHandle bool renderObjHandle renderObjText bool renderObjText renderPopupBackground bool renderPopupBackground renderSelectionBox bool renderSelectionBox selectHandle filename selectHandle selectionBoxColor ColorI selectionBoxColor selectionLocked bool selectionLocked showMousePopupInfo bool showMousePopupInfo stickToGround bool stickToGround toggleIgnoreList bool toggleIgnoreList WorldEditorClass ConsoleClassObject WorldEditorSelection SimPersistSet containsGlobalBounds () True if an object with global bounds is contained in the selection. getBoxCentroid () Return the center of the bounding box around the selection. getCentroid () Return the median of all object positions in the selection. offset ( vector delta, float gridSnap=0 ) Move all objects in the selection by the given delta. subtract ( SimSet ) Remove all objects in the given set from this selection. union ( SimSet set ) Add all objects in the given set to this selection. WorldEditorSelectionClass ConsoleClassObject ZipObject SimObject addFile (filename, pathInZip[, replace = true]) Add a file to the zip closeArchive () Close a zip file closeFile (stream) Close a file within the zip deleteFile (pathInZip) Delete a file from the zip extractFile (pathInZip, filename) Extract a file from the zip getFileEntry (index) Get file entry. Returns tab separated string containing filename, uncompressed size, compressed size, compression method and CRC32 getFileEntryCount () Get number of files in the zip openArchive (filename, [accessMode = Read]) Open a zip file openFileForRead (filename) Open a file within the zip for reading openFileForWrite (filename) Open a file within the zip for reading ZipObjectClass ConsoleClassObject Zone SceneObject soundAmbience Ambient sound environment for the zone. ZoneClass ConsoleClassObject activateDirectInput Activate input. (ie, grab the mouse again so the user can play our game. activatePackage activatePackage(packageName) 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. @param 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 @see filterString @tsexample // 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");@endtsexample @ingroup Game addGlobalShaderMacro ( string name, string value=NULL ) 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. @see resetLightManager, removeGlobalShaderMacro @ingroup Rendering addMaterialMapping (string texName, string matName) @brief Set up a material to texture mapping. @ingroup Materials addSceneEvent addSceneEvent(S32 eventType,S32 physUser,F32 time,F32 duration,S32 node,Point3F value,const char *action,S32 dbID) addTaggedString (string str) @brief Use the addTaggedString function to tag a new string and add it to the NetStringTable @param string The string to 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@ingroup Networking addTerrain Add Terrain aiAddPlayer aiAddPlayer( 'playerName'[, 'AIClassType'] ); aiConnect (...) @brief Make a new AIConnection, and pass arguments to the onConnect script callback. @see GameConnection for parameter information @ingroup AI allowConnections allowConnections(bool); backtrace Print the call stack. beginSampling (location, [backend]) @brief 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.@tsexample beginSampling( "mysamples.csv" ); @endtsexample @ingroup Rendering buildTaggedString (string format, ...) @brief Bbuild a tagged string using the specified format.@ingroup Networking calcExplosionCoverage ( Point3F pos=Point3F(0.0f,0.0f,0.0f), int id=NULL, int covMask=NULL ) Calculates how much an explosion effects a specific object. Use this to determine damage values to objects based on their distance from the explosion's center point. @tsexample // Get the position of an explosion. %position = ExplosionData.getPosition(); // Set a list of TypeMasks (defined in gameFunctioncs.cpp), seperated by the | character. %TypeMasks = $TypeMasks::StaticObjectType | $TypeMasks::ItemObjectType // Call the function, and acquire the value of effect, from 0.0f - 1.0f. %effectValue = calcExplosionCoverage(%position , %sceneObjectToEffect , %TypeMasks); @endtsexample @ingroup FX call ( string functionName, string args... ) Apply the given arguments to the specified global function and return the result of the call. @param 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. @tsexample function myFunction( %arg ) { return ( %arg SPC "World!" ); } echo( call( "myFunction", "Hello" ) ); // Prints "Hello World!" to the console. @endtsexample @ingroup Scripting cancel cancel(eventId) cancelAll cancelAll(objectId): cancel pending events on the specified object. Events will be automatically cancelled if object is deleted. cancelServerQuery cancelServerQuery() castNxTractorBeam Point3F start, Point3F dir, S32 type castRayShape castRayShape(start,end); cleanupTexturePool () Release the unused pooled textures in texture manager freeing up video memory. @ingroup GFX clearClientPaths clearDR clearGFXResourceFlags () Clears the flagged state on all allocated GFX resources. See flagCurrentGFXResources for usage details. @ingroup GFX @see flagCurrentGFXResources, listGFXResources, describeGFXResources clearSceneEvents clearSceneEvents() clearServerPaths clearWaitForReset clearWaitForReset() clientContainerSearchCurrDist Get distance of the center of the current item from the center of the current initContainerRadiusSearch. clientContainerSearchCurrRadiusDist Get the distance of the closest point of the current item from the center of the current initContainerRadiusSearch. clientContainerSearchNext Get next item from a search started with initContainerRadiusSearch. closeNetPort () @brief Closes the current network port @ingroup Networking cls () @brief Clear the screen. @ingroup Console collapseEscape ( string text ) Replace all escape sequences in @a text with their respective character codes. This function replaces all escape sequences (like \n, \t, etc.) in the given string with the respective characters they respresent. The primary use of this function is for converting strings from their literal form into their compiled/translated form, as it is done by the TorqueScript compiler. @param text A string. @return A duplicate of @a text with all escape sequences replaced by their respective character codes. @tsexample // Print: // // str // ing // // to the console. Note how the backslash in the string must be escaped here // in order to preserve the TorqueScript compiler from collapsing the escape // sequence in the resulting string. echo( collapseEscape( "str\ning" ) ); @endtsexample @see expandEscape @ingroup Strings collapseFilename (string filename) @internal Editor use only commandToClient (NetConnection client, string func, ...) @brief Send a command from the server to the client @param function Name of the client command being called @param ... Various parameters being passed to client command @tsexample // Set up the client command // 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 function GameConnection::setAmmoAmountHud(%client, %amount) { commandToClient(%client, 'SetAmmoAmountHud', %amount); } @endtsexample @ingroup Networking commandToServer (string func, ...) @brief Send a command to the server. @param function Name of the server command being called @param ... Various parameters being passed to server command @tsexample // Create a standard function function toggleCamera(%val) { ^// If key was down, call a server command named 'ToggleCamera' ^if (%val) ^^commandToServer('ToggleCamera'); } // Server command being called from above 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(); } @endtsexample @ingroup Networking compile ( string fileName, bool overrideNoDSO=false ) 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 @a overrideNoDDSO is true, will store the compiled code in a .dso file in the current DSO path mirrorring the path of @a fileName. @param fileName Path to the file to compile to bytecode. @param 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 getDSOPath @see exec @ingroup Scripting containerBoxEmpty ( int mask, Point3F center, float xRadius, float yRadius=-1, float zRadius=-1 ) See if any objects of 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. @param mask Indicates the type of objects we are checking against. @param center Center of box. @param xRadius Search radius in the x-axis. See note above. @param yRadius Search radius in the y-axis. See note above. @param zRadius Search radius in the z-axis. See note above. @return true if the box is empty, false if any object is found. @ingroup gameObjects containerFindFirst (bitset type, Point3F point, float x, float y, float z) Find objects matching the bitmask type within a box centered at point, with extents x, y, z. Returns the first object found; thereafter, you can get more results using containerFindNext().@ingroup Game containerFindNext Get more results from a previous call to containerFindFirst().@ingroup Game containerRayCast ( Point3F start, Point3F end, int mask, SceneObject pExempt=NULL ) Cast a ray from start to end, checking for collision against items matching mask. If exempt 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.) @returns A string containing either null, if nothing was struck, or these fields: <ul><li>The ID of the object that was struck.</li><li>The x, y, z position that it was struck.</li><li>The x, y, z of the normal of the face that was struck.</li></ul>@ingroup gameObjects containerSearchCurrDist () Get distance of the center of the current item from the center of the current initContainerRadiusSearch.@return distance from the center of the current object to the center of the search @see containerSearchNext @ingroup gameObjects containerSearchCurrRadiusDist () Get the distance of the closest point of the current item from the center of the current initContainerRadiusSearch.@return distance from the closest point of the current object to the center of the search @see containerSearchNext @ingroup gameObjects containerSearchNext () Get next item from a search started with initContainerRadiusSearch() or initContainerTypeSearch().@return the next object found in the search, or null if no more @tsexample // 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() ); } @endtsexample @ingroup gameObjects 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@param text Text to scan for bad words @return True if the text has bad word(s), false if it is clean @see addBadWord @tsexample // 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); @endtsexample @ingroup Game countBits ( int v ) Count the number of bits that are set in the given 32 bit integer. @param v An integer value. @return The number of bits that are set in @a v. @ingroup Utilities createPath ( string path ) Create the given directory or the path leading to the given filename. If @a path ends in a trailing slash, then all components in the given path will be created as directories (if not already in place). If @a path, does @b 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. @param path The script path to create. @ingroup FileSystem createPhysicsManager Create Physics Manager (int type) 1 = PhysX, 2 = ODE dbgDisconnect () Forcibly disconnects any attached script debugging client. @internal Primarily used for Torsion and other debugging tools dbgIsConnected () Returns true if a script debugging client is connected else return false. @internal Primarily used for Torsion and other debugging tools dbgSetParameters (int port, string password, bool waitForClient) Open a debug server port on the specified port, requiring the specified password, and optionally waiting for the debug client to connect. @internal Primarily used for Torsion and other debugging tools deactivateDirectInput Deactivate input. (ie, ungrab the mouse so the user can do other things. deactivatePackage deactivatePackage(packageName) debug () Drop 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, this generates a runtime error on most platforms. @ingroup Debugging debugv ( string variableName ) Log the value of the given variable to the console. This functions prints a string of the form "<variableName> = <variable value>" to the console. @param variableName Name of the local or global variable to print. @tsexample %var = 1; debugv( "%var" ); // Prints "%var = 1" @endtsexample @ingroup Debugging decalManagerAddDecal ( string inputPosition="1.0 1.0 1.0", string inputNormal="1.0 1.0 1.0", float rot=1.0, float scale=1.0, DecalData decalData=NULL, bool isImmortal=false ) Adds a new decal to the decal manager. @param position Position for new decal to be placed. @param normal XYZ Rotation for new decal to be oriented. Like the axel for this decal. @param rotation Distance for this decal to be rotated around the normal, like a tire on an axel. @param scale Physical scale of new decal. @param decalData DecalData Datablock to use for the new decal. @param immortal Whether or not this decal is immortal. If immortal, it does not age and must be removed explicitly. @return Returns the ID of the new decal object. @tsexample // Specify the decal position %position = "1.0 1.0 1.0"; // Normal %normal = ?; // Specify the rotation for the decal %rotation = "0.5"; // Specify the scale for the decal %scale = "0.35"; // Specify the decalData datablock to use for this new decal %decalData = "decalDatablockName"; // Specify if this decal is immortal. Immortal decals don't age and must be removed explicitly. %immortal = "false"; // Tell the decal manager to remove all existing decals. decalManagerAddDecal( %position, %normal, %rotation, %scale, %decalData, %immortal); @endtsexample @ingroup FX decalManagerClear () Removes all decals currently loaded in the decalManager. @tsexample // Tell the decal manager to remove all existing decals. decalManagerClear(); @endtsexample @ingroup FX decalManagerDirty () Returns if the decal manager has unsaved modifications. @return True if the decal manager has unsaved modifications, false if everything has been saved. @tsexample // Ask the decal manager if it has unsaved modifications. %hasUnsavedModifications = decalManagerDirty(); @endtsexample @ingroup FX decalManagerLoad ( string decalLoadFile="" ) Loads the decals from the entered filename. @param 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. @tsexample // 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); @endtsexample @ingroup FX decalManagerRemoveDecal ( int decalID=-1 ) Remove specified decal from the scene. @return Returns true if successful, false if decal not found. @param decalID Entry ID of the decal to remove. @tsexample // Specify a decal ID to be removed %decalID = 1; // Tell the decal manager to remove the specified decal ID. decalManagerRemoveDecal( %decalId ) @endtsexample @ingroup FX decalManagerSave ( string decalSaveFile="" ) Saves the decals for the active mission in the entered filename. @param filename Filename to save the decals at. @tsexample // 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); @endtsexample @ingroup FX 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 @a pattern. @param pattern A global variable name pattern. Must begin with '$'. @tsexample // Define a global variable in the "My" namespace. $My::Variable = "value"; // Undefine all variable in the "My" namespace. deleteVariables( "$My::*" ); @endtsexample @see strIsMatchExpr @ingroup Scripting describeGFXResources ( string resourceTypes, string filePath, bool unflaggedOnly=false ) @brief Dumps a description of GFX resources to a file or the console. @param resourceTypes A space seperated list of resource types or an empty string for all resources. @param filePath A file to dump the list to or an empty string to write to the console. @param 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 @ingroup GFX describeGFXStateBlocks ( string filePath ) Dumps a description of all state blocks. @param filePath A file to dump the state blocks to or an empty string to write to the console. @ingroup GFX detag ( string str ) @brief Removes tag from a specified string @ingroup Console disableJoystick disableJoystick() disableXInput disableXInput()@brief Disabled XInput for Xbox 360 controller input @ingroup Input dispatchMessage (string queueName, string event, string data) @brief Dispatch a message to a queue @param queue Queue to dispatch the message to @param msg Message to dispatch @param data Data for message @return true for success, false for failure @see dispatchMessageObject @ingroup Platform dispatchMessageObject (string queueName, string message) @brief Dispatch a message object to a queue @param queue Queue to dispatch the message to @param msg Message to dispatch @return true for success, false for failure @see dispatchMessage @ingroup Platform displaySplashWindow () Display a startup splash window suitable for showing while the engine still starts up. @note This is currently only implemented on Windows. @return True if the splash window could be successfully initialized. @ingroup Platform DNetSetLogging (bool enabled) @brief Enables logging of the connection protocols @param enabled True to enable, false to disable @ingroup Networking dropSceneEvent dropSceneEvent(S32 eventID, S32 DatabaseID) dumpConsoleClasses (bool dumpScript = true, bool dumpEngine = true) dumps all declared console classes to the console. @param dumpScript Specifies whether or not classes defined in script should be dumped. @param dumpEngine Specifies whether or not classes defined in the engine should be dumped.@ingroup Logging dumpConsoleFunctions (bool dumpScript = true, bool dumpEngine = true) Dumps all declared console functions to the console. @param dumpScript Specifies whether or not functions defined in script should be dumped. @param dumpEngine Specifies whether or not functions defined in the engine should be dumped.@ingroup Logging dumpEngineDocs ( string outputFile ) Dumps the engine scripting documentation to the specified file overwriting any existing content. @param outputFile The relative or absolute output file path and name. @return Returns true if successful. @ingroup Engine dumpFontCacheStatus () Dumps to the console a full description of all cached fonts, along with info on the codepoints each contains. @ingroup Font dumpMaterialInstances @brief Dumps a formatted list of currently allocated material instances to the console. @ingroup Materials dumpNetStats 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. @ingroup GFX 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. @param oldFontName The name of the font face to copy. @param oldFontSize The size of the font to copy. @param newFontName The name of the new font face. @ingroup Font echo ( string text... ) Log a message to the console. This function concatenates all given arguments to a single string and prints the string to the console. A newline is added automatically after the text. @param text Any number of string arguments. @ingroup Logging echoInputState () @brief Prints a message to the console stating if DirectInput is enabled, and if Joystick is enabled @ingroup Input enableJoystick enableJoystick() enableSamples (pattern, [state]) @brief Enable sampling for all keys that match the given name pattern. Slashes are treated as separators. @ingroup Rendering enableWinConsole enableWinConsole(bool); enableXInput enableXInput()@brief Enables XInput for Xbox 360 controller input @ingroup Input endsWith ( string str, string suffix, bool caseSensitive=false ) @brief Test whether the given string ends with the given suffix. @param str The string to test. @param suffix The potential suffix of @a str. @param 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 @a str match the complete contents of @a suffix; false otherwise. @tsexample startsWith( "TEST123", "123" ) // Returns true. @endtsexample @see startsWith @ingroup Strings enumColladaForImport (string shapePath, GuiTreeViewCtrl ctrl) Collect scene information from a COLLADA file and store it in a GuiTreeView control. This function is used by the COLLADA import gui to show a preview of the scene contents prior to import, and is probably not much use for anything else. @param shapePath COLLADA filename @param ctrl GuiTreeView control to add elements to @return true if successful, false otherwise @ingroup Editors @internal enumerateConsoleClasses enumerateConsoleClasses(<"base class">);@brief Currently only used by editors and intenrnal console system @internal enumerateConsoleClassesByCategory ( string category ) @brief Provide a list of classes that belong to the given category. @param category Contains the category type @return String containing each classes in the specified category @ingroup Editors @internal error ( string text... ) Log an error message to the console. This function 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. @param text Any number of string arguments. @ingroup Logging eval eval(consoleString) excludeOtherInstance ( string appIdentifer ) @brief Used to exclude/prevent all other instances using the same identifier specified @note Not used on OSX, Xbox, or in Win debug builds @param appIdentifier Name of the app set up for exclusive use. @return False if another app is running that specified the same appIdentifier @ingroup Platform @ingroup GuiCore exec ( string fileName, bool noCalls=false, bool journalScript=false ) Execute the given script file. @param fileName @param noCalls @param journalScript @return True if the script was successfully executed, false if not. @tsexample // Execute the init.cs script file found in the same directory as the current script file. exec( "./init.cs" ); @endtsexample @see compile @see eval @ingroup Scripting execPrefs ( string relativeFileName, bool noCalls=false, bool journalScript=false ) @brief Manually execute a special script file that contains game or editor preferences @param relativeFileName Name and path to file from project folder @param noCalls Deprecated @param journalScript Deprecated @return True if script was successfully executed @note Appears to be useless in Torque 3D, should be deprecated @ingroup Scripting expandEscape ( string text ) @brief Replace all characters in @a text that need to be escaped for the string to be a valid string literal with their respective escape sequences. All characters in @a that cannot appear in a string literal will be replaced by an escape sequence (like \n, \t, etc.). The primary use of this function is for converting strings suitable for being passed as string literals to the TorqueScript compiler. @param 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 @see collapseEscape @ingroup Strings expandFilename (string filename) @brief Grabs the full path of a specified file @param filename Name of the local file to locate @return String containing the full filepath on disk @ingroup FileSystem expandOldFilename (string filename) @brief Retrofits a filepath that uses old Torque style @return String containing filepath with new formatting @ingroup FileSystem export ( string pattern, string filename="", bool append=false ) Write out the definitions of all global variables matching the given name @a pattern. If @a 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. @param pattern A global variable name pattern. Must begin with '$'. @param filename %Path of the file to which to write the definitions or "" to write the definitions to the console. @param append If true and @a fileName is not "", then the definitions are appended to the specified file. Otherwise existing contents of the file (if any) will be overwritten. @tsexample // Write out all preference variables to a prefs.cs file. export( "$prefs::*", "prefs.cs" ); @endtsexample @ingroup Scripting 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. @param faceName The name of the font face. @param fontSize The size of the font in pixels. @param fileName The file name and path for the output PNG. @param padding The padding between characters. @param kerning The kerning between characters. @ingroup Font 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. @ingroup Core fileBase (string fileName) @brief Get the base of a file name (removes extension) @param fileName Name and path of file to check @return String containing the file name, minus extension @ingroup FileSystem fileCreatedTime ( string fileName ) @brief Returns a platform specific formatted string with the creation time for the file.@param 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 @ingroup FileSystem fileDelete (string path) @brief Delete a file from the hard drive @param 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 @ingroup FileSystem fileExt (string fileName) @brief Get the extension of a file @param fileName Name and path of file @return String containing the extension, such as ".exe" or ".cs" @ingroup FileSystem fileModifiedTime ( string fileName ) @brief Returns a platform specific formatted string with the last modified time for the file. @param 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 @ingroup FileSystem fileName (string fileName) @brief Get the file name of a file (removes extension and path) @param fileName Name and path of file to check @return String containing the file name, minus extension and path @ingroup FileSystem filePath (string fileName) @brief Get the path of a file (removes name and extension) @param fileName Name and path of file to check @return String containing the path , minus name and extension @ingroup FileSystem fileSize fileSize(fileName)@brief Determines the size of a file on disk @param fileName Name and path of the file to check @return Returns filesize in KB, or -1 if no file @ingroup FileSystem filterString ( string baseString=NULL, string replacementChars=NULL ) Replaces the characters in a string with designated text @param baseString The original string to filter. @param replacementChars A string containing letters you wish to swap in the baseString. @return The new scrambled string @see containsBadWords @tsexample // 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);@endtsexample @ingroup Game findFirstFile ( string pattern, bool recurse=true ) Begin a file system search based on a filename pattern. This function returns the first file of a search. To return the remaining hits of a search, use findNextFile(). You cannot run multiple simultaneous file system searches with these functions. Each call to findFirstFile initiates a new search and renders a previous search invalid. @param pattern The path and file name pattern to match against. @param 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 the empty string if no matching file could be found. @tsexample // Execute all .cs files in a subdirectory and its subdirectories. for( %file = findFirstFile( "subdirectory/*.cs" ); %file !$= ""; %file = findNextFile() ) exec( %file ); @endtsexample @see findNextFile @see getFileCount @see findFirstFileMultiExpr @ingroup FileSearches findFirstFileMultiExpr (string pattern [, bool recurse]) @brief Returns the first file in the directory system matching the given pattern. @param pattern The path and file name pattern to match against, such as *.cs. @param recurse If true, the search will exhaustively recurse into subdirectories of the given path and match the given filename patter. @return String containing the number of files located and the list of files by name @ingroup FileSystem findNextFile ( string pattern="" ) Get the next file matched in a file system search initiated by findFirstFile(). @param pattern Ignored. @return The path of the next filename matched by the search or the empty string if no more files match. @tsexample // Execute all .cs files in a subdirectory and its subdirectories. for( %file = findFirstFile( "subdirectory/*.cs" ); %file !$= ""; %file = findNextFile() ) exec( %file ); @endtsexample @see findFirstFile @see getFileCount @see findNextFileMultiExpr @ingroup FileSearches findNextFileMultiExpr ([string pattern]) @brief Returns the next file matching a search begun in findFirstFile. @param pattern The path and file name pattern to match against. @return The path of the next matching file in string format @ingroup FileSystem firstWord ( string text ) Return the first word in @a text. @param text A list of words separated by newlines, spaces, and/or tabs. @return The word at index 0 in @a text or "" if @a text is empty. @note This is equal to @tsexample_nopar getWord( text, 0 ) @endtsexample @see getWord @ingroup FieldManip flagCurrentGFXResources () @breif 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. @ingroup GFX @see listGFXResources, clearGFXResourceFlags, describeGFXResources flushTextureCache () Releases all textures and resurrects the texture manager. @ingroup GFX fmodDumpDSPInfo () @brief Dump information about the standard DSP effects. @ingroup SFXFMOD fmodDumpMemoryStats () @return Prints the current memory consumption of the FMOD module @ingroup SFXFMOD FreeMemoryDump FreeMemoryDump(); generateUUID () Generate a new universally unique identifier (UUID). @return A newly generated UUID. @ingroup Utilities getActiveDDSFiles () Returns the count of active DDSs files in memory. @ingroup Rendering getActiveLightManager () Returns the active light manager name. @ingroup Lighting getBestHDRFormat () Returns the best texture format for storage of HDR data for the active device. @ingroup GFX getBitmapInfo ( string filename ) Returns image info in the following format: width TAB height TAB bytesPerPixel. It will return an empty string if the file is not found. @ingroup Rendering getBoxCenter (Box b) @brief Get the center point of a box. @param b A Box3F, in string format using "minExtentX minExtentY minExtentZ maxExtentX maxExtentY maxExtentZ" @return Center of the box in string format using "X Y Z" @ingroup Math getBuildString Get the type of build, "Debug" or "Release". getCategoryOfClass ( string className ) @brief Return the category of the given class. @param className String containing name of the class, such as "Player" @return Category in string format @ingroup Console getClipboard () @brief Get text from the clipboard. @internal getCompileTimeString Get the time of compilation. getCoreLangTable () @brief Gets the primary LangTable used by the game @return ID of the core LangTable @ingroup Localization getCurrentActionMap () Get the current ActionMap. @return The current ActionMap. @tsexample %currentMap = moveMap.getCurrentActionMap(); @endtsexample @ingroup Input getCurrentDirectory () Return the current working directory. @return The absolute path of the current working directory. @see getWorkingDirectory @ingroup FileSystem @ingroup Platform getDebugRender getDescriptionOfClass ( string className ) @brief Return the description string for the given class. @param className String containing name of the class, such as "Player" @return Class description in string format @ingroup Console getDesktopResolution () Returns the width, height, and bitdepth of the screen/desktop. @ingroup GFX getDirectoryList (string path, string depth) @brief Gather the contents (list of files) of a directory or set of directories @param path String containing the path of the directory @depth Depth of search, as in how many subdirectories to parse through @return String containing list of files found during search, "" if no files were found @ingroup FileSystem getDisplayDeviceInformation () Get the string describing the active GFX device. @ingroup GFX getDisplayDeviceList () Returns a tab-seperated string of the detected devices across all adapters. @ingroup GFX getDSOPath ( string scriptFileName ) Get the absolute path to the file in which the compiled code for the given script file will be stored. @param 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 compile @see getPrefsPath @ingroup Scripting getEngineName Get the name of the engine product that this is running from, as a string. getEventAction getEventAction(S32 eventID) getEventCause getEventCause(S32 eventID) getEventDatabaseID getEventDatabaseID(S32 eventType,S32 physUser,F32 time,F32 duration,S32 node,const char *action) getEventDBID getEventDBID(S32 eventID) getEventDuration getEventDuration(S32 eventID) getEventIdByNum getEventIdByNum(S32 type,S32 actorID,S32 node,S32 eventNum) getEventIdByTime getEventIdByTime(S32 type,S32 actorID,S32 node,F32 startTime) getEventIDDB getEventIDDB(S32 dbID) getEventNode getEventNode(S32 eventID) getEventPhysUser getEventPhysUser(S32 eventID) getEventTime getEventTime(S32 eventID) getEventTimeLeft getEventTimeLeft(scheduleId) Get the time left in ms until this event will trigger. getEventType getEventType(S32 eventID) getEventTypeDescription getEventTypeDescription(S32 eventType) getEventValue getEventValue(S32 eventID) getExecutableName () @brief Gets the name of the game's executable @return String containing this game's executable name @ingroup FileSystem getField ( string text, int index ) Extract the field at the given @a index in the newline and/or tab separated list in @a text. Fields in @a text must be separated by newlines and/or tabs. @param text A list of fields separated by newlines and/or tabs. @param 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. @tsexample getField( "a b" TAB "c d" TAB "e f", 1 ) // Returns "c d" @endtsexample @see getFields @see getFieldCount @see getWord @see getRecord @ingroup FieldManip getFieldCount ( string text ) Return the number of newline and/or tab separated fields in @a text. @param text A list of fields separated by newlines and/or tabs. @return The number of newline and/or tab sepearated elements in @a text. @tsexample getFieldCount( "a b" TAB "c d" TAB "e f" ) // Returns 3 @endtsexample @see getWordCount @see getRecordCount @ingroup FieldManip getFields ( string text, int startIndex, int endIndex=-1 ) Extract a range of fields from the given @a startIndex onwards thru @a endIndex. Fields in @a text must be separated by newlines and/or tabs. @param text A list of fields separated by newlines and/or tabs. @param startIndex The zero-based index of the first field to extract from @a text. @param endIndex The zero-based index of the last field to extract from @a text. If this is -1, all fields beginning with @a startIndex are extracted from @a text. @return A string containing the specified range of fields from @a text or "" if @a startIndex is out of range or greater than @a endIndex. @tsexample getFields( "a b" TAB "c d" TAB "e f", 1 ) // Returns "c d" TAB "e f" @endtsexample @see getField @see getFieldCount @see getWords @see getRecords @ingroup FieldManip getFileCount ( string pattern, bool recurse=true ) Get the number of files in the given directory tree matching the given @a pattern. @param pattern The path and file name pattern to match against. @param 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 @tsexample // Count the number of .cs files in a subdirectory and its subdirectories. getFileCount( "subdirectory/*.cs" ); @endtsexample @see findFirstFile @see findNextFile @see getFileCountMultiExpr @ingroup FileSearches getFileCountMultiExpr (string pattern [, bool recurse]) @brief Returns the number of files in the directory tree that match the given pattern @param pattern The path and file name pattern to match against, such as "*.cs" @param recurse If true, the search will exhaustively recurse into subdirectories of the given path and match the given filename patter. @return Number of files located using the pattern @ingroup FileSystem getFileCRC getFileCRC(filename) getJoystickAxes getJoystickAxes( instance ) getLightManagerNames () Returns a tab seperated list of light manager names. @ingroup Lighting 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. @ingroup FileSystem @ingroup Platform getMapEntry Returns the material name via the materialList mapTo entry @return String containing the material name @ingroup Materials getMaterialMapping (string texName) @brief Gets the name of the material mapped to this texture. param texName Name of the texture @ingroup Materials getMax ( float v1, float v2 ) Calculate the greater of two specified numbers. @param v1 Input value.@param v2 Input value.@returns The greater value of the two specified values.@ingroup Math getMin ( float v1, float v2 ) Calculate the lesser of two specified numbers. @param v1 Input value.@param v2 Input value.@returns The lesser value of the two specified values.@ingroup Math getModNameFromPath (string path) @brief Attempts to extract a mod directory from path. Returns empty string on failure. @param File path of mod folder @note This is no longer relevant in Torque 3D (which does not use mod folders), should be deprecated @internal getNumSceneEvents getNumSceneEvents(S32 type,S32 actorID,S32 node) getPixelShaderVersion () Returns the pixel shader version for the active device. @ingroup GFX getPlatformTime getPlatformTime(); getPrefsPath ([relativeFileName]) @note Appears to be useless in Torque 3D, should be deprecated @internal getRandom ( int a=1, int b=0 ) Get a random number between @a a and @a b. @param a Lower bound on the random number. The random number will be >= @a a. @param b Upper bound on the random number. The random number will be <= @a b. @return A pseudo-random number between @a a and @a b. @see setRandomSeed @ingroup Random getRandomSeed () Get the current seed used by the random number generator. @return The current random number generator seed value. @ingroup Random getRealTime () @brief Return the current real time in milliseconds. Real time is platform defined; typically time since the computer booted. @ingroup Platform getRecord ( string text, int index ) Extract the record at the given @a index in the newline-separated list in @a text. Records in @a text must be separated by newlines. @param text A list of records separated by newlines. @param index The zero-based index of the record to extract. @return The record at the given index or "" if @a index is out of range. @tsexample getRecord( "a b" NL "c d" NL "e f", 1 ) // Returns "c d" @endtsexample @see getRecords @see getRecordCount @see getWord @see getField @ingroup FieldManip getRecordCount ( string text ) Return the number of newline-separated records in @a text. @param text A list of records separated by newlines. @return The number of newline-sepearated elements in @a text. @tsexample getRecordCount( "a b" NL "c d" NL "e f" ) // Returns 3 @endtsexample @see getWordCount @see getFieldCount @ingroup FieldManip getRecords ( string text, int startIndex, int endIndex=-1 ) Extract a range of records from the given @a startIndex onwards thru @a endIndex. Records in @a text must be separated by newlines. @param text A list of records separated by newlines. @param startIndex The zero-based index of the first record to extract from @a text. @param endIndex The zero-based index of the last record to extract from @a text. If this is -1, all records beginning with @a startIndex are extracted from @a text. @return A string containing the specified range of records from @a text or "" if @a startIndex is out of range or greater than @a endIndex. @tsexample getRecords( "a b" NL "c d" NL "e f", 1 ) // Returns "c d" NL "e f" @endtsexample @see getRecord @see getRecordCount @see getWords @see getFields @ingroup FieldManip getSceneID getSceneID() getSceneName getSceneName() getScheduleDuration getScheduleDuration(%scheduleId); getServerCount getServerCount(); getSimTime () Return the current sim time in milliseconds. @brief Sim time is time since the game started. @ingroup Platform getSubStr ( string str, int start, int numChars=-1 ) @brief Return a substring of @a str starting at @a start and continuing either through to the end of @a str (if @a numChars is -1) or for @a numChars characters (except if this would exceed the actual source string length). @param str The string from which to extract a substring. @param start The offset at which to start copying out characters. @param 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 stream. @tsexample getSubStr( "foobar", 1, 2 ) // Returns "oo". @endtsexample @ingroup Strings getTag (string textTagString) @brief Extracts the tag from a tagged string @ingroup Console getTaggedString (int tag) @brief 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. @param tag A numeric tag ID.@ingroup Networking getTemporaryDirectory () @brief Returns the OS temporary directory, "C:/Users/Mich/AppData/Local/Temp" for example @note This can be useful to adhering to OS standards and practices, but not really used in Torque 3D right now. @note Be very careful when getting into OS level File I/O.@return String containing path to OS temp directory @note This is legacy function brought over from TGB, and does not appear to have much use. Possibly deprecate? @ingroup FileSystem @internal getTemporaryFileName () @brief Creates a name and extension for a potential temporary file This does not create the actual file. It simply creates a random name for a file that does not exist. @note This is legacy function brought over from TGB, and does not appear to have much use. Possibly deprecate? @ingroup FileSystem @internal getTerrainHeight (Point2 pos) gets the terrain height at the specified position.@param pos The world space point, minus the z (height) value Can be formatted as either ("x y") or (x,y) @return Returns the terrain height at the given point as an F32 value. @hide getTerrainHeightBelowPosition (Point3F pos) gets the terrain height at the specified position.@param pos The world space point. Can be formatted as either ("x y z") or (x,y,z) @note This function is useful if you simply want to grab the terrain height underneath an object. @return Returns the terrain height at the given point as an F32 value. @hide getTerrainUnderWorldPoint (Point3F x/y/z) Gets the terrain block that is located under the given world point. @param x/y/z The world coordinates (floating point values) you wish to query at. These can be formatted as either a string ("x y z") or separately as (x, y, z) @return Returns the ID of the requested terrain block (0 if not found). @hide getTextureProfileStats () Returns a list of texture profiles in the format: ProfileName TextureCount TextureMB @ingroup GFX getTime getTime() getTimeSinceStart getTimeSinceStart(%scheduleId); getTrailingNumber ( string str ) Get the numeric suffix of the given input string. @param str The string from which to read out the numeric suffix. @return The numeric value of the number suffix of @a str or -1 if @a str has no such suffix. @tsexample getTrailingNumber( "test123" ) // Returns '123'. @endtsexample @see stripTrailingNumber @ingroup Strings getUniqueInternalName ( String baseName, SimSet set, bool searchChildren ) @brief Returns a unique unused internal name within the SimSet/Group based on a given base name. @note Currently only used by editors @ingroup Editors @internal getUniqueName ( String baseName ) @brief Returns a unique unused SimObject name based on a given base name. @baseName Name to conver to a unique string if another instance exists @note Currently only used by editors @ingroup Editors @internal getUserDataDirectory getUserDataDirectory() getUserHomeDirectory getUserHomeDirectory() getVariable (string varName) @brief 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 @ingroup Scripting getVersionNumber Get the version of the build, as a string. getVersionString Get the version of the build, as a 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. @ingroup Platform getWord ( string text, int index ) Extract the word at the given @a index in the whitespace-separated list in @a text. Words in @a text must be separated by newlines, spaces, and/or tabs. @param text A whitespace-separated list of words. @param 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. @tsexample getWord( "a b c", 1 ) // Returns "b" @endtsexample @see getWords @see getWordCount @see getField @see getRecord @ingroup FieldManip getWordCount ( string text ) Return the number of whitespace-separated words in @a text. Words in @a text must be separated by newlines, spaces, and/or tabs. @param text A whitespace-separated list of words. @return The number of whitespace-separated words in @a text. @tsexample getWordCount( "a b c d e" ) // Returns 5 @endtsexample @see getFieldCount @see getRecordCount @ingroup FieldManip getWords ( string text, int startIndex, int endIndex=-1 ) Extract a range of words from the given @a startIndex onwards thru @a endIndex. Words in @a text must be separated by newlines, spaces, and/or tabs. @param text A whitespace-separated list of words. @param startIndex The zero-based index of the first word to extract from @a text. @param endIndex The zero-based index of the last word to extract from @a text. If this is -1, all words beginning with @a startIndex are extracted from @a text. @return A string containing the specified range of words from @a text or "" if @a startIndex is out of range or greater than @a endIndex. @tsexample getWords( "a b c d", 1, 2, ) // Returns "b c" @endtsexample @see getWord @see getWordCount @see getFields @see getRecords @ingroup FieldManip getWorkingDirectory () @brief Reports the current directory file system is in @return String containing full file path of working directory @ingroup FileSystem getXInputState ( int controllerID, string property, bool current ) @brief Queries the current state of an Xbox 360 controller @param controllerID Unique ID assigned to device at creation @param property Constant name of input action being queried, such as "XI_THUMBLX" @param current True checks current device in action @return Integer containing state of input, 0 off, 1 on @ingroup Input gotoWebPage ( string address ) Open the given URL or file in the user's web browser. @param 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 @a adress; if the file check fails, "http://" is prepended to @a address. @tsexample gotoWebPage( "http://www.torquepowered.com" ); @endtsexample @ingroup Platform 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. @param faceName The name of the font face. @param fontSize The size of the font in pixels. @param fileName The file name and path for the input PNG. @param padding The padding between characters. @param kerning The kerning between characters. @ingroup Font initClientContainerRadiusSearch (Point3F pos, float radius, bitset mask) Start a search for items within radius of pos, filtering by bitset mask. initContainerRadiusSearch ( Point3F pos, float radius, int mask ) Start a search for items within radius of pos, filtering by mask. @param pos Center position for the search @param radius Search radius @param mask Bitmask of object types to include in the search @see containerSearchNext @ingroup gameObjects initContainerTypeSearch ( int mask ) Start a search for all items of the types specified by the bitset mask.@param mask Bitmask of object types to include in the search @see containerSearchNext @ingroup gameObjects initDisplayDeviceInfo () @brief Initializes variables that track device and vendor information/IDs @ingroup Rendering 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 or numbers. @param str The string to test. @param index The index of a character in @a str. @return True if the character at the given index in @a str is an alpha-numeric character; false otherwise. @see isspace @ingroup Strings isClass ( string className ) @brief Returns if the passed string is a defined class @param className String containing the name of the class @return True if the class exists, false if clas does not exist or className is something else @ingroup Console isCurrentScriptToolScript () Returns true if the calling script is a tools script. @hide 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. @ingroup Platform isDefined isDefined(varName)@brief Determines if a variable exists and contains a value @param varName Name of the variable to search for @return True if the variable was defined in script, false if not @ingroup Scripting isDemo IsDirectory ( string directory) @brief Determines if a specified directory exists or not @param directory String containing path in the form of "foo/bar" @note Do not include trailing /, is case insensitive, directory must have files in it if you expect the directory to be in a zip @ingroup FileSystem isEventPending isEventPending(%scheduleId); isFile isFile(fileName) isFunction (string funcName) @brief Determines if a function exists or not @param funcName String containing name of the function @return True if the function exists, false if not @ingroup Scripting isJoystickDetected isJoystickDetected() isJoystickEnabled () @brief Queries input manager to see if a joystick is enabled @return True if a joystick exists and is enabled @ingroup Input isKoreanBuild isKoreanBuild() isMemberOfClass (classA, classB) @brief Determines if a class is a member of another @param classA Parent class @param classB Class to check if child of classA @return Returns true if classA <: classB. @ingroup Console isMethod (string namespace, string method) @brief Determines if a class/namespace method exists @param namespace Class or namespace, such as Player @param method Name of the funciton to search for @return True if the method exists, false if not @ingroup Scripting isObject isObject(object) isPackage isPackage(packageName) isPointInside Check to see if a point in world space is inside of an interior.@hide isQueueRegistered (string queueName) @brief Determines if a dispatcher queue exists @param queueName String containing the name of queue @ingroup Platform isScriptPathExpando (string expando) @internal Editor use only 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. @ingroup Platform 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. @param str The string to test. @param index The index of a character in @a str. @return True if the character at the given index in @a str is a whitespace character; false otherwise. @see isalnum @ingroup Strings 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. @ingroup Platform isValidObjectName ( string name ) @brief Return true if the given name makes for a valid object name. @param name Name of object @return True if name is allowed, false if denied (usually because it starts with a number, _, or invalid character@ingroup Console isWebDemo isWriteableFileName isWriteableFileName(fileName)@brief Determines if a file name can be written to using File I/O @param fileName Name and path of file to check @return True if the file name can be written to @ingroup FileSystem isXInputConnected ( int controllerID ) @brief Checks to see if an Xbox 360 controller is connected @param controllerID Unique ID assigned to device at creation @ingroup Input lightScene ( string completeCallbackFn=NULL, string mode=NULL ) Will generate static lighting for the scene if supported by the active light manager. If mode is "forceAlways", the lightmaps will be regenerated regardless of whether lighting cache files can be written to. If mode is "forceWritable", then the lightmaps will be regenerated only if the lighting cache files can be written. @param completeCallbackFn The name of the function to execute when the lighting is complete. @param mode Either "forceAlways" or "forceWritable". @return Returns true if the scene lighting process was started. @ingroup Lighting listGFXResources ( bool unflaggedOnly=false ) Returns a list of the unflagged GFX resources. See flagCurrentGFXResources for usage details. @ingroup GFX @see flagCurrentGFXResources, clearGFXResourceFlags, describeGFXResources loadColladaLights (string filename, SimGroup parentGroup=MissionGroup, SimObject baseObject=-1) Load all light instances from a COLLADA (.dae) file and add to the scene. @param filename COLLADA filename to load lights from @param parentGroup (optional) name of an existing simgroup to add the new lights to (defaults to MissionGroup) @param baseObject (optional) name of an object to use as the origin (useful if you are loading the lights for a collada scene and have moved or rotated the geometry) @return true if successful, false otherwise @tsexample // load the lights in room.dae loadColladaLights( "art/shapes/collada/room.dae" ); // load the lights in room.dae and add them to the RoomLights group loadColladaLights( "art/shapes/collada/room.dae", "RoomLights" ); // load the lights in room.dae and use the transform of the "Room" object as the origin loadColladaLights( "art/shapes/collada/room.dae", "", "Room" ); @endtsexample @note Currently for editor use only @ingroup Editors @internal loadObject ( string filename ) @brief Load a plain-text serialized object form the given file. @param Name and path to text file containing the object @ingroup Scripting @ingroup Console loadSceneEvents loadSceneEvents(S32 scene_id || const char *filename) lockMouse (bool isLocked) @brief Lock the mouse (or not, depending on the argument's value) to the window. @ingroup Platform log ( String string ) Log a message to the console log. @param string The message text. @ingroup Logging logError ( String string ) @brief Log an error message to the console log. @param string The message text. @ingroup Logging logWarning ( String string ) @brief Log a warning message to the console log. @param string The message text. @ingroup Logging ltrim ( string str ) Remove leading whitespace from the string. @param str A string. @return A string that is the same as @a str but with any leading (i.e. leftmost) whitespace removed. @tsexample ltrim( " string " ); // Returns "string ". @endtsexample @see rtrim @see trim @ingroup Strings m2Pi () Return the value of 2*PI (full-circle in radians). @returns The value of 2*PI.@ingroup Math mAbs ( float v ) Calculate absolute value of specified value. @param v Input Value.@returns Absolute value of specified value.@ingroup Math mAcos ( float v ) Calculate the arc-cosine of v. @param v Input Value (in radians).@returns The arc-cosine of the input value.@ingroup Math makeFullPath (string path) @brief Converts a relative file path to a full path For example, "./console.log" becomes "C:/Torque/t3d/examples/FPS Example/game/console.log" @param path Name of file or path to check @return String containing non-relative directory of path @ingroup FileSystem makeRelativePath (string path, [string to]) @brief Turns a full or local path to a relative one For example, "./game/art" becomes "game/art" @returns String containing relative path @ingroup FileSystem mAsin ( float v ) Calculate the arc-sine of v. @param v Input Value (in radians).@returns The arc-sine of the input value.@ingroup Math mAtan ( float rise, float run ) Calculate the arc-tangent (slope) of a line defined by rise and run. @param rise of line.@param run of line.@returns The arc-tangent (slope) of a line defined by rise and run.@ingroup Math mathInit ( ... ) @brief Install the math library with specified extensions. Possible parameters are: - 'DETECT' Autodetect math lib settings. - 'C' Enable the C math routines. C routines are always enabled. - 'FPU' Enable floating point unit routines. - 'MMX' Enable MMX math routines. - '3DNOW' Enable 3dNow! math routines. - 'SSE' Enable SSE math routines. @ingroup Math MatrixCreate ( VectorF position, AngAxisF orientation ) Create a transform from the given translation and orientation. @param position The translation vector for the transform. @param orientation The axis and rotation that orients the transform. @return A transform based on the given position and orientation. @ingroup Matrices MatrixCreateFromEuler (Vector3F e) @brief Create a matrix from the given rotations. @param Vector3F containing the rotation @ingroup Matrices MatrixMulPoint (MatrixF xfrm, Point3F pnt) @brief Multiply pnt by xfrm. @ingroup Matrices MatrixMultiply (Matrix4F left, Matrix4F right) @brief Multiply the two matrices. @ingroup Matrices MatrixMulVector (MatrixF xfrm, Point3F vector) @brief Multiply the vector by the transform. @ingroup Matrices mCeil ( float v ) Round v up to the nearest integer. @param v Number to convert to integer.@returns Number converted to integer.@ingroup Math mClamp ( float v, float min, float max ) Clamp the specified value between two bounds. @param v Input value.@param min Minimum Bound.@param max Maximum Bound.@returns The specified value clamped to the specified bounds.@ingroup Math mCos ( float v ) Calculate the cosine of v. @param v Input Value (in radians).@returns The cosine of the input value.@ingroup Math mDegToRad ( float degrees ) Convert specified degrees into radians. @param degrees Input Value (in degrees).@returns The specified degrees value converted to radians.@ingroup Math messageBox ( string title, string message, MBButtons buttons=MBOkCancel, MBIcons icons=MIInformation ) Display a modal message box using the platform's native message box implementation. @param title The title to display on the message box window. @param message The text message to display in the box. @param buttons Which buttons to put on the message box. @param icons Which icon to show next to the message. @return A value identifying the button that the user pressed. @tsexample messageBox( "Error", "" ); @endtsexample @ingroup Platform mFloatLength ( float v, int precision ) Formats the specified number to the given number of decimal places. @param v Number to format.@param precision Number of decimal places to format to (1-9).@returns Number formatted to the specified number of decimal places.@ingroup Math mFloor ( float v ) Round v down to the nearest integer. @param v Number to convert to integer.@returns Number converted to integer.@ingroup Math mFMod ( float v, float d ) Calculate the remainder of v/d. @param v Input Value.@param d Divisor Value.@returns The remainder of v/d.@ingroup Math mIsPow2 ( int v ) Returns whether the value is an exact power of two. @param v Input value.@returns Whether the specified value is an exact power of two.@ingroup Math mLerp ( float v1, float v2, float time ) Calculate linearly interpolated value between two specified numbers using specified normalized time. @param v1 Interpolate From Input value.@param v2 Interpolate To Input value.@param time Normalized time used to interpolate values (0-1).@returns The interpolated value between the two specified values at normalized time t.@ingroup Math mLog ( float v ) Calculate the natural logarithm of v. @param v Input Value.@returns The natural logarithm of the input value.@ingroup Math mPi () Return the value of PI (half-circle in radians). @returns The value of PI.@ingroup Math mPow ( float v, float p ) Calculate b raised to the p-th power. @param v Input Value.@param p Power to raise value by.@returns v raised to the p-th power.@ingroup Math mRadToDeg ( float radians ) Convert specified radians into degrees. @param radians Input Value (in radians).@returns The specified radians value converted to degrees.@ingroup Math mRound ( float v ) Round v to the nearest integer. @param v Number to convert to integer.@returns Number converted to integer.@ingroup Math mSaturate ( float v ) Clamp the specified value between 0 and 1 (inclusive). @param v Input value.@returns The specified value clamped between 0 and 1 (inclusive).@ingroup Math mSin ( float v ) Calculate the sine of v. @param v Input Value (in radians).@returns The sine of the input value.@ingroup Math 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. @param a First Coefficient.@param b Second Coefficient.@param c Third Coefficient.@param d Fourth Coefficient.@returns A 4-tuple, containing: (sol x0 x1 x2). (sol) is the number of solutions(being 0, 1, 2 or 3), and (x0), (x1) and (x2) are the solutions, if any.@ingroup Math mSolveQuadratic ( float a, float b, float c ) Solve a quadratic equation (2nd degree polynomial) of form a*x^2 + b*x + c = 0. @param a First Coefficient.@param b Second Coefficient.@param c Third Coefficient.@returns A triple, containing: (sol x0 x1). (sol) is the number of solutions(being 0, 1, or 2), and (x0) and (x1) are the solutions, if any.@ingroup Math 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. @param a First Coefficient.@param b Second Coefficient.@param c Third Coefficient.@param d Fourth Coefficient.@param e Fifth Coefficient.@returns A 5-tuple, containing: (sol x0 x1 x2 c3). (sol) is the number of solutions(being 0, 1, 2, 3 or 4), and (x0), (x1), (x2) and (x3) are the solutions, if any.@ingroup Math mSqrt ( float v ) Calculate the square-root of v. @param v Input Value.@returns The square-root of the input value.@ingroup Math mTan ( float v ) Calculate the tangent of v. @param v Input Value (in radians).@returns The tangent of the input value.@ingroup Math nameToID nameToID(object) nextToken ( string str, string token, string delimiters ) Tokenize a string using a set of delimiting characters. This function first skips all leading charaters in @a str that are contained in @a delimiters. From that position, it then scans for the next character in @a str that is contained in @a delimiters and stores all characters from the starting position up to the first delimiter in a variable in the current scope called @a token. Finally, it skips all characters in @a delimiters after the token and then returns the remaining string contents in @a str. To scan out all tokens in a string, call this function repeatedly by passing the result it returns each time as the new @a str until the function returns "". @param str A string. @param token The name of the variable in which to store the current token. This variable is set in the scope in which nextToken is called. @param delimiters A string of characters. Each character is considered a delimiter. @return The remainder of @a str after the token has been parsed out or "" if no more tokens were found in @a str. @tsexample // Stores "a" in the variable %token and sets %remainder to "b c". %remainder = nextToken( "a b c", "token", " " ); @endtsexample @ingroup Strings nxCastRay Point3F start, Point3F dir, F32 force, F32 damage, DirtExplosion, BrickExplosion, WaterExplosion,BloodExplosion nxDelayCastRay Point3F start, Point3F dir, F32 force, F32 damage, DirtExplosion, BrickExplosion, WaterExplosion,BloodExplosion nxNum nxSampleRagdoll openFile ( string file ) Open the given @a file through the system. This will usually open the file in its associated application. @param file Path of the file to open. @ingroup FileSystem @ingroup Platform openFolder ( string path ) Open the given folder in the system's file manager. @param path Path to a directory. @ingroup FileSystem @ingroup Platform pathConcat (string path, string file) @brief Combines two separate strings containing a file path and file name together into a single string @param path String containing file path @param file String containing file name @return String containing concatenated file name and path @ingroup FileSystem pathCopy ( string fromFile, string toFile, bool noOverwrite=true ) Copy a file to a new location. @param fromFile %Path of the file to copy. @param toFile %Path where to copy @a fromFile to. @param noOverwrite If true, then @a fromFile will not overwrite a file that may already exist at @a toFile. @return True if the file was successfully copied, false otherwise. @ingroup FileSystem pathOnMissionLoadDone () Load all path information from interiors. @tsexample // Inform the engine to load all path information from interiors. pathOnMissionLoadDone(); @endtsexample @ingroup Game physCreateScene physDestroyScene physEndingMission physicsDebugDraw physicsDebugDraw( bool enable ) physicsDestroy physicsDestroy() physicsDestroyWorld physicsDestroyWorld( String worldName ) physicsGetTimeScale physicsGetTimeScale() physicsInit physicsInit( [string library] ) physicsInitWorld physicsInitWorld( String worldName ) physicsPluginPresent physicsPluginPresent() Returns true if a physics plugin exists and is initialized. physicsRestoreState physicsRestoreState() physicsSetTimeScale physicsSetTimeScale( F32 scale ) physicsSimulationEnabled physicsSimulationEnabled() physicsStartSimulation physicsStartSimulation( String worldName ) physicsStopSimulation physicsStopSimulation( String worldName ) physicsStoreState physicsStoreState() playJournal (string filename, bool break=false) @brief Begin playback of a journal from a specified field, optionally breaking at the start. @param filename Name and path of file journal file @ingroup Platform playJournalToVideo ( string journalFile, string videoFile=NULL, string encoder="THEORA", float framerate=30.0f, Point2I resolution=Point2I( 0, 0 ) ) Load a journal file and capture it video. @ingroup Rendering popInstantGroup () @brief Pop and restore the last setting of $instantGroup off the stack. @note Currently only used for editors @ingroup Editors @internal populateAllFontCacheRange ( int rangeStart, int rangeEnd ) Populate the font cache for all fonts with Unicode code points in the specified range. @param rangeStart The start Unicode point. @param rangeEnd The end Unicode point. @note We only support BMP-0, so code points range from 0 to 65535. @ingroup Font populateAllFontCacheString ( string string ) Populate the font cache for all fonts with characters from the specified string. @ingroup Font populateFontCacheRange ( string faceName, int fontSize, int rangeStart, int rangeEnd ) Populate the font cache for the specified font with Unicode code points in the specified range. @param faceName The name of the font face. @param fontSize The size of the font in pixels. @param rangeStart The start Unicode point. @param rangeEnd The end Unicode point. @note We only support BMP-0, so code points range from 0 to 65535. @ingroup Font populateFontCacheString ( string faceName, int fontSize, string string ) Populate the font cache for the specified font with characters from the specified string. @param faceName The name of the font face. @param size The size of the font in pixels. @param string The string to populate. @ingroup Font preloadClientDataBlocks Preload all datablocks in client mode. (Server parameter is set to false). This will take some time to complete. profilerDump () @brief Dump the current state of the profiler. @ingroup Debuggin profilerDumpToFile (string filename) @brief Dump profiling stats to a file. @filename Name and path of file to save to @ingroup Debugging profilerEnable (bool enable) @brief Turn on the profiler @ingroup Debugging profilerMarkerEnable ( string markerName, bool enable=true ) @brief Enable or disable a specific profile @param Name of tag as a specific marker to start profiling @param True to enable immediately @ingroup Debugging profilerReset () @brief Resets the profiler, clearing all of its data. @ingroup Debugging pushInstantGroup ([group]) @brief Pushes the current $instantGroup on a stack and sets it to the given value (or clears it). @note Currently only used for editors @ingroup Editors @internal queryLanServers queryLanServers(...); queryMasterServer queryMasterServer(...); querySingleServer querySingleServer(address, flags); quit () Shut down the engine and exit its process. This function cleanly uninitializes the engine and then exits back to the system with a process exit status indicating a clean exit. @see quitWithErrorMessage @ingroup Platform quitWithErrorMessage ( string message ) Display an error message box showing the given @a message and then shut down the engine and exit its process. This function cleanly uninitialized the engine and then exits back to the system with a process exit status indicating an error. @param message The message to log to the console and show in an error message box. @see quit @ingroup Platform redbookClose Close the current Redbook device.@brief Deprecated @internal redbookGetDeviceCount get the number of redbook devices.@brief Deprecated @internal redbookGetDeviceName (int index) Get name of specified Redbook device.@brief Deprecated @internal redbookGetLastError Get a string explaining the last redbook error.@brief Deprecated @internal redbookGetTrackCount Return the number of tracks.@brief Deprecated @internal redbookGetVolume Get the volume.@brief Deprecated @internal redbookOpen (string device=NULL) @brief Deprecated @internal redbookPlay (int track) Play the selected track.@brief Deprecated @internal redbookSetVolume (float volume) Set playback volume.@brief Deprecated @internal redbookStop Stop playing.@brief Deprecated @internal registerMessageListener (queueName, listener) @brief Registers an event message @param queueName String containing the name of queue to attach listener to @param listener Name of event messenger @ingroup Platform registerMessageQueue (string queueName) @brief Registeres a dispatcher queue @param queueName String containing the name of queue @ingroup Platform reInitMaterials @brief Flushes all the procedural shaders and re-initializes all the active materials instances. @ingroup Materials reloadResource ( string path ) Force the resource at specified input path to be reloaded @param path Path to the resource to be reloaded @tsexample reloadResource( "art/shapes/box.dts" ); @endtsexample @note Currently used by editors only @ingroup Editors @internal reloadTextures () Reload all the textures from disk. @ingroup GFX removeField ( string text, int index ) Remove the field in @a text at the given @a index. Fields in @a text must be separated by newlines and/or tabs. @param text A list of fields separated by newlines and/or tabs. @param index The zero-based index of the field in @a text. @return A new string with the field at the given index removed or the original string if @a index is out of range. @tsexample removeField( "a b" TAB "c d" TAB "e f", 1 ) // Returns "a b" TAB "e f" @endtsexample @see removeWord @see removeRecord @ingroup FieldManip removeGlobalShaderMacro ( string name ) Removes an existing global macro by name. @see addGlobalShaderMacro @ingroup Rendering removeRecord ( string text, int index ) Remove the record in @a text at the given @a index. Records in @a text must be separated by newlines. @param text A list of records separated by newlines. @param index The zero-based index of the record in @a text. @return A new string with the record at the given @a index removed or the original string if @a index is out of range. @tsexample removeRecord( "a b" NL "c d" NL "e f", 1 ) // Returns "a b" NL "e f" @endtsexample @see removeWord @see removeField @ingroup FieldManip removeScriptPathExpando (string expando) @internal Editor use only removeTaggedString (int tag) @brief Remove a tagged string from the Net String Table @param The tag associated with the string @ingroup Networking removeWord ( string text, int index ) Remove the word in @a text at the given @a index. Words in @a text must be separated by newlines, spaces, and/or tabs. @param text A whitespace-separated list of words. @param index The zero-based index of the word in @a text. @return A new string with the word at the given index removed or the original string if @a index is out of range. @tsexample removeWord( "a b c d", 2 ) // Returns "a b d" @endtsexample @see removeField @see removeRecord @ingroup FieldManip resetFPSTracker () @brief Reset FPS stats (fps::) @ingroup Game resetLightManager () @brief 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. @ingroup Lighting resetXInput resetXInput()@brief Rebuilds the XInput section of the InputManager @ingroup Input restartInstance restartInstance() restWords ( string text ) Return all but the first word in @a text. @param text A list of words separated by newlines, spaces, and/or tabs. @return @a text with the first word removed. @note This is equal to @tsexample_nopar getWords( text, 1 ) @endtsexample @see getWords @ingroup FieldManip rtrim ( string str ) Remove trailing whitespace from the string. @param str A string. @return A string that is the same as @a str but with any trailing (i.e. rightmost) whitespace removed. @tsexample rtrim( " string " ); // Returns " string". @endtsexample @see ltrim @see trim @ingroup Strings rumble (string device, float xRumble, float yRumble) @brief Rumbles the specified controller with constant force feedback in the (x, y) direction. Valid inputs for xRumble/yRumble are [0 - 1]. @param device Name of the device to rumble @param xRumble Intensity to apply to xRumble motor @param yRumble Intensity to apply to yRumble motor @ingroup Input saveJournal (string filename) Save the journal to the specified file. @ingroup Platform saveObject ( object, string filename ) @brief Save the given object to the given filename in plain-text form. @param object Name or ID of object to save @param filename Name and path of text file to save object to @ingroup Scripting @ingroup Console saveScene saveScene() saveSceneEvent saveSceneEvent(S32 eventID,S32 eventType,S32 physUser,F32 time,F32 duration,S32 node,Point3F value,const char *action) saveSceneEvents saveSceneEvents(const char *filename) schedule schedule(time, refobject|0, command, <arg1...argN>) screenShot ( string file, string format, int tileCount=1, float tileOverlap=0 ) Takes a screenshot with optional tiling to produce huge screenshots. @param file The output image file path. @param format Either JPEG or PNG. @param tileCount If greater than 1 will tile the current screen size to take a large format screenshot. @param tileOverlap The amount of horizontal and vertical overlap between the tiles used to remove tile edge artifacts from post effects. @ingroup GFX setArenaBot setArenaBot(shapebase_id); setClipboard (string text) @brief Set the system clipboard. @internal setCoreLangTable (LangTable) @brief Sets the primary LangTable used by the game @param LangTable ID of the core LangTable @ingroup Localization setCurrentDirectory ( string path ) Set the current working directory. @param path The absolute or relative (to the current working directory) path of the directory which should be made the new working directory. @return True if the working directory was successfully changed to @a path, false otherwise. @ingroup FileSystem @ingroup Platform setDebugRender setDefaultFov (defaultFov) @brief Set the default FOV for a camera. @ingroup CameraSystem setDR setEcstasyProject setEcstasyProject(const char *filename) setEventAction setEventAction(S32 eventID, const char *action) setEventCause setEventCause(S32 eventID,S32 causeID) setEventDuration setEventDuration(S32 eventID,F32 duration) setEventNode setEventNode(S32 eventID,S32 node) setEventPhysUser setEventPhysUser(S32 eventID,S32 actorID) setEventTime setEventTime(S32 eventID,F32 time) setEventType setEventType(S32 eventID,S32 type) setEventValue setEventValue(S32 eventID, Point3F value) setField ( string text, int index, string replacement ) Replace the field in @a text at the given @a index with @a replacement. Fields in @a text must be separated by newlines and/or tabs. @param text A list of fields separated by newlines and/or tabs. @param index The zero-based index of the field to replace. @param replacement The string with which to replace the field. @return A new string with the field at the given @a index replaced by @a replacement or the original string if @a index is out of range. @tsexample setField( "a b" TAB "c d" TAB "e f", 1, "g h" ) // Returns "a b" TAB "g h" TAB "e f" @endtsexample @see getField @see setWord @see setRecord @ingroup FieldManip setFov (fov) @brief Set the FOV of the camera. @ingroup CameraSystem setInteriorFocusedDebug (bool enable) @brief No longer properly supported @internal setInteriorRenderMode ( int mode ) Globally changes how InteriorInstances are rendered. Useful for debugging geometry and rendering artifacts @note This does not work in shipping mode @param mode The render mode can be one of: NormalRender = 0, NormalRenderLines = 1, ShowDetail = 2, ShowAmbiguous = 3, ShowOrphan = 4, ShowLightmaps = 5, ShowTexturesOnly = 6, ShowPortalZones = 7, ShowOutsideVisible = 8, ShowCollisionFans = 9, ShowStrips = 10, ShowNullSurfaces = 11, ShowLargeTextures = 12, ShowHullSurfaces = 13, ShowVehicleHullSurfaces = 14, ShowVertexColors = 15, ShowDetailLevel = 16 @ingroup Game setLightManager ( string name ) Finds and activates the named light manager. @return Returns true if the light manager is found and activated. @ingroup Lighting setLogMode ( int mode ) Set the operational mode of the console logging system. @param mode The logging mode. This can be one of: - 1: Open and close the console log file for each seperate string of output. This will ensure that all parts get written out to disk and that no parts remain in intermediate buffers even if the process crashes. - 2: Keep the log file open and write to it continuously. This will make the system operate faster but if the process crashes, parts of the output may not have been written to disk yet and will be missing from the log. Additionally, when changing the log mode and thus opening a new log file, either of the two mode values may be combined by binary OR with 0x4 to cause the logging system to flush all console log messages that had already been issued to the console system to the newly created log file. @ingroup Logging setMissionName setMissionName(char *name) setMouseValue S32 value setNetPort (int port, bool bind=true) @brief Set the network port for the game to use. If bind is true, bind()will be called on the port. This will trigger a windows firewall prompt. If you don't have firewall tunneling tech you can set this to false to avoid the prompt. @ingroup Networking setPixelShaderVersion ( float version ) @brief 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. @param version The floating point shader version number. @note This will only affect shaders/materials created after the call and should be used before the game begins. @see $pref::Video::forcedPixVersion @ingroup GFX setRandomSeed ( int seed=-1 ) Set the current seed for the random number generator. Based on this seed, a repeatable sequence of numbers will be produced by getRandom(). @param seed The seed with which to initialize the randon number generator with. The same seed will always leed tothe same sequence of pseudo-random numbers. If -1, the current timestamp will be used as the seed which is a good basis for randomization. @ingroup Random setRecord ( string text, int index, string replacement ) Replace the record in @a text at the given @a index with @a replacement. Records in @a text must be separated by newlines. @param text A list of records separated by newlines. @param index The zero-based index of the record to replace. @param replacement The string with which to replace the record. @return A new string with the record at the given @a index replaced by @a replacement or the original string if @a index is out of range. @tsexample setRecord( "a b" NL "c d" NL "e f", 1, "g h" ) // Returns "a b" NL "g h" NL "e f" @endtsexample @see getRecord @see setWord @see setField @ingroup FieldManip setReflectFormat ( GFXFormat format ) Set the reflection texture format. @ingroup GFX setSceneName setSceneName(char *name) setSceneRecordGlobal setSceneRecordGlobal() setSceneRecordLocal setSceneRecordLocal() setScriptPathExpando (string expando, string path[, bool toolsOnly]) @internal Editor use only setServerInfo setServerInfo(index); setShadowManager string sShadowSystemName setShadowVizLight setTweakerOne setTweakerOne(shapebase_id); setTweakerTwo setTweakerTwo(shapebase_id); setVariable (string varName, string value) @brief Sets the value of the named variable. @param varName Name of the variable to locate @param value New value of the variable @return True if variable was successfully found and set @ingroup Scripting setVISBodyAxes bool setVISCollisionShapes bool setVISJointAxes bool setVISJointLimits bool setWord ( string text, int index, string replacement ) Replace the word in @a text at the given @a index with @a replacement. Words in @a text must be separated by newlines, spaces, and/or tabs. @param text A whitespace-separated list of words. @param index The zero-based index of the word to replace. @param replacement The string with which to replace the word. @return A new string with the word at the given @a index replaced by @a replacement or the original string if @a index is out of range. @tsexample setWord( "a b c d", 2, "f" ) // Returns "a b f d" @endtsexample @see getWord @see setField @see setRecord @ingroup FieldManip setZoomSpeed (speed) @brief Set the zoom speed of the camera, in ms per 90deg FOV change. @ingroup CameraSystem sfxCreateDevice ( string provider, string device, bool useHardware, int maxBuffers ) Try to create a new sound device using the given properties. If a sound device is currently initialized, it will be uninitialized first. However, be aware that in this case, if this function fails, it will not restore the previously active device but rather leave the sound system in an uninitialized state. Sounds that are already playing while the new device is created will be temporarily transitioned to virtualized playback and then resume normal playback once the device has been created. In the core scripts, sound is automatically set up during startup in the sfxStartup() function. @param provider The name of the device provider as returned by sfxGetAvailableDevices(). @param device The name of the device as returned by sfxGetAvailableDevices(). @param useHardware Whether to enabled hardware mixing on the device or not. Only relevant if supported by the given device. @param maxBuffers The maximum number of concurrent voices for this device to use or -1 for the device to pick its own reasonable default.@return True if the initialization was successful, false if not. @note This function must be called before any of the sound playback functions can be used. @see sfxGetAvailableDevices @see sfxGetDeviceInfo @see sfxDeleteDevice @ref SFX_devices @ingroup SFX sfxCreateSource ( SFXTrack track | ( SFXDescription description, string filename ) [, float x, float y, float z ] ) Creates a new paused sound source using a profile or a description and filename. The return value is the source which must be released by delete(). @hide sfxDeleteDevice () Delete the currently active sound device and release all its resources. SFXSources that are still playing will be transitioned to virtualized playback mode. When creating a new device, they will automatically transition back to normal playback. In the core scripts, this is done automatically for you during shutdown in the sfxShutdown() function. @see sfxCreateDevice @ref SFX_devices @ingroup SFX sfxDeleteWhenStopped ( SFXSource source ) Mark the given @a source for deletion as soon as it moves into stopped state. This function will retroactively turn the given @a source into a play-once source (see @ref SFXSource_playonce). @param source A sound source. @ingroup SFX sfxDumpSources ( bool includeGroups=false ) Dump information about all current SFXSource instances to the console. The dump includes information about the playback status for each source, volume levels, virtualization, etc. @param includeGroups If true, direct instances of SFXSources (which represent logical sound groups) will be included. Otherwise only instances of subclasses of SFXSources are included in the dump. @see SFXSource @see sfxDumpSourcesToString @ingroup SFX sfxDumpSourcesToString ( bool includeGroups=false ) Dump information about all current SFXSource instances to a string. The dump includes information about the playback status for each source, volume levels, virtualization, etc. @param includeGroups If true, direct instances of SFXSources (which represent logical sound groups) will be included. Otherwise only instances of subclasses of SFXSources are included in the dump. @return A string containing a dump of information about all currently instantiated SFXSources. @see SFXSource @see sfxDumpSources @ingroup SFX sfxGetActiveStates () Return a newline-separated list of all active states. @return A list of the form @verbatim stateName1 NL stateName2 NL stateName3 ... @endverbatim where each element is the name of an active state object. @tsexample // Disable all active states. foreach$( %state in sfxGetActiveStates() ) %state.disable(); @endtsexample @ingroup SFX sfxGetAvailableDevices () Get a list of all available sound devices. The return value will be a newline-separated list of entries where each line describes one available sound device. Each such line will have the following format:@verbatim provider TAB device TAB hasHardware TAB numMaxBuffers @endverbatim - provider: The name of the device provider (e.g. "FMOD"). - device: The name of the device as returned by the device layer. - hasHardware: Whether the device supports hardware mixing or not. - numMaxBuffers: The maximum number of concurrent voices supported by the device's mixer. If this limit limit is exceeded, i.e. if there are more active sounds playing at any one time, then voice virtualization will start culling voices and put them into virtualized playback mode. Voice virtualization may or may not be provided by the device itself; if not provided by the device, it will be provided by Torque's sound system. @return A newline-separated list of information about all available sound devices. @see sfxCreateDevice @see sfxGetDeviceInfo @see $SFX::DEVICE_INFO_PROVIDER @see $SFX::DEVICE_INFO_NAME @see $SFX::DEVICE_INFO_USEHARDWARE @see $SFX::DEVICE_INFO_MAXBUFFERS @ref SFX_devices @ingroup SFX sfxGetDeviceInfo () Return information about the currently active sound device. The return value is a tab-delimited string of the following format: @verbatim provider TAB device TAB hasHardware TAB numMaxBuffers TAB caps @endverbatim - provider: The name of the device provider (e.g. "FMOD"). - device: The name of the device as returned by the device layer. - hasHardware: Whether the device supports hardware mixing or not. - numMaxBuffers: The maximum number of concurrent voices supported by the device's mixer. If this limit limit is exceeded, i.e. if there are more active sounds playing at any one time, then voice virtualization will start culling voices and put them into virtualized playback mode. Voice virtualization may or may not be provided by the device itself; if not provided by the device, it will be provided by Torque's sound system. - caps: A bitfield of capability flags. @return A tab-separated list of properties of the currently active sound device or the empty string if no sound device has been initialized. @see sfxCreateDevice @see sfxGetAvailableDevices @see $SFX::DEVICE_INFO_PROVIDER @see $SFX::DEVICE_INFO_NAME @see $SFX::DEVICE_INFO_USEHARDWARE @see $SFX::DEVICE_INFO_MAXBUFFERS @see $SFX::DEVICE_INFO_CAPS @see $SFX::DEVICE_CAPS_REVERB @see $SFX::DEVICE_CAPS_VOICEMANAGEMENT @see $SFX::DEVICE_CAPS_OCCLUSION @see $SFX::DEVICE_CAPS_DSPEFFECTS @see $SFX::DEVICE_CAPS_MULTILISTENER @see $SFX::DEVICE_CAPS_FMODDESIGNER @ref SFX_devices @ingroup SFX sfxGetDistanceModel () Get the falloff curve type currently being applied to 3D sounds. @return The current distance model type. @ref SFXSource_volume @ref SFX_3d @ingroup SFX sfxGetDopplerFactor () Get the current global doppler effect setting. @return The current global doppler effect scale factor (>=0). @see sfxSetDopplerFactor @ref SFXSource_doppler @ingroup SFX sfxGetRolloffFactor () Get the current global scale factor applied to volume attenuation of 3D sounds in the logarithmic model. @return The current scale factor for logarithmic 3D sound falloff curves. @see sfxGetDistanceModel @see SFXDistanceModel @ref SFXSource_volume @ref SFX_3d @ingroup SFX sfxPlay ( SFXSource source | ( SFXTrack track [, float x, float y, float z ] ) ) Start playing the given source or create a new source for the given track and play it. @hide sfxPlayOnce SFXSource sfxPlayOnce( ( SFXTrack track | SFXDescription description, string filename ) [, float x, float y, float z, float fadeInTime=-1 ] ) Create a new play-once source for the given profile or description+filename and start playback of the source. @hide sfxSetDistanceModel ( SFXDistanceModel model ) Set the falloff curve type to use for distance-based volume attenuation of 3D sounds. @param model The distance model to use for 3D sound. @note This setting takes effect globally and is applied to all 3D sounds. @ingroup SFX sfxSetDopplerFactor ( float value ) Set the global doppler effect scale factor. @param value The new doppler shift scale factor. @pre @a value must be >= 0. @see sfxGetDopplerFactor @ref SFXSource_doppler @ingroup SFX sfxSetRolloffFactor ( float value ) Set the global scale factor to apply to volume attenuation of 3D sounds in the logarithmic model. @param value The new scale factor for logarithmic 3D sound falloff curves. @pre @a value must be > 0. @note This function has no effect if the currently distance model is set to SFXDistanceModel::Linear. @see sfxGetDistanceModel @see SFXDistanceModel @ref SFXSource_volume @ref SFX_3d @ingroup SFX sfxStop ( SFXSource source ) Stop playback of the given @a source. This is equivalent to calling SFXSource::stop(). @param source The source to put into stopped state. @ingroup SFX sfxStopAndDelete ( SFXSource source ) Stop playback of the given @a source (if it is not already stopped) and delete the @a source. The advantage of this function over directly calling delete() is that it will correctly handle volume fades that may be configured on the source. Whereas calling delete() would immediately stop playback and delete the source, this functionality will wait for the fade-out to play and only then stop the source and delete it. @param source A sound source. @ref SFXSource_fades @ingroup SFX shellExecute (executable, [args], [directory]) @brief Launches an outside executable or batch file @param executable Name of the executable or batch file @param args List of arguments, in string format, to pass to the executable @param directory Optional string containing path to output or shell @ingroup Platform sizeof sizeof( object | classname)@brief Determines the memory consumption of a class or object @param object The object or class being measured @return Total size of an object and its members @ingroup Debugging snapToggle () @brief Prevents mouse movement from being processed In the source, whenever a mouse move event occurs GameTSCtrl::onMouseMove() is called. Whenever snapToggle() is called, it will flag a variable that can prevent this from happening: gSnapLine. This variable is not exposed to script, so you need to call this function to trigger it. @tsexample // Snapping is off by default, so we will toggle // it on first: PlayGui.snapToggle(); // Mouse movement should be disabled // Let's turn it back on PlayGui.snapToggle(); @endtsexample @ingroup GuiGame spawnObject spawnObject(class [, dataBlock, name, properties, script])@hide startArenaStreaming startArenaStreaming(char localIP,char sourceIP) StartClientReplication () Activates the shape replicator. @tsexample // Call the function StartClientReplication() @endtsexample @ingroup Foliage startFileChangeNotifications startFileChangeNotifications()@brief Start watching resources for file changes @note Currently used by Editors only @ingroup Editors @internal StartFoliageReplication () Activates the foliage replicator. @tsexample // Call the function StartFoliageReplication(); @endtsexample @ingroup Foliage startHeartbeat startHeartbeat() startPrecisionTimer startPrecisionTimer() - Create and start a high resolution platform timer. Returns the timer id. startSceneEvents startSceneEvents(F32 time) startsWith ( string str, string prefix, bool caseSensitive=false ) Test whether the given string begins with the given prefix. @param str The string to test. @param prefix The potential prefix of @a str. @param caseSensitive If true, the comparison will be case-sensitive; if false, differences in casing will not be taken into account. @return True if the first characters in @a str match the complete contents of @a prefix; false otherwise. @tsexample startsWith( "TEST123", "test" ) // Returns true. @endtsexample @see endsWith @ingroup Strings startVideoCapture ( GuiCanvas canvas, string filename, string encoder="THEORA", float framerate=30.0f, Point2I resolution=Point2I( 0, 0 ) ) Begins a video capture session. @see stopVideoCapture @ingroup Rendering stopArenaStreaming stopArenaStreaming() stopFileChangeNotifications stopFileChangeNotifications()@brief Stop watching resources for file changes@note Currently used by Editors only @ingroup Editors @internal stopHeartbeat stopHeartbeat(); stopPrecisionTimer stopPrecisionTimer( S32 id ) - Stop and destroy timer with the passed id. Returns the elapsed milliseconds. stopSampling () @brief Stops the rendering sampler @ingroup Rendering stopServerQuery stopServerQuery() stopVideoCapture () Stops the video capture session. @see startVideoCapture @ingroup Rendering strasc ( string chr ) Return the integer character code value corresponding to the first character in the given string. @param chr a (one-character) string. @return the UTF32 code value for the first character in the given string. @ingroup Strings strchr ( string str, string chr ) Find the first occurrence of the given character in @a str. @param str The string to search. @param chr The character to search for. Only the first character from the string is taken. @return The remainder of the input string starting with the given character or the empty string if the character could not be found. @see strrchr @ingroup Strings strchrpos ( string str, string chr, int start=0 ) Find the first occurrence of the given character in the given string. @param str The string to search. @param chr The character to look for. Only the first character of this string will be searched for. @param start The index into @a str at which to start searching for the given character. @return The index of the first occurrence of @a chr in @a str or -1 if @a str does not contain the given character. @tsexample strchrpos( "test", "s" ) // Returns 2. @endtsexample @ingroup Strings strcmp ( string str1, string str2 ) Compares two strings using case-<b>sensitive</b> comparison. @param str1 The first string. @param str2 The second string. @return 0 if both strings are equal, -1 if the first character different in str1 has a smaller character code value than the character at the same position in str2, and 1 otherwise. @tsexample if( strcmp( %var, "foobar" ) == 0 ) echo( "%var is equal to 'foobar'" ); @endtsexample @see stricmp @see strnatcmp @ingroup Strings strformat ( string format, string value ) Format the given value as a string using printf-style formatting. @param format A printf-style format string. @param value The value argument matching the given format string. @tsexample // Convert the given integer value to a string in a hex notation. %hex = strformat( "%x", %value ); @endtsexample @ingroup Strings @see http://en.wikipedia.org/wiki/Printf stricmp ( string str1, string str2 ) Compares two strings using case-<b>insensitive</b> comparison. @param str1 The first string. @param str2 The second string. @return 0 if both strings are equal, -1 if the first character different in str1 has a smaller character code value than the character at the same position in str2, and 1 otherwise. @tsexample if( stricmp( "FOObar", "foobar" ) == 0 ) echo( "this is always true" ); @endtsexample @see strcmp @see strinatcmp @ingroup Strings strinatcmp ( string str1, string str2 ) Compares two strings using "natural order" case-<b>insensitive</b> comparison. Natural order means that rather than solely comparing single character code values, strings are ordered in a natural way. For example, the string "hello10" is considered greater than the string "hello2" even though the first numeric character in "hello10" actually has a smaller character value than the corresponding character in "hello2". However, since 10 is greater than 2, strnatcmp will put "hello10" after "hello2". @param str1 The first string. @param str2 The second string. @tsexample // Bubble sort 10 elements of %array using natural order do { %swapped = false; for( %i = 0; %i < 10 - 1; %i ++ ) if( strnatcmp( %array[ %i ], %array[ %i + 1 ] ) > 0 ) { %temp = %array[ %i ]; %array[ %i ] = %array[ %i + 1 ]; %array[ %i + 1 ] = %temp; %swapped = true; } } while( %swapped ); @endtsexample @see stricmp @see strnatcmp @ingroup Strings stripChars ( string str, string chars ) Remove all occurrences of characters contained in @a chars from @a str. @param str The string to filter characters out from. @param chars A string of characters to filter out from @a str. @return A version of @a str with all occurrences of characters contained in @a chars filtered out. @tsexample stripChars( "teststring", "se" ); // Returns "tttring".@endtsexample @ingroup Strings stripExtension stripExtension(const char *filename) StripMLControlChars ( string inString ) @brief Strip TorqueML control characters from the specified string, returning a 'clean' version. @param inString String to strip TorqueML control characters from. @tsexample // Define the string to strip TorqueML control characters from %string = "<font:Arial:24>How Now <color:c43c12>Brown <color:000000>Cow"; // Request the stripped version of the string %strippedString = StripMLControlChars(%string); @endtsexample @return Version of the inputted string with all TorqueML characters removed. @see References @ingroup GuiCore stripTrailingNumber ( string str ) Strip a numeric suffix from the given string. @param str The string from which to strip its numeric suffix. @return The string @a str without its number suffix or the original string @a str if it has no such suffix. @tsexample stripTrailingNumber( "test123" ) // Returns "test". @endtsexample @see getTrailingNumber @ingroup Strings strIsMatchExpr ( string pattern, string str, bool caseSensitive=false ) Match a pattern against a string. @param pattern The wildcard pattern to match against. The pattern can include characters, '*' to match any number of characters and '?' to match a single character. @param str The string which should be matched against @a pattern. @param caseSensitive If true, characters in the pattern are matched in case-sensitive fashion against this string. If false, differences in casing are ignored. @return True if @a str matches the given @a pattern. @tsexample strIsMatchExpr( "f?o*R", "foobar" ) // Returns true. @endtsexample @see strIsMatchMultipleExpr @ingroup Strings strIsMatchMultipleExpr ( string patterns, string str, bool caseSensitive=false ) Match a multiple patterns against a single string. @param patterns A space- or tab-separated list of patterns. Each pattern can include charaters, '*' to match any number of characters and '?' to match a single character. Each of the patterns is tried in turn. @param str The string which should be matched against @a patterns. @param caseSensitive If true, characters in the pattern are matched in case-sensitive fashion against this string. If false, differences in casing are ignored. @return True if @a str matches any of the given @a patterns. @tsexample strIsMatchMultipleExpr( "*.cs *.gui *.mis", "mymission.mis" ) // Returns true. @endtsexample @see strIsMatchExpr @ingroup Strings strlen ( string str ) Get the length of the given string in bytes. @note This does <b>not</b> return a true character count for strings with multi-byte characters! @param str A string. @return The length of the given string in bytes. @ingroup Strings strlwr ( string str ) Return an all lower-case version of the given string. @param str A string. @return A version of @a str with all characters converted to lower-case. @tsexample strlwr( "TesT1" ) // Returns "test1" @endtsexample @see strupr @ingroup Strings strnatcmp ( string str1, string str2 ) Compares two strings using "natural order" case-<b>sensitive</b> comparison. Natural order means that rather than solely comparing single character code values, strings are ordered in a natural way. For example, the string "hello10" is considered greater than the string "hello2" even though the first numeric character in "hello10" actually has a smaller character value than the corresponding character in "hello2". However, since 10 is greater than 2, strnatcmp will put "hello10" after "hello2". @param str1 The first string. @param str2 The second string. @tsexample // Bubble sort 10 elements of %array using natural order do { %swapped = false; for( %i = 0; %i < 10 - 1; %i ++ ) if( strnatcmp( %array[ %i ], %array[ %i + 1 ] ) > 0 ) { %temp = %array[ %i ]; %array[ %i ] = %array[ %i + 1 ]; %array[ %i + 1 ] = %temp; %swapped = true; } } while( %swapped ); @endtsexample @see strcmp @see strinatcmp @ingroup Strings strpos ( string haystack, string needle, int offset=0 ) Find the start of @a needle in @a haystack searching from left to right beginning at the given offset. @param haystack The string to search. @param needle The string to search for. @return The index at which the first occurrence of @a needle was found in @a heystack or -1 if no match was found. @tsexample strpos( "b ab", "b", 1 ) // Returns 2. @endtsexample @ingroup Strings strrchr ( string str, string chr ) Find the last occurrence of the given character in @a str.@param str The string to search. @param chr The character to search for. Only the first character from the string is taken. @return The remainder of the input string starting with the given character or the empty string if the character could not be found. @see strchr @ingroup Strings strrchrpos ( string str, string chr, int start=0 ) Find the last occurrence of the given character in the given string. @param str The string to search. @param chr The character to look for. Only the first character of this string will be searched for. @param start The index into @a str at which to start searching for the given character. @return The index of the last occurrence of @a chr in @a str or -1 if @a str does not contain the given character. @tsexample strrchrpos( "test", "t" ) // Returns 3. @endtsexample @ingroup Strings strrepeat ( string str, int numTimes, string delimiter="" ) Return a string that repeats @a str @a numTimes number of times delimiting each occurrence with @a delimiter. @param str The string to repeat multiple times. @param numTimes The number of times to repeat @a str in the result string. @param delimiter The string to put between each repetition of @a str. @return A string containing @a str repeated @a numTimes times. @tsexample strrepeat( "a", 5, "b" ) // Returns "ababababa". @endtsexample @ingroup Strings strreplace ( string source, string from, string to ) Replace all occurrences of @a from in @a source with @a to. @param source The string in which to replace the occurrences of @a from. @param from The string to replace in @a source. @param to The string with which to replace occurrences of @from. @return A string with all occurrences of @a from in @a source replaced by @a to. @tsexample strreplace( "aabbccbb", "bb", "ee" ) // Returns "aaeeccee". @endtsexample @ingroup Strings strstr ( string string, string substring ) Find the start of @a substring in the given @a string searching from left to right. @param string The string to search. @param substring The string to search for. @return The index into @a string at which the first occurrence of @a substring was found or -1 if @a substring could not be found. @tsexample strstr( "abcd", "c" ) // Returns 2. @endtsexample @ingroup Strings strToPlayerName strToPlayerName( string ) strupr ( string str ) Return an all upper-case version of the given string. @param str A string. @return A version of @a str with all characters converted to upper-case. @tsexample strupr( "TesT1" ) // Returns "TEST1" @endtsexample @see strlwr @ingroup Strings telnetSetParameters (int port, string consolePass, string listenPass) @brief Initialize and open the telnet console. @param port Port to listen on for console connections (0 will shut down listening). @param consolePass Password for read/write access to console. @param listenPass Password for read access to console.@param remoteEcho [optional] Enable echoing back to the client, off by default. @ingroup Debugging TestFunction2Args testFunction(arg1, arg2) testJavaScriptBridge testBridge(arg1, arg2, arg3) trace ( bool enable=true ) Enable or disable tracing in the script code VM. When tracing is on, the script code runtime will trace the invocation and returns from all functions that are called and log them to the console. This is helpful in finding what the script program flow is. @param enable New setting for script trace execution. @ingroup Debugging trim ( string str ) Remove leading and trailing whitespace from the string. @param str A string. @return A string that is the same as @a str but with any leading (i.e. leftmost) and trailing (i.e. rightmost) whitespace removed. @tsexample trim( " string " ); // Returns "string". @endtsexample @ingroup Strings tsUpdateImposterImages tsUpdateImposterImages( bool forceupdate ) unitTest_runTests ([searchString[, bool skipInteractive]]) @brief Run unit tests, or just the tests that prefix match against the searchString. @ingroup Console unregisterMessageListener (queueName, listener) @brief Unregisters an event message @param queueName String containing the name of queue @param listener Name of event messenger @ingroup Platform unregisterMessageQueue (queueName) @brief Unregisters a dispatcher queue @param queueName String containing the name of queue @ingroup Platform VectorAdd ( VectorF a, VectorF b ) Add two vectors. @param a The first vector. @param b The second vector. @return The vector @a a + @a b. @tsexample //----------------------------------------------------------------------------- // // VectorAdd( %a, %b ); // // The sum of vector a, (ax, ay, az), and vector b, (bx, by, bz) is: // // a + b = ( ax + bx, ay + by, az + bz ) // //----------------------------------------------------------------------------- %a = "1 0 0"; %b = "0 1 0"; // %r = "( 1 + 0, 0 + 1, 0 + 0 )"; // %r = "1 1 0"; %r = VectorAdd( %a, %b ); @endtsexample @ingroup Vectors VectorCross ( VectorF a, VectorF b ) Calculcate the cross product of two vectors. @param a The first vector. @param b The second vector. @return The cross product @a x @a b. @tsexample //----------------------------------------------------------------------------- // // VectorCross( %a, %b ); // // The cross product of vector a, (ax, ay, az), and vector b, (bx, by, bz), is // // a x b = ( ( ay * bz ) - ( az * by ), ( az * bx ) - ( ax * bz ), ( ax * by ) - ( ay * bx ) ) // //----------------------------------------------------------------------------- %a = "1 1 0"; %b = "2 0 1"; // %r = "( ( 1 * 1 ) - ( 0 * 0 ), ( 0 * 2 ) - ( 1 * 1 ), ( 1 * 0 ) - ( 1 * 2 ) )"; // %r = "1 -1 -2"; %r = VectorCross( %a, %b ); @endtsexample @ingroup Vectors VectorDist ( VectorF a, VectorF b ) Compute the distance between two vectors. @param a The first vector. @param b The second vector. @return The length( @a b - @a a ). @tsexample //----------------------------------------------------------------------------- // // VectorDist( %a, %b ); // // The distance between vector a, (ax, ay, az), and vector b, (bx, by, bz), is // // a -> b = ||( b - a )|| // = ||( bx - ax, by - ay, bz - az )|| // = mSqrt( ( bx - ax ) * ( bx - ax ) + ( by - ay ) * ( by - ay ) + ( bz - az ) * ( bz - az ) ) // //----------------------------------------------------------------------------- %a = "1 1 0"; %b = "2 0 1"; // %r = mSqrt( ( 2 - 1 ) * ( 2 - 1) + ( 0 - 1 ) * ( 0 - 1 ) + ( 1 - 0 ) * ( 1 - 0 ) ); // %r = mSqrt( 3 ); %r = VectorDist( %a, %b ); @endtsexample @ingroup Vectors VectorDot ( VectorF a, VectorF b ) Compute the dot product of two vectors. @param a The first vector. @param b The second vector. @return The dot product @a a * @a b. @tsexample //----------------------------------------------------------------------------- // // VectorDot( %a, %b ); // // The dot product between vector a, (ax, ay, az), and vector b, (bx, by, bz), is: // // a . b = ( ax * bx + ay * by + az * bz ) // //----------------------------------------------------------------------------- %a = "1 1 0"; %b = "2 0 1"; // %r = "( 1 * 2 + 1 * 0 + 0 * 1 )"; // %r = 2; %r = VectorDot( %a, %b ); @endtsexample @ingroup Vectors VectorLen ( VectorF v ) Calculate the magnitude of the given vector. @param v A vector. @return The length of vector @a v. @tsexample //----------------------------------------------------------------------------- // // VectorLen( %a ); // // The length or magnitude of vector a, (ax, ay, az), is: // // ||a|| = Sqrt( ax * ax + ay * ay + az * az ) // //----------------------------------------------------------------------------- %a = "1 1 0"; // %r = mSqrt( 1 * 1 + 1 * 1 + 0 * 0 ); // %r = mSqrt( 2 ); // %r = 1.414; %r = VectorLen( %a ); @endtsexample @ingroup Vectors VectorLerp ( VectorF a, VectorF b, float t ) Linearly interpolate between two vectors by @a t. @param a Vector to start interpolation from. @param b Vector to interpolate to. @param t Interpolation factor (0-1). At zero, @a a is returned and at one, @a b is returned. In between, an interpolated vector between @a a and @a b is returned. @return An interpolated vector between @a a and @a b. @tsexample //----------------------------------------------------------------------------- // // VectorLerp( %a, %b ); // // The point between vector a, (ax, ay, az), and vector b, (bx, by, bz), which is // weighted by the interpolation factor, t, is // // r = a + t * ( b - a ) // = ( ax + t * ( bx - ax ), ay + t * ( by - ay ), az + t * ( bz - az ) ) // //----------------------------------------------------------------------------- %a = "1 1 0"; %b = "2 0 1"; %v = "0.25"; // %r = "( 1 + 0.25 * ( 2 - 1 ), 1 + 0.25 * ( 0 - 1 ), 0 + 0.25 * ( 1 - 0 ) )"; // %r = "1.25 0.75 0.25"; %r = VectorLerp( %a, %b ); @endtsexample @ingroup Vectors VectorNormalize ( VectorF v ) Brings a vector into its unit form, i.e. such that it has the magnitute 1. @param v The vector to normalize. @return The vector @a v scaled to length 1. @tsexample //----------------------------------------------------------------------------- // // VectorNormalize( %a ); // // The normalized vector a, (ax, ay, az), is: // // a^ = a / ||a|| // = ( ax / ||a||, ay / ||a||, az / ||a|| ) // //----------------------------------------------------------------------------- %a = "1 1 0"; %l = 1.414; // %r = "( 1 / 1.141, 1 / 1.141, 0 / 1.141 )"; // %r = "0.707 0.707 0"; %r = VectorNormalize( %a ); @endtsexample @ingroup Vectors VectorOrthoBasis ( AngAxisF aa ) Create an orthogonal basis from the given vector. @param aaf The vector to create the orthogonal basis from. @return A matrix representing the orthogonal basis. @ingroup Vectors VectorScale ( VectorF a, float scalar ) Scales a vector by a scalar. @param a The vector to scale. @param scalar The scale factor. @return The vector @a a * @a scalar. @tsexample //----------------------------------------------------------------------------- // // VectorScale( %a, %v ); // // Scaling vector a, (ax, ay, az), but the scalar, v, is: // // a * v = ( ax * v, ay * v, az * v ) // //----------------------------------------------------------------------------- %a = "1 1 0"; %v = "2"; // %r = "( 1 * 2, 1 * 2, 0 * 2 )"; // %r = "2 2 0"; %r = VectorScale( %a, %v ); @endtsexample @ingroup Vectors VectorSub ( VectorF a, VectorF b ) Subtract two vectors. @param a The first vector. @param b The second vector. @return The vector @a a - @a b. @tsexample //----------------------------------------------------------------------------- // // VectorSub( %a, %b ); // // The difference of vector a, (ax, ay, az), and vector b, (bx, by, bz) is: // // a - b = ( ax - bx, ay - by, az - bz ) // //----------------------------------------------------------------------------- %a = "1 0 0"; %b = "0 1 0"; // %r = "( 1 - 0, 0 - 1, 0 - 0 )"; // %r = "1 -1 0"; %r = VectorSub( %a, %b ); @endtsexample @ingroup Vectors warn ( string text... ) Log a warning message to the console. This function concatenates all given arguments to a single string and prints the string to the console as a warning message (in the in-game console, these will show up using a grey font by default). A newline is added automatically after the text. @param text Any number of string arguments. @ingroup Logging writeFontCache () Force all cached fonts to serialize themselves to the cache. @ingroup Font