Jump to content

What is OnCreate code used for?


blackteapie

Recommended Posts

It's an event throw when you create a recipe, check lua/server/recipecode.lua to have some example :)

Thank you.

Then,what is the difference between the recipes with oncreate feature and those without?I saw many recipes don't have oncreate code,in recipes.txt.

Link to comment
Share on other sites

 

It's an event throw when you create a recipe, check lua/server/recipecode.lua to have some example :)

Thank you.

Then,what is the difference between the recipes with oncreate feature and those without?I saw many recipes don't have oncreate code,in recipes.txt.

 

 

Maybe it's used  to subtract durability from items that were kept in a recipe?

Link to comment
Share on other sites

It's an event throw when you create a recipe, check lua/server/recipecode.lua to have some example :)

Thank you.

Then,what is the difference between the recipes with oncreate feature and those without?I saw many recipes don't have oncreate code,in recipes.txt.

Maybe it's used to subtract durability from items that were kept in a recipe?

not very understand what you are saying.
Link to comment
Share on other sites

 

 

 

It's an event throw when you create a recipe, check lua/server/recipecode.lua to have some example :)

Thank you.

Then,what is the difference between the recipes with oncreate feature and those without?I saw many recipes don't have oncreate code,in recipes.txt.

Maybe it's used to subtract durability from items that were kept in a recipe?

not very understand what you are saying.

 

Maybe, when a recipe is completed, and you used twine (but specified to keep it in the recipe)....

 

You could use the OnCreate code to remove from the remaining twine in a spool. ._.

Link to comment
Share on other sites

 

 

 

 

It's an event throw when you create a recipe, check lua/server/recipecode.lua to have some example :)

Thank you.

Then,what is the difference between the recipes with oncreate feature and those without?I saw many recipes don't have oncreate code,in recipes.txt.

Maybe it's used to subtract durability from items that were kept in a recipe?

not very understand what you are saying.

 

Maybe, when a recipe is completed, and you used twine (but specified to keep it in the recipe)....

 

You could use the OnCreate code to remove from the remaining twine in a spool. ._.

 

Maybe....

I need to check the recipes first. 

Link to comment
Share on other sites

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