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 zdarmalocal anim = ActiveAnimations[game.SavedObject:getName()]
anim.AnimationFirstFrame = ActiveAnimations[game.SavedObject:getName()].CurrentSpriteIndex + 1
anim.AnimationLastFrame = ActiveAnimations[game.SavedObject:getName()].CurrentSpriteIndex + 1This works perfectly! Thank you very much.Now I just need to find way to set function when rotate reach last frame to reset to first frame (as it is 360 rotation).
local anim = ActiveAnimations[game.SavedObject:getName()]
if anim.CurrentSpriteIndex < 360 then
anim.AnimationFirstFrame = ActiveAnimations[game.SavedObject:getName()].CurrentSpriteIndex + 1
anim.AnimationLastFrame = ActiveAnimations[game.SavedObject:getName()].CurrentSpriteIndex + 1
else
anim.AnimationFirstFrame = 1
anim.AnimationLastFrame = 1
endSo I have tried to execute this code, but I don't understand how to get code executed within VS. This is how I'm going about it. Wondering if you can show me what I'm missing.Wrap it in a query.local anim = ActiveAnimations[game.SavedObject:getName()] if anim.CurrentSpriteIndex < 360 then anim.AnimationFirstFrame = ActiveAnimations[game.SavedObject:getName()].CurrentSpriteIndex + 1 anim.AnimationLastFrame = ActiveAnimations[game.SavedObject:getName()].CurrentSpriteIndex + 1 else anim.AnimationFirstFrame = 1 anim.AnimationLastFrame = 1 end
Just edit the query & frame for the opposite direction.
ActiveAnimations["example"]Thanks, I'll try it. Really appreciate your help and patience as I'm learning VS!hmm... game.SavedObject is the object below the cursor that has manually been saved using the save object action part. Try replacing that with the actual name of the object/animation...ActiveAnimations["example"]Quick note #1: names are case sensitive.Quick note #2: technically the code could have been shortened further - I have no idea why I wrote the currentspriteindex lines out fully when I could have just used anim.CurrentSpriteIndex + 1, seeing as I'd already stored the animation inside of the anim variable.
Toto 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émaDeponia, 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.