TorqueScript Reference

- Main Page
- Related Pages
- Modules
- Classes

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

Public Member Functions | List of all members
ParticlePlayer Class Reference

Inherits SceneObject.

## Public Member Functions
Float | getCameraIdleDistance ()
Float | getEmissionRateScale ()
Boolean | getEmitterPaused (emitterIndex)
Boolean | getEmitterVisible (emitterIndex)
Float | getForceScale ()
Boolean | getIsPlaying ()
String | getParticleAsset ()
Float | getParticleInterpolation ()
Boolean | getPaused ()
Float | getSizeScale ()
Float | getTimeScale ()
Boolean | play ([resetParticles])
void | setCameraIdleDistance (idleDistance)
void | setEmissionRateScale (scale)
void | setEmitterPaused (paused, emitterIndex)
void | setEmitterVisible (visible, emitterIndex)
void | setForceScale (scale)
void | setParticleAsset (particleAssetId?)
void | setParticleInterpolation (bool status)
void | setPaused (paused?)
void | setSizeScale (scale)
void | setTimeScale (scale)
void | stop ([waitForParticles?, killEffect?])
Public Member Functions inherited from SceneObject
void | addToScene (Scene scene)
void | applyAngularImpulse (impulse)
void | applyForce (worldForce X/Y, [worldPoint X/Y])
void | applyLinearImpulse (worldImpulse X/Y, [worldPoint X/Y])
void | applyTorque (torque)
void | attachGui (guiControl guiObject, SceneWindow window, [sizeControl?=false])
void | cancelFadeTo ()
void | cancelGrowTo ()
void | cancelMoveTo ([autoStop=true])
void | cancelRotateTo ([autoStop=true])
void | clearCollisionShapes ()
void | copyAllCollisionShapes (targetObject[, clearTargetShapes?])
Integer | copyCollisionShape (int shapeIndex, targetObject)
Boolean | copyFrom (SceneObject object, [copyDynamicFields?=false])
Integer | createChainCollisionShape (localPointsX/Y, [adjacentLocalPositionStartX, adjacentLocalPositionStartY], [adjacentLocalPositionEndX, adjacentLocalPositionEndY])
Integer | createCircleCollisionShape (radius, [localPositionX, localPositionY])
Integer | createEdgeCollisionShape (localPositionStartX, localPositionStartY, localPositionEndX, localPositionEndY, [adjacentLocalPositionStartX, adjacentLocalPositionStartY], [adjacentLocalPositionEndX, adjacentLocalPositionEndY])
Integer | createPolygonBoxCollisionShape (width, height, [localCentroidX, localCentroidY], [angle])
Integer | createPolygonCollisionShape (localPointsX/Y)
Boolean | deleteCollisionShape (int shapeIndex)
void | detachGui ()
Boolean | fadeTo (targetColor red/green/blue/alpha, rate)
Boolean | fadeToTime (targetColor red/green/blue/alpha, time)
String | getAABB ()
Boolean | getActive ()
Float | getAlphaTest ()
Float | getAngle ()
Float | getAngularDamping ()
Float | getAngularVelocity ()
String | getArea ()
String | getAreaMax (...)
String | getAreaMin ()
Boolean | getAutoSizing ()
Boolean | getAwake ()
Float | getBlendAlpha ()
String | getBlendColor (allowColorNames)
Boolean | getBlendMode ()
String | getBodyType ()
Boolean | getBullet ()
String | getChainCollisionShapeAdjacentEnd (int shapeIndex)
String | getChainCollisionShapeAdjacentStart (int shapeIndex)
Boolean | getChainCollisionShapeHasAdjacentEnd (int shapeIndex)
Boolean | getChainCollisionShapeHasAdjacentStart (int shapeIndex)
String | getChainCollisionShapeLocalPoint (int shapeIndex, int pointIndex)
Integer | getChainCollisionShapePointCount (int shapeIndex)
String | getCircleCollisionShapeLocalPosition (int shapeIndex)
Float | getCircleCollisionShapeRadius (int shapeIndex)
Boolean | getCollisionCallback ()
String | getCollisionGroups ()
String | getCollisionLayers ()
String | getCollisionMasks (...)
Boolean | getCollisionOneWay ()
Float | getCollisionShapeArea (int shapeIndex)
Integer | getCollisionShapeCount ()
Float | getCollisionShapeDensity (int shapeIndex)
Float | getCollisionShapeFriction (int shapeIndex)
Boolean | getCollisionShapeIsSensor (int shapeIndex)
Float | getCollisionShapeRestitution (int shapeIndex)
String | getCollisionShapeType (int shapeIndex)
Boolean | getCollisionSuppress ()
String | getContact (contactIndex)
Integer | getContactCount ()
Float | getDefaultDensity ()
Float | getDefaultFriction ()
Float | getDefaultRestitution ()
String | getDstBlendFactor ()
String | getEdgeCollisionShapeAdjacentEnd (int shapeIndex)
String | getEdgeCollisionShapeAdjacentStart (int shapeIndex)
Boolean | getEdgeCollisionShapeHasAdjacentEnd (int shapeIndex)
Boolean | getEdgeCollisionShapeHasAdjacentStart (int shapeIndex)
String | getEdgeCollisionShapeLocalPositionEnd (int shapeIndex)
String | getEdgeCollisionShapeLocalPositionStart (int shapeIndex)
Boolean | getFixedAngle ()
Boolean | getGatherContacts ()
Float | getGravityScale ()
Float | getHeight ()
Float | getInertia ()
Boolean | getIsPointInCollisionShape (int shapeIndex, worldPointX/Y)
Boolean | getIsPointInOOBB (worldPointX/Y)
Float | getLifetime ()
Float | getLinearDamping ()
String | getLinearVelocity ()
String | getLinearVelocityFromLocalPoint (localPointX/Y)
String | getLinearVelocityFromWorldPoint (worldPointX/Y)
String | getLinearVelocityPolar ()
Float | getLinearVelocityX ()
Float | getLinearVelocityY ()
String | getLocalCenter ()
String | getLocalPoint (float worldPointX/Y)
String | getLocalVector (float worldVectorX/Y)
Float | getMass ()
Boolean | getPickingAllowed ()
String | getPolygonCollisionShapeLocalPoint (int shapeIndex, int pointIndex)
Integer | getPolygonCollisionShapePointCount (int shapeIndex)
String | getPosition ()
Float | getPositionX ()
Float | getPositionY ()
Float | getRenderAngle ()
String | getRenderGroup ()
String | getRenderPosition ()
Integer | getScene ()
Integer | getSceneGroup ()
Integer | getSceneLayer ()
Float | getSceneLayerDepth ()
String | getSize ()
Float | getSizeX ()
Float | getSizeY ()
Boolean | getSleepingAllowed ()
Boolean | getSleepingCallback ()
String | getSortPoint ()
Float | getSortPointX ()
Float | getSortPointY ()
String | getSrcBlendFactor ()
Boolean | getUpdateCallback ()
Boolean | getUseInputEvents ()
Boolean | getVisible ()
Float | getWidth ()
String | getWorldCenter ()
String | getWorldPoint (float localPointX/Y)
String | getWorldVector (float localVectorX/Y)
Boolean | growTo (targetSize width/height, rate rateX/rateY)
Boolean | growToTime (targetSize width/height, time)
Boolean | isFadeToComplete ()
Boolean | isGrowToComplete ()
Boolean | isMoveToComplete ()
Boolean | isRotateToComplete ()
Boolean | moveTo (worldPoint X/Y, speed, [autoStop=true], [snapToTarget=true], [margin=0.1])
void | removeFromScene ()
Boolean | rotateTo (angle, speed, [autoStop=true], [warpToTarget=true])
void | safeDelete ()
void | setActive ([bool status?])
void | setAlphaTest (float alpha)
void | setAngle (float angle)
void | setAngularDamping (float damping)
void | setAngularVelocity (float velocity)
void | setArea (float x1, float y1, float x2, float y2)
void | setAwake ([bool status?])
void | setBlendAlpha (float alpha)
void | setBlendColor (float red, float green, float blue, [float alpha=1.0])
void | setBlendMode (bool blendMode)
void | setBodyType (bodyType type)
void | setBullet ([bool status?])
void | setCollisionAgainst (SceneObject object, [clearMasks?=false])
void | setCollisionCallback ([bool status?])
void | setCollisionGroups (groups)
void | setCollisionLayers (layers)
void | setCollisionMasks (groupMask, [layerMask])
void | setCollisionOneWay ([bool status?])
void | setCollisionShapeDensity (int shapeIndex, float density)
void | setCollisionShapeFriction (int shapeIndex, float friction)
void | setCollisionShapeIsSensor (int shapeIndex, bool status)
void | setCollisionShapeRestitution (int shapeIndex, float restitution)
void | setCollisionSuppress ([bool status?])
void | setDebugOff (debugOptions)
void | setDebugOn (debugOptions)
void | setDefaultDensity (float density, [bool updateShapes])
void | setDefaultFriction (float friction, [bool updateShapes])
void | setDefaultRestitution (float restitution, [bool updateShapes])
void | setDstBlendFactor (dstBlend)
void | setEnabled (bool status)
void | setFixedAngle (bool status?)
void | setGatherContacts (bool gatherContacts)
void | setGravityScale (float scale)
void | setHeight (float height)
void | setLifetime (float lifetime)
void | setLinearDamping (float damping)
void | setLinearVelocity (float velocityX, float velocityY)
void | setLinearVelocityPolar (float angle, float speed)
void | setLinearVelocityX (float velocityX)
void | setLinearVelocityY (float velocityY)
void | setPickingAllowed (bool pickingAllowed)
void | setPosition (float x, float y)
void | setPositionX (float x)
void | setPositionY (float y)
void | setRenderGroup (renderGroup)
void | setSceneGroup (integer group)
void | setSceneLayer (integer layer)
void | setSceneLayerDepth (float layerDepth)
Boolean | setSceneLayerDepthBack ()
Boolean | setSceneLayerDepthBackward ()
Boolean | setSceneLayerDepthForward ()
Boolean | setSceneLayerDepthFront ()
void | setSize (float width, float height)
void | setSizeX (float width)
void | setSizeY (float height)
void | setSleepingAllowed ([bool status?])
void | setSleepingCallback ([bool status?])
void | setSortPoint (float x, float y)
void | setSortPointX (float x)
void | setSortPointY (float y)
void | setSrcBlendFactor (srcBlend)
void | setUpdateCallback ([bool status?])
void | setUseInputEvents (bool inputStatus)
void | setVisible (bool status)
void | setWidth (float width)
Public Member Functions inherited from BehaviorComponent
Boolean | addBehavior (BehaviorInstance bi)
void | clearBehaviors ()
Boolean | connect (outputBehavior, inputBehavior, outputName, inputName)
Boolean | disconnect (outputBehavior, inputBehavior, outputName, inputName)
Integer | getBehavior (string BehaviorTemplateName)
Integer | getBehaviorByIndex (int index)
String | getBehaviorConnection (outputBehavior, outputName, connectionIndex)
Integer | getBehaviorConnectionCount (outputBehavior, outputName)
Integer | getBehaviorCount ()
Boolean | raise (outputBehavior, outputName, [deltaTime])
Boolean | removeBehavior (BehaviorInstance bi, [bool deleteBehavior=true])
Boolean | reOrder (BehaviorInstance inst, [int desiredIndex=0])
Public Member Functions inherited from DynamicConsoleMethodComponent
String | callOnBehaviors (methodName, argi)
Public Member Functions inherited from SimComponent
Boolean | addComponents (compObjName, compObjName2,...)
Integer | getComponent (idx)
Integer | getComponentCount ()
Boolean | isEnabled ()
Boolean | removeComponents (compObjName, compObjName2,...)
void | setEnabled (enabled)
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

Float getCameraIdleDistance | ( |  | ) |

Gets the distance from any camera when the particle player will become idle i.e. stop integrating and rendering.

Returns
  The distance from any camera when the particle player will become idle i.e. stop integrating and rendering.

Float getEmissionRateScale | ( |  | ) |

Gets the scale for the particle player emission rate.

Returns
  The scale for the particle player emission rate.

Boolean getEmitterPaused | ( | emitterIndex |  | ) |

Gets whether the specified particle emitter is paused or not.

Parameters

  emitterIndex | The index of the emitter to modify.

Returns
  Whether the specified particle emitter is paused or not.

Boolean getEmitterVisible | ( | emitterIndex |  | ) |

Gets whether the specified particle emitter is visible or not.

Parameters

  emitterIndex | The index of the emitter to modify.

Returns
  Whether the specified particle emitter is visible or not.

Float getForceScale | ( |  | ) |

Gets the scale for the particle player forces.

Returns
  The scale for the particle player forces.

Boolean getIsPlaying | ( |  | ) |

Gets whether the particle player is playing or not.

Returns
  Whether the particle player is playing or not.

String getParticleAsset | ( |  | ) |

Gets the particle asset Id.

Returns
  The particle asset Id.

Float getParticleInterpolation | ( |  | ) |

Gets whether the intermediate world position, rotation, and size data points of particles between ticks are calculated.

Returns
  (bool status) Whether interpolation is calculated or not.

Boolean getPaused | ( |  | ) |

Gets whether the particle player is paused or not.

Returns
  Whether the particle player is paused or not.

Float getSizeScale | ( |  | ) |

Gets the scale for the particle player particle sizes.

Returns
  The scale for the particle player particle sizes.

Float getTimeScale | ( |  | ) |

Gets the scale for the particle player particle lifetimes.

Returns
  The scale for the particle player lifetimes.

Boolean play | ( |  | ) |

Starts the particle player playing.

Parameters

  resetParticles | Whether to reset any existing particles before starting to play. Default is true.

Returns
  Returns true on success and false otherwise.

void setCameraIdleDistance | ( | idleDistance |  | ) |

Sets the distance from any camera when the particle player will become idle i.e. stop integrating and rendering.

Parameters

  pauseDistance | The distance from any camera when the particle player will become idle i.e. stop integrating and rendering.

Returns
  No return value.

void setEmissionRateScale | ( | scale |  | ) |

Sets the scale for the particle player emission rate.

Parameters

  scale | The scale for the particle player emission rate.

Returns
  No return value.

void setEmitterPaused | ( | paused | ,
|  | emitterIndex |
| ) |  |

Sets whether the specified particle emitter is paused or not.

Parameters

  paused | Whether the specified particle emitter is paused or not.
  emitterIndex | The index of the emitter to modify.

Returns
  No return value.

void setEmitterVisible | ( | visible | ,
|  | emitterIndex |
| ) |  |

Sets whether the specified particle emitter is visible or not.

Parameters

  paused | Whether the specified particle emitter is visible or not.
  emitterIndex | The index of the emitter to modify.

Returns
  No return value.

void setForceScale | ( | scale |  | ) |

Sets the scale for the particle player forces.

Parameters

  scale | The scale for the particle player forces.

Returns
  No return value.

void setParticleAsset | ( | particleAssetId? |  | ) |

Sets the particle asset Id to play.

Parameters

  particleAssetId | The particle asset Id to play.

Returns
  No return value.

void setParticleInterpolation | ( | bool | status | ) |

Sets whether the intermediate world position, rotation, and size data points of particles between ticks are calculated.

Returns
  No return value.

void setPaused | ( | paused? |  | ) |

Sets whether the particle player is paused or not.

Parameters

  paused | Whether the particle player is paused or not.

Returns
  No return value.

void setSizeScale | ( | scale |  | ) |

Sets the scale for the particle player particle sizes.

Parameters

  scale | The scale for the particle player particle sizes.

Returns
  No return value.

void setTimeScale | ( | scale |  | ) |

Sets the scale for the particle player lifetimes.

Parameters

  scale | The scale for the particle player lifetimes.

Returns
  No return value.

void stop | ( |  | ) |

Stops the Particle Effect.

Parameters

  waitForParticles | Whether or not the effect should wait until all of its particles have run their course, or just stop immediately and delete the particles (default true).
  killEffect | Whether or not the effect should be deleted after it has stopped (default false).

Returns
  No return value.