whatdothhappen Posted April 22, 2016 Share Posted April 22, 2016 i'm attempting to make a character that will only eat rot and refuses to eat anything else, and i've got the "refuses to eat anything else" part down, but they'll also refuse to eat rot someone help Link to comment https://forums.kleientertainment.com/forums/topic/66539-what-is-rots-foodtype/ Share on other sites More sharing options...
Mobbstar Posted April 22, 2016 Share Posted April 22, 2016 You'll need to specifically allow those foods. There's similiar threads doing the same for eggs, etc. Link to comment https://forums.kleientertainment.com/forums/topic/66539-what-is-rots-foodtype/#findComment-754051 Share on other sites More sharing options...
DarkXero Posted April 22, 2016 Share Posted April 22, 2016 Rot's foodtype is "GENERIC", since after AddComponent("edible") in spoiledfood.lua there is no specification. So you need to make a distinction between prefabs, and not foodtypes. local function caneattest(inst, food) if food.prefab == "spoiled_food" then return true end return false end inst.components.eater:SetCanEatTestFn(caneattest) Link to comment https://forums.kleientertainment.com/forums/topic/66539-what-is-rots-foodtype/#findComment-754056 Share on other sites More sharing options...
whatdothhappen Posted April 22, 2016 Author Share Posted April 22, 2016 i've managed to make the .lua for the food, thanks Link to comment https://forums.kleientertainment.com/forums/topic/66539-what-is-rots-foodtype/#findComment-754433 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