Page 1 of 1

[SOLVED] Need help getting a sound to play

Posted: Mon Oct 15, 2012 6:56 pm
by SpiderFighter
Sorry for the newb behavior. I can work plates, timers and counters like nobody's business, but when it comes to scripting...well, let's just say I'm a Giant Snail in a world full of all you Cubes. I've checked the resources and the superthread, but I'm having difficulty just getting the game to call a predefinied sound and, while I can find plenty of info that assumes you already know how to call that sound, I can't find anything that tells you the basic function, so I'm certain I'm doing something wrong.

What I have is a simple script entity in the map itself, triggered by a hidden touchplate:
SpoilerShow
-- Thasoraa script
function Thasoraa()
playSound("secret")
hudPrint("NPC says something potentially useful here.")
end
The hudPrint works fine, but the playSound does nothing at all. Can one of you code warriors please point me in the right direction?
[EDIT]: I did have a second "end" command, but the editor returned an error when I ran it.

Re: Need help getting a sound to play

Posted: Mon Oct 15, 2012 7:04 pm
by Belblindd
There's no error within the script, I copied it and it worked perfectly fine.
I don't know what could possibly be the error here.
Did you connect it properly to the plate?
Or did you set the sound to mute? Because when you decreased the volume ingame, it's decreased in the editor as well.

Re: Need help getting a sound to play

Posted: Mon Oct 15, 2012 7:17 pm
by SpiderFighter
Belblindd wrote:There's no error within the script, I copied it and it worked perfectly fine.
I don't know what could possibly be the error here.
Did you connect it properly to the plate?
Or did you set the sound to mute? Because when you decreased the volume ingame, it's decreased in the editor as well.
Hmm..weird. No, my volumes are all up. Maybe I need to restart the editor. It should be connected fine to the plate, as it prints the text to the screen just fine.

I appreciate you testing this! Be right back after I restart.

[EDIT]: Yep, that did it! How odd. Sorry to waste your time!! Kinda feel stupid that I had to ask for help when I actually had it right. :P Thanks again!