Jump to content

Recommended Posts

I had two questions on making an edible item. 

1: do all foods have to have the spoiled food prefab? (the food im making really doesnt spoil)

2: if I wanted it to have more then one use, is there any resources or links out there on how to do that? 

(the food is in a jar, I made a full, half full, and empty png, im just not sure entirely on how to enter the variable or the value of said variable for that) 

Link to comment
https://forums.kleientertainment.com/forums/topic/53979-making-a-food-item/
Share on other sites

1: No, food can be edible without being spoilable.

 

2: No idea, what might be the difference between a pickle jar of 4 uses and 4 stacks of pickles though?

well, if they where pickles, yah! but imagine if it where say, a bag of chips. something like that (its not a bag of chips,:-/)

  1. It doesn't need to turn to rot when spoiled, look up the perishable component for further reference (I might explain it on the API docs later today)

The eater component removes the item no matter what. You can try to use oneaten to spawn a half jar of jam, I guess.

u could maybe also make it stackable up to 4 items, and update the inventoryimage everytime the stacksize changes? the stackable component probably has an event u can listen for or an function u can override.

That maybe the answer. I have the artwork done, all I have to do is include it in the file. Do I need to add anything to the sprinter file?

do u only want the different stages of emptiness only in the inventory, or also on the ground?

if u want it on the ground, u need different folders(banks) in spriter and then change the bank in the code.

if u want it in the inventory, u just need to change the inventoryimage(which doesnt have to be in an animationfile at all).

do u only want the different stages of emptiness only in the inventory, or also on the ground?

if u want it on the ground, u need different folders(banks) in spriter and then change the bank in the code.

if u want it in the inventory, u just need to change the inventoryimage(which doesnt have to be in an animationfile at all).

 

getting into a wierd place with scripting now. Could it be possible to declare a variable that could handle both? 

 

so say its potato chips (i should really make a potato chip mod now) 

 

I would need something like a potato chip action bank?

Edited by RedRock911

getting into a wierd place with scripting now. Could it be possible to declare a variable that could handle both? 

 

so say its potato chips (i should really make a potato chip mod now) 

 

I would need something like a potato chip action bank?

A what? I thought your plan is to cook 4 "bags of chips" at once and have them change texture depending on whether theres 1,2,3, or more on that stack. That doesn't require actions! Just hook up component callbacks and event callbacks to update the texture when needed (you can change the animation and inventory icon at any time).

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