How to cycle through weapons
I have 3 weapons that I want to cycle through and this system is working fine, but I want to be able to add a store where you start the game with only one and then after purchasing the other 2 weapons, you can cycle through. Right now, I have an attribute "weaponNum" with rules stating if weaponNum = 1 change to weapon 1, if weaponNum =2, change to weapon 2 and if weaponNum = 3, change to weapon 3. When the "Cycle Weapons" button is touched, weaponNum + 1. If weaponNum>3, weaponNum=1. This all works, but I am not sure how to approach taking away all but weapon 1 and how to add the other two weapons. What if weapon 3 is purchased before weapon 2 and vice versa. I am not sure if I explained that well, but I hope some can make sense of that. Does anyone have any suggestions on how to go about doing this? Thank you.
Comments
You need either a table or attributes where the weapon purchased is stored.
Two booleans
Weapon 2
Weapon 3
Add those conditions to your rules where appropriate.
So say where weapon number = 2 add the condition when weapon2 is true.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS