Jump to content

How To: Crafting


Recommended Posts

In order to make a flexible system I'd have a list of all valid combinations of items and the result:


recipes = [

{ list: ["a", "b"], result: "c"},

{ list: ["a", "a", "c"], result: "d"},




Then it's just a matter of writing some code that runs every time the player's inventory changes which skims the recipe list to see if all the required items for any recipe are in the inventory.

Remember: the inventory changes after crafting as well as when the player picks something up!

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...