So I’m working on a project for school, and part of it is to have a player collect 5 keys. I wanted to go above what I assume is the standard for the class, and make the game as well designed as possible. One of the ideas I had to do that included the idea that, once a key is obtained, all copies of that same key would be destroyed. The idea here was that, if this were a live game, a player can’t find some way to clone the same key 5 times to get all 5 keys required, as getting one of those 5 would destroy the other 4. Here’s the code I had, but unfortunately it only destroys the key the player collided with.
Note I’m sure this looks entirely newbish, like I said I’m in school and this is for a class, I’m very new at this.