TorqueScript Reference
Public Member Functions | List of all members
Trigger Class Reference

Inherits SceneObject.

Public Member Functions

bool getEnterCallback ()
 
bool getLeaveCallback ()
 
bool getStayCallback ()
 
void setEnterCallback ([setting]?)
 
void setLeaveCallback ([setting]?)
 
void setStayCallback ([setting]?)
 
- 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 cancelMoveTo ([autoStop=true])
 
void cancelRotateTo ([autoStop=true])
 
void clearCollisionShapes ()
 
void copyAllCollisionShapes (targetObject[, clearTargetShapes?])
 
int copyCollisionShape (int shapeIndex, targetObject)
 
bool copyFrom (SceneObject object,[copyDynamicFields?=false])
 
int createChainCollisionShape (localPointsX/Y,[adjacentLocalPositionStartX, adjacentLocalPositionStartY],[adjacentLocalPositionEndX, adjacentLocalPositionEndY])
 
int createCircleCollisionShape (radius,[localPositionX, localPositionY])
 
int createEdgeCollisionShape (localPositionStartX, localPositionStartY, localPositionEndX, localPositionEndY,[adjacentLocalPositionStartX, adjacentLocalPositionStartY],[adjacentLocalPositionEndX, adjacentLocalPositionEndY])
 
int createPolygonBoxCollisionShape (width, height,[localCentroidX, localCentroidY],[angle])
 
int createPolygonCollisionShape (localPointsX/Y)
 
bool deleteCollisionShape (int shapeIndex)
 
void detachGui ()
 
string getAABB ()
 
bool getActive ()
 
float getAlphaTest ()
 
float getAngle ()
 
float getAngularDamping ()
 
float getAngularVelocity ()
 
string getArea ()
 
string getAreaMax (...)
 
string getAreaMin ()
 
bool getAutoSizing ()
 
bool getAwake ()
 
float getBlendAlpha ()
 
string getBlendColor (allowColorNames)
 
bool getBlendMode ()
 
string getBodyType ()
 
bool getBullet ()
 
string getChainCollisionShapeAdjacentEnd (int shapeIndex)
 
string getChainCollisionShapeAdjacentStart (int shapeIndex)
 
bool getChainCollisionShapeHasAdjacentEnd (int shapeIndex)
 
bool getChainCollisionShapeHasAdjacentStart (int shapeIndex)
 
string getChainCollisionShapeLocalPoint (int shapeIndex, int pointIndex)
 
int getChainCollisionShapePointCount (int shapeIndex)
 
string getCircleCollisionShapeLocalPosition (int shapeIndex)
 
float getCircleCollisionShapeRadius (int shapeIndex)
 
bool getCollisionCallback ()
 
string getCollisionGroups ()
 
string getCollisionLayers ()
 
string getCollisionMasks (...)
 
float getCollisionShapeArea (int shapeIndex)
 
int getCollisionShapeCount ()
 
float getCollisionShapeDensity (int shapeIndex)
 
float getCollisionShapeFriction (int shapeIndex)
 
bool getCollisionShapeIsSensor (int shapeIndex)
 
float getCollisionShapeRestitution (int shapeIndex)
 
string getCollisionShapeType (int shapeIndex)
 
bool getCollisionSuppress ()
 
string getContact (contactIndex)
 
int getContactCount ()
 
float getDefaultDensity ()
 
float getDefaultFriction ()
 
float getDefaultRestitution ()
 
string getDstBlendFactor ()
 
string getEdgeCollisionShapeAdjacentEnd (int shapeIndex)
 
string getEdgeCollisionShapeAdjacentStart (int shapeIndex)
 
bool getEdgeCollisionShapeHasAdjacentEnd (int shapeIndex)
 
bool getEdgeCollisionShapeHasAdjacentStart (int shapeIndex)
 
string getEdgeCollisionShapeLocalPositionEnd (int shapeIndex)
 
string getEdgeCollisionShapeLocalPositionStart (int shapeIndex)
 
bool getFixedAngle ()
 
bool getGatherContacts ()
 
float getGravityScale ()
 
float getHeight ()
 
float getInertia ()
 
bool getIsPointInCollisionShape (int shapeIndex, worldPointX/Y)
 
bool 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 ()
 
bool getPickingAllowed ()
 
string getPolygonCollisionShapeLocalPoint (int shapeIndex, int pointIndex)
 
int getPolygonCollisionShapePointCount (int shapeIndex)
 
string getPosition ()
 
float getRenderAngle ()
 
string getRenderGroup ()
 
string getRenderPosition ()
 
int getScene ()
 
int getSceneGroup ()
 
int getSceneLayer ()
 
float getSceneLayerDepth ()
 
string getSize ()
 
float getSizeX ()
 
float getSizeY ()
 
bool getSleepingAllowed ()
 
bool getSleepingCallback ()
 
string getSortPoint ()
 
float getSortPointX ()
 
float getSortPointY ()
 
string getSrcBlendFactor ()
 
bool getUpdateCallback ()
 
bool getUseInputEvents ()
 
bool getVisible ()
 
float getWidth ()
 
string getWorldCenter ()
 
string getWorldPoint (float localPointX/Y)
 
string getWorldVector (float localVectorX/Y)
 
bool isMoveToComplete ()
 
bool isRotateToComplete ()
 
bool moveTo (worldPoint X/Y, speed,[autoStop=true],[warpToTarget=true])
 
void removeFromScene ()
 
bool 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 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)
 
bool setSceneLayerDepthBack ()
 
bool setSceneLayerDepthBackward ()
 
bool setSceneLayerDepthForward ()
 
bool 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
bool addBehavior (BehaviorInstance bi)
 
void clearBehaviors ()
 
bool connect (outputBehavior, inputBehavior, outputName, inputName)
 
bool disconnect (outputBehavior, inputBehavior, outputName, inputName)
 
int getBehavior (string BehaviorTemplateName)
 
int getBehaviorByIndex (int index)
 
string getBehaviorConnection (outputBehavior, outputName, connectionIndex)
 
int getBehaviorConnectionCount (outputBehavior, outputName)
 
int getBehaviorCount ()
 
bool raise (outputBehavior, outputName,[deltaTime])
 
bool removeBehavior (BehaviorInstance bi,[bool deleteBehavior=true])
 
bool reOrder (BehaviorInstance inst,[int desiredIndex=0])
 

Member Function Documentation

bool getEnterCallback ( )
Returns
Returns whether trigger checks onEnter events
bool getLeaveCallback ( )
Returns
Returns whether trigger checks onLeave events
bool getStayCallback ( )
Returns
Returns whether trigger checks onStay events
void setEnterCallback ( [setting] ?  )

Set whether trigger checks onEnter events

Parameters
settingDefault is true.
Returns
No return value.
void setLeaveCallback ( [setting] ?  )

Set whether trigger checks onLeave events

Parameters
settingDefault is true.
Returns
No return value.
void setStayCallback ( [setting] ?  )

Set whether trigger checks onStay events

Parameters
settingDefault is true.
Returns
No return value.