Quick Actions: Assigned!


I'm Sick

Not sure what happened but I came down with something yesterday. Slight fever, headache, congestion, it sucked. Luckily, the worst of it seems to have passed while I slept, though I'm still not feeling 100% yet. I didn't let that stop me from working on the game though. I made some big decisions about the quick action buttons and I really wanted to get them implemented, and (spoiler warning) I did!

Quick Action Button Assignment

It took a little bit of work, but I have modified my quick action button assignment function to allow for assigning all sorts of things, instead of just items. Now, when I have skills, they can be assigned to the button, or even other things I haven't even thought of yet. This required nesting another dictionary inside of the existing dictionary, which was a bit of a mind puzzle. I had to really think about the best approach to storing and retrieving the data. 

I updated the function itself to accept another parameter, for the "type" of action being assigned, defaulting to "item" since that's all I have right now. I put the action type, along with the action id, into a dictionary keyed for the specific scene, into my variable holding the individual button's assignment. During the process, I'm also checking the other three button's assignments, using the same data, to make sure there's no duplication. If it exists, it just simply clears the entry for that scene.

I did have to rely on Gemini to help me figure out the proper way to access the data, don't want to cause any crashes trying to access a dictionary value. But in the end, the testing shows it works exactly how I want it to! There is still the matter of updating the buttons when they're assigned, and actually making the buttons do something. But that's a problem for future me!

Next Time

So, what's left to do? Well, I mean, finish the game. . . But really, in relation to the quick action buttons I've still got a lot of work to do. I need to add a public method to my ui manager to force a ui refresh and I need to update my hud prefab to listen for the signal to update the quick action buttons. I need to force a signal when the button assignment is set. I need to build out the system with which to update the quick action buttons. I need to build out the function for each button and connect them to it. So much to do, but I'm patient. Everyday I'm a winner! I'm really excited for the direction of this project.

Leave a comment

Log in with itch.io to leave a comment.