Good morning/afternoon/night community
I have been struggling to set up few conditions for my first game and cannot find the right/easy solution for this. I am asking for help, I’m sure there is an easy way there but my brain is stuck on this one.
I am setting up a button for swapping between weapons/typeofammo as in the style of ZombievilleUSA and many other games. (Upper left button click). Once you touch on it will change to the next weapon/ammo previously purchased.
-Each weapon has its own TypeOfAmmo ,Upgrades etc (WEAPON01, WEAPON01AMMO, WEAPON01Upgrade1, WEAPON01Upgrade2 etc),. and every upgrades has its own bullet damage.
At the beginning of the game you just have one weapon, and so the condition to swap between weapons is depending on a variable that is comparing a variable of the total number of weapons purchased with a variable of the Number of Ammo that you are selecting. That is working for me so far.
However, with this system lets say you purchase the WEAPON2-> the next weapon will show up the N_AMMUNITION = 2 with its characteristics. That is ok.
But if instead of purchasing the WEAPON2 you purchase the WEAPON3-> the next weapon will show up the N_AMMUNITION=2 with its characteristics…
So this system does not work for me then. I guess Im not putting the right variables or the logic behind its wrong for sure.
Any bright mind can give me a hand on this??
Many thanks to the Community