Why not just write a file with the info needed for the next chapter, that then gets read at run time? file not there = no way to play = auto-quit chapter (or just show a screen that one needs to complete the previous chapter before starting on the next).