Jump to content

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) 

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

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.

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"

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...