Custom Sounds.
Moderator: Moderators
Custom Sounds.
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.
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.
Philip II of Macedon sent a message to Sparta:
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
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
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
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
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
Philip II of Macedon sent a message to Sparta:
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
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
Tom, I zipped the sound files and the script ( which is what you just posted for me ), you can grab them HERE
Philip II of Macedon sent a message to Sparta:
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
worked
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
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
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.
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.
Philip II of Macedon sent a message to Sparta:
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
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.
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.
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 ?
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 ?
Philip II of Macedon sent a message to Sparta:
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
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 ?
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 ?
Philip II of Macedon sent a message to Sparta:
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
Trigger_multiple
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
Key: setthread
Value: start_sounds
Key: count
Value: 1
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.
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.
Philip II of Macedon sent a message to Sparta:
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".


