custom sounds not working

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
ernst
Sergeant
Posts: 52
Joined: Thu Aug 03, 2006 6:00 pm
Location: Windsor ON Canada
Contact:

custom sounds not working

Post by ernst »

after searching all the posts and tuts, i found some very usefull information, but all to no avail....

i have a custom sound which is wav. its in sound/fx

its for a set of sliding doors i have created for the dm map i am working on. here is what i have done

in my script added this.

Code: Select all

local.master = spawn ScriptMaster

local.master aliascache snd_siloalarm sound/fx/siloalarm.wav soundparms 1.1 0.2 0.8 0.2 160 1600 auto loaded maps "obj dm"

level waittill spawn


end
for my sliding door in the entity window i added

Code: Select all

key: sound_close_end 
value: snd_siloalarm

key: sound_close_start 
value: snd_siloalarm

key: sound_open_end 
value: snd_siloalarm

key: sound_open_start 
value: snd_siloalarm

key: classname 
value: func_door

key: spawnflags 
value: 0

key: speed 
value: 12

key: targetname
value: silo1

key: angle
value: 0

i thought i was doing everything right, but when the map loads and i trigger the door, i have no sound. and there are no errors in console.
prior to doing this i had the wooden door sounds of course, but now none... i know the keys i added above will overide the wooden door sounds, but i thought it would be with the sound i replaced it with.

i also tried setting the sound value to just

Code: Select all

 siloalarm
but only then got the error in console saying

Code: Select all

ERROR: Entity: siloalarm needs an alias in ubersound.scr or uberdialog.scr - Please fix
i am at a loss, any suggestions.

should mention i have tested the .wav file and it works fine as far as i know... i even created a test map and had the same problems, also tried another wav file and still no go
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

SH

Post by tltrude »

Is your map Spearhead or Mohaa?
Tom Trude,

Image
ernst
Sergeant
Posts: 52
Joined: Thu Aug 03, 2006 6:00 pm
Location: Windsor ON Canada
Contact:

Post by ernst »

mohaa sorry forgot to mention
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

test

Post by tltrude »

Try this line in your script as a test.

local.master aliascache snd_siloalarm sound/mechanics/M1_LightTurn.wav soundparms 1.2 0.0 1.0 0.0 500 5000 item loaded maps "dm moh obj train"

Also move the local master lines above prespawn and below the setcvar lines.
Tom Trude,

Image
ernst
Sergeant
Posts: 52
Joined: Thu Aug 03, 2006 6:00 pm
Location: Windsor ON Canada
Contact:

Post by ernst »

thanks tltrude,

it worked when i did the above, but didnt work when i replaced the light sound with my wav.

im wondering... the wav file was originally an mp3, converted to wav. could that be the problem?

obviously something is not right with my wav file unless there is another problem
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

If you have a 'level waittill prespawn' line in your script, place the aliascache line above it. If that doesn't fix the problem, the .wav file isn't valid. It should be 16 bit, mono and 11, 22 or 44 kHz.
Image
ernst
Sergeant
Posts: 52
Joined: Thu Aug 03, 2006 6:00 pm
Location: Windsor ON Canada
Contact:

Post by ernst »

If that doesn't fix the problem, the .wav file isn't valid. It should be 16 bit, mono and 11, 22 or 44 kHz.
jv and tltrude thank you both.

that was the problem. tltrude's original suggestion of placing the local.master lines above prespawn and jv you were right, the the file was formatted in 44khz 16 bit stereo. a quick conversion to mono solved the problem.

thank you both, you truly saved my sanity lol!!!

p.s.

once my map is finished, where can i send it to get reviewed?? if thats still done anymore??

this is my first map im actually going to finish, so many projects started but restarted lol. couldnt have done it without all the tuts and posts in here either.

----

if i could ask help on another thing....

just not sure if this is can be done strictly through radiant or if i am going to have to script part of it,


in addition to the door being on a trigger_use can i not add in a light to blink once the door is being opened and closed?

by removing the trigger_use and replacing with a trigger_multiple
door and light will have same target name
what im not sure on is the coding for the light to actually blink.
i have created the light, fixture and corona that i want to use,
with the entity window for the light and corona, can i achieve the blinking or will this be done in my script?

should mention this will need to be done 8 times, for 8 different silo doors and all of them are independant of each other.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

light

Post by tltrude »

First, I think you should download a couple of my tutorial maps.

This tutorial map has around 35 doors you can study or just copy. Some of them are very different from your normal mohaa doors! The zip file contains the .map file, a playable pk3, and a text version of the script.

door2
Image


This tutorial map has a fireworks rocket launcher. The firework entities have a few new corrona colors and dynamic lights. A .map file, a playable pk3, and a text version of the script are included.

test_pointer
Image


When your map is done, you should send it to a few friends for testing. Then, when the bugs are fixed, release it to the public.
Tom Trude,

Image
ernst
Sergeant
Posts: 52
Joined: Thu Aug 03, 2006 6:00 pm
Location: Windsor ON Canada
Contact:

Post by ernst »

great thank you for the advice, i will check out the tut maps,

so in there i should find some way of having a light turn on and blink, by using the same switch controlling the door?
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

light

Post by tltrude »

There is a blinking red light on top of the lighthouse.
Tom Trude,

Image
Post Reply