Vital.sandbox
Model

self:get_current_animation

Shared

Retrieves the name of the currently playing animation


Syntax

local name = self:get_current_animation()

Parameters

TypeNameDescription

Returns

TypeNameDescription
stringnameName of the currently playing animation

Examples

Get the name of the currently playing animation
local entity = model.create("character")

entity:play_animation("idle")
engine.print("info", "Current animation:", entity:get_current_animation())

On this page