Unlock-able Images (achievements)

Hey Everyone,

I’m new to the forums and trying to create a basic achievement system. Basically I have an array that creates a bunch of “trophy” images and that works fine. Then another array that creates “locked” images that goes on top of the “trophy” ones. When certain character traits reach a certain amount I want to be able to click the “locked” image and have it disappear revealing the “trophy” image underneath.

I have a similar post in the GUI section but i’m not sure if the GUI is the best way to do this because since all of the “lock” images use the same texture. Removing that texture clears them all instead of just one. I’ve tried tons of different approaches but none seem to work right.

Can someone provide insight into how to create a very basic achievement system similar to this?

Create an array of textures, an array of booleans (same size, all set to false), and a variable for the locked image.

Set the booleans to true as items are unlocked.

In OnGUI, iterate over the boolean array, and if true, use the respective texture in the array, else use the locked image.

Or you could create a Trophy class that has texture and locked properties.

You can follow this tutorial from cgcookie:
http://cgcookie.com/unity/2011/12/16/creating-an-achievement-system/