Contents

Console Objects Fields and Methods Quick Reference Part 4


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.


fxLightData



The fxLight object is used to represent in-game lights with and respective flares. This object casts (dynamic) light in the scene. It renders both a representation of the light source flare, and casts light on terrain and other objects.

Fields

Field Name Description Sample or Range
AnimBrightness Enable brightness animation. [ false , true ]
AnimColour Enable color animation. [ false , true ]
AnimOffsets Enable offset animation. [ false , true ]
AnimRadius Enable radius animation. [ false , true ]
AnimRotation Enable rotation animation. [ false , true ]
BlendMode

0 = GL_SRC_ALPHA, GL_ONE
1 = GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA
2 = GL_ONE, GL_ONE

[ 0 , 2 ]
BlueKeys Key frame values for blue channel animation. “ABCDABCD”
Brightness Starting brightness. [ 0.0 , 1.0 ]
BrightnessKeys Key frame values for brightness animation. “ABCDABCD”
BrightnessTime Round-trip animation time for brightness. [ 0.0 , 0.inf )
Colour Initial light color. “0.5 0.5 0.7 1.0”
ColourTime Round-trip animation time for color. [ 0.0 , 0.inf )
ConstantSize Screen size for flare if not animated. [ 0.0 , 0.inf )
ConstantSizeOn Enable screen size animation for flare bitmap. [ false , true ]
EndOffset Ending offset for offset animations. [ 0.0 , 0.inf )
FadeTime Round-trip animation time for fade. [ 0.0 , 0.inf )
FarDistance Distance from light when flare achieves screen size of FarSize. [ 0.0 , 0.inf )
FarSize Screen size for flare at FarDistance and beyond. [ 0.0 , 0.inf )
FlareBitmap Bitmap used represent the light source. “~/data/flare.png”
FlareColour Starting color for flare bitmap. “0.5 0.5 0.7 1.0”
FlareOn Enable flare bitmap. [ false , true ]
FlareTP Turns flare off in third person. [ false , true ]
GreenKeys Key frame values for green channel animation. “ABCDABCD”
LerpBrightness Enable brightness interpolation. [ false , true ]
LerpColour Enable color interpolation. [ false , true ]
LerpOffset Enable offset interpolation. [ false , true ]
LerpRadius Enable radius interpolation. [ false , true ]
LerpRotation Enable rotation interpolation. [ false , true ]
LightOn Enable light. [ false , true ]
LinkFlare Flag controlling whether the flare is linked to the light. If on then the flare tracks the color & brightness settings of the light to control its colorization. [ 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 ]
MaxBrightness Maximum brightness when brightness animation is enabled. [ 0.0 , 0.inf )
MaxColour Maximum color when color animation is enabled. “0.5 0.5 0.7 1.0”
MaxRadius Maximum radius when radius animation is enabled. [ 0.0 , 0.inf )
MaxRotation Maximum rotation when rotation animation is enabled. [ 0.0 , 0.inf )
MinBrightness Minimum brightness when brightness animation is enabled. [ 0.0 , 0.inf )
MinColour Minimum color when color animation is enabled. “0.5 0.5 0.7 1.0”
MinRadius Minimum radius when radius animation is enabled. [ 0.0 , 0.inf )
MinRotation Minimum rotation when rotation animation is enabled. [ 0.0 , 0.inf )
NearDistance Distance from light when flare achieves screen size of NearSize. [ 0.0 , 0.inf )
NearSize Screen size for flare at NearDistance and closer. [ 0.0 , 0.inf )
OffsetKeys Key frame values for offset animation. “ABCDABCD”
OffsetTime Round-trip animation time for offset. [ 0.0 , 0.inf )
Radius Initial light sphere radius. [ 0.0 , 0.inf )
RadiusKeys Key frame values for radius animation. “ABCDABCD”
RadiusTime Round-trip animation time for radius. [ 0.0 , 0.inf )
RedKeys Key frame values for red channel animation. “ABCDABCD”
RotationKeys Key frame values for rotation animation. “ABCDABCD”
RotationTime Round-trip animation time for rotation. [ 0.0 , 0.inf )
SingleColourKeys Use RedKeys to animate all colors at the same time. “ABCDABCD”
StartOffset Starting offset for offset animation. [ 0.0 , 0.inf )


fxShapeReplicator


This class is used to replicate any shape. It works in nearly the same way as the fxFoliageReplicator. Each of the individual shapes may enable or disable a collision box allowing them to be interacted with or ignore it in collision interactions.
The fxLight object is used to represent in-game lights with and respective flares. This object casts (dynamic) light in the scene. It renders both a representation of the light source flare, and casts light on terrain and other objects.

Fields

Field Name Description Sample or Range
Transform
position XYZ position of fx object. “10.0 20. 0.0”
rotation Values have no effect. --
scale Values have no effect. --
Debugging
HideReplications Stop displaying shapes. [ false , true ]
ShowPlacementArea Show the placement feedback device. [ false , true ]
PlacementAreaHeight Changes height of feedback device. [ 0.0 , inf.0 )
PlacementColour Changes color of feedback device. “1.0 0.5 0.5 1.0”
Media/Replications
Seed Value used to deterministically generate random object positions and parameters. [ 0 , inf )
shapeFile DTS file to replicate. “~/data/myshape.dts”
ShapeCount Number of shapes to replicate. [ 0 , inf )
ShapeRetries Determines how many times to attempt to place a shape. Retries are sometimes required in order to meet placement criteria. Failed placement attempts result fewer objects placed. [ 0 , inf )
Area/Placement Radius
InnerRadiusX X dimension of inner do-not-place ellipse. Objects are not allowed in ellipse described by this and the InnerRadiusY dimension. [ 0.0 , 0.inf )
InnerRadiusY Y dimension of inner do-not-place ellipse. Objects are not allowed in ellipse described by this and the InnerRadiusX dimension. [ 0.0 , 0.inf )
OuterRadiusX X dimension of outer do-not-place ellipse. Objects are not allowed outside ellipse described by this and the OuterRadiusY dimension. [ 0.0 , 0.inf )
OuterRadiusY Y dimension of outer do-not-place ellipse. Objects are not allowed outside ellipse described by this and the OuterRadiusX dimension. [ 0.0 , 0.inf )
Restrictions/Restraints
AllowOnTerrain Allows objects to be placed on terrain. [ false , true ]
AllowOnInteriors Allows objects to be placed on interiors. [ false , true ]
AllowOnStatics Allows objects to be placed on static shapes. [ false , true ]
AllowOnWater Allows objects to be placed in area covered by water. [ false , true ]
AllowWaterSurface Place on surface of water. Otherwise will be placed on terrain below water. [ false , true ]
AllowedTerrainSlope Maximum slope to place on. Slopes beyond this value will be devoid of objects. [ false , true ]
AlignToTerrain Causes DTS shapes to align to up vector of terrain if placed on terrain. [ false , true ]
Interactions Enables collision boxes if DTS shape has one. [ false , true ]
TerrainAlignment Vector to adjust how shape aligns to terrain when AlighnToTerrain is true. “0.7 0.7 0.7”
Object Transforms
ShapeScaleMin Minimum randomly selected scale for DTS shape. [ 0.0 , 0.inf )
ShapeScaleMax Maximum randomly selected scale for DTS shape. [ 0.0 , 0.inf )
ShapeRotationMin Minium random rotation for DTS shape. [ 0.0 , 0.inf )
ShapeRotationMax Maximum random rotation for DTS shape. [ 0.0 , 0.inf )
OffsetZ This allows you to assist placement by lowering or raising the shape by a fixed amount. “ 0.0 1.2 0.0 “


Console Function

StartClientReplication()


StartClientReplication()

Purpose
Use the StartClientReplication function to start the shape replication system.

Returns
No return value.

Notes
This can be called before be called after replication objects have been placed, but it should only be called once, and if it is not called, replicators will not work.

See Also
startFoliageReplication


Table of Contents || Part 1 || Part 2 || Part 3 || Part 5 || Part 6 || Part 7 || Part 8 || Part 9 || Part 10 || Part 11 || Part 12 || Part 13 || Part 14 || Part 15