Page 1 of 1

Adding Existing Sounds to Stuff (Bare with me lol)

Posted: Mon Feb 16, 2004 4:52 pm
by Shifty
Hi

I've built a metal sliding door which is situated on the floor and leads down to the sewers/underground currently it just plays the normal door sound (not good) but i've found something i'd like to use its in pak3.pk3 -> mechanics -> Fence_Open.wav

I've done some looking around here so would it be something like this in the script

Code: Select all

$the_door loopsound Fence_Open
If so how do i connect the script to this item? do i have to make it say a script object if so how i'm a bit rusty on this????

Cheers

Shifty

Posted: Mon Feb 16, 2004 4:59 pm
by jv_map
Use a script_model with model fx/dummy.tik. Give it a targetname like 'doorsound'.

Then type:
$doorsound playsound mycoolcustomdoorsoundaliasname

To define the mycoolcustomdoorsoundaliasname alias, use the 'new' ubersound work-around method as described in the sticky over at the scripting forum, or read the custom sounds tutorial.

Note that this applies to mohaa only, not to sh or breakthrough.

Posted: Mon Feb 16, 2004 8:13 pm
by M&M
im just curious but doesnt the door have a key in the entity window that changes the sound ?i think it was called door_open or something like that,there is also another one for closing

Posted: Mon Feb 16, 2004 8:14 pm
by Axion
If you want the dooor to just play a generic metal sound, enter this in the entity window-

doortype metal

Posted: Mon Feb 16, 2004 8:20 pm
by M&M
yeah ,thats what i ment :wink:

speaker

Posted: Tue Feb 17, 2004 7:14 am
by tltrude
I wouldn't add a speaker, as jv_map said, because the normal sounds will still be heard as well--using a func_door.

Here are the key/values to change the sounds of the door.

Key: sound_close_end
Value: snd_step_paper // null.wav to kill normal sound

Key: sound_close_start
Value: fence_roll_open

Key: sound_open_end
Value: snd_step_paper // null.wav to kill normal sound

Key: sound_open_start
Value: fence_roll_open


Now that you have "fence_roll_open" in the door entity, you need to make that alias work for your map's game type--normally only works for map m2l2 (singleplayer), as you can see in this line from the ubersound script.

aliascache fence_roll_open sound/mechanics/Fence_Open.wav soundparms 1.2 0.0 1.1 0.0 160 1600 item loaded maps "m2l2 "

To fix it, you'll need to add this above "level waittill prespawn" in your map's script.

Code: Select all

local.master = spawn ScriptMaster
local.master aliascache fence_roll_open sound/mechanics/Fence_Open.wav soundparms 1.2 0.0 1.1 0.0 160 1600 item loaded maps "m dm obj train "
Hope that helps!