ffc script DungeonUnlock {
void run(int Item) {
if(Screen->State[ST_SECRET]) Quit();
while(true) {
if(<the big triggering conditional>😉 {
Screen->State[ST_SECRET] = true;
if(Item != 0) Link->Item[Item] = false;
Game->PlaySound(SFX_SECRET);
Waitframes(30); //greatly exaggerated for demonstration purposes
Link->PitWarp(Game->GetCurDMap(), Game->GetCurDMapScreen());
Quit();
}
Waitframe();
}
}
}This is my script to simulate those dungeon locks in the gameboy Zeldas. You know, the kinds that are on the overworld, and you need a unique key? Yeah, those.
The problem is that I play the Secret sound effect, but when I do the Pit Warp to trigger the secret flags, the sound is cut off!