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

Inherits SimObject.

Public Member Functions

bool addComponents (compObjName, compObjName2,...)
 
int getComponent (idx)
 
int getComponentCount ()
 
bool isEnabled ()
 
bool removeComponents (compObjName, compObjName2,...)
 
void setEnabled (enabled)
 
- Public Member Functions inherited from SimObject
string call (functionName,[args]*)
 
int clone ([bool copyDynamicFields?=false]?)
 
void delete ()
 
void dump ()
 
void dumpClassHierarchy ()
 
const char * getClassName ()
 
string getClassNamespace ()
 
string getDynamicField (index)
 
int getDynamicFieldCount ()
 
string getField (int index)
 
int getFieldCount ()
 
const char * getFieldType (fieldName)
 
const char * getFieldValue (fieldName)
 
int getGroup ()
 
int getId ()
 
string getInternalName ()
 
const char * getName ()
 
string getProgenitorFile ()
 
string getSuperClassNamespace ()
 
int getType ()
 
bool isChildOfGroup ()
 
bool isMemberOfClass (string classname)
 
bool isMethod (const char *methodName)
 
bool isMethod (string method name)
 
bool isTimerActive ()
 
bool save (fileName,[selectedOnly]?)
 
int schedule (time, command,[arg]*)
 
void setClassNamespace ()
 
bool setFieldValue (fieldName, value)
 
void setInternalName (string InternalName)
 
void setName (newName)
 
void setProgenitorFile (file)
 
void setSuperClassNamespace ()
 
bool startTimer (callbackFunction, float timePeriod,[repeat]?)
 
void stopTimer ()
 

Additional Inherited Members

- Static Public Member Functions inherited from SimObject
static S32 QSORT_CALLBACK compareFields (const void *a, const void *b)
 

Member Function Documentation

bool addComponents ( compObjName  ,
compObjName2  ,
  ... 
)

Adds additional components to current list.

Parameters
Upto 62 component names
Returns
Returns true on success, false otherwise.
int getComponent ( idx  )

Get the component corresponding to the given index.

Parameters
idxAn integer index value corresponding to the desired component.
Returns
The id of the component at the given index as an integer
int getComponentCount ( )

Get the current component count

Returns
The number of components in the list as an integer
bool isEnabled ( )

Check whether SimComponent is currently enabled

Returns
true if enabled and false if not
bool removeComponents ( compObjName  ,
compObjName2  ,
  ... 
)

Removes components by name from current list.

Parameters
objNamexUp to 62 component names
Returns
Returns true on success, false otherwise.
void setEnabled ( enabled  )

Sets or unsets the enabled flag

Parameters
enabledBoolean value
Returns
No return value