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

#include <simComponent_ScriptBinding.h>

Inherits SimObject.

Inherited by DynamicConsoleMethodComponent.

Public Member Functions

Boolean addComponents (compObjName, compObjName2,...)
 
Integer getComponent (idx)
 
Integer getComponentCount ()
 
Boolean isEnabled ()
 
Boolean removeComponents (compObjName, compObjName2,...)
 
void setEnabled (enabled)
 
- Public Member Functions inherited from SimObject
void assignFieldsFrom (SimObject)
 
Integer clone ([copyDynamicFields=false]?)
 
void delete ()
 
Integer getId ()
 
void setName (newName)
 
String getName ()
 
String getClassNamespace ()
 
String getSuperClassNamespace ()
 
void setClassNamespace (nameSpace)
 
void setSuperClassNamespace ()
 
Boolean isMethod (string methodName)
 
String call (methodName, [args] *)
 
void dumpClassHierarchy ()
 
void dump ()
 
Boolean isMemberOfClass (string classname)
 
String getClassName ()
 
String getFieldValue (fieldName)
 
Boolean setFieldValue (fieldName, value)
 
Boolean setEditFieldValue (fieldName, value)
 
Integer getDynamicFieldCount ()
 
String getDynamicField (index)
 
Integer getFieldCount ()
 
String getField (int index)
 
void setProgenitorFile (file)
 
String getProgenitorFile ()
 
Integer getType ()
 
String getFieldType (fieldName)
 
void setInternalName (string InternalName)
 
String getInternalName ()
 
Boolean isChildOfGroup (groupID)
 
Integer getGroup ()
 
Boolean startTimer (callbackFunction, float timePeriod, [repeat]?)
 
void stopTimer ()
 
Boolean isTimerActive ()
 
Integer schedule (time, command, [arg] *)
 
void startListening (SimObject)
 
void stopListening (SimObject)
 
void addListener (SimObject)
 
void removeListener (SimObject)
 
void removeAllListeners ()
 
void postEvent (String eventName, String data)
 
Boolean save (fileName, [selectedOnly]?)
 
void addFieldFilter (fieldName)
 
void removeFieldFilter (fieldName)
 

Member Function Documentation

◆ addComponents()

Boolean addComponents ( compObjName  ,
compObjName2  ,
  ... 
)

Adds additional components to current list.

Parameters
Upto 62 component names
Returns
Returns true on success, false otherwise.

◆ getComponent()

Integer 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

◆ getComponentCount()

Integer getComponentCount ( )

Get the current component count

Returns
The number of components in the list as an integer

◆ isEnabled()

Boolean isEnabled ( )

Check whether SimComponent is currently enabled

Returns
true if enabled and false if not

◆ removeComponents()

Boolean removeComponents ( compObjName  ,
compObjName2  ,
  ... 
)

Removes components by name from current list.

Parameters
objNamexUp to 62 component names
Returns
Returns true on success, false otherwise.

◆ setEnabled()

void setEnabled ( enabled  )

Sets or unsets the enabled flag

Parameters
enabledBoolean value
Returns
No return value