TorqueScript Reference

- Main Page
- Related Pages
- Modules
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
ParticleAssetEmitter Class Reference

Inherits SimObject.

## Public Member Functions
Integer | addDataKey (time, value)
Boolean | clearDataKeys ()
void | deselectField ()
Float | getAlignedAngleOffset ()
Float | getAlphaTest ()
String | getAnimation ()
Boolean | getAttachPositionToEmitter ()
Boolean | getAttachRotationToEmitter ()
Boolean | getBlendMode ()
String | getDataKey (keyIndex)
Integer | getDataKeyCount ()
String | getDstBlendFactor ()
Float | getEmitterAngle ()
String | getEmitterName ()
String | getEmitterOffset ()
String | getEmitterSize ()
String | getEmitterType ()
Float | getFieldValue (time)
Float | getFixedAngleOffset ()
Boolean | getFixedAspect ()
Float | getFixedForceAngle ()
String | getImage ()
Integer | getImageFrame ()
Boolean | getIntenseParticles ()
Boolean | getKeepAligned ()
Boolean | getLinkEmissionRotation ()
Float | getMaxTime ()
Float | getMaxValue ()
Float | getMinTime ()
Float | getMinValue ()
String | getNamedImageFrame ()
Boolean | getOldestInFront ()
String | getOrientationType ()
String | getOwner ()
| Particle emitter accessors. More...
String | getPivotPoint ()
Float | getRandomAngleOffset ()
Float | getRandomArc ()
Boolean | getRandomImageFrame ()
Float | getRepeatTime ()
Integer | getSelectableFieldCount ()
| Particle emitter fields. More...
String | getSelectableFieldName (fieldIndex)
Boolean | getSelectedField ()
Boolean | getSingleParticle ()
String | getSrcBlendFactor ()
Float | getValueScale ()
Boolean | isUsingNamedImageFrame ()
Boolean | removeDataKey (keyIndex)
Boolean | selectField (fieldName)
void | setAlignedAngleOffset (alignAngleOffset)
void | setAlphaTest (float alpha)
Boolean | setAnimation (animationAssetId)
void | setAttachPositionToEmitter (attachPositionToEmitter)
void | setAttachRotationToEmitter (attachRotationToEmitter)
void | setBlendMode (blendMode)
Boolean | setDataKeyValue (keyIndex, value)
void | setDstBlendFactor (dstBlend)
void | setEmitterAngle (angle)
void | setEmitterName (emitterName)
void | setEmitterOffset (float X/float Y)
void | setEmitterSize (width/height)
void | setEmitterType (emitterType)
void | setFixedAngleOffset (randomAngle)
void | setFixedAspect (fixedAspect)
void | setFixedForceAngle (fixedForceAngle)
Boolean | setImage (imageAssetId, [frame])
Boolean | setImageFrame (frame)
void | setIntenseParticles (intenseParticles)
void | setKeepAligned (keepAligned)
void | setLinkEmissionRotation (linkEmissionRotation)
Boolean | setNamedImageFrame (frame)
void | setOldestInFront (oldestInFront)
void | setOrientationType (orientationType)
void | setPivotPoint (pivotX/pivotY)
void | setRandomAngleOffset (randomAngle)
void | setRandomArc (randomArc)
void | setRandomImageFrame (randomImageFrame)
Boolean | setRepeatTime (repeatTime)
Integer | setSingleDataKey (value)
void | setSingleParticle (singleParticle)
void | setSrcBlendFactor (srcBlend)
Boolean | setValueScale (valueScale)
Public Member Functions inherited from SimObject
Integer | clone ([copyDynamicFields=false]?)
void | delete ()
Integer | getId ()
void | setName (newName)
String | getName ()
String | getClassNamespace ()
String | getSuperClassNamespace ()
void | setClassNamespace (nameSpace)
void | setSuperClassNamespace ()
Boolean | isMethod (string methodName)
String | call (methodName, [args]*)
void | dumpClassHierarchy ()
void | dump ()
Boolean | isMemberOfClass (string classname)
String | getClassName ()
String | getFieldValue (fieldName)
Boolean | setFieldValue (fieldName, value)
Integer | getDynamicFieldCount ()
String | getDynamicField (index)
Integer | getFieldCount ()
String | getField (int index)
void | setProgenitorFile (file)
String | getProgenitorFile ()
Integer | getType ()
String | getFieldType (fieldName)
void | setInternalName (string InternalName)
String | getInternalName ()
Boolean | isChildOfGroup (groupID)
Integer | getGroup ()
Boolean | startTimer (callbackFunction, float timePeriod, [repeat]?)
void | stopTimer ()
Boolean | isTimerActive ()
Integer | schedule (time, command, [arg]*)
Boolean | save (fileName, [selectedOnly]?)
void | addFieldFilter (fieldName)
void | removeFieldFilter (fieldName)

## Member Function Documentation

Integer addDataKey | ( | time | ,
|  | value |
| ) |  |

Add Data-Key to Graph.

Parameters

  time | The key time.
  value | The value at specified time

Returns
  Returns the index of the new data-key or -1 on failure.

Boolean clearDataKeys | ( |  | ) |

Clears all data-key(s) from the field.

Returns
  Whether the operation was successful or not.

void deselectField | ( |  | ) |

Deselect any selected field. If no field is selected then nothing happens.

Returns
  No return value.

Float getAlignedAngleOffset | ( |  | ) |

Gets the aligned angle offset.

Returns
  The aligned angle offset.

Float getAlphaTest | ( |  | ) |

Gets the render alpha test threshold.

Returns
  The render alpha test threshold in the range of 0.0f to 1.0. Less than zero represents disabled alpha testing.

String getAnimation | ( |  | ) |

Gets the asset Id of the animation asset assigned to the emitter.

Returns
  The asset Id of the animation asset assigned to the emitter or nothing if no animation is assigned.

Boolean getAttachPositionToEmitter | ( |  | ) |

Get Attach-Position-To-Emitter Flag.

Boolean getAttachRotationToEmitter | ( |  | ) |

Get Attach-Rotation-To-Emitter Flag.

Boolean getBlendMode | ( |  | ) |

Gets whether to use render blending or not.

Returns
  Whether to use render blending or not.

String getDataKey | ( | keyIndex |  | ) |

Gets the data-key at the specified index from the field.

Parameters

  keyIndex | The index of the data-key to be retrieved.

Returns
  The data-key comprising both the time and value or nothing if the key is invalid.

Integer getDataKeyCount | ( |  | ) |

Gets the data-key count.

Returns
  The number of data-keys in the currently selected field or -1 if no field is selected.

String getDstBlendFactor | ( |  | ) |

Gets the destination render blend factor.

Returns
  (dstBlend) The destination render blend factor.

Float getEmitterAngle | ( |  | ) |

Gets the emitter angle.

Returns
  (float angle) The emitter's current angle.

String getEmitterName | ( |  | ) |

Gets the name of the emitter.

Returns
  The name of the emitter.

String getEmitterOffset | ( |  | ) |

Gets the emitter offset position.

Returns
  (float x/float y) The offset of the emitter relative to the effect or player position.

String getEmitterSize | ( |  | ) |

Gets the emitter size.

Returns
  (float width/float height) The width and height of the emitter.

String getEmitterType | ( |  | ) |

Gets the type of the emitter.

Returns
  The type of the emitter.

Float getFieldValue | ( | time |  | ) |

Get the fields' value at the specified time.

Parameters

  time | The time to sample the field value at.

Returns
  The fields' value at the specified time or always 0.0 if no field is selected.

Float getFixedAngleOffset | ( |  | ) |

Get Fixed-Orientation Angle-Offset.

Boolean getFixedAspect | ( |  | ) |

Gets whether the emitter uses a fixed-aspect for particles or not.

Returns
  Whether the emitter uses a fixed-aspect for particles or not.

Float getFixedForceAngle | ( |  | ) |

Gets the emitter fixed-force angle for particles.

Returns
  The fixed-force angle for particles.

String getImage | ( |  | ) |

Gets the asset Id of the image asset assigned to the emitter.

Returns
  The asset Id of the image asset assigned to the emitter or nothing if no image is assigned.

Integer getImageFrame | ( |  | ) |

Gets the frame index of the image asset assigned to the emitter.

Returns
  The frame index of the image asset assigned to the emitter or nothing if no image is assigned.

Boolean getIntenseParticles | ( |  | ) |

Get Intense-Particles Flag.

Boolean getKeepAligned | ( |  | ) |

Gets whether to keep emitted particles aligned or not.

Returns
  Whether to keep emitted particles aligned or not.

Boolean getLinkEmissionRotation | ( |  | ) |

Get Link-Emission-Rotation Flag.

Float getMaxTime | ( |  | ) |

Get the maximum time for the field.

Returns
  The maximum time for the field or always 0.0 if no field is selected.

Float getMaxValue | ( |  | ) |

Get the maximum value for the field.

Returns
  The maximum value for the field or always 0.0 if no field is selected.

Float getMinTime | ( |  | ) |

Get the minimum time for the field.

Returns
  The minimum time for the field or always 0.0 if no field is selected.

Float getMinValue | ( |  | ) |

Get the minimum value for the field.

Returns
  The minimum value for the field or always 0.0 if no field is selected.

String getNamedImageFrame | ( |  | ) |

Gets the asset Id of the image asset assigned to the emitter.

Returns
  The asset Id of the image asset assigned to the emitter or nothing if no image is assigned.

Boolean getOldestInFront | ( |  | ) |

Gets whether to render particles as oldest on front or not.

Returns
  Whether to render particles as oldest on front or not.

String getOrientationType | ( |  | ) |

Gets the orientation-type of the emitter.

Returns
  The orientation-type of the emitter.

String getOwner | ( |  | ) |

Particle emitter accessors.

Gets the asset owner of the emitter.

Returns
  The asset owner of the emitter or nothing if no owner assigned.

String getPivotPoint | ( |  | ) |

Get Pivot-Point.

Float getRandomAngleOffset | ( |  | ) |

Get Random-Orientation Angle-Offset.

Float getRandomArc | ( |  | ) |

Get Random-Orientation Arc.

Boolean getRandomImageFrame | ( |  | ) |

Gets whether a random frame from the specified ImageAsset is being used or not.

Returns
  Whether to use a random image frame or not.

Float getRepeatTime | ( |  | ) |

Gets the time period that the fields' value repeat (cycle) at.

Returns
  The time period that the fields' value repeat (cycle) at.

Integer getSelectableFieldCount | ( |  | ) |

Particle emitter fields.

Gets the number of available selectable fields.

Returns
  The number of available selectable fields.

String getSelectableFieldName | ( | fieldIndex |  | ) |

Gets the selectable field at the specified index.

Returns
  The selectable field name at the specified index.

Boolean getSelectedField | ( |  | ) |

Gets the selected field name or nothing if no field is selected.

Returns
  The selected field name or nothing if no fields is selected.

Boolean getSingleParticle | ( |  | ) |

Get Single-Particle Flag.

String getSrcBlendFactor | ( |  | ) |

Gets the source render blend factor.

Returns
  (srcBlend) The source render blend factor.

Float getValueScale | ( |  | ) |

Gets the scaling of field values' retrieved from the field.

Returns
  The scaling of field values' retrieved from the field.

Boolean isUsingNamedImageFrame | ( |  | ) |

Gets whether the emitter is using a numerical or named image frame.

Returns
  Returns true when using a named frame, false when using a numerical index.

Boolean removeDataKey | ( | keyIndex |  | ) |

Remove the data-key from the field.

Parameters

  keyIndex | The index of the data-key you want to remove.

Returns
  Whether the operation was successful or not.

Boolean selectField | ( | fieldName |  | ) |

Select the specified field by its name.

Parameters

  fieldName | The field name to use for the selection. Use an empty name to deselect to stop accidental changes.

Returns
  Whether the field was successfully selected or not.

void setAlignedAngleOffset | ( | alignAngleOffset |  | ) |

Sets the aligned angle offset.

Parameters

  alignAngleOffset | The aligned angle offset.

Returns
  No return value.

void setAlphaTest | ( | float | alpha | ) |

Set the render alpha test threshold.

Parameters

  alpha | The alpha test threshold in the range of 0.0 to 1.0. Less than zero to disable alpha testing.

Returns
  No return value.

Boolean setAnimation | ( | animationAssetId |  | ) |

Sets the emitter to use the specified animation asset Id.

Parameters

  animationAssetId | The animation asset Id to use.

Returns
  Whether the operation was successful or not.

void setAttachPositionToEmitter | ( | attachPositionToEmitter |  | ) |

Set Attach-Position-To-Emitter Flag.

void setAttachRotationToEmitter | ( | attachRotationToEmitter |  | ) |

Set Attach-Rotation-To-Emitter Flag.

void setBlendMode | ( | blendMode |  | ) |

Sets whether to use render blending or not.

Parameters

  blendMode | Whether to use render blending or not.

Returns
  No return value.

Boolean setDataKeyValue | ( | keyIndex | ,
|  | value |
| ) |  |

Set data-key value for the field.

Parameters

  keyIndex | The index of the key to be modified.
  value | The value to change the key to.

Returns
  Whether the operation was successful or not.

void setDstBlendFactor | ( | dstBlend |  | ) |

Sets the destination render blend factor.

Parameters

  dstBlend | The destination render blend factor.

Returns
  No return Value.

void setEmitterAngle | ( | angle |  | ) |

Sets the emitter angle.

Parameters

  angle | The angle of the emitter.

Returns
  No return value.

void setEmitterName | ( | emitterName |  | ) |

Sets the name of the emitter.

Parameters

  emitterName | The name to set the emitter to.

Returns
  No return value.

void setEmitterOffset | ( | float X/float | Y | ) |

Offsets the position of the emitter relative to the effect or player position.

Returns
  No return value.

void setEmitterSize | ( | width/ | height | ) |

Sets the emitter size.

Parameters

  width | The width of the emitter.
  height | The height of the emitter.

Returns
  No return value.

void setEmitterType | ( | emitterType |  | ) |

Sets the type of the emitter.

Parameters

  emitterType | The type to set the emitter. Either 'POINT', 'LINE', 'BOX' or 'DISK', 'ELLIPSE' or 'TORUS'. An emitter-type of 'POINT' creates the particles at the position of the particle asset. An emitter-type of 'LINE' creates the particles along a line defined by the particle width. An emitter-type of 'BOX' creates the particles within the dimensions defined by the particle size. An emitter-type of 'DISK' creates the particles within a disk with radii defined by the particle size. An emitter-type of 'ELLIPSE' creates the particles on an ellipse with the radii defined by the particle size. An emitter-type of 'TORUS' creates the particles within a torus with a maximum and minimum radii defined by the particle width and height respectively.

Returns
  No return value.

void setFixedAngleOffset | ( | randomAngle |  | ) |

Set Fixed-Orientation Angle-Offset.

void setFixedAspect | ( | fixedAspect |  | ) |

Sets the emitter to used a fixed-aspect for particles.

Parameters

  fixedAspect | Whether to use a fixed-aspect or not.

Returns
  No return value.

void setFixedForceAngle | ( | fixedForceAngle |  | ) |

Sets the emitter fixed-force angle for particles.

Parameters

  fixedForceAngle | The fixed-force angle for particles.

Returns
  No return value.

Boolean setImage | ( | imageAssetId |  | ) |

Sets the emitter to use the specified image asset Id and optional frame.

Parameters

  imageAssetId | The image asset Id to use.
  frame | The frame of the image asset Id to use. Optional.

Returns
  Whether the operation was successful or not.

Boolean setImageFrame | ( | frame |  | ) |

Sets the emitter to use the specified numerical image frame.

Parameters

  frame | The frame index of the image to use..

Returns
  Whether the operation was successful or not.

void setIntenseParticles | ( | intenseParticles |  | ) |

Set Intense-Particles Flag.

void setKeepAligned | ( | keepAligned |  | ) |

Sets whether to keep emitted particles aligned or not. Whether to keep emitted particles aligned or not.

Returns
  No return value.

void setLinkEmissionRotation | ( | linkEmissionRotation |  | ) |

Set Link-Emission-Rotation Flag.

Boolean setNamedImageFrame | ( | frame |  | ) |

Sets the emitter to use the specified image frame by name.

Parameters

  frame | String containing the name of the frame in the image to use.

Returns
  Whether the operation was successful or not.

void setOldestInFront | ( | oldestInFront |  | ) |

Sets whether to render particles as oldest on front or not.

Parameters

  oldestInFront | Whether to render particles as oldest on front or not.

Returns
  No return value.

void setOrientationType | ( | orientationType |  | ) |

Sets the orientation-type of the emitter.

Parameters

  orientationType | The orientation-type to set the emitter to. Either 'FIXED', 'ALIGNED' or 'RANDOM'. An orientation-type of 'FIXED' causes the particles to be orientation at a fixed angle. An orientation-type of 'ALIGNED' causes the particles to be orientation at the current emission angle. An orientation-type of 'RANDOM' causes the particles to be orientation at a fixed angle.

Returns
  No return value.

void setPivotPoint | ( | pivotX/ | pivotY | ) |

Set the Pivot-Point.

void setRandomAngleOffset | ( | randomAngle |  | ) |

Set Random-Orientation Angle-Offset.

void setRandomArc | ( | randomArc |  | ) |

Set Random-Orientation Arc.

void setRandomImageFrame | ( | randomImageFrame |  | ) |

Disables the Frame and NamedFrame fields and uses a random frame from the specified ImageAsset.

Parameters

  randomImageFrame | Whether to use a random image frame or not.

Returns
  No return value.

Boolean setRepeatTime | ( | repeatTime |  | ) |

Sets the time period to repeat (cycle) the fields' values at.

Returns
  Whether the operation was successful or not.

Integer setSingleDataKey | ( | value |  | ) |

Sets a single data-key at time-zero with the specified value. All existing keys are cleared.

Parameters

  value | The value to set the key to.

Returns
  Returns the index of the new data-key (always zero) or -1 on failure.

void setSingleParticle | ( | singleParticle |  | ) |

Set Single-Particle Flag.

void setSrcBlendFactor | ( | srcBlend |  | ) |

Sets the source blend factory.

Parameters

  srcBlend | The source blend factor.

Returns
  No return Value.

Boolean setValueScale | ( | valueScale |  | ) |

Set the scaling of field values retrieved from the field. This does not alter the actual data-key values.

Parameters

  valueScale | The scale for field values retrieved from the field.

Returns
  Whether the operation was successful or not.