Jump to content

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.

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.

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