Torque Console Objects 5
From TDN
[edit] Console Objects Fields and Methods Quick Reference Part 5
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] fxSunLight |
This class is used to represent celestial bodies. You may defined as many fxSunlight objects as you need in your seeing. Each object may be animated independently. As a whole, this class provides several features allowing us to represent a variety of celestial bodies with many different behaviors.
Fields
| Field Name | Description | Sample or Range |
| AnimAzimuth | Enable azimuth animation. | [ false , true ] |
| AnimBrightness | Enable brightness animation. | [ false , true ] |
| AnimColour | Enable color animation. | [ false , true ] |
| AnimElevation | Enable elevation animation. | [ false , true ] |
| AnimRotation | Enable rotation animation. | [ false , true ] |
| AnimSize | Enable size animation. | [ false , true ] |
| AzimuthKeys | Key frame values for azimuth animation. | “ABCDABCD†|
| AzimuthTime | Round-trip animation time for azimuth. | [ 0.0 , inf.0 ) |
| BlendMode |
0 = GL_SRC_ALPHA, GL_ONE |
[ 0 , 2 ] |
| BlueKeys | Key frame values for blue channel animation. | “ABCDABCD†|
| Brightness | Starting brightness. | [ 0.0 , inf.0 ) |
| BrightnessKeys | Key frame values for brightness animation. | “ABCDABCD†|
| BrightnessTime | Round-trip animation time for brightness. | [ 0.0 , inf.0 ) |
| Colour | Initial color. | “1.0 1.0 0.0 1.0†|
| ColourTime | Round-trip animation time for color. | [ 0.0 , inf.0 ) |
| ElevationKeys | Key frame values for elevation animation. | “ABCDABCD†|
| ElevationTime | Round-trip animation time for elevation. | [ 0.0 , inf.0 ) |
| Enable | Enable or disable fxSunlight object rendering. | [ false , true ] |
| FadeTime | Round-trip animation time for fade. | [ 0.0 , inf.0 ) |
| FlareSize | Size for flare bitmap. | [ 0.0 , inf.0 ) |
| FlareTP | If true, enables flare in third person. | [ false , true ] |
| GreenKeys | Key frame values for green channel animation. | “ABCDABCD†|
| LerpAzimuth | Enable azimuth interpolation. | [ false , true ] |
| LerpBrightness | Enable brightness interpolation. | [ false , true ] |
| LerpColour | Enable color interpolation. | [ false , true ] |
| LerpElevation | Enable elevationr interpolation. | [ false , true ] |
| LerpRotation | Enable rotation interpolation. | [ false , true ] |
| LerpSize | Enable size interpolation. | [ false , true ] |
| LinkFlareSize | Flag controlling whether the flare is linked to the light by size. If on then the flare tracks the color & brightness settings of the light to control its size. The brighter the light, the larger the flare. The flare is scaled according to it's current animation e.g. it never gets any bigger than it would with this setting off. | [ false , true ] |
| LocalFlareBitmap | Lens flare texture. | ~/path/filename.png |
| LockToRealSun | Elevation and azimuth for this object follows elevation and azimuth for Sun object. | [ false , true ] |
| MaxAzimuth | Maximum azimuth setting. | [ 0.0 , 360.0 ) |
| MaxBrightness | Maximum brightness when brightness animation is enabled. | [ 0.0 , inf.0 ) |
| MaxColour | Maximum color when color animation is enabled. | |
| MaxElevation | Maximum elevation. | [ -90.0 , 90.0 ] |
| MaxRotation | Maximum rotation when rotation animation is enabled. | [ 0.0 , 360.0 ) |
| MaxSize | Maximum size for flare. | [ 0.0 , inf.0 ) |
| MinAzimuth | Minimum azimuth setting. | [ 0.0 , 360.0 ) |
| MinBrightness | Minimum brightness when brightness animation is enabled. | [ 0.0 , inf.0 ) |
| MinColour | Minimum color when color animation is enabled. | “0.0 0.0 1.0 1.0†|
| MinElevation | Minimum elevation setting. | [ -90.0 90.0 ] |
| MinRotation | Minimum rotation when rotation animation is enabled. | [ 0.0 , 360.0 ) |
| MinSize | Minimum flare size. | [ 0.0 , inf.0 ) |
| NearDistance | Distance from light when flare achieves screen size of NearSize. | [ 0.0 , inf.0 ) |
| NearSize | Screen size for flare at NearDistance and closer. | [ 0.0 , inf.0 ) |
| OffsetKeys | Key frame values for offset animation. | “ABCDABCD†|
| OffsetTime | Round-trip animation time for offset. | [ 0.0 , inf.0 ) |
| RedKeys | Key frame values for red channel animation. | “ABCDABCD†|
| RemoteFlareBitmap | The sun texture. | ~/path/filename.png |
| RotationKeys | Key frame values for rotation animation. | “ABCDABCD†|
| RotationTime | Round-trip animation time for rotation. | [ 0.0 , inf.0 ) |
| SingleColourKeys | Use RedKeys to animate all colors at the same time. | “ABCDABCD†|
| SizeKeys | Key frame values for size animation. | “ABCDABCD†|
| SizeTime | Round-trip animation time for size. | [ 0.0 , inf.0 ) |
| SunAzimuth | Initial azimuth setting. | [ 0.0 , 360.0 ) |
| SunElevation | Initial elevation setting. | [ -90.0 , 90.0 ] |
Console Method Summaries
Long descriptions for these functions have not been supplied because the functions are very simple and their names are quite descriptive.
| reset() | setAzimuthKeys( keys ) | setAzimuthTime( time ) |
| setBlendMode( mode ) | setBlueKeys( keys ) | setBrightnessKeys( keys ) |
| setBrightnessTime( time ) | setColourTime( time ) | setElevationKeys( keys ) |
| setElevationTime( time ) | setEnable( status ) | setFadeTime( time ) |
| setFlareBitmaps( local , remote ) | setFlareBrightness( brightness ) | setFlareColour( r , g , b ) |
| setFlareSize( size ) | setFlareTP( status ) | setGreenKeys( keys ) |
| setLerpAzimuth( status ) | setLerpBrightness( status ) | setLerpColour( status ) |
| setLerpElevation( status ) | setLerpRotation( status ) | setLerpSize( status ) |
| setLinkFlareSize( status ) | setMaxAzimuth( azimuth ) | setMaxBrightness( brightness ) |
| setMaxColour( r , g , b ) | setMaxElevation( elevation ) | setMaxRotation( rotation ) |
| setMaxSize( size ) | setMinAzimuth( azimuth ) | setMinBrightness( brightness ) |
| setMinColour( r , g , b ) | setMinElevation( elevation ) | setMinRotation( rotation ) |
| setMinSize( size ) | setRedKeys( keys ) | setRotationKeys( keys ) |
| setRotationTime( time ) | setSingleColourKeys( status ) | setSizeKeys( keys ) |
| setSizeTime( time ) | setSunAzimuth( azimuth ) | setSunElevation( elevation ) |
| setUseAzimuth( status ) | setUseBrightness( status ) | setUseColour( status ) |
| setUseElevation( status ) | setUseRotation( status ) | setUseSize( status ) |
GameBase
This is the base class to all classes using or requiring a data block. This class can be considered virtual as you do not create instances of it in the game world.
Fields
| Field Name | Description | Sample or Range |
| dataBlock | The corresponding data block for this object. | GameBaseData datablock |
Globals
| Variable Name | Description | Sample or Range |
| $gameBase::boundingBox | If true, objects will display their bounding boxes. | [ false , true ] |
Console Method Summaries
| getDataBlock | setDataBlock |
Console Methods
|
getDataBlock() |
|
Purpose |
|
setDataBlock( db ) |
|
Purpose |
GameBaseData
This class is the corresponding data block the gamebase. It can be considered virtual also.
Fields
| Field Name | Description | Sample or Range |
| category | Creator category to place this object in. | “MyCategory†|
| className | A new namespace to be inserted between the name of the data block and the class name of the data block. | “SomeClassname†|
GameConnection
A class connecting the client in the current executable to a server in the current executable or to a server and external executable.
Console Method Summaries
| activateGhosting | chaseCam | clearCameraObject |
| delete | getCameraObject | getControlCameraFov |
| getControlObject | getServerConnection | isAIControlled |
| isDemoPlaying | isDemoRecording | isFirstPerson |
| listClassIDs | play2D | play3D |
| playDemo | resetGhosting | setBlackOut |
| setCameraObject | setConnectArgs | setControlCameraFov |
| setControlObject | setFirstPerson | setJoinPassword |
| setMissionCRC | startRecording | stopRecording |
Console Methods
|
activateGhosting() |
|
Purpose |
|
chaseCam( delay ) |
|
Purpose |
|
delete( [ reason ] ) |
|
Purpose |
|
getCameraObject() |
|
Purpose |
|
getControlCameraFov() |
|
Purpose |
|
getControlObject() |
|
Purpose |
|
getServerConnection() |
|
Purpose |
|
isAIControlled() |
|
Purpose |
|
isDemoPlaying() |
|
Purpose |
|
isDemoRecording() |
|
Purpose |
|
isFirstPerson() |
|
Purpose |
|
listClassIDs() |
|
Purpose |
|
play2D( AP ) |
|
Purpose |
|
play3D( AP , position ) |
|
Purpose |
|
playDemo( demoFileName ) |
|
Purpose |
|
resetGhosting() |
|
Purpose |
|
setBlackOut( doFade , timeMS ) |
|
Purpose |
|
setCameraObject( newCamera ) |
|
Purpose |
|
setConnectArgs( name [ , arg1 , ... , arg15 ] ) |
|
Purpose |
Table of Contents || Part 1 || Part 2 || Part 3 || Part 4 || Part 6 || Part 7 || Part 8 || Part 9 || Part 10 || Part 11 || Part 12 || Part 13 || Part 14 || Part 15



