ZiggsZZoro Posted May 29, 2015 Share Posted May 29, 2015 i been makeing a charater for a little bit now and i wanted her to have a custom item i thought i had it all worked out but when i put her into the game i got this message Link to comment https://forums.kleientertainment.com/forums/topic/54555-help-plz/ Share on other sites More sharing options...
Blueberrys Posted May 29, 2015 Share Posted May 29, 2015 (edited) @ZiggsZZoro See this guide. You'll find an example like yours near the end.Provide your code if you need further assistance. Edited May 29, 2015 by Blueberrys Link to comment https://forums.kleientertainment.com/forums/topic/54555-help-plz/#findComment-641996 Share on other sites More sharing options...
ZiggsZZoro Posted May 29, 2015 Author Share Posted May 29, 2015 local assets={ Asset("ANIM", "anim/shusui.zip"), Asset("ANIM", "anim/swap_shusui.zip"), Asset("ATLAS", "images/inventoryimages/shusui.xml"), Asset("IMAGE", "images/inventoryimages/shusui.tex"),}local function fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() MakeInventoryPhysics(inst) inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddSoundEmitter() inst.entity:AddNetwork() inst.AnimState:SetBank("shusui") inst.AnimState:SetBuild("shusui") inst.AnimState:PlayAnimation("idle") if not TheWorld.ismastersim then return inst end local function OnEquip(inst, owner) owner.AnimState:OverrideSymbol("swap_object", "swap_shusui", "swap_shusui") owner.AnimState:Show("ARM_carry") owner.AnimState:Hide("ARM_normal") end local function OnUnequip(inst, owner) owner.AnimState:Hide("ARM_carry") owner.AnimState:Show("ARM_normal") end inst:AddComponent("inventoryitem") inst.components.inventoryitem.keepondeath = true inst.components.inventoryitem.imagename = "shusui" inst.components.inventoryitem.atlasname = "images/inventoryimages/shusui.xml" inst:AddComponent("equippable") inst.components.equippable:SetOnEquip( OnEquip ) inst.components.equippable:SetOnUnequip( OnUnequip ) inst.components.inventoryitem.keepondeath = true inst:AddComponent("inspectable") inst:AddTag("shadow") inst:AddComponent("weapon") inst.components.weapon:SetDamage(75) inst.components.weapon:SetRange(8, 10) inst.components.weapon:SetProjectile("koshka_projectile") if not inst.components.characterspecific then inst:AddComponent("characterspecific")end inst.components.characterspecific:SetOwner("koshka") inst.components.characterspecific:SetStorable(true) inst.components.characterspecific:SetComment("These seem heavier than they look.") return inst end return Prefab("common/inventory/shusui", fn, assets) Link to comment https://forums.kleientertainment.com/forums/topic/54555-help-plz/#findComment-642091 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