Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

Link->Pitwarp() cuts off sound effects

2 replies · 978 views · Started 22 March 2009

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!

I'm not sure if this is really something that's fixable to be honest. All I can recommend for now is playing the sound effect after doing the pit warp somehow.

Yeah, I tweaked it so that when the script triggers again, it uses Screen->D[7] as a flag as to whether it needs to play the sound effect before quitting.