Script for collectiong keys to escape

In my game, the character (first person) must collect 5 keys from random places on the large map, and when he collects them, escape from a door. Script?

I’m not sure you’ll get anyone to write you an entire script, but that shouldn’t be too hard to do. Have you done any scripting before? If not, go check out this tutorial: Newbie Guide to Unity Javascript.

Here’s a thought on how to solve your particular project, too: declare 5 boolean variables, one for each key. Set a collider around the key, so that when you touch it it flips the variable it’s associated with. Once all 5 booleans are flipped, the door opens.

Anyways, go run through the tutorial, try your hand at writing that out, and post your results if you run into issues :slight_smile:

Here, I think I got one for you. Email me at carrandrew1@gmail.com