I thought I had the perfect solution for an inventory interface but things haven't gone as expected.
I have 14 identical looking active objects which span across my screen (they are empty boxes) - these are the slots for my inventory's interface. I have a loop which counts the number of items in the inventory and works out how many pages it needs and populates them accurately with item descriptions which are inherited from a save file in the build directory.
For the icons, I created an active object called Inventory and I have made dozens of icons showing different items in which each item is displayed in a frame of animation. (Eg: Frame 1 is empty (no item in slot), Frame 2 is item 1, Frame 3 is item 2 etc...). In the loop, I create an icon for each slot and assign the item ID + 1 to the animation frame of that object... HOWEVER, every single icon is stuck on frame 1.
Is this because all instances of an object will display the same frame once one item is changed? I ran a condition which says "If icon overlaps Slot 1 then change to frame 2) etc... but none of them are showing anything other than frame 1.
Is there a way to solve this??
I really thought this would work because if you create 20 enemies from the same object and a bullet collides with it and you say "destroy", only that enemy is destroyed and not all of them, why can't I call an animation frame using the same principal? I know the collision with the slot is being detected because I logged an event in a list box every time it happened, yet the animation frame isn't changing, or they all change at once, I'm not sure which.