Throughout the last Weeks and this week i spent a long time trying to make sure that inventory was working while also doing other stuff and now this week even with all the problems i had with the inventory I finally finished what i had planed for it and am happy with the result. What was the main issue was with the slots not changing color and the scrolling feature i wanted was not working out which what i planned it to do was when u move far to the left of the inventory and press the button while your on the last slot in that row you while loop around to the slot in the front of that row and same with scrolling up and down. The last other issue i was having was that the page and image on the right wasn't updating the way i intended which was to make the box on the top show the same sprite that the player was currently hovering over in the inventory slot and the other thing was giving a description of the item the player was currently hovering over at the same time but both were erroring because of index out of range errors which were about the spot i was currently hovering over would break the game because there was not item in the slot and u were still able to move to the slot.
While having this error i managed to fix it by setting the players inventory spot to always start at 0 and also to make sure that i cant give the information on that slot of the inventory if the list isn't big enough so it can only grab the slots it knows and nothing more while also changing the text mesh pros text to be the text we used to describe the pick ups from the tech doc and whenever u hover over the inventory item u change the alpha values of the border of the inventory slot to look like your hovering over it.
author: Anthony Perez
Posted on 4/26/2024
Did you like this post? Tell us
Leave a comment
Log in with your itch.io account to leave a comment.