Custom Sounds.

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

Moderator: Moderators

User avatar
Jack Ruby
General
Posts: 1443
Joined: Fri Feb 07, 2003 12:20 am
Location: london

Custom Sounds.

Post 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.
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".
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Post 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
Tom Trude,

Image
User avatar
Jack Ruby
General
Posts: 1443
Joined: Fri Feb 07, 2003 12:20 am
Location: london

Post 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
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".
crunch
Major
Posts: 348
Joined: Sat Jun 14, 2003 2:34 pm
Location: USA
Contact:

Post by crunch »

Did you spawn the penspeakers into the map?
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

send

Post by tltrude »

Can you send me the script and sounds?
Tom Trude,

Image
User avatar
Jack Ruby
General
Posts: 1443
Joined: Fri Feb 07, 2003 12:20 am
Location: london

Post 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
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".
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

worked

Post 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
Tom Trude,

Image
User avatar
Jack Ruby
General
Posts: 1443
Joined: Fri Feb 07, 2003 12:20 am
Location: london

Post 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.
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".
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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.
Image
User avatar
Jack Ruby
General
Posts: 1443
Joined: Fri Feb 07, 2003 12:20 am
Location: london

Post 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 ?
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".
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

The ScriptMaster work-around doesn't work for Spearhead :cry:
Image
User avatar
Jack Ruby
General
Posts: 1443
Joined: Fri Feb 07, 2003 12:20 am
Location: london

Post 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 ?
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".
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Trigger_multiple

Post 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
Tom Trude,

Image
User avatar
Jack Ruby
General
Posts: 1443
Joined: Fri Feb 07, 2003 12:20 am
Location: london

Post by Jack Ruby »

Thanks a million Tom, its working perfectly now :)

Cheers.
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".
User avatar
Jack Ruby
General
Posts: 1443
Joined: Fri Feb 07, 2003 12:20 am
Location: london

Post 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.
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".
Post Reply