Skip to main content

Avatar

The global instance of AvatarAPI

Metadata

getName()

Gets the name string of this avatar

Example:

avatar:getName()

getAuthors()

Gets the authors string of this avatar

Example:

avatar:getAuthors()

getVersion()

Gets the version string of this avatar

Example:

avatar:getVersion()

hasTexture()

Gets whether or not this avatar has a texture

Example:

avatar:hasTexture()

setColor(Vector3)

Sets the current color string of your avatar, used as your avatar theme

Can be given a rgb as Vector3 or three numbers, it expects numbers 0-1

Example:

avatar:setColor(50 / 255, 200 / 255, 200 / 255)

getColor()

Gets the current color string of your avatar, used as your avatar theme

Example:

avatar:getColor()

Misc

store(string,any)

Store the given key-value pair inside your current avatar's metadata

Someone else can get this information from a different script with the avatarVars() function in World

The key must be a string

Example:

avatar:store("storing", true)

getSize()

Gets the file size of this avatar in bytes

Example:

avatar:getSize()

getEntityName()

Attempts to get the entity name of this avatar, defaulting to the avatar name

Example:

avatar:getEntityName()

getUUID()

Returns the UUID of the owner of this avatar

Example:

avatar:getUUID()

getNBT()

Gets the NBT data this avatar is stored as

Example:

avatar:getNBT()

hasScriptError()

Gets whether this script currently has stopped due to an error (kinda useless lol)

Example:

avatar:hasScriptError()

Permissions

getPermissionLevel()

Returns this avatar current permission level

Example:

avatar:getPermissionLevel()

getComplexity()

Gets the current complexity of this avatar

Example:

avatar:getComplexity()

getMaxComplexity()

Gets the maximum allowed model complexity (number of faces) as permitted by the viewer

Example:

avatar:getMaxComplexity()

getInitCount()

Gets the number of initialization instructions of this avatar

Example:

avatar:getInitCount()

getMaxInitCount()

Gets the maximum allowed instructions during initialization as permitted by the viewer

Example:

avatar:getMaxInitCount()

getEntityInitCount()

Gets the number of events.ENTITY_INIT instructions of this avatar

Example:

avatar:getEntityInitCount()

getTickCount()

Gets the number of events.TICK instructions of this avatar last tick

Example:

avatar:getTickCount()

getMaxTickCount()

Gets the maximum allowed instructions in events.TICK as permitted by the viewer

Example:

avatar:getMaxTickCount()

getWorldTickCount()

Gets the number of events.WORLD_TICK instructions of this avatar last tick

Example:

avatar:getWorldTickCount()

getMaxWorldTickCount()

Gets the maximum allowed instructions in events.WORLD_TICK as permitted by the viewer

Example:

avatar:getMaxWorldTickCount()

getRenderCount()

Gets the number of events.RENDER and events.POST_RENDER instructions of this avatar last frame

Example:

avatar:getRenderCount()

getMaxRenderCount()

Gets the maximum allowed instructions in events.RENDER and Events.POST_RENDER as permitted by the viewer

Example:

avatar:getMaxRenderCount()

getWorldRenderCount()

Gets the number of events.WORLD_RENDER and events.POST_WORLD_RENDER instructions of this avatar last frame Example:

avatar:getWorldRenderCount()

getMaxWorldRenderCount()

Gets the maximum allowed instructions in events.WORLD_RENDER and events.POST_WORLD_RENDER as permitted by the viewer

Example:

avatar:getMaxWorldRenderCount()

getRemainingSounds()

Gets the remaining amount of sound this avatar can play

Example:

avatar:getRemainingSounds()

getMaxSounds()

Gets the maximum allowed number of sounds as permitted by the viewer

Example:

avatar:getMaxSounds()

getAnimationCount()

Gets the number of Lua instructions used within animations

Example:

avatar:getAnimationCount()

getMaxAnimationCount()

Gets the maximum allowed Lua instructions in animations as permitted by the viewer

Example:

avatar:getMaxAnimationCount()

getAnimationComplexity()

Gets the current animation complexity of this avatar

Example:

avatar:getAnimationComplexity()

getMaxAnimationComplexity()

Gets the maximum allowed animation complexity (number of playing channels) as permitted by the viewer

Example:

avatar:getMaxAnimationComplexity()

getMaxTextureSize()

Gets the max dimensions of custom textures that this avatar can create

Example:

avatar:getMaxTextureSize()

getRemainingParticles()

Gets the remaining amount of particles this avatar can summon

Example:

avatar:getRemainingParticles()

getMaxParticles()

Gets the maximum allowed number of particles as permitted by the viewer

Example:

avatar:getMaxParticles()

getCurrentInstructions()

Gets the current number of instructions that have been executed by your avatar

Resets to 0 at the beginning of certain events

Example:

avatar:getCurrentInstructions()

canEditVanillaModel()

Gets whether or not the viewer allows your avatar to edit the vanilla models

Example:

avatar:canEditVanillaModel()

canRenderOffscreen()

Gets whether or not the viewer allows you to render the avatar off-screen

Example:

avatar:canRenderOffscreen()

canHaveCustomSkull()

Gets whether or not your avatar is allowed to have custom player skull

Example:

avatar:canHaveCustomSkull()

canUseCustomSounds()

Gets whether or not the viewer allows your avatar to play custom sounds

Example:

avatar:canUseCustomSounds()

canEditNameplate()

Gets whether or not the viewer allows your avatar to edit your nameplate

Example:

avatar:canEditNameplate()

getVolume()

Gets the maximum allowed volume of this avatar as permitted by the viewer

Example:

avatar:getVolume()