Torque Console Objects 14
From TDN
[edit] Console Objects Fields and Methods Quick Reference Part 14
This quick reference guide was taken directly out of The Game Programmer's Guide to Torque by Edward Maurina. It's an outstanding resource - a must for anyone wanting to get serious about programming in Torque. [edit] TerrainBlock |
Mission object representing terrain. Default terrain in Torque measures 2 x 2 km and repeats forever. See EGTGE Volume I – Mission Objects chapter for usage.
Fields
| Field Name | Description | Sample or Range |
| bumpOffset | Offset between bumpmap textures. | [ 0.0 , inf ) |
| bumpScale | Scale of bumpmap texture. | [ 1 , inf ) |
| bumpTexture | Path to texture to use for bump map textures. | -- |
| detailTexture | Path to texture to use for terrain detailing. | -- |
| emptySquares | List of empty squares in terrain. | -- |
| squareSize | Vertical and horizontal distance between terrain verticies in meters. Default is 8 meters. Affects water rendering. | 1 , 2 , 4 , 8 (default) , 16 , 32 , 64 , 128 |
| terrainFile | Path to file used for terrain. | -- |
| zeroBumpScale | Value controlling bumpmap rendering distance. | [ 1 , inf ) |
| tile | Enables and disables tiling of terrain. | [ false , true ] |
Globals
| Variable Name | Description | Sample or Range |
| $farDistance | Distance to far render plane (where rendering stops). | Modify in sky object. |
| $pref::Terrain::dynamicLights | - | |
| $pref::Terrain::enableDetails | Enable/Disable detailTexture rendering. | - |
| $pref::Terrain::enableEmbossBumps | Enable/Disable bump map rendering. NOTE: TGEA does not support terrain bump maps. | - |
| $pref::Terrain::screenError | Terrain screen error metrics. The higher this value is, the smoother terrain slopes will become (within limits). Lowering this value can increase render speed on old systems. | [ 0 , inf ) |
| $pref::Terrain::texDetail | This value modifies the texturing LOD. Higher numbers equal LOWER LOD. For best results leave this at 0. | [ 0 , 10 ] |
| $pref::Terrain::textureCacheSize | - | |
| $screenSize | - | |
| $T2::dynamicTextureCount | Grand total newly rendered textures count for the terrain. | - |
| $T2::staticTextureCount | Grand total rendered textures count for the terrain. | - |
Console Methods
| getHeightfieldScript() | getTextureScript() | save() |
| setHeightfieldScript() | setTextureScript() |
These methods are used by the editors and should not be used for general scripting purposes. Please see EditorGui.cs if you want to see these methods in use.
Trigger
Mission object representing a re-active zone in the game. This object senses the entry, exit, and presence of objects within it's bounds.
Fields
| Field Name | Description | Sample or Range |
| polyhedron | List of (relative) coordinates representing bounds of area. | -- |
Console Methods
| getNumObjects() | getObject() |
|
getNumObjects() |
|
Purpose |
|
getObject( index ) |
|
Purpose |
TriggerData
Datablock associated with the trigger mission object.
Fields
| Field Name | Description | Sample or Range |
| tickPeriodMS | Period in milliseconds describing time to next trigger tick. Trigger checks for current contents on each tick. Does not affect sensing of onEnter/onLeave. | [ 0 , inf ) |
TSShapeConstructor
Fields
| Field Name | Description | Sample or Range |
| baseShape | The DTS file used by this shape constructor. | ~/path/filename.dts |
| sequence[0:126] | Up to 127 sequences that can be associated with this shape construtor. | ~/path/filename.dsq |
TSStatic
Fields
| Field Name | Description | Sample or Range |
| position | The object's placement position, not neccesarily the current position. | "1.0 2.0 3.0" |
| rotation | The object's placement rotation, not neccesarily the current rotation. | "1.0 2.0 3.0" |
| scale | The object's placement scale, not neccesarily the current scale. | "1.0 2.0 3.0" |
| shapeName | DTS file for this shape | ~/path/filename.dts |
Vehicle
Fields
| Field Name | Description | Sample or Range |
| disableMove | Used to disable a vehicle's ability to move. | [ false , true ] |
VehicleData
Fields
| Field Name | Description | Sample or Range |
| bodyFriction | The vehicle's rigid body friction coefficient. Used in the physical simulation during contacts and collisions. Higher friction values dampen contact and collision forces. | ( -inf.0 , inf.0 ) |
| bodyRestitution | The vehicle's rigid body restitution. Used in the physical simulation during collisions. The scalar restitution value affects the strength of the body's rebound resulting from collisions with objects. Higher restitution values yield more powerful rebound reactions. | ( -inf.0 , inf.0 ) |
| cameraDecay | Scalar rate at which the third person camera offset decays, per tick. | ( -inf.0 , inf.0 ) |
| cameraLag | Scalar amount by which the third person camera lags the vehicle, relative to the vehicle's linear velocity. | ( -inf.0 , inf.0 ) |
| cameraOffset | The vertical offset of the vehicle's camera. | ( -inf.0 , inf.0 ) |
| cameraRoll | Specifies whether the camera's rotation matrix, and the render eye transform are multiplied during camera updates. | [ false , true ] |
| collDamageMultiplier | Note: this field currently has no tangible effect in the engine's simulation.. | ( -inf.0 , inf.0 ) |
| collDamageThresholdVel | Note: this field currently has no tangible effect in the engine's simulation. | ( -inf.0 , inf.0 ) |
| collisionTol | The minimum collision velocity required to trigger a full collision. Collisions with velocities less than the collisionTol value will be treated as collision contacts or constraints. | ( -inf.0 , inf.0 ) |
| contactTol | The minimum collision velocity required to trigger a collision contact. Collisions with velocities less than the contactTol value will be treated as collision constraints. | ( -inf.0 , inf.0 ) |
|
damageEmitter[0] |
Array of pointers to ParticleEmitterData datablocks which will be used to emit particles for damage effects (smoke). | see type |
|
damageEmitterOffset[0] |
Offset point at which to display damage effects. | "1.0 2.0 3.0" |
|
damageLevelTolerance[0] |
Array of floats specifying damage level thresholds. Each entry is specified as a decimal percentage of maxDamage (defined in ShapeBaseData). Each damage level is used to determine what damage effect to play. | ( -inf.0 , inf.0 ) |
| dustEmitter | Array of pointers to ParticleEmitterData datablocks which will be used to emit particles at vehicle/terrain contact point. | see type |
| dustHeight | Height of dust effects. | ( -inf.0 , inf.0 ) |
| exitingWater | The AudioProfile will be used to produce sounds when emerging from water. | see type |
| exitSplashSoundVelocity | The minimum velocity at which the exit splash sound will be played when emerging from water. | ( -inf.0 , inf.0 ) |
| hardImpactSound | The AudioProfile used to produce sounds for hard impacts. | see type |
| hardImpactSpeed | Minimum speed at which the vehicle must be travelling for the hard impact sound to be played. | ( -inf.0 , inf.0 ) |
| hardSplashSoundVelocity | The minimum velocity at which the hard splash sound will be played when impacting water. | ( -inf.0 , inf.0 ) |
| impactWaterEasy | The AudioProfile will be used to produce sounds when a soft impact with water occurs. | see type |
| impactWaterHard | The AudioProfile will be used to produce sounds when a hard impact with water occurs. | see type |
| impactWaterMedium | The AudioProfile will be used to produce sounds when a medium impact with water occurs. | see type |
| integration | The number of discrete steps with which to process physics data per tick. | ( -inf , inf ) |
| jetEnergyDrain | Energy drained per tick by use of the vehicle's jet, if it has one. | ( -inf.0 , inf.0 ) |
| jetForce | Force generated by the vehicle's jet, if it has one. This field is only used by derived classes. | ( -inf.0 , inf.0 ) |
| massCenter | The vehicle's rigid body center of mass. | "1.0 2.0 3.0" |
| maxDrag | dIntended to clamp the maximum drag available. Note: this field currently has no tangible effect in the engine's simulation. | - |
| maxSteeringAngle | Maximum attainable steering angle, measured in radians. Steering angles are clamped to this maximum value. | ( -inf.0 , inf.0 ) |
| mediumSplashSoundVelocity | The minimum velocity at which the medium splash sound will be played when impacting water. | ( -inf.0 , inf.0 ) |
| minDrag | The minimum drag acting on the vehicle at all times. At present, this field is only used by FlyingVehicleData and helps determine it's maxSpeed and movement force. | ( -inf.0 , inf.0 ) |
| minImpactSpeed | Minimum speed at which the vehicle must be travelling for the OnImpact script function to be called. | ( -inf.0 , inf.0 ) |
| minJetEnergy | Minimum energy required in order to use the vehicle's jet, if it has one. | ( -inf.0 , inf.0 ) |
| minRollSpeed | Note: this field currently has no tangible effect in the engine's simulation. | - |
| numDmgEmitterAreas | The number of areas on the vehicle that can display damage effects. | ( -inf.0 , inf.0 ) |
| softImpactSound | The AudioProfile used to produce sounds for soft impacts. | see type |
| softImpactSpeed | Minimum speed at which the vehicle must be travelling for the soft impact sound to be played. | ( -inf.0 , inf.0 ) |
| softSplashSoundVelocity | The minimum velocity at which the soft splash sound will be played when impacting water. | ( -inf.0 , inf.0 ) |
|
splashEmitter[0] |
Array of pointers to ParticleEmitterData datablocks which will generate splash effects. | see type |
| splashFreqMod | The simulated frequency modulation of a splash generated by this vehicle. Multiplied along with vehicle speed and time elapsed when determining splash emition rate. | ( -inf.0 , inf.0 ) |
| splashVelEpsilon | The threshold speed at which we consider the vehicle's movement to have stopped when updating splash effects. | ( -inf.0 , inf.0 ) |
| triggerDustHeight | Maximum height from the ground at which the vehicle will generate dust. | ( -inf.0 , inf.0 ) |
| waterWakeSound | The AudioProfile will be used to produce sounds when a water wake is displayed. | see type |
Table of Contents || Part 1 || Part 2 || Part 3 || Part 4 || Part 5 || Part 6 || Part 7 || Part 8 || Part 9 || Part 10 || Part 11 || Part 12 || Part 13 || Part 15



