Diet Modification Help


Naidingo

Recommended Posts

I am trying to make my character have negative affects from eating fruits/veggies and be able to eat monster meat just like regular meat. This is the coding I have written for it at the moment, but it does not work. It doesn't crash the game but none of the affects I tried to write are going off and not sure what the problem is. Is anyone able to help point out what I did wrong?

 

 

post-588148-0-67247400-1423439298_thumb.

Link to comment
Share on other sites

@Naidingo, welcome!

 

Here's a bit of code to get you started.

inst.components.eater.old_Eat = inst.components.eater.Eatinst.components.eater.Eat = function(self, food)    -- Do your stuff here        inst.components.eater:old_Eat(food)end

Read the "Tables as objects (and how to modify their functions nicely)" section of this guide for more information.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.