Niels
Member
Hi all,
For my game I want the players to be able to switch weapons.
I might pull it off with a switch and different scripts for different weapons, and I know how to use switches, but I have the feeling a array would be more effective in the long run. Problem is that (while I watched some videos on it) I don't understand how to implemt arrays yet.
Basicly I need the following variables for every weapon:
Damage
Clipsize
Current ammo in clip
Ammo (amount)
X coordinate of end of barrel
Y coordinate of end of barrel
Sprite of guniet
So is it worth diving into arrays for this, or will a switch work just as good?
For my game I want the players to be able to switch weapons.
I might pull it off with a switch and different scripts for different weapons, and I know how to use switches, but I have the feeling a array would be more effective in the long run. Problem is that (while I watched some videos on it) I don't understand how to implemt arrays yet.
Basicly I need the following variables for every weapon:
Damage
Clipsize
Current ammo in clip
Ammo (amount)
X coordinate of end of barrel
Y coordinate of end of barrel
Sprite of guniet
So is it worth diving into arrays for this, or will a switch work just as good?