TorqueScript Reference

- Main Page
- Related Pages
- Modules
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
NameTags Class Reference

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 | 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 | reorderChild (SimObject child1, SimObject child2)
Public Member Functions inherited from 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)
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]*)
Boolean | save (fileName, [selectedOnly]?)
void | addFieldFilter (fieldName)
void | removeFieldFilter (fieldName)

## Member Function Documentation

Integer createTag | ( | tagName |  | ) |

Creates a tag.

Parameters

  tagName | The tag name to create.

Returns
  The tag Id created.

Integer deleteTag | ( | tagId |  | ) |

Deletes a tag.

Parameters

  tagId | The tag Id to use.

Returns
  The tag Id confirms the delete else 0 indicates an error.

String getAllTags | ( |  | ) |

Gets all the tag Id / tag name pairs.

Returns
  [tag Id / tag Name] pairs

Integer getTagCount | ( |  | ) |

Gets the total tag count.

Returns
  No return value.

Integer getTagId | ( | tagName |  | ) |

Gets the tag Id associated with the tag name.

Parameters

  tagName | The 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.

String getTagName | ( | tagId |  | ) |

Gets the tag name associated with the tag Id.

Parameters

  tagId | The tag Id to use.

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

Boolean hasTag | ( | object | ,
|  | tagId |
| ) |  |

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

Parameters

  object | The object to use.
  tagId | The tag Id(s) to use.

Returns
  Whether the object is tagged with any of the tag Ids or not.

String queryTags | ( | tagIds |  | ) |

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

Parameters

  tagId | The tag Id to use.
  excluded | Optionally 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).

Integer renameTag | ( | tagId | ,
|  | newTagName |
| ) |  |

Renames an existing tag.

Parameters

  tagId | The tag Id to use.
  newTagName | The new tag name to assign.

Returns
  The tag Id confirms the rename else 0 indicates an error.

Boolean tag | ( | object | ,
|  | tagIds |
| ) |  |

Adds the tag Id(s) to the object.

Parameters

  object | The object to use.
  tagIds | The tag Id(s) to use.

Returns
  Whether the tag operation was successful or not.

Boolean untag | ( | object | ,
|  | tagIds |
| ) |  |

Removes the tag Id(s) from the object.

Parameters

  object | The object to use.
  tagIds | The tag Id(s) to use.

Returns
  Whether the un-tag operation was successful or not.