Jump to content

Item doesn't show up on ground in-game


Recommended Posts

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

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

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

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

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.

×
  • Create New...