setAnimFrames("anim_name", first_key, last_key)
setAnimFrames("my_anim", 5, 8)
setAnimFrames("my_anim", 15, 15)
function setFrames(anim, a, b)
if b == nil then b = a end -- fallback in case only a value was entered
-- + --
ActiveAnimations[anim].AnimationFirstFrame = a
ActiveAnimations[anim].AnimationLastFrame = b
end
setFrames("test", 3, 8) -- play / loop animation "test" between frame 3 to frame 8
setFrames("test", 3) -- force animation "test" to play / loop frame 3 only
setFrames(anim, a, b)
if b == nil then b = a end -- fallback in case only a value was entered
-- + --
ActiveAnimations[anim].AnimationFirstFrame = a
ActiveAnimations[anim].AnimationLastFrame = b
end
setFrames("right2", 1)
I make new script in script editor and put this code there
Good! (make sure it is a definition script, not execution script)And put this code in frame 1 of standing animations
I think this is why it doesn't work: don't put this code inside the animation, and call it from somewhere else.
For example:
- on left click, execute script (copy/paste the code).
(There is an Action "Execute A Script" where you can write your own scripts)
setFrames("right2", 1)