Luis95R Posted December 8, 2017 Share Posted December 8, 2017 Hi, I'm working on a flower pot item (Just like the Potted Succulent) I've been doing the animation on Spriter and trying to do the same things as the Potted Succulent. However when I start the game up to compile. It doesn't look like the Potted Succulent atlas-0.tex file. Here is what the Potted Succulent atlas looks like: https://prnt.sc/hkn6al Here is what my Potted Flower atlas looks like when it's compiled when I start the game up. https://prnt.sc/hkn4fo As you can see it gets split into two files, atlas-0.tex and atlas-1.tex and it doesn't even include other flower images from Spriter: https://prnt.sc/hkn44i Anyone have any advice to make my Potted Flower atlas be just like the Potted Succulent one? I'm not sure what I'm doing wrong. Thank you. Link to comment Share on other sites More sharing options...
Lumina Posted December 8, 2017 Share Posted December 8, 2017 Sometimes compiler makes multiples atlas instead of just one. About not including the other flowers, two hypothesis : Maybe you have to make one anim for each flower. In this case you needs to do the different anims (and say to the game to use them) Or maybe you have to set up a symbol that will be replaced by the image of the flower. In this case you need to have a symbol (and say to the game to use it) How does it works for the potted succulent/potted fern ? Link to comment Share on other sites More sharing options...
Luis95R Posted December 8, 2017 Author Share Posted December 8, 2017 (edited) Ah I see, and yes I feel like you might possibly be right about me needing to set up a symbol, but how do I create a symbol? Here's how the succulent anim on Spriter is like: https://prnt.sc/hkp471 It only has animation for 1 Succulent and I think the code takes care of the rest: require "prefabutil" local assets = { Asset("ANIM", "anim/succulent_potted.zip"), } local prefabs = { "collapse_small", } local function SetupPlant(inst, plantid) if inst.plantid == nil then inst.plantid = plantid or math.random(5) end if inst.plantid == 1 then inst.AnimState:ClearOverrideSymbol("succulent") else inst.AnimState:OverrideSymbol("succulent", "succulent_potted", "succulent"..tostring(inst.plantid)) end end local function onsave(inst, data) data.plantid = inst.plantid end local function onload(inst, data) Edited December 8, 2017 by Luis95R Link to comment Share on other sites More sharing options...
Lumina Posted December 8, 2017 Share Posted December 8, 2017 I confirm that the succulent plant is using symbol. You create a symbol by the folder name. If your folder is named flower, then the symbol will be flower. The names of image also need to be at the right format. It seems to be the case here. So i guess you need to adapt your code. What is your code looking like ? Link to comment Share on other sites More sharing options...
Luis95R Posted December 8, 2017 Author Share Posted December 8, 2017 Yeah thanks for helping me realize it was a symbol. Also the issue lied with the way I was doing the animation on Spriter. I needed to assign the unused flowers pivot points or they wouldn't be compiled into the anim file. That's why my atlas-0.tex file was only showing 1 flower. https://prnt.sc/hkxi3j It's working great now. Thank you for your help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now