This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license. Until 1 Dec 2026 all licenses are 30 % off, for example the Indie Bundle for €69.30 instead of €99. The code BLACKFRIDAY is applied automatically at checkout.
See licenses Try it for freesetAnimFrames("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)
· 11 years ago#6Yes, you can put it in your animation.
The problem is that the editor says frame 0 but you can ignore that because the first frame index value is always 1, so the last frame of your 2 frame animation would be 2.setFrames("right2", 1)
P.S: you actually want to add the execute a script action part containing the function & parameters into the frame that you want to stop it on. So add it to the final frame. · 11 years ago#7Sorry but it doesn't work yet.
@Simon
I paste it another location and not happened
@AFRLme
I paste it in last frame in standing. And not work. · 11 years ago#8Could you post some screenshots of exactly what you did please? · 11 years ago#9I make same method that you said.
1.I made a script0 in script editor and pasted :
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
2.I pasted this code in frame 2 ( frame 1 in editor and it's last frame ). right2 is for standing animations :
setFrames("right2", 2)
It doesn't work even with 1 number too.
I have this log :
Implicit cast from 'int' to 'float'
Script local label
If use Tabletoolbar then label = "#Scripts" else label = nil end
Objectlist ("Visobjects",took 111 ms · 11 years ago#10Do all your characters use the same animation names? If you have multiple characters on screen at the same time & they all have the same animation names, then the engine may be struggling to determine which ActiveAnimation to access.
Would you mind sending me your ved & resource files? afrlme (at) outlook (dot) com. · 11 years ago#11I sent it.
Sorry but my project was heavy so I made another project as default and paste your codes.please check your mail
Thanks so muchThis thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.
New thread
Deponia, The Whispered World and more than 160 other games were made with Visionaire Studio. The free version covers up to 25 scenes. For more scenes there is Visionaire Studio PRO from €75, and to sell your game the Indie Bundle for €99.
Through December 1: all licenses 30% off, for example the Indie Bundle for €69.30 instead of €99. Applied automatically at checkout.