incognitox Posted February 5, 2015 Share Posted February 5, 2015 Hey Guys, i need a help I need when my character eat a seed, he still more fast! Like inst.components.locomotor.runspeed = 20 But i can't make this work's, can u guys help me? Thx Link to comment https://forums.kleientertainment.com/forums/topic/50565-need-help-with-my-character-mod/ Share on other sites More sharing options...
Blueberrys Posted February 5, 2015 Share Posted February 5, 2015 (edited) @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 February 9, 2015 by Blueberrys Link to comment https://forums.kleientertainment.com/forums/topic/50565-need-help-with-my-character-mod/#findComment-610127 Share on other sites More sharing options...
incognitox Posted February 5, 2015 Author Share Posted February 5, 2015 @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 Link to comment https://forums.kleientertainment.com/forums/topic/50565-need-help-with-my-character-mod/#findComment-610133 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