TSTK Reference: TGE General Functions

From RGWiki

Jump to: navigation, search

Contents

TSTK Reference: TGE - General Functions

GameBase

The following section documents all of the functions found in the file: TSTK/TGE/GameBase.cs.

isGameBase( %obj )

Description: Return true if %obj is in in the GameBase object hierarchy.

Top

Networking

The following section documents all of the functions found in the file: TSTK/TGE/Networking.cs.

pushActionMapOnClient( %client , %mapName ) {

Description: Push the specified action map (%mapName) on a numbered %client.

Top

clientCmdPushActionMap( %mapName ) {

Description: Client command that goes with pushActionMapOnClient()

Top

popActionMapOnClient( %client , %mapName ) {

Description: Pop the specified action map (%mapName) on a numbered %client.

Top

clientCmdPopActionMap( %mapName ) {

Description: Client command that goes with popActionMapOnClient()

Top

activatePackageOnClient( %client , %packageName ) {

Description: Activate the specified package on a numbered %client.

Top

clientCmdActivatePackage( %packageName ) {

Description: Client command that goes with activatePackageOnClient()

Top

deactivatePackageOnClient( %client , %packageName ) {

Description: Deactivate the specified package on a numbered %client.

Top

clientCmdDeactivatePackage( %packageName ) {

Description: Client command that goes with deactivatePackageOnClient()

Top


SceneObject

The following section documents all of the functions found in the file: TSTK/TGE/SceneObject.cs.

sceneObject::GetCompassPoints( %obj, %radius, %offset)

Description:
Returns scriptObject containing eight of scriptObjects, each having a
field named 'position' containing the location of a compass point about the
shape. Compass points are in a circle about the shape, where the circle
lies on the outer edges of the shape's world box. The circle's radius can
be increased by specifying an %offset.

Top

DropObject( %object , %offsetVector ) {

Description: Cast a ray from the current position of %object downward, finding a point that intersects any of the following types:
$TypeMasks::TerrainObjectType
$TypeMasks::InteriorObjectType
$TypeMasks::StaticShapeObjectType
$TypeMasks::PlayerObjectType
$TypeMasks::ItemObjectType
$TypeMasks::VehicleObjectType
$TypeMasks::VehicleBlockerObjectType
$TypeMasks::StaticTSObjectType
At that point, add the %offsetVector and place %object at this new calculated position.
Note: This function will not move TSStatic() objects. Their positions must be set once and only once, on construction. Use CalculateObjectDropPosition() instead.

Top

DropObjectFromMarker( %object , %marker , %offsetVector ) {

Description: Temporarily set the transform for %object to that of %marker. Then, call dropObject() on %object with the specified %offsetVector.

Top

CalculateObjectDropPosition( %oldPosition , %offsetVector , %mask) {

Description: This function is used to calculate a drop postion using the same technique as dropObject(), but simply returning the drop position.
An option %mask (bitmask) can be passed in. If one is not provided, the automatically calculated %mask will contain all of these types:
$TypeMasks::TerrainObjectType
$TypeMasks::InteriorObjectType
$TypeMasks::StaticShapeObjectType
$TypeMasks::PlayerObjectType
$TypeMasks::ItemObjectType
$TypeMasks::VehicleObjectType
$TypeMasks::VehicleBlockerObjectType
$TypeMasks::StaticTSObjectType

Top

getObjLeftVector( %Obj )

Description: Calculate a leftward-facing vector from the object's (%obj) forward vector.

Top

getObjRightVector( %Obj )

Description: Calculate a rightward-facing vector from the object's (%obj) forward vector.

Top

getRightVector( %vec )

Description: Calculate a rightward-facing vector from %vec.

Top

getLeftVector( %vec )

Description: Calculate a leftward-facing vector from %vec.

Top

Personal tools