How to make certain collectibles have to be unlocked before being able to be picked up?

I’m still a very early beginner, and I’m 13. But I was intrigued by game developing and scripting. I’m trying to make a game for little kids about the ABC’s and numbers, where you have to pick 1 before 2 etc. I’m trying to do that over the Roll-A-Ball project, but the scripting is kinda hard. If anyone can, please let me know how to be able to do that. Thanks in advance. :smiley:

To get you started … have a script something like this

NeedTracker:MonoBehaviour
{
public bool userHasGotThisOneAlready
}

(I leave it to you as an exercise to get the syntax right.)

Now, put that on all the objects (the “A”, “B”, “C” etc.)

Arrange so that when the user clicks on one (say “B”), it sets that boolean as true.

As you do this (press Play and try it), keep an eye on the Inspector of the various items, notice how the boolean is being affected.

This will set you off on the right track. Notice that basically when the user clicks on say “C”, you in fact have to check those booleans … in that example you’d have to be sure “A” and “B” were already true. Right?

Knock yourself out :slight_smile: