Drag and Drop 'Crafting' System

16

Index

Attached Files

The following files have been attached to this tutorial:

.c3p

alchemystylecrafting.c3p

Download now 187.8 KB

Stats

5,325 visits, 10,043 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 5 Nov, 2020.

Before we dive into the actual events, I'm going to take a moment to look at the "Items" project file. This JSON file stores data about each individual item as well as the recipes that dictate which items can be combined.

Items and recipes are each stored in an array within the JSON file that is then referenced at various points in the event sheet. The "items" section stores the item's ID, Display Name, Animation Name and Animation Frame. In this example, our animations are just single frames, so Animation Frame is not really used, but it's a good option to have.

The second array in the JSON file stores the recipes that define which items can be combined to produce something else. A recipe is simply defined as ID1, ID2 and ResultID – when it comes to crafting, if the two overlapping items match ID1 and ID2 then a new item matching ResultID is spawned.

  • 3 Comments

  • Order by
Want to leave a comment? Login or Register an account!