onAvatarAnimationPlayed

Constructor:

onAvatarAnimationPlayed()

Description

This event is triggered when an avatar's animation is played.

Examples

Create an avatar to play the Drive action. Trigger this event when the Drive animation finishes playing.

local player = RWObject.Create("Avatar") -- create an avatar
player.Position = Vector3(0,0.125,3) -- assign a vector to the avatar position
local climb = player. animation. drive -- retrieve the Drive action position
climb.onAvatarAnimationPlayed:Connect(function()  -- register an animation event that is triggered once the animation is played
    print("The event that the animation is played is triggered")
end)
wait(1) -- wait 1
climb.LocalClipId = "Drive" -- assign a value to the animation
climb.Loop = true -- enable looping
climb:PlayAnimation() -- play the animation