PlatformAvatar

Description

Properties

        string   Name
    The custom name of this object.

        string   ClassName
    The object-type name.

        RWObject   Parent
    The parent of this object.

        float   MaxHealth
    Avatar's HP ceiling

        float   Health
    Avatar's current HP value. Avatar will die once it is less than or equal to 0.

        Enum.HealthDisplayMode   HealthDisplayType
    The display modes of avatar's HP: always display, never display and display when HP goes down.

        bool   NameEnable
    Control whether to display avatar's name.

        float   MoveSpeed
    Avatar's movement speed.

        float   JumpSpeed
    The upward start speed when avatar jumps.

        float   ClimbRate
    The ratio of avatar's climbing speed to moving speed.

        float   DisplayDistance
    The display distance of information above avatar's head, including name and HP.

        Enum.ExternalRalation   ExternalRalationType
    External relations.

        Vector3   HumanCameraOffset
    The camera offset added when shooting the avatar.

        float   StepUpHigh
    The barrier height that an avatar can step over when moving.

        enum   DeadMode
    When the character dies, there are two kinds of performances: rag doll performance and fragmentation performance.

        float   GravityMultiplier
    The multiple effect of gravity on the character.

        int   PlayerId
    The player's ID.

        float   ForceFiledDuration
    The player's current remaining protect duration.

        bool   IsAutoRotate
    Whether an avatar will turn with its moving direction automatically.

        RWObject   SubjectSeat
    Refer to the current seat of an avatar. If exists, it will display, if not, returns null. (Including seat and driving seat)

        Vector3   MoveOrientation
    Avatar moving direction.

Functions

    DelAllChild()
    Deletes all child 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 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.