I am planning on using an array to handle my weapon inventory, selection, and ammo for my game. I have it set up to be 6 x 3 x 1
I am new to arrays so bare with me. As I have it set up now, I have a row setup for checking if the weapon is collected. 1 being yes and 0 being no. I was planning on using this method to make it easy to cycle through weapons.
[attachment=1:2908ih39][/attachment:2908ih39]
Basically I was planning this:
Global Variable :
selectedWeapon = ""
OnStart:
Set up array
On collection of weapon add to the array & update ammo on weapon selection
[attachment=0:2908ih39][/attachment:2908ih39]
Weapon selection (basic)
Cycle down
on 1 pressed | subtract 1 from selectedWeapon
- selectedWeapon = 1 | set selectedWeapon to 6
Cycle Up
on 2 pressed | add 1 to selectedWeapon
- selectedWeapon = 6 | set selectedWeapon to 1
On cycle check for available weapons
Array Check for value at (0,2) = 0 | got to next weapon
Array Check for value at (0,2) = 1 | select weapon
Which is rather redundant to create a bunch of event to check for a value.
My question is how do I check all of the values in the row I have designated for setting if weapon is collected?
Thanks