Hello,
You need to load the sounds first.
sound.load("/sounds/sound1.wav");
Or whatever your sound path is. Then call play on the sound, or play_looped or any of the other play functions.


Casey Mathews wrote:
Hello all. I've really been working on this for a while. I'm trying some stuff just for my own personal understanding, and while I realize the function below isn't complete, I don't understand why none of the sounds play. The script runs, but the sounds don't play unless I put an alert box up first. Thanks for any ideas. Note: I do have a main function that works fine.

void borg()
{
background.play_looped();

int borg; //This will be the location of the borg on the sound scape.
borg=random(1, 3);
if (borg==1)
{
spon.pan=-100;
spon.play();
if (key_pressed(KEY_LEFT))
{
borgdown.play();
kills++;
alert("Kills","You killed "+kills+" borg.");

}
alert("OK","else");
} //end if
} //end borg

---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gam...@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.


---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gam...@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.

Reply via email to