kinglim1224 Posted February 22, 2017 Share Posted February 22, 2017 (edited) I was able to eat nightmare fuel but My friend could not eat the nightmare fuel. How should I fix it? Help Codes --PUT THE CODE BELOW IN MODMAIN.LUA local FOODTYPE = GLOBAL.FOODTYPE FOODTYPE.SHADOW = "SHADOW" AddComponentPostInit("eater", function(self) function self:SetCanEatShadows() table.insert(self.preferseating, FOODTYPE.SHADOW) table.insert(self.caneat, FOODTYPE.SHADOW) self.inst:AddTag(FOODTYPE.SHADOW.."_eater") end end) AddPrefabPostInit("nightmarefuel", function(inst) if not GLOBAL.TheWorld.ismastersim then return inst end inst:AddComponent("edible") inst.components.edible.foodtype = FOODTYPE.SHADOW inst.components.edible.healthvalue = 5--CHANGE THESE 3 VALUES TO ANYTHING YOU WANT inst.components.edible.hungervalue = 10 inst.components.edible.sanityvalue = 15 end) --PUT THE CODE BELOW IN YOUR CHARACTER.LUA (in master_postinit) inst.components.eater:SetCanEatShadows() Edited February 22, 2017 by JoeW formatting Link to comment Share on other sites More sharing options...
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
Already have an account? Sign in here.Sign In Now