Trouble adding custom Door Sounds

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Stevo
Corporal
Posts: 38
Joined: Tue Dec 16, 2003 8:31 pm
Location: Florida, USA
Contact:

Trouble adding custom Door Sounds

Post by Stevo »

Hey,

I've been working on adding my own door sounds to a map of mine, but I'm not getting very good results. I've tried specifying the sounds in the editor with keys such as start_open_sound, but it doesn't work.

The sound's filename is SteveDoorGEMachine.wav
It's located in \sound\mechanics (I've tried it in a .pk3 as well as out)

The code I use in my map's .scr is


local.master = spawn ScriptMaster

local.master aliascache md01 sound/mechanics/stevedoorgemachine.wav soundparms 1.2 0.2 0.8 0.2 160 1600 item loaded maps "dm obj "



Can anyone help me? What am I doing wrong? Is it even possible to make custom door sounds? I've never seen any map that does it.

I assume there is a way to do it OTHER than editing ubersound.scr, because editing ubersound isn't practical, right?

Thanks for any consideration.
-Stevo
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

One thing you could try is try using a different stock sound file for the door. There could be a problem with the file format or your SteveDoorGEMachine.wav.

Also, is the ScriptMaster code above level waittill spawn? Is this for a multiplayer mohaa map? Do you see any (unusual) error messages in the console? Finally, be aware that the start_open_sound is only played for a very short amount of time when using a fast opening door.

btw welcome .map :D - I like new members ;)
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

key

Post by tltrude »

Here are the "key" names you can try (you have it backwards, btw):

"sound_close_end( String sound_close )Sets the sound to use when the door closes.
"sound_close_start( String sound_close ) Sets the sound to use when the door closes.
"sound_locked( String sound_locked ) Sets the sound to use when the door is locked.
"sound_message" ( String sound_message ) Sets the sound to use when the door displays a message.
"sound_open_end" ( String sound_open_end ) Sets the sound to use when the door stops to opens.
"sound_open_start" ( String sound_open_start ) Sets the sound to use when the door starts to opens.

So it would be like this:

Key: sound_open_start
Value: md01
Tom Trude,

Image
Stevo
Corporal
Posts: 38
Joined: Tue Dec 16, 2003 8:31 pm
Location: Florida, USA
Contact:

Post by Stevo »

Fast replies! Awesome.

Ok, heres some more info I should have included before:

the sound is PCM,44,100 Hz, 16 Bit, Mono

That's what it needs to be, right?

Here's my full .scr:

main:
level.script = maps/dm/facility.scr
level.music = mp_facility_dm

setcvar "g_obj_alliedtext1" "Facility"
setcvar "g_obj_alliedtext2" "by Stevo"
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "facility"

level waitTill prespawn

exec global/ambient.scr facility
exec global/DMprecache.scr
exec global/door_locked.scr

level waittill spawn

local.master = spawn ScriptMaster

local.master aliascache md01 sound/mechanics/stevedoorgemachine.wav soundparms 1.2 0.2 0.8 0.2 160 1600 item loaded maps "dm obj "

end


Yes, it's multiplayer. I have both the expansions installed, and no, I keep checking the console, but it's not telling me anything. Also, the door move-time is 3 seconds, so it's pretty long (slow mechanical doors).

The closest I got to a "result", strangely, was when i used the key \ value sound_open_start \ global md01
when I used this key\value on a door, it wouldn't play MY sound, but instead it WOULDN'T play ANY sound at all when the door opened! All my other feable attempts end with the dissappointing MOHAA default door sounds.

I checked the scriptmaster code by putting in a looping ambient, and that worked, so i really don't think anything is wrong with that -- that is, of course, if scriptmaster is even what i should be using for the door sounds.

Also, thanks for the reply Tom, but I already know all those, and sound_open_start \ md01 is what i've been using (along with other variations). Sorry if i didn't explain that well enough.

Thanks for the welcome! I've always been reluctant to enter forums... but this one seems really good.

Thanks for all the help so far!

Oh! also, have any of you guys made your own custom door sounds work before? if you have, would it be possible for you to send me the map as an example or something?
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Put this:

local.master = spawn ScriptMaster

local.master aliascache md01 sound/mechanics/stevedoorgemachine.wav soundparms 1.2 0.2 0.8 0.2 160 1600 item loaded maps "dm obj "

above 'level waittill spawn'

:wink:
Image
Stevo
Corporal
Posts: 38
Joined: Tue Dec 16, 2003 8:31 pm
Location: Florida, USA
Contact:

Post by Stevo »

Sorry to be a pain, but...
That did absolutely nothing. Have you ever actually used your own door sounds before?
I really need a concrete example.

Thanks, though.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

sound

Post by tltrude »

If your new sound is not compatable with the game, there should be an error in the console.

Try this:

==============================

main:
level.music = mp_facility_dm // <--does this work?

setcvar "g_obj_alliedtext1" "Facility"
setcvar "g_obj_alliedtext2" "by Stevo"
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "facility" //<--requires image and shader to work

local.master = spawn ScriptMaster
local.master aliascache md01 sound/mechanics/stevedoorgemachine.wav soundparms 1.2 0.2 0.8 0.2 160 1600 item loaded maps "dm obj "

level waitTill prespawn

exec global/DMprecache.scr
exec global/ambient.scr facility //<--background sound needs facility.mus file to work
exec global/door_locked.scr::lock
level.script = maps/dm/facility.scr

level waittill spawn

end

==============================

Did you fix the key/value for the door entity?
Tom Trude,

Image
Stevo
Corporal
Posts: 38
Joined: Tue Dec 16, 2003 8:31 pm
Location: Florida, USA
Contact:

Post by Stevo »

Perhaps I've been unclear again, Tom, because you're still not addressing the issue.

The problem is NOT with the music file,
nor is there any problem with the scoreboard picture OR its shader,
nor is there any problem whatsoever with the backround ambients.
AND there has never been, and never will be, any problem with the doors' key\value (which has always been sound_open_start\md01).

The Console reports no errors.

The sound IS compatible.

Does anyone have, or know of, a map that uses custom door sounds?

or

has anyone actually ever gotten their own custom doors sounds to work?

Please give me a direct answer.
Thanks.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

script

Post by tltrude »

Did you try the script?--I rearranged some of the lines. I have changed door sounds before, but not with a custom sound. If you want to post/e-mail the sound wav file, I'll try making a test map for you.

One way to tell if it is the wav file or the script is to subsitute an original game sound. I use "lighthouse_run" a lot because it does not require a local.master alias. Here is a map that uses it: http://pages.sbcglobal.net/tltrude/Temp/door2.zip . The "manhole" elevator is really a func_door.
Tom Trude,

Image
Stevo
Corporal
Posts: 38
Joined: Tue Dec 16, 2003 8:31 pm
Location: Florida, USA
Contact:

Post by Stevo »

Okay cool, this is a start.

I've used stock sounds with sound_start_open before, too, and it worked... Which confuses me even more.

Yes, I tried the script you posted, but no result, sadly. I will give the substitution a try, though.

I really like the test map, by the way! Very inventive! I especially likened to the folding stair case.

I uploaded my sound:
http://www.geocities.com/soccerplyr86/S ... achine.wav

You should recognize it easily. I really hope you can do something with it.
Thanks.
Stevo
Corporal
Posts: 38
Joined: Tue Dec 16, 2003 8:31 pm
Location: Florida, USA
Contact:

Take your time. Happy Holidays!

Post by Stevo »

Alright, take your time Tom. I have to be gone until either the 29th or the 30th, so i'm going to be gone for a while. Thanks for all the help you've offered so far.

my e-mail is soccerplyr86@yahoo.com if you get it working and want to send me it before I get back.

Happy Holidays!
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

link

Post by tltrude »

The link is no good. Geocities wont let you post a file--only webpages.
Tom Trude,

Image
Stevo
Corporal
Posts: 38
Joined: Tue Dec 16, 2003 8:31 pm
Location: Florida, USA
Contact:

Post by Stevo »

Sorry about that. I e-mailed you the sound now. If you can't get it to work - though I hope you can - I suppose I can always just script it to trigger an ambient sound... It would be a pain, but I need this sound for the map to jive right.

Thanks
Post Reply