setAnimFrames("anim_name", first_key, last_key)
1
2
setAnimFrames("my_anim", 5, 8)
1
2
setAnimFrames("my_anim", 15, 15)
1
2
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
1
2
3
4
5
6
7
setFrames("test", 3, 8) -- play / loop animation "test" between frame 3 to frame 8
1
2
setFrames("test", 3) -- force animation "test" to play / loop frame 3 only
1
2
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
1
2
3
4
5
6
7
setFrames("right2", 1)
1
2
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)
1
2