Thunderhelm Posted November 12, 2018 Share Posted November 12, 2018 Hi, I'm new to modding but I know a bit of lua. I'm trying to make a character named Fluffy, a magic teddy bear who only eats magic gems. I've been trying for a while, and it's stopped crashing but the character won't eat the healing gem, they just inspect it. How do I make them eat the gem? In my character file: inst.components.eater:SetDiet({ FOODGROUP.OMNI }, {FOODTYPE.GEMS, FOODTYPE.GOODIES }) inst.components.eater.foodprefs={FOODTYPE.GEMS} In my item file inst:AddComponent("edible") inst.components.edible.foodtype = "GEMS" inst.components.edible.healthvalue = 50 inst.components.edible.hungervalue = -50 inst.components.edible.sanityvalue = 0 Thanks in advance. Link to comment Share on other sites More sharing options...
Thunderhelm Posted November 12, 2018 Author Share Posted November 12, 2018 I found the issue, adding the GEMS food type to the first table seemed to have fixed it. Link to comment 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