• Studio

  • Bots

  • Web API

  • Designer Resources

  • Host Resources

  • Character

    Inherits from: Behaviour

    Represents an in-game character, providing properties and methods to control its movement, appearance, and interaction within the game environment.

    Properties

    isMoving

    boolean

    Indicates whether the character is currently moving.

    Returns the distance from the character to its destination.

    The target destination of the character in the game world.

    Specifies the rendering layer of the character for drawing order.

    The position of the character in the game world for rendering purposes.

    The rotation of the character in the game world for rendering purposes.

    The scale of the character in the game world for rendering purposes.

    Reference to the player object that controls or owns the character.

    An event that is triggered when the character's state changes.

    An event that is triggered when the character finishes moving to a destination.

    Methods

    Sets the character to an idle state.

    Returns

    void

    Plays a specified emote animation on the character.

    Parameters

    emoteName

    string

    The name of the emote to play.

    loop

    boolean

    Whether the emote should loop.

    callback
    LuaFunction

    A callback function to execute when the emote playback is complete.

    Returns

    void

    Moves the character to a specified position.

    Parameters

    position
    Vector3

    The target position for the character to move to.

    areaMask

    number

    An optional mask to specify allowed movement areas.

    callback
    LuaFunction

    A callback function to execute when movement is complete.

    Returns

    boolean

    Returns true if movement is successfully initiated.

    Moves the character within a specified range of a position.

    Parameters

    position
    Vector3

    The target position for the character to approach.

    distance

    number

    The desired distance from the target position.

    areaMask

    number

    An optional mask to specify allowed movement areas.

    callback
    LuaFunction

    A callback function to execute when movement is complete.

    Returns

    boolean

    Returns true if movement is successfully initiated.

    Smoothly transitions the character's render position from one point to another.

    Parameters

    The starting position for the tween.

    The ending position for the tween.

    Returns

    Tween

    A Tween object representing the transition.

    Initiates a smooth transition for the character's render position to a specified destination.

    Parameters

    The target position for the character's render position.

    Returns

    Tween

    A Tween object representing the transition.

    PocketWorlds Icon

    © 2024 Pocket Worlds. All rights reserved.