Torque Console Objects 8
From TDN
[edit] Console Objects Fields and Methods Quick Reference Part 8
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] PathCamera |
This object is a special version of the camera that can be placed on a path. The camera can then be made to travel along this path. This feature can be used for many purposes, including cut-scenes, in-game movies, demos, etc.
Console Method Summaries
| popFront | pushBack | pushFront |
| reset | setPosition | setState |
Console Methods
|
popFront() |
|
Purpose |
|
pushBack( transform , speed , type , path ) |
|
Purpose |
|
pushFront( transform , speed , type , path ) |
|
Purpose |
|
reset( [ speed ] ) |
|
Purpose |
|
setPosition( pos ) |
|
Purpose |
|
setState( state ) |
|
Purpose |
|
setTarget( pos ) |
|
Purpose |
PhysicalZone
Fields
| Field Name | Description | Sample or Range |
| appliedForce | Three-element floating point value representing forces in three axes to apply to objects entering pzone. |
“x y z†|
| gravityMod | Gravity in pzone. Multiplies against standard gravity. | ( -inf.0 , inf.0 ) |
| polyhedron | Floating point values describing outer bounds of pzone. | - |
| velocityMod | Multiply velocity of objects entering zone by this value every tick. | [ -40000 , 40000 ] |
Console Method Summaries
| activate | deactivate |
Console Methods
|
activate() |
|
Purpose |
|
deactivate() |
|
Purpose |
Player
Console Method Summaries
| checkDismountPoint | clearControlObject | getControlObject |
| getDamageLocation | getState | setActionThread |
Console Methods
|
checkDismountPoint( oldPos , pos ) |
|
Purpose |
|
clearControlObject() |
|
Purpose |
|
getControllingObject() |
|
Purpose |
|
getDamageLocation( damagePosition ) |
|
Purpose
|
|
getState() |
|
Purpose |
|
setActionThread( string sequenceName , hold , fps ) |
|
Purpose |
|
setControlObject( obj ) |
|
Purpose |
PhysicalZone
Fields
| Field Name | Description | Sample or Range |
| Rendering | ||
| renderFirstPerson | If true, render the player mesh while in 1st POV. | [ false , true ] |
| Pickups | ||
| pickupRadius | Can be used to increase the sizeof the player box for item collisions ONLY. | [ 0.0 , inf.0 ) |
| Looking | ||
| maxFreelookAngle | Maximum free-look angle in radians. | [ -3.14159 , 3.14159 ] |
| maxLookAngle | Maximum look angle in radians. | [ -3.14159 , 3.14159 ] |
| minLookAngle | Minimum look angle in radians. | [ -3.14159 , 3.14159 ] |
| Time Scaling | ||
| maxTimeScale | Limits animation scaling. Animations will scale up to this amount when matching ground velocity. | [ 0.0 , inf.0 ) |
| Step Height | ||
| maxStepHeight | Maximum height player will be able to step up. Heights larger than this will stop a walking player. | [ 0.0 , inf.0 ) |
| Forces and Factors | ||
| horizMaxSpeed | Maximum horizontal velocity on ground, in air, or in water. | -- |
| horizResistFactor | Delta factor used to determine how muchof 'horizResistspeed' is removed from current velocity. | -- |
| horizResistSpeed | Velocity at which horizontal resistance kicks in. | -- |
| jumpDelay | Forced delay between jumps (in ticks). | -- |
| jumpEnergyDrain | Drain this many energy points for every jump. | -- |
| jumpForce | Force applied to player on jump. Should be less than 40000 * mass. | -- |
| jumpSurfaceAngle | Cannot jump if surface angle equal to or greater to this many degrees. | -- |
| maxJumpSpeed | Cannot jump if running faster than this. | -- |
| minJumpEnergy | Cannot jump if energy lower than this. | -- |
| minRunEnergy | Cannot run if energy lower than this. | -- |
| recoverDelay | Number of ticks that player stays in 'recovery mode' after hard impact. | [ 0 , inf ] |
| recoverRunForceScale | Run force is multiplied by this amount during 'recovery'. | [ 0.0 , 1.0 ] |
| runEnergyDrain | Drain this much energy per tick while running. | -- |
| runForce | Accelerate player by this much per tick as a result of a move (command). Should be less than 40000 * mass. | -- |
| runSurfaceAngle | Cannot accelerate if surface angle equal to or greater to this many degrees. | -- |
| upMaxSpeed | Maximum velocity allowed in the positve Z direction. | -- |
| upResistFactor | Delta factor used to determine how muchof 'upResistSpeed' is removed from current velocity. | -- |
| upResistSpeed | Velocity at which vertical resistance kicks in. | -- |
| Velocity | ||
| maxBackwardSpeed | Maximum backward velocity in m/s. | -- |
| maxForwardSpeed | Maximum forward velocity in m/s. | -- |
| maxSideSpeed | Maximum sideway velocity in m/s. | -- |
| maxUnderwaterBackwardSpeed | Maximum underwater backward velocity in m/s. | -- |
| maxUnderwaterForwardSpeed | Maximum underwater forward velocity in m/s. | -- |
| maxUnderwaterSideSpeed | Maximum underwater sideway velocity in m/s. | -- |
| Impacts0 | ||
| groundImpactMinSpeed | The velocity at which a collision with the ground is registered as an impact. | [ 0.0 , inf.0 ) |
| groundImpactShakeAmp | Camera shake amplitude when a ground impact is registered. | “1.0 1.0 10.0“ |
| groundImpactShakeDuration | Camera shake duration when a ground impact is registered. | [ 0.0 , inf.0 ) |
| groundImpactShakeFalloff | a multiplier determining at what rate the shaking from an impact is reduced over time. | [ 0.0 , inf.0 ) |
| groundImpactShakeFreq | Camera shake frequency when a ground impact is registered. | “4.0 4.0 4.0“ |
| minImpactSpeed | The velocity at which a collision with the any object is registered as an impact. | [ 0.0 , inf.0 ) |
| Hit Boxes | ||
| boundingBox | A vector containing the radius values for each dimension of the unscaled player's bounding box. (Will be multiplied by scale.) | “1.6 1.6 2.3†|
| boxHeadBackPercentage | In conjunction with boxHeadBackPercentage, used to determine whether the front, middle, or back side of the player's torso or legs was hit. Note: this functionality is difficult to proprely change; it is recommended taht default values be used. | 0 |
| boxHeadFrontPercentage | In conjunction with boxHeadBackPercentage, used to determine whether the front, middle, or back side of the player's torso or legs was hit. Note: this functionality is difficult to proprely change; it is recommended taht default values be used. | 1 |
| boxHeadLeftPercentage | In conjunction with boxHeadRightPercentage, used to determine whether the left, middle, or right side of the player's torso or legs was hit. Note: this functionality is difficult to properly change; it is recommended that default values be used | 0 |
| boxHeadPercentage | The distance from the bottom of the player's bounding box, to the beginning of the area considered to bound the player's head. Measured as a raw percentage. | [ 0.0 , 1.0 ] |
| boxHeadRightPercentage | In conjunction with boxHeadRightPercentage, used to determine whether the left, middle, or right side of the player's torso or legs was hit. Note: this functionality is difficult to properly change; it is recommended that default values be used | 1 |
| boxTorsoPercentage | Like boxHeadPercentage, but specifies where the torso area begins. | [ 0.0 , 1.0 ] |
| Footprints and -puffs | ||
| decalData | DecalData datablock used for footprints. | |
| decalOffset | The offset from the player's center by which the decal should be displayed; should correlate with the distance from player's center, to the player's right foot center. | |
| dustEmitter | -- | Not Used |
| footPuffEmitter | The ParticleEmitterData datablock will be used to emit particles at footstep locations. | |
| footPuffNumParts | Number of dust particles to be generated for foot puffs. | [ 0 , inf ) |
| footPuffRadius | The radius of dust spread from foot steps. | [ 0.0 , inf.0 ) |
| Sounds and Modifiers | ||
| exitingWater | The AudioProfile 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. | -- |
| FootBubblesSound | The AudioProfile used to produce sounds for bubbles produced by footsteps. | -- |
| FootHardSound | The AudioProfile used to produce sounds for hard footsteps. | -- |
| FootMetalSound | The AudioProfile used to produce sounds for soft footsteps. | -- |
| FootShallowSound | The AudioProfile used to produce sounds for shallow water footsteps. | -- |
| FootSoftSound | The AudioProfile used to produce sounds for soft footsteps. | -- |
| FootUnderWater | The AudioProfile used to produce sounds for funderwater footsteps. | -- |
| Footwading | The AudioProfile used to produce sounds for wading footsteps. | -- |
| hardSplashSoundVelocity | The minimum velocity at which the hard splash sound will be played when entering or leaving water. | -- |
| impactHardSound | The AudioProfile used to produce sounds for hard impacts. | -- |
| impactMetal | The AudioProfile used to produce sounds for metal impacts. | -- |
| impactSnowSound | The AudioProfile used to produce sounds for snow impacts. | -- |
| impactSoftSound | The AudioProfile used to produce sounds for soft impacts. | -- |
| impactWaterEasy | The AudioProfile used to produce sounds for soft impacts against water. | -- |
| impactWaterHard | The minimum velocity at which the hard water impact sound will be played when entering or leaving water. | -- |
| impactWaterMedium | The AudioProfile used to produce sounds for medium impacts against water. | -- |
| mediumSplashSoundVelocity | The minimum velocity at which the medium water impact sound will be played when entering or leaving water. | -- |
| movingBubblesSound | The AudioProfile used to produce sounds for underwater bubble while the player is moving. | -- |
| waterBreathSound | The AudioProfile used to produce sounds for underwater breathing. | -- |
| Splashes and Bubbles | ||
| bubbleEmitTime | The length of time to continue emitting bubbles. | -- |
| footstepSplashHeight | The maximum height at which to play the shallow footstep effect. | -- |
| splash | The SplashData datablock used to emit splashes. | -- |
| splashAngle | The mimimum verticle angle at which a player must be travelling in order to generate a splash effect. | -- |
|
splashEmitter[0] |
Array of pointers to ParticleEmitterData datablocks which will be used to generate splash effect particles. | -- |
| splashFreqMod | The simulated frequency modulation of a splash generated by this player. Multiplied along with player speed and time elapsed when determining splash emition rate. | -- |
| splashVelEpsilon | The threshold speed at which we consider the player's movement to have stopped when updating splash effects. | -- |
| splashVelocity | The mimimum velocity a player needs in order to generate a splash effect. | -- |
Table of Contents || Part 1 || Part 2 || Part 3 || Part 4 || Part 5 || Part 6 || Part 7 || Part 9 || Part 10 || Part 11 || Part 12 || Part 13 || Part 14 || Part 15



