Dev Log 2


Introduction

Hello, welcome to my second dev log about my Coding 2 project. These last few weeks have been really fun as I learn more about widgets interacting with items and creating items that interact with the player and world around them. So let's get straight into it.

Items

In addition to the key and door I created earlier, I added 2 new items to add some ideas for future gameplay. I added a grenade and a gun. They are both very simple right now, using a BPI_Item to easily add functionality and transfer quickly to new items. Both are able to be picked up, dropped, and used with left click. Currently, left click only prints text with either "Kaboom" or "Pow" depending on which weapon you use and where it's aimed.  But I hope to expand on this later: sound effects, niagras, and maybe even a way to hit something are all aspects I'm curious about how to implement and hope to do in the future.


These items utilize the same basic coding inside the key used for the doors and keys that were set up previously. They also utilize the line trace that was also implemented in my first dev log.

Inventory

The other major thing we worked on was creating an inventory for both a shopkeeper and the player. I created widgets for the Inventory slot, Inventory grid, shopkeeper menu, player inventory, and a drag preview. All of these fulfill different purposes and build off of each other to create the inventory in-game you can see now.


As you can see here and in the video- the items can be moved around into different slots and will stay when you close out. In the image below you can see that even when I open just the player inventory the item stays where it was after messing with it.


There was quite a bit of coding going on here to make this all work, but here's a snippet of what we created to make the shopkeeper work and the inventory itself.




Closing Thoughts

This sprint of work has been really cool. Learning about not only widget making, but also a functional inventory system is just really fun and something I would have never thought to learn about if it wasn't a part of the curriculum. I'm excited to see what we work on next, as for now we finish all of this up and package this into a cool tidbit of code.

Leave a comment

Log in with itch.io to leave a comment.