diovbc Posted February 5, 2017 Share Posted February 5, 2017 Hey guys. I'm struggling a bit to limit my character's diet to a herbivore. I've pretty much succeeded on it by now, using the code line " inst.components.eater:SetDiet({FOODGROUP.OMNI}, {FOODTYPE.VEGGIE, FOODTYPE.SEEDS, FOODTYPE.GENERIC}) " It works perfectly... or almost. My character still eats butterfly wings. How could i make my character to NOT eat those things? It makes no logical sense to leave it like it is by now xD Ty. Link to comment https://forums.kleientertainment.com/forums/topic/73829-butterfly-wings/ Share on other sites More sharing options...
CarlZalph Posted February 5, 2017 Share Posted February 5, 2017 @diovbc According to the butterflywings prefab file they're considered a veggie. But this should be a workaround by hooking the eater component's PrefersToEat function in your character's master postinit or after the eater component is added. local PrefersToEat_old = inst.components.eater.PrefersToEat inst.components.eater.PrefersToEat = function(self, beingeaten, ...) if beingeaten.prefab=="butterflywings" then return false end return PrefersToEat_old(self, beingeaten, ...) end Link to comment https://forums.kleientertainment.com/forums/topic/73829-butterfly-wings/#findComment-863965 Share on other sites More sharing options...
diovbc Posted February 5, 2017 Author Share Posted February 5, 2017 (edited) @CarlZalph Worked perfectly. Thank you very much! I don't get why the butterfly wings are considered as veggies xD This topic can be closed now. Edited February 5, 2017 by diovbc Link to comment https://forums.kleientertainment.com/forums/topic/73829-butterfly-wings/#findComment-864023 Share on other sites More sharing options...
SrNomercy Posted February 6, 2017 Share Posted February 6, 2017 @CarlZalph Can you help me on this perks: Gain Sanity from Plant & havest farmplot. ?! Link to comment https://forums.kleientertainment.com/forums/topic/73829-butterfly-wings/#findComment-864158 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