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

#include <nameTags_ScriptBinding.h>

Inherits SimSet.

Public Member Functions

Integer createTag (tagName)
 
Integer deleteTag (tagId)
 
String getAllTags ()
 
Integer getTagCount ()
 
Integer getTagId (tagName)
 
String getTagName (tagId)
 
Boolean hasTag (object, tagId)
 
String queryTags (tagIds, [excluded])
 
Integer renameTag (tagId, newTagName)
 
Boolean tag (object, tagIds)
 
Boolean untag (object, tagIds)
 
- Public Member Functions inherited from SimSet
void add (obj1, [obj2] *)
 
void bringToFront (object)
 
void callOnChildren (string method, [string args] *)
 
void callOnChildrenNoRecurse (string method, [string args] *)
 
void clear ()
 
void deleteObjects ()
 
Integer findObjectByInternalName (string name, [bool searchChildren]?)
 
Integer getCount ()
 
Integer getObject (index)
 
Boolean isMember (object)
 
void listObjects ()
 
void pushToBack (object)
 
void remove (obj1, [obj2] *)
 
void removeIfMember (obj1, [obj2] *)
 
void reorderChild (SimObject child1, SimObject child2)
 
- 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

◆ createTag()

Integer createTag ( tagName  )

Creates a tag.

Parameters
tagNameThe tag name to create.
Returns
The tag Id created.

◆ deleteTag()

Integer deleteTag ( tagId  )

Deletes a tag.

Parameters
tagIdThe tag Id to use.
Returns
The tag Id confirms the delete else 0 indicates an error.

◆ getAllTags()

String getAllTags ( )

Gets all the tag Id / tag name pairs.

Returns
[tag Id / tag Name] pairs

◆ getTagCount()

Integer getTagCount ( )

Gets the total tag count.

Returns
No return value.

◆ getTagId()

Integer getTagId ( tagName  )

Gets the tag Id associated with the tag name.

Parameters
tagNameThe tag name to associated with the tag Id.
Returns
The tag Id associated with the tag name or 0 if the tag name was not found.

◆ getTagName()

String getTagName ( tagId  )

Gets the tag name associated with the tag Id.

Parameters
tagIdThe tag Id to use.
Returns
The tag name associated with the tag Id or empty string if the tag Id was not found.

◆ hasTag()

Boolean hasTag ( object  ,
tagId   
)

Checks whether the object is tagged with any of the tag Ids or not.

Parameters
objectThe object to use.
tagIdThe tag Id(s) to use.
Returns
Whether the object is tagged with any of the tag Ids or not.

◆ queryTags()

String queryTags ( tagIds  )

Finds any objects added to this instance that are tagged with any of the specified tag(s).

Parameters
tagIdThe tag Id to use.
excludedOptionally inverts the query resulting in objects that are excluded i.e. objects that are NOT tagged with any of the specified tag(s).
Returns
Any objects added to this instance that are tagged with any of the specified tag(s).

◆ renameTag()

Integer renameTag ( tagId  ,
newTagName   
)

Renames an existing tag.

Parameters
tagIdThe tag Id to use.
newTagNameThe new tag name to assign.
Returns
The tag Id confirms the rename else 0 indicates an error.

◆ tag()

Boolean tag ( object  ,
tagIds   
)

Adds the tag Id(s) to the object.

Parameters
objectThe object to use.
tagIdsThe tag Id(s) to use.
Returns
Whether the tag operation was successful or not.

◆ untag()

Boolean untag ( object  ,
tagIds   
)

Removes the tag Id(s) from the object.

Parameters
objectThe object to use.
tagIdsThe tag Id(s) to use.
Returns
Whether the un-tag operation was successful or not.