Question on Mutually Exclusive Object pickups

Talon
13 Feb 2016, 00:34
I'm a very new person to the program and just really started exploring it a few days ago, so be kind if this is a dumb question

I have done very little programming in my time though I suppose I know a bit, in any case I've been alot of fun working with this program, it just has let my creativity soar. I've come up with a quandary..

The setting is this, I've hidden a number of "Snap Bands" of various colors around the location, I want to make it so the player can only get one. Once a person has a snap band they are treated differently by the various npcs (Ie one might attack if you had a red, but let you go if you had a green), The effect I'm aiming for is once one band is found all the rest become invisible and effectively out of the game
I've Tried this by using "If statements that are nested, so if player has Red, they can't grab Yellow It works, and is easy, however as I plan on having a half dozen bands the number of IF's i'd have to use seems excessive..

Is there a way in making one script where I can essentially have it checking for multiple items in an inventory? The way mentioned seems pretty lacking in elegance.

Talon
13 Feb 2016, 00:38
...I feel like an idiot,i just decided to try making one of the bands turn all the others invisible and just copy the code there to the others, changing the names.. this should work