I use quite a lot of globals. Why? Because its far easier when variables are regularly needed by a range of different functions. You have two choices. Pass variables from function to function, or make them global.
For temporary variables (Such as 'For X = 1 to 10') - I would define the X as Local within a function, for instance. Reason being, I may use that variable in many different functions, but its a generic variable that I would use for many purposes.
What I DO tend to do, is have, for example, a tScore type. Within that type, I can add various fields pertaining to the game scoring system. Then at the start, all I need to do is create one tScore object, and I can access all the score variables from there. But I digress.
For temporary variables (Such as 'For X = 1 to 10') - I would define the X as Local within a function, for instance. Reason being, I may use that variable in many different functions, but its a generic variable that I would use for many purposes.
What I DO tend to do, is have, for example, a tScore type. Within that type, I can add various fields pertaining to the game scoring system. Then at the start, all I need to do is create one tScore object, and I can access all the score variables from there. But I digress.