[SOLVED] Need help getting a sound to play

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
SpiderFighter
Posts: 789
Joined: Thu Apr 12, 2012 4:15 pm

[SOLVED] Need help getting a sound to play

Post 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.
Last edited by SpiderFighter on Mon Oct 15, 2012 7:20 pm, edited 1 time in total.
Belblindd
Posts: 27
Joined: Tue Oct 09, 2012 4:13 pm

Re: Need help getting a sound to play

Post 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.
User avatar
SpiderFighter
Posts: 789
Joined: Thu Apr 12, 2012 4:15 pm

Re: Need help getting a sound to play

Post 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!
Post Reply