Animation

Description

The animation object of an avatar object.

Properties

        string   Name
    The custom name of this object.

        string   ClassName
    The object-type name.

        RWObject   Parent
    The parent of this object.

        string   ClipId
    The unique identification of the action file.

        Enum.AnimationType   Action
    Action name.

        string   LocalClipId
    The corresponding name of the local animation.

        float   AnimationSpeed
    The speed of the animation playing.

        float   AnimationTimePosition
    The time position to which the current animation is playing.

        float   AnimationLength
    The length of the animation (unit: second).

        bool   IsAnimationPlaying
    Whether the current animation is playing or not.

        int   UpperBodyPriority
    When multiple actions need to be played at the same time, priority will determine the playing order. The higher priority, the earlier the action will be played. For actions of the same priority, the latter performed will be presented. Priorities of basic actions are 0.

        int   UnderBodyPriority
    When multiple actions need to be played at the same time, priority will determine the playing order. The higher priority, the earlier the action will be played. For actions of the same priority, the latter performed will be presented. Priorities of basic actions are 0.

        int   LeftPriority
    When multiple actions need to be played at the same time, priority will determine the playing order. The higher priority, the earlier the action will be played. For actions of the same priority, the one latter performed will be presented. Priorities of basic actions are 0.

        int   RightPriority
    When multiple actions need to be played at the same time, priority will determine the playing order. The higher priority, the earlier the action will be played. For actions of the same priority, the latter performed will be presented. Priorities of basic actions are 0.

        bool   Play
    Play the action.

        bool   Loop
    Loop the action.

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.

    PlayAnimation()
    Play the current animation.

    StopAnimation()
    Stop playing the current animation.

Events

    ChildAdded(childobject)
    Triggered when a 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.

    AnimationLoop()
    This event is triggered before the next loop starts when an animation loop is finished.

    AnimationComplete()
    This event is triggered when the animation finishes playing.

    onAvatarAnimationPlayed()
    This event is triggered when the avatar's animation is playing.