Volgera Posted May 20, 2015 Share Posted May 20, 2015 I'm trying to create a new item, but it doesn't show up on the ground, even though I created a proper anim for it. this is the code for the prefab I made, I don't think anything should be wrong with this. Does anyone have a clue what could be wrong?local assets={ Asset("ANIM", "anim/ironore.zip"), Asset("ATLAS", "images/inventoryimages/ironore.xml")}local function fn(Sim) local inst = CreateEntity() local trans = inst.entity:AddTransform() local anim = inst.entity:AddAnimState() MakeInventoryPhysics(inst) anim:SetBank("ironore") anim:SetBuild("ironore") anim:PlayAnimation("idle") inst:AddComponent("inspectable") inst:AddComponent("inventoryitem") inst.components.inventoryitem.atlasname = "images/inventoryimages/ironore.xml" inst:AddComponent("stackable") inst.components.stackable.maxsize = 20 return instendreturn Prefab( "common/inventory/ironore", fn, assets) Link to comment Share on other sites More sharing options...
Corrosive Posted May 20, 2015 Share Posted May 20, 2015 @Volgera, Inside the game, from the console do: c_spawn("iron_ore") Then close the console and press backspace to open the debug overlay. Check the top left. It will probably say the bank, animation, or build is missing. Link to comment Share on other sites More sharing options...
Volgera Posted May 20, 2015 Author Share Posted May 20, 2015 yeah the "idle" anim is missing... though I do have it in the ironore.zip in the anim folder :s the only thing I could imagine being wrong is the way I created the folder structure for the ironore. I based it on an equipable weapon (using ironore->ground_ironore->ironore.scml), but I never saw any other way of structuring those Link to comment Share on other sites More sharing options...
Volgera Posted May 20, 2015 Author Share Posted May 20, 2015 I fixed the issue I named the entity in spriter "ground_ironore" whether it was looking for "ironore" Link to comment Share on other sites More sharing options...
Seiai Posted May 20, 2015 Share Posted May 20, 2015 the folderstructure for the scml doesnt really matter. the filename of the spriterfile is the build and the bank is the foldername INSIDE of the spriterfile in the animationtab. if u cant figure it out, u could attach your mod, so we can have a look. Link to comment Share on other sites More sharing options...
Mobbstar Posted May 20, 2015 Share Posted May 20, 2015 the folderstructure for the scml doesnt really matter. the filename of the spriterfile is the build and the bank is the foldername INSIDE of the spriterfile in the animationtab.if u cant figure it out, u could attach your mod, so we can have a look. ehm.. I fixed the issue I named the entity in spriter "ground_ironore" whether it was looking for "ironore" Link to comment Share on other sites More sharing options...
Seiai Posted May 20, 2015 Share Posted May 20, 2015 ehm..#timestamp Link to comment Share on other sites More sharing options...
Corrosive Posted May 20, 2015 Share Posted May 20, 2015 the folderstructure for the scml doesnt really matter. The name of the folder that contains the set of images used in a spriter timeline actually gets translated into the symbol name by scml.exe. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.