Code: Select all
require "subclass/startup"
Code: Select all
currentLevel = "level_1"
multiplayer = 1
players = {}
If a variable is not defined as local, it is global to the entire game. It doesn't matter which file it is defined in. Think in terms of functions, not files.
Edit: following statement is false, apparently.
So, if you want a variable to be local to a file, you have to make sure that file's contents are inside a big function, otherwise it is effectively global again (it's effectively local will refer to the whole program, if I remember correctly).