state("XionLeak") { byte inLevelTransition : 0x01E80A10, 0x2B0, 0x150, 0x108, 0xB0, 0x58, 0x20, 0x50; byte inCutscene : 0x01E80A10, 0x2B0, 0x150, 0x108, 0xB0, 0x58, 0x20, 0x68; byte inLevel : 0x01E80A10, 0x2B0, 0x150, 0x108, 0xB0, 0x58, 0x20, 0x80; byte inWorldMap : 0x01E80A10, 0x2B0, 0x150, 0x108, 0xB0, 0x58, 0x20, 0x98; byte isGameFinished : 0x01E80A10, 0x2B0, 0x150, 0x108, 0xB0, 0x58, 0x20, 0xB0; } start { // Start when entering the 1st level after the title transition return old.inLevelTransition == 1 && current.inLevelTransition == 0 && current.inLevel == 1; } split { // Triggers split when returning to the worldmap (usually after finishing a level or when arriving in a new biome) // Triggers also at the end of the game when ending rocket cutscene begins return (old.inWorldMap == 0 && current.inWorldMap == 1) || (old.isGameFinished == 0 && current.isGameFinished == 1); } isLoading { // Pause during transition, cutscune, score menu, new powers menu, etc. (globally when the players have no control on their characters return current.inLevelTransition == 1 || current.inCutscene == 1 || (current.inWorldMap == 0 && current.inLevel == 0); }