Arrays in C3 can only hold values, not objects. So to try to store sprites in an array is impossible...
If I were going to try and put together a scene with key items placed randomly, that the player needs to spot and then click on, I would probably try this approach first:
- have a single sprite for all the items in your game ( depending on how many there are, this may be inefficient ), then load the items for a given scene into an animation in that sprite, that way, for a single scene, you're simply creating instances of that sprite, and setting the frame of that scene's animation to match the item you want to display.
- create those sprite instances with randomized placement ( you can randomize along a tile grid size of your choosing, all the way down to individual decimals between pixels, it depends on what you like the look of )
- fill the array with the frame numbers (or InstanceID's) of the items you want the play to find
- when the player clicks on an item, loop through the array to see if any of the stored values match the item clicked. If there's a match, remove the item from the scene ( I like to make things invisible rather than destroy them ) and update the player's progress ( score, items remaining, etc ), and if there's not a match, simply do nothing, or maybe penalize the player somehow ( set a timer so they can't click again until the timer is up to prevent spam clicking, or maybe have strikes where if you have a wrong click, it counts as a strike, 3 strikes and the player it out kinda thing )
That's where I'd start. I'd only use the array to hold the values to check against when the player clicks an item. Everything else is all is stuff that can be done pretty simply at the start of a scene. Hope this helps :)
EDIT: I just re-read the initial post and think I may have misunderstood slightly, I'll leave the original reply in case its still applicable
If you want the array to store the mystery and hint, then I'm assuming you're simply storing text?
eg:
mystery = "I sit with my hands on my face"
hint = "I'll always have time for you"
answer = image of a clock ( this can be the animation from or InstanceID I was referring to above
So I'd set this up so that each of these values would have its own Y coord in the array, so Y0 is all of the mysteries, Y1 is all the hints, Y2 is all the InstanceIDs of the item image you want to display.
Then each X of the array is a different mystery. That way when a new scene starts, you can use smart random ( so it won't pick a number that's already been chosen) to select an X coord in the array, then you just look at each Y value for the different parts of the mystery itself.
Does that help?