Page 1 of 2
Custom Sounds.
Posted: Sat Feb 07, 2004 9:27 pm
by Jack Ruby
I am trying to add some custom sounds.
Heres the script I am using:
main:
local.master = spawn ScriptMaster
local.master aliascache snd_pen sound/*****s/pen.mp3 soundparms 1.0 0.2 1.0 0.2 200 2000 auto loaded maps "obj dm"
local.master aliascache snd_pen2 sound/*****s/pen2.mp3 soundparms 1.0 0.2 1.0 0.2 200 2000 auto loaded maps "obj dm"
level waittill spawn
$penspeaker1 loopsound snd_pen
$penspeaker2 loopsound snd_pen2
end
I cant hear the sounds ingame, the console shows me this error:
ERROR: Entity::LoopSound: snd_pen needs an alias in ubersound.scr or uberdialog.scr - Please fix.
Anyone have any idea whats going wrong here ?
Excuse me putting this in the wrong forum, shoulda been scripting I guess.
Posted: Sat Feb 07, 2004 9:33 pm
by tltrude
Is the sub folder really named "*****s"? Try this:
main:
local.master = spawn ScriptMaster
local.master aliascache snd_pen sound/*****s/pen.mp3 soundparms 1.0 0.2 1.0 0.2 200 2000 auto loaded maps "obj dm"
local.master aliascache snd_pen2 sound/*****s/pen2.mp3 soundparms 1.0 0.2 1.0 0.2 200 2000 auto loaded maps "obj dm"
level waittill prespawn
thread start_sounds
level waittill spawn
end
start_sounds:
wait 1
$penspeaker1 loopsound snd_pen
$penspeaker2 loopsound snd_pen2
end
Posted: Sat Feb 07, 2004 9:41 pm
by Jack Ruby
Thanks Tom, yes that folder really was called *****'s only for testing purposes right now though.
Still no sound, the console now tells me this:
ERROR: Entity::LoopSound: snd_pen needs an alias in ubersound.scr or uberdialog.scr - Please fix.
$penspeaker2 loopsound snd_pen2 (maps/obj/mp_naziare_obj.scr, 19)
$penspeaker2 ^
^~^~^ Script Error: command 'loopsound' applied to NULL listener
Posted: Sat Feb 07, 2004 9:57 pm
by crunch
Did you spawn the penspeakers into the map?
send
Posted: Sat Feb 07, 2004 9:57 pm
by tltrude
Can you send me the script and sounds?
Posted: Sat Feb 07, 2004 10:22 pm
by Jack Ruby
Crunch, I inserted the script models into the .map, didnt spawn them.
Tom, I zipped the sound files and the script ( which is what you just posted for me ), you can grab them
HERE
worked
Posted: Sat Feb 07, 2004 11:15 pm
by tltrude
I just tried them in my mp_ambient2 tutorial map (Mohaa) and they worked fine. So, maybe it is your speakers. I like using 16X16X16 script_object brushes with nodraw texture and notsoild set.
I don't know if your map is Spearhead, but I think there is a problem with the work around in spearhead maps. Search the forum, if that is the case.
Here is the tutorial map.
http://files.filefront.com/1435845
Posted: Sun Feb 08, 2004 12:08 am
by Jack Ruby
Thanks for your time Tom.
The map is indeed for spearhead, earlier I found a thread by JV over at TMT about radio's and spearhead, I cant find the damn thing now.
I will keep on hunting for it.
Thanks again for your help.
Posted: Sun Feb 08, 2004 7:37 am
by jv_map
Well naming a folder '****' is definately a bad idea and I'm surprised your windows doesn't complain about it
Anyway you risk that mohaa 'reads' **** as multiply multiply multiply multiply instead of a folder name, so try:
"sound/*****s/pen.mp3"
instead.
Also, check your entire console (maybe make a log) to see if the ScriptMaster code is producing any errors.
Posted: Sun Feb 08, 2004 11:49 am
by Jack Ruby
Jv the folder isnt named with those asterisks, somehow this forum changed my typing into those, the folder is actually just named as my name.
The log file tells me this error which I posted above:
ERROR: Entity::LoopSound: snd_pen needs an alias in ubersound.scr or uberdialog.scr - Please fix.
$penspeaker2 loopsound snd_pen2 (maps/obj/mp_nazaire_obj.scr, 19)
$penspeaker2 ^
^~^~^ Script Error: command 'loopsound' applied to NULL listener
It is for spearhead, so is there anything else I should be doing ?
Posted: Sun Feb 08, 2004 4:18 pm
by jv_map
The ScriptMaster work-around doesn't work for Spearhead

Posted: Sun Feb 08, 2004 9:47 pm
by Jack Ruby
Thats a crying shame it wont work for spearhead.
However I found a thread at TMT where you posted this map Jv,
Soundmap
It works in spearhead but I was thinking is there a way to trigger the sound without pressing the switch, is there a way I could have the player walk through a trigger which would activate the sound, in this case I would only want it to be triggered to play once, the actual sound would loop but the trigger would only work once, that make sense ?
Trigger_multiple
Posted: Mon Feb 09, 2004 11:13 am
by tltrude
Trigger_multiple is a "walk-in" trigger. If you have these key/values it will run your sound thread and only be triggered one time.
Key: setthread
Value: start_sounds
Key: count
Value: 1
Posted: Mon Feb 09, 2004 11:52 am
by Jack Ruby
Thanks a million Tom, its working perfectly now
Cheers.
Posted: Mon Feb 09, 2004 12:56 pm
by Jack Ruby
Well it seemed to be working perfectly
If I rename the files from soundmap to mp_nazaire_obj the sound wont trigger, I also renamed the tiki in models and got the precache to search for the renamed tiki, why would just renaming it stop the sounds from playing, I'm sure its something simple as it works fine with the original name of soundmap.