This question is for those with formal programming knowledge.
I know that it is advisable to limit the number of global variable, that said I have a question on how to handle a situation.
I have 10 turrets, each turret can be level 1-10.
The game is multiplayer, and loads via ajax the opponents turrets and level.
All good so far, but a level 1 turret fires a bullet with 5 damage per second (dps). A level 10 turret fires a bullet with 100 dps.
Each Turret has to have the dps information loaded some how.
My question revolves around the "On Created" condition (or another if someone knows a better way).
Possible solutions:
1. An Event sheet that has ALL of the turret information as global variables. This works fine and have used it before.
2. Put all of the information in the turret (or a new sprite as a placeholder and keep things "clean"). (Use instance Variables)
Anyway, just looking for a clean way of handling this, because in reality I have 100 turrets.
Thanks in advance!