Jump to content

Quick Food Question - Cookable


MidrealmDM

Recommended Posts

I was trying to make a food item that can be cooked/roasted at the camp fire.

 

I created prefabs for the 'food' and 'food_cooked'

 

And then added these lines into the food.lua

    inst:AddComponent("cookable")
    inst.components.cookable.product = "food_cooked"

 

When I try to cook the food at the fire, the animation works (Wilson cooks at the fire)

but then instead of getting the cooked version Wilson announces "I can't do that."

The original food is removed from inventory.

Link to comment
Share on other sites

Check if all prefab are working correctly with DebugSpawn command. The second prefab may have some errors that cause this.

 

Yep - I was so convinced it was the code I didn't bother to check the item.

Miss one little thing and it all goes to crud.

 

Thanks again.

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...