Hello everyone! Today, I made progress on the back end of crafting - building the core functionality for it to work. Specifically, I finished a script that was intended to be finished years ago - the DELITEM script. In crafting, there are two essential scripts that I needed. I attempted to finish crafting when the project first developed, but gave up because I was frustrated. These two scripts are the ADDITEM and DELITEM scripts. I completed the ADDITEM script easily - it's the script that adds an item to your inventory. To craft an item, both scripts must be utilized - the DELITEM script to remove the ingredients of a crafting recipe from the player's inventory, and the ADDITEM script to add the newly crafted item to the player's inventory. The DELITEM script also gives a value of '0' if it doesn't detect the proper materials to craft the item, and a '1' if it detects the proper materials. Today, I've split the two functions of the DELITEM script into two scripts: the EXISTITEM script and the DELITEM script. The DELITEM script deletes items, while the EXISTITEM script checks if certain items exist. For example, here's the code for a torch's crafting recipe. All three scripts must be used to craft the item.
Expect a development video tomorrow about this. Until then, see you later!
0 Comments
Leave a Reply. |
TaskFebruary's task is to improve the combat system and create a system for enemies and their AI.
AuthorThe author of the blog is Alec. He posts weekly, usually on the weekends on Saturday. CategoriesArchives
March 2020
|