Torque Console Objects 9
From TDN
[edit] Console Objects Fields and Methods Quick Reference Part 9
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] Precipitation |
Fields
| Field Name | Description | Sample or Range |
| boxHeight | Height of box (around camera) where precipitation occurs. | ( 0.0 , inf ) |
| boxWidth | Width of box (around camera) where precipitation occurs. | ( 0.0 , inf ) |
| doCollision | Allow precipitation to collide with objects vs. fall through. | [ false , true ] |
| maxMass | Maximum mass per drop. | [ minMass , inf ) |
| maxSpeed | Maximum speed per drop. | [ minSpeed , inf ) |
| maxTurbulence | Max turbulence to apply per drop. | [ 0.0 , inf ) |
| minMass | Minimum mass per drop. | [ 0.0 , maxMass ] |
| minSpeed | Minimum speed per drop. | [ 0.0 , maxSpeed ] |
| numDrops | Approximate number of drops allowed to exist at any one time. | ( 0 , inf ) |
| rotateWithCamVel | Drops rotate to face camera. | [ false , true ] |
| turbulenceSpeed | Velocity (of drops) at which turbulence kicks in. | [ 0.0 , inf ) |
| useTurbulence | Enable turbulence effect. | [ false , true ] |
Console Method Summaries
| modifyStorm | setPercentage |
Console Methods
|
modifyStorm( percentage , time ) |
|
Purpose |
|
setPercentage( percentage ) |
|
Purpose |
PrecipitationData
Fields
| Field Name | Description | Sample or Range |
| dropSize | Render size for drops. | ( 0.0 , inf ) |
| dropTexture | Texture file (4 x 4 bitmap array) to use for drops. | texture Path |
| soundProfile | Looping 2D audio profile to play with precipitation. | Audio Profile Name |
| splashMS | Life of splashes in milliseconds. | ( 0 , inf ) |
| splashSize | Size of splashes. | ( 0.0 , inf ) |
| splashTexture | Texture to use for splashes (4 x 4 bitmap array). | texture path |
| useTrueBillboards | Drops behave like true (non axis-aligned) billboards. | [ false , true ] |
Projectile
Fields
| Field Name | Description | Sample or Range |
| initialPosition | Position that projectile starts at. | "1.0 2.0 3.0" |
| initialVelocity | Starting velocity of projectile. | "1.0 2.0 3.0" |
| sourceObject | description | ( -inf , inf ) |
| sourceSlot | description | ( -inf , inf ) |
ProjectileData
Fields
| Field Name | Description | Sample or Range |
| armingDelay | The number of ticks that must pass after the Projectile is created before it can explode. Valid range is 0 to Projectile::MaxLivingTicks (4095 by default). | ( -inf , inf ) |
| bounceElasticity | Used to simulate the Projectile's bounce elasticity, if it collides with something but does not explode. The bounce elasticity scales the velocity from a bounce, after friction is taken into account. | [ 0.0 , 0.999 ] |
| bounceFriction | On bounce, reduce projectile velocity by this factor and a multiple of the tangent to impact. | ( -inf.0 , inf.0 ) |
|
decals[0] |
Array of pointers to DecalData datablocks. A non-NULL decal object will be randomly chosen from the array when the Projectile collides with the terrain or an interior. | DecalData datablock |
| explosion | ExplosionData datablock used when the Projectile object blows up out of water. | see type |
| fadeDelay | The number of ticks that must pass after the Projectile is created before it will begin becoming transparent. Projectile's opacity will follow a linear degression starting fadeDelay number of ticks after it is creating and ending at lifetime number of ticks. Valid range is 0 to Projectile::MaxLivingTicks (4095 by default). | ( -inf , inf ) |
| gravityMod | If isBallistic is true, scales the effect of gravity on the Projectile. Valid range is 0.0 to 1.0. | ( -inf.0 , inf.0 ) |
| hasLight | Specifies whether the Projectile object sheds light when not in water. If so, a point light object is used with the radius and color specified in the lightRadius and lightColor fields. | [ false , true ] |
| hasWaterLight | Specifies whether the Projectile object sheds light when in water. If so, a point light object is used with the radius and color specified in the lightRadius and waterLightColor fields. | [ false , true ] |
| isBallistic | Specifies whether the Projectile will be affected by gravity, and whether it can bounce before exploding. | [ false , true ] |
| lifetime | The number of ticks the Projectile should survive for. Also used along with fadeDelay to determine the transparency of the Projectile object at a given time. See the fadeDelay field documentation for more information. The valid range for lifetime values is 0 to Projectile::MaxLivingTicks (4095 by default). | ( -inf , inf ) |
| lightColor | The projectile's point light color for use when not in water. | "1.0 0.5 0.5" |
| lightRadius | The projectile's point light radius. Valid range is 1.0 to 20.0 | ( -inf.0 , inf.0 ) |
| muzzleVelocity | Note: this field currently has no tangible effect in the engine simulation itself, but it is useful in script, and its valid range is checked by the engine. Valid range is from 0.0 to 10,000.0 | ( -inf.0 , inf.0 ) |
| particleEmitter | ParticleEmitter datablock used to generate particles for the projectile when it is out of water, and when entering or leaving water. | see type |
| particleWaterEmitter | ParticleEmitter datablock used to generate particles for the projectile when it is under water, and when it is entering or leaving water. | see type |
| projectileShapeName | The name of the shape file for the Projectile object. Must adhere to the semantics associated with the Filename datatype as defined in the engine. | ~/path/filename.dts |
| sound | AudioProfile used to generate the Projectile object's sound. | see type |
| Splash | SplashData datablock used in the generation of splash effects when the Projectile is entering or leaving water. | see type |
| velInheritFactor | Note: this field currently has no tangible effect in the engine simulation itself, but it is useful in script, and its valid range is checked by the engine. Valid range is from 0.0 to 1.0. | ( -inf.0 , inf.0 ) |
| waterExplosion | ExplosionData datablock used when the Projectile object blows up in the water. | see type |
| waterLightColor | The projectile's point light color for use when in water. | "1.0 0.5 0.5" |
SceneObject
Console Method Summaries
| getForwardVector | getObjectBox | getPosition |
| getScale | getTransform | getWorldBox |
| getWorldBoxCenter | setScale | setTransform |
Console Methods
|
getForwardVector() |
|
Purpose |
|
getObjectBox() |
|
Purpose |
|
getPosition() |
|
Purpose |
|
getScale() |
|
Purpose |
|
getTransform() |
|
Purpose |
|
getWorldBox() |
|
Purpose |
|
getWorldBoxCenter() |
|
Purpose |
|
setScale( scale ) |
|
Purpose |
|
setTransform( transform ) |
|
Purpose |
ScriptGroup
Fields
| Field Name | Description | Sample or Range |
| class | A new namespace to place after the object's name and before ScriptObject in the namespace chain. | “Rectangle†|
| superClass | A new namespace to place after class and before ScriptObject in the namespace chain. | “Polyhedron†|
ScriptObject
Fields
| Field Name | Description | Sample or Range |
| class | A new namespace to place after the object's name and before ScriptObject in the namespace chain. | “Rectangle†|
| superClass | A new namespace to place after class and before ScriptObject in the namespace chain. | “Polyhedron†|
ScriptBase
Globals
| Variable Name | Description | Sample or Range |
| SB::DFDec | Damage flash reduced by this amount per tick. | ( 0.0, 1.0 ] |
| SB::WODec | Whiteout reduced by this amount per tick. | ( 0.0, 1.0 ] |
| pref::environmentMaps | Enables environmental mapping for all shapes. | [ false , true ] |
Console Functions
| getShadowDetailLevel() |
|
setShadowDetailLevel( level ) |
|
Purpose |
Console Method Summaries
| applyDamage | applyImpulse | applyRepair |
| canCloak | getAIRepairPoint | getCameraFov |
| getControllingClient | getControllingObject | getDamageFlash |
| getDamageLevel | getDamagePercent | getDamageState |
| getEnergyLevel | getEnergyPercent | getEyePoint |
| getEyeTransform | getEyeVector | getImageAmmo |
| getImageLoaded | getImageSkinTag | getImageState |
| getImageTrigger | getMountedImage | getMountedObject |
| getMountedObjectCount | getMountedObjectNode | getMountNodeObject |
| getMountSlot | getMuzzlePoint | getMuzzleVector |
| getObjectMount | getPendingImage | getRechargeRate |
| getRepairRate | getShapeName | getSkinName |
| getSlotTransform | getVelocity | getWhiteOut |
| isCloaked | isDestroyed | isDisabled |
| isEnabled | isHidden | isImageFiring |
| isImageMounted | isMounted | mountImage |
| mountObject | pauseThread | playAudio |
| playThread | setCameraFov | setCloaked |
| setDamageFlash | setDamageLevel | setDamageState |
| setDamageVector | setEnergyLevel | setHidden |
| setImageAmmo | setImageLoaded | setImageTrigger |
| setInvincibleMode | setRechargeRate | setRepairRate |
| setShapeName | setSkinName | setThreadDir |
| setVelocity | setWhiteOut | startFade |
| stopAudio | stopThread | unmount |
Console Methods
Cloaking
| canCloak | isCloaked | setCloaked |
|
canCloak() |
|
Purpose |
|
isCloaked() |
|
Purpose |
|
setCloaked( isCloaked ) |
|
Purpose |
Hiding and Fading
| isHidden | setHidden | startFade |
|
isHidden() |
|
Purpose |
|
setHidden( isHidden ) |
|
Purpose |
|
startFade( time , delay , fadeOut ) |
|
Purpose |
Table of Contents || Part 1 || Part 2 || Part 3 || Part 4 || Part 5 || Part 6 || Part 7 || Part 8 || Part 10 || Part 11 || Part 12 || Part 13 || Part 14 || Part 15



