You're thinking of storing the level and item, but that's not really the way to think of it, although there are different ways of doing it. You don't need to search for a level, your level maps to the index in X -> LevelA is X=0, LevelB is X=1... Your items map to Y, ItemA is Y=0, ItemB is Y=1. So the statistics for Level B, Item C are always (1,2,z). The array only contains the stat data. You do need to know the Y index for each item though. You could alternatively store the item ID always at Z=0, so then you could search for it in Y, and your statistics would always be from Z=1, to ...
Thanks for the reply . I think I understand what you are getting at, but I still cant think how to get the data I'm after out of the array...
Maybe its because my system is actually slightly more complex than I initially indicated, maybe I'm just being dense. The 'items' (objects on the Y) aren't actually items at all. They are simply IDs which are assigned at run time as an object is created - they how I planned on connecting the data on the Z with the object I just spawned.
Basically I have items which I spawn in each level. I need to take information from an array and write it into those items instance variables. I'd like to just use one 3D array.
Is there a better way of doing this?
Thanks for your help, this is causing my a major headache!