Register events tied to the animation. The event will be triggered when a specified frame is played.
Register events tied to the animation. The event will be triggered when a specified frame is played.
1 string name
the animation name.
2 table the event table.
-- taken from game/developer/avatar.lua local function playKeyboard(animObj, animObjOwner) animObjOwner:playKeyboardClicks() end local workAnimEvents = {} local frames = tdas.getAnimData("work_hands") for i = 1, #frames do -- clal :playKeyboardClicks() at the beginning of every frame in the animation workAnimEvents[i] = playKeyboard end register.animationEvents("work_hands", workAnimEvents)