play sound on exit..?

Started by Matt Brown, Sat 14/06/2003 19:06:00

Previous topic - Next topic

Matt Brown

hey, if I wanted to play a sound everytime the player quit the game, to I just slap a Playsound(1); and a Wait(whatever) in the game script, or do I need to do something else?
word up

Scummbuddy

put those in right before the quit game command, and it seems like it would work just fine.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Matt Brown

#2
whoa, that was quick.

thanks, I'll do that.

;D

EDIT:

no dice

else if (button == 6)    // save game
     SaveGameDialog();
   else if (button == 7)   // load game
     RestoreGameDialog();
   else if (button == 8)   // quit
     PlaySound(1);
     Wait(420);
     QuitGame(1);
   else if (button == 9)    // about
blah blah blah

I get a parse errror around the second else if...what do I do?

word up

scotch

#3
You need to put {}s around that bit where there's two commands for the one if.

else if (button == 6) // save game
SaveGameDialog();
else if (button == 7) // load game
RestoreGameDialog();
else if (button == 8) // quit
{PlaySound(1);
Wait(420);
QuitGame(1);}
else if (button == 9) // about
blah blah blah

Matt Brown

ah, thank you much. I'll add that in there
word up

SMF spam blocked by CleanTalk