BGT: Playing don't work, why?

Yes, i doing something in this language because i must.
Why this code  don't work? After pressed 1 sound work but other keys not.
I tried with {} and without but no resulds.
void ms()
{
mmusic.stop();
sound1.load("sound1.ogg");
sound2.load("sound2.ogg");
sound3.load("sound3.ogg");
while(true)
if(key_pressed(KEY_1)) {
sound1.stop();
sound2.stop();
sound3.stop();
sound1.play_looped(); }
if(key_pressed(KEY_2)) {
sound1.stop();
sound2.stop();
sound3.stop();
sound2.play_looped(); }

if(key_pressed(KEY_3)) {
sound1.stop();
sound2.stop();
sound3.stop();
sound3.play_looped(); }
if(key_pressed(KEY_ESCAPE)) {
sound1.stop();
sound2.stop();
sound3.stop(); }
mainmenu();
}

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : dash via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Rastislav Kiss via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : dash via Audiogames-reflector

Reply via email to