Torque 3D - Script Manual: TurretShapeData Class Reference

TorqueScript

Main   Class List   Namespace List   Online

TurretShapeData Class Reference
[Game Objects]

Defines properties for a TurretShape object. More...

Inheritance diagram for TurretShapeData:

List of all members.

Public Member Functions

Callbacks

void onMountObject (TurretShape turret, SceneObject obj, int node)
 Informs the TurretShapeData object that a player is mounting it.
void onStickyCollision (TurretShape obj)
 Informs the TurretData object that it is now sticking to another object.
void onUnmountObject (TurretShape turret, SceneObject obj)
 Informs the TurretShapeData object that a player is unmounting it.

Public Attributes

float cameraOffset
 Vertical (Z axis) height of the camera above the turret.
float headingRate
 Degrees per second rotation.
float maxHeading
 Maximum number of degrees to rotate from center.
float maxPitch
 Maximum number of degrees to rotate up from straight ahead.
float minPitch
 Minimum number of degrees to rotate down from straight ahead.
float pitchRate
 Degrees per second rotation.
bool startLoaded
 Does the turret's mounted weapon(s) start in a loaded state.
TurretShapeFireLinkType weaponLinkType
 Set how the mounted weapons are linked and triggered.
bool zRotOnly
 Should the turret allow only z rotations.

Detailed Description

Defines properties for a TurretShape object.

See also:
TurretShape
TurretShapeData

Member Function Documentation

void TurretShapeData::onMountObject ( TurretShape  turret,
SceneObject  obj,
int  node 
)

Informs the TurretShapeData object that a player is mounting it.

Parameters:
turret The TurretShape object.
obj The player that is mounting.
node The node the player is mounting to.
Note:
Server side only.
void TurretShapeData::onStickyCollision ( TurretShape  obj  ) 

Informs the TurretData object that it is now sticking to another object.

This callback is only called if the TurretData::sticky property for this Turret is true.

Parameters:
obj The Turret object that is colliding.
Note:
Server side only.
See also:
TurretShape, TurretData
void TurretShapeData::onUnmountObject ( TurretShape  turret,
SceneObject  obj 
)

Informs the TurretShapeData object that a player is unmounting it.

Parameters:
turret The TurretShape object.
obj The player that is unmounting.
Note:
Server side only.

Member Data Documentation

Vertical (Z axis) height of the camera above the turret.

Degrees per second rotation.

A value of 0 means no rotation is allowed. A value less than 0 means the rotation is instantaneous.

Maximum number of degrees to rotate from center.

A value of 180 or more degrees indicates the turret may rotate completely around.

Maximum number of degrees to rotate up from straight ahead.

Minimum number of degrees to rotate down from straight ahead.

Degrees per second rotation.

A value of 0 means no rotation is allowed. A value less than 0 means the rotation is instantaneous.

Does the turret's mounted weapon(s) start in a loaded state.

True indicates that all mounted weapons start in a loaded state.

See also:
ShapeBase::setImageLoaded()

Set how the mounted weapons are linked and triggered.

  • FireTogether: All weapons fire under trigger 0.
  • GroupedFire: Weapon mounts 0,2 fire under trigger 0, mounts 1,3 fire under trigger 1.
  • IndividualFire: Each weapon mount fires under its own trigger 0-3.
See also:
TurretShapeFireLinkType

Should the turret allow only z rotations.

True indicates that the turret may only be rotated on its z axis, just like the Item class. This keeps the turret always upright regardless of the surface it lands on.



Copyright © GarageGames, LLC. All Rights Reserved.