Jump to content

Recommended Posts

@incognitox

 

Eater component (See the SetOnEatFn function)

 

You'll need to check if the food item's prefab is "seeds" in the OnEat fn.

local function OnEat(inst, food)    if (food.prefab == "seeds") then        -- ...    endend-- ...-- In character create fninst.components.eater:SetOnEatFn(OnEat)
Edited by Blueberrys

 

@incognitox

 

Eater component (See the on SetOnEatFn function)

 

You'll need to check if the food item's prefab is "seeds" in the OnEat fn.

local function OnEat(inst, food)    if (food.prefab == "seeds") then        -- ...    endend-- ...-- In character create fninst.components.eater:SetOnEatFn(OnEat)

Thx for this link, i'm studying the Lua language, so your link help me a lot to input these things in don't starve

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...