Jump to content

Foodprefs compoment in RoG? Help please.


Recommended Posts

Hi,

 

 

So I'm trying to create some custom foods and I have a problem.

 

I include the:

table.insert(inst.components.eater.foodprefs, "STEAK")

for my custom character,

 

I have the onEat function:

if food and food.components.edible and food.components.edible.foodtype == "STEAK" then--do stuff

and I obviously also have the steak prefab which is edible. 

      inst:AddComponent("edible")    inst.components.edible.foodtype = "STEAK"

Also is it possible to alter hud.xml so that it would recognize a new element added to hud.tex?

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.

×
  • Create New...