Problem with 'local sound' need some help pls

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
StevenSct
Lance Corporal
Posts: 17
Joined: Tue Jul 29, 2008 9:19 am
Location: France

Problem with 'local sound' need some help pls

Post by StevenSct »

Hi all,

So, I start mapping since some days, and I have one worries which I would like to solve :?
I would like to put some sound (like singing of birds), which could be heard in a local area only. Local sound.
But I have try everything, made and done again the tutoral about that, and nothing work :( :cry:

I thinks there's some point I didn't understand, and I really need help. Or is there some other way to make those 'local sounds'?

Sorry for my bad English :?

Thanks you.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Hi Steven,

Welcome to .Map :)

I take it you are trying the Adding Custom Sounds tutorial?

Could you specify which part/step of it you do not understand, or what error messages you get (if any)? Make sure to look in the console (~ key), after the map has loaded, scroll all the way up and look for error messages.
Image
StevenSct
Lance Corporal
Posts: 17
Joined: Tue Jul 29, 2008 9:19 am
Location: France

Post by StevenSct »

Thanks :)

Hum yes, exactly. About the mapping part, I think there is no problem (scrips/model with key/value: model/fx/dummy.tik and targetname/riverspeaker and ALWAYS_DRAW checked).
In script part, I create a new file (Notepad2), named 'terre_son.scr' :


main:

local.master = spawn ScriptMaster

ocal.master aliascache snd_river sound/amb/Amb_RainPlant_01.wav soundparms 1.0 0.2 1.0 0.2 200 2000 auto loaded maps "obj dm"

level waittill spawn

$riverspeaker loopsound snd_river

end



which is saved in the same folder than the '.bsp' file of the map (.../main/maps). I just changed 'sound/amb/river.wav' for 'sound/amb/Amb_RainPlant_01.wav, because I didn't have the 'river.wav' file.
Then, I compile and test my map, but... nothing, no sound.


I don't understand anymore, probably when you start speaking about 'ubersound.scr' file.

About the console,Is it the same that we can open with '2'?
Anyway I didn't manage to find it with '~' key. If it is important, my keyboard is azerty, probably that '~' is not at the same place or something else.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Hi StevenSct,

Maybe it's a copy+paste error but 'ocal.master' should obviously be 'local.master'. Contrary to the tutorial I would suggest replacing the final bit:

Code: Select all

(...) maps "obj dm"
to the safer alternative:

Code: Select all

(...) maps (getcvar mapname)
This will make it work for both single player and multiplayer maps. What you had originally is only valid for multiplayer maps in the dm or obj folder.

Other than that everything seems fine, you need not worry about ubersound.scr. It ought to work like this.

I'm not sure which key to press for the console on an azerty keyboard. Maybe ask one of our German members (e.g. wacko) if any are still active.
Image
StevenSct
Lance Corporal
Posts: 17
Joined: Tue Jul 29, 2008 9:19 am
Location: France

Post by StevenSct »

Hi Jv,

I tried everything, but nothing work... :cry:

Is there another way to put a local sound? Multiplayer map (dm).
StevenSct
Lance Corporal
Posts: 17
Joined: Tue Jul 29, 2008 9:19 am
Location: France

Post by StevenSct »

Same for custom sounds? :?:
Tazz
Second Lieutenant
Posts: 155
Joined: Fri Feb 16, 2007 1:29 pm
Contact:

Post by Tazz »

hey man did u save ur custom file to that path?...u said
I just changed 'sound/amb/river.wav' for 'sound/amb/Amb_RainPlant_01.wav,
....is that where ur sound is?......also...u might want to save ur map and ur .scr file to mohaa/main/maps/dm to get all ur sounds working.....when i was mapping i wouldnt get sounds until i loaded everything in the dm folder....not sure why but everyone told me to make sure was there and then i got all my sounds back.....try that and it should get ur sounds in for ya



good luck
StevenSct
Lance Corporal
Posts: 17
Joined: Tue Jul 29, 2008 9:19 am
Location: France

Post by StevenSct »

I have a sounf named 'Amb_RainPlant_01' in Main/sound/amb, my map and my '.scr' are in Main/maps/dm (and compliled), but this still doesn't work :evil:
User avatar
Gold
First Lieutenant
Posts: 176
Joined: Sun Sep 28, 2003 8:10 pm

Post by Gold »

post your script maybe there is a error somewere else in it thats stopping it from working
StevenSct
Lance Corporal
Posts: 17
Joined: Tue Jul 29, 2008 9:19 am
Location: France

Post by StevenSct »

My map is called 'terre_son', my script 'terre_son.scr':

main:
local.master = spawn ScriptMaster
local.master aliascache snd_river sound/amb/Amb_RainPlant_01.wav soundparms 1.0 0.2 1.0 0.2 200 2000 auto loaded maps (getcvar terre_son)
level waittill spawn
$riverspeaker loopsound snd_river
end


In main/maps: BSP file
In main/maps/dm: BAK file, BSP file, MAP file, PRT file, scr and VIS file
In main/sound/amb: Amb_RainPlant_01

:?
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Lol I meant that with the getcvar literally.

local.master aliascache snd_river sound/amb/Amb_RainPlant_01.wav soundparms 1.0 0.2 1.0 0.2 200 2000 auto loaded maps (getcvar terre_son)

should be:

local.master aliascache snd_river sound/amb/Amb_RainPlant_01.wav soundparms 1.0 0.2 1.0 0.2 200 2000 auto loaded maps (getcvar mapname)

Why do you have 2 versions of the bsp file at two different locations? Are you sure you are starting the maps/dm one?
Image
StevenSct
Lance Corporal
Posts: 17
Joined: Tue Jul 29, 2008 9:19 am
Location: France

Post by StevenSct »

So script should be:

main:
local.master = spawn ScriptMaster
local.master aliascache snd_river sound/amb/Amb_RainPlant_01.wav soundparms 1.0 0.2 1.0 0.2 200 2000 auto loaded (getcvar mapname)
level waittill spawn
$riverspeaker loopsound snd_river
end

?

I don't know why I have two BSP file, but they seems to be created automaticly each time I compile a map and be the same.
Must I put the scr file in main/maps too?


still not work :(
StevenSct
Lance Corporal
Posts: 17
Joined: Tue Jul 29, 2008 9:19 am
Location: France

Post by StevenSct »

Hipeeeeeeeeeeeeeee !!! :D

I finaly managed in hearing something, but need to restart my map each time, I saw in another post, which I can't found back, a line to add to correct this probleme.
If somebody know this line?

Anyway, thank you very much for your help
Post Reply