Also remember that if you run a level with a script attached, it actually doesn't run the level at all: it runs the script, which is then given the responsibility to load the level. Thus you must use a level_load() statement in your function main() to load the level when you run the script through the level editor.
It's confusing, I know.
