Toto téma je několik let staré. Některé údaje se mohou týkat starší verze Visionaire Studia. Aktuální návody
Bezplatná verze umožňuje až 25 scén na projekt. Pro více scén a pro prodej hry potřebujete licenci. Do 1. 12. 2026 jsou všechny licence o 30 % levnější, například Indie Bundle za 69,30 € místo 99 €. Kód BLACKFRIDAY se odečte automaticky při platbě.
Zobrazit licence Vyzkoušet zdarmasetAnimFrames("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 muchToto téma je uzavřené, protože tu přes rok nikdo neodpověděl. Svůj dotaz můžete položit v novém tématu.
Nové téma
Deponia, The Whispered World a více než 160 dalších her vzniklo ve Visionaire Studiu. Bezplatná verze stačí až na 25 scén. Pro více scén je tu Visionaire Studio PRO od 75 €, a pro prodej vaší hry Indie Bundle za 99 €.
Do 1. 12. včetně: všechny licence o 30 % levnější, například Indie Bundle za 69,30 € místo 99 €. Sleva se odečte automaticky.