Improved Interactions: Sounds Good


This morning I started thinking about my interactables and I realized that I had overlooked a few things while skipping others intentionally. So I jumped back in to make some major improvements! 

The first thing I did was add an interactable indicator, so the player is able to know at a glance that an object in the world is available to interact with. It's just a simple icon over the object, when the player gets in range (and it is the targeted interactable) it disappears and the interaction indicator appears in its place. They swap again when the interactable is no longer the target.

The next thing that occurred to me was sound. I wanted audible feedback for the player, and it was a simple add. Just added a new SFX, and attached a call to my audio manager to play it when the player interacts. Super quick and easy to do!

The final thing was the hardest, and making it work properly actually helped me find and fix a bug. I've added a simple string variable where I can type in an Item's ID and the interactable will add it to the player's inventory. There was a bug though, where I was accidentally clearing all item definitions when loading a saved game. Super-simple fix though, just don't bother clearing the inventory at all!

Of course, I also added a new item definition for this. I'm sure there's more I need to do related to this item, but for now it is successfully going into the player's inventory! This is another huge win. I guess my next step is going to be working on the dialogue system.

Leave a comment

Log in with itch.io to leave a comment.