goldfish911 Posted November 19, 2013 Share Posted November 19, 2013 So,I am confused on how to make a character not only a carnivore, but also have sanity gain from raw meats. I know to make it consume just meat(and some other things), I have to do something like//in scripts/prefabs/webber.luainst.components.eater.foodprefs = { "MEAT", "SEEDS", "GENERIC" }But how do I make my character say a string when the player tries eating something not in their diet without consuming it? Link to comment https://forums.kleientertainment.com/forums/topic/29830-how-to-make-my-custom-character-a-carnivore/ Share on other sites More sharing options...
Developer Cheerio Posted November 19, 2013 Developer Share Posted November 19, 2013 So,I am confused on how to make a character not only a carnivore, but also have sanity gain from raw meats. I know to make it consume just meat(and some other things), I have to do something like//in scripts/prefabs/webber.luainst.components.eater.foodprefs = { "MEAT", "SEEDS", "GENERIC" }But how do I make my character say a string when the player tries eating something not in their diet without consuming it?Try using the 'Eater:SetCanEatTestFn' to write your own test to see if you can eat the item and if not, have the player say something. Link to comment https://forums.kleientertainment.com/forums/topic/29830-how-to-make-my-custom-character-a-carnivore/#findComment-373665 Share on other sites More sharing options...
NikMik Posted November 19, 2013 Share Posted November 19, 2013 I've made a carnivore character before.I put this component in the stats section of his prefab.The lines are to represent the health, sanity, tags, etc. --Stats--------------------------------------------------------------------------------------------------------Carnivore, can only eat meat. Can Eat Monster Meat. inst.components.eater:SetCarnivore() inst.components.eater.strongstomach = true Sorry for the lousy, errh... layout? Damn, I'm stupid today. Link to comment https://forums.kleientertainment.com/forums/topic/29830-how-to-make-my-custom-character-a-carnivore/#findComment-373670 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