When I declare a variable in my function LevelDraw(), and run the level, it works fine.
But then, if I quit and reload the level, all the variables that were learned from the previous time I played are still there!
This is a problem because it stops new things being procedurally generated. When the level loads, I want to say "if init == nil then" run a whole bunch of math.randoms to procedurally generate stuff, as well as setting "init" to = 1. That way the code should only be run once. But when I do this inside a LevelDraw, it remembers the values of all variables between plays. :/
This is hard problem to explain.. :P