DarkCrafter Posted January 11, 2015 Share Posted January 11, 2015 (edited) I tried to make a dupe of willow's lighter without any functions. Everytime i enable it, it crashes. The coding: ModmainPrefabFiles = { "lighter2"} Assets = { Asset("IMAGE", "images/inventoryimages/lighter2.tex"), Asset("ATLAS", "images/inventoryimages/lighter2.xml"), } GLOBAL.STRINGS.NAMES.LIGHTER2 = "The Darkened's Lighter"GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.LIGHTER2 = "It breathes darkness..." Lighter2.lualocal assets ={ Asset("ANIM", "anim/lighter.zip"), Asset("ATLAS", "images/inventoryimages/lighter2.xml"), Asset("IMAGE", "images/inventoryimages/lighter2.tex"),} local function fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddSoundEmitter() inst.entity:AddNetwork() MakeInventoryPhysics(inst) inst.AnimState:SetBank("lighter") inst.AnimState:SetBuild("lighter") inst.AnimState:PlayAnimation("idle") if not TheWorld.ismastersim then return inst end inst.entity:SetPristine() inst:AddComponent("inspectable") --inst:AddComponent("stackable") --inst.components.stackable.maxsize = TUNING.STACK_SIZE_SMALLITEM -- Remove the -- from the 2 lines above to make this item able to stack more than 1, TUNING.STACK_SIZE_SMALLITEM is 20 I believe. inst:AddComponent("inventoryitem") inst.component.inventoryitem.atlasname = "images/inventoryimages/lighter2.xml" inst:AddComponent("equippable") MakeHauntableLaunchAndIgnite(inst) return instend return Prefab("common/inventory/lighter2", fn, assets) --You might need to change "common/lighter2" not sure tho... Edited January 11, 2015 by DarkCrafter Link to comment https://forums.kleientertainment.com/forums/topic/48905-custom-item-crash-on-mod-enabling/ 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