Hey guys! I have another quick question, my game has an inventory that I have displayed to the screen. I would like the inventory to scroll along with the rest of the game like my health bar does. The inventory has 9 slots, and I also would like the slots to be clickable.
The issue I am currently having is getting the entire inventory to move with the screen. Also what would be recommended if I want the inventory able to be interacted with?
This is how I currently populate the bottom portion of the screen with blank inventory blocks:
for (var i:int = 0; i < 9; i ++)
{
add(new Inventory(200 + 32 * i, 448));
}
I tried messing with the FP.camera.x and FP.camera.y in the update function of the Inventory class but it then only makes one block appear. I am assuming that is because they are all stacking on top of each other since the actual X and Y locations are not being saved?
I am assuming some kind of array work?
Thanks in advance guys!