Jump to content

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?

Edited by D4rk0

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...