Accessory

Description

Accessory is used to add other parts onto the avatar to change its appearance.
The accessory itself has no shape, value or physical properties, etc.. It has a child object Hook by default. The appearance's effect can be changed by adjusting the properties of the Hook, including the position where the part wants to add. The accessory automatically takes effect when it is added as the child of an Avatar.

Accessory Functions:

  1. Accessory is a type of avatar appearance (the appearance, except for texture, can be displayed using accessories, such as hair, hat and glasses).
  2. The accessory can be uploaded, but it cannot collide with or be picked up by an avatar, nor be put into the backpack.
  3. When the accessory is put under the avatar object, the hook under the accessory will build a hook relation with the corresponding bone according to its hook point and offset, and then move with it.
  4. The player can purchase and wear the accessory on the platform and bring it into the game.
  5. The accessory appearance can be changed by attaching a special mesh to the hook part or building a constraint between the part and the hook part.

Properties

        string   ClassName
    The object-type name. Read only.

        string    Name
    The custom name of this object.

        RWObject   Parent
    The parent of this object.

        RWObject   Subject
    Used for a compound object, such as a tool, an accessory or a model, to confirm its reference position when the methods MoveTo, RotationTo and ScaleTo are executed in a script.

Functions

    RWObject.Create(classname)
    A special function, creating an instance of the specified class.

    DelAllChild()
    Deletes all child objects.

    Clone()
    Clones an object to create a copy.

    Destroy()
    Delete objects.

    GetAncestorByName(Name)
    Returns the object's first parent node with the same name.

    GetAncestorByClassName(className)
    Returns the object's first parent node of the same class.

    GetChildByName(Name,recursive)
    Returns the object's first child object with the same name. If the second parameter is true, it will search through descendants of all hierarchies.

    GetChildByClassName(className,recursive)
    Returns the object's first child object of the same type. If the second parameter is true, it will search through descendants of all hierarchies.

    GetAllChild()
    Seeks all its child objects and returns as a list.

    GetAllDescendant()
    Recursively seeks all its descendants and returns as a list.

    IsClass(ClassName)
    Judges whether it is the class the same as the given object class or not.

    IsAncestor(TarObj)
    Judges whether itself is the ancestor of the target object or not.

    IsDescendant(TarObj)
    Judges whether itself is the descendant of the target object or not.

    WaitForChild(childName,timeout)
    Seeks its own child object.

    Child(childName)
    Seeks its own child object by a given name.

    Equals(TarObj)
    Judges whether the target object is the same as itself or not.

Events

    ChildAdded(childobject)
    Triggered when a direct child object is added.

    ChildRemoved(childobject)
    Deletes all child objects.

    DescendantAdded(descendantobject)
    Triggered when a descendant is added.

    DescendantRemoved(descendantobject)
    Triggered when a descendant is removed.

    AncestryChanged(AncestryChanged)
    Triggered when the ancestry is changed.