TorqueScript Reference
Functions

Functions

Boolean isObject (handle)
 
Integer nameToID (string objectName)
 

Detailed Description

Function Documentation

◆ isObject()

Boolean isObject ( handle  )

check if the name or ID specified is a valid object.

Parameters
handleA name or ID of a possible object.
Returns
true if handle refers to a valid object, false otherwise
See Engine Function/Method
Sim::findObject

◆ nameToID()

Integer nameToID ( string  objectName)

Use the nameToID function to convert an object name into an object ID.

Helper function for those odd cases where a string will not covert properly, but generally this can be replaced with a statement like: ("someName")

Parameters
objectNameA string containing the name of an object.
Returns
a positive non-zero value if the name corresponds to an object, or a -1 if it does not.
See Engine Function/Method
Sim::findObject