I know how much you all love helping out with problems so I've another question for you.
My brother is making a game where you walk around picking up weapons which you can use in the game. If you press "1" then it selects weapon 1, pressing "2" selects weapon 2 and so on.
Well he wants to create it so if you press a button (eg "+") then it will cycle through the weapons and pick the next one. This would be easy(ish) if you started the game with all the weapons but as you pick them up along the way then you might not have them all.
So you have weapons 1, 3 and 4. "1" is currently selected. When you press "+" it should check and realise you don't have "2" so it should set the weapon to "3". How can we do this?
With my limited knowledge I can create it but it requires massive amounts of code. Is there a way it can be done using loops or something like that requiring only a few lines of code, and if so how would I do it?
Thanks!