What's wrong w/ my brain????

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

Moderator: Moderators

Post Reply
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

What's wrong w/ my brain????

Post by Krane »

Ok, I have a script model in my map:

key:model
value:fx/dummy.tik

key:targetname
value:speaker1

Here's my script (the map is in early stages):

Code: Select all

// The Streets of Rome - MP
// ARCHITECTURE: Krane
// SCRIPTING: Krane

main:

// set scoreboard messages
setcvar "g_obj_alliedtext1" ""
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "none" 

level waittill prespawn

exec global/DMprecache.scr

//exec global/ambient.scr romestreets

level.script = "maps/dm/romestreets.scr" 

level waittill spawn

//Foutain Sound
thread fountainsound

fountainsound:
$speaker1 loopsound m2l1_radio3


end
It's a fountain but I'm using the radio alias to make sure it will work. I was using "river" which I think will work but for now...

Anyway, no matter which alias I'm using.....IT SIMPLY DOES NOT WORK....

This is really stupid, sorry to bother you guys w/ that but it's been 2h and I really need to get back to work...I'll check back later...

Thanks
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

Post by Krane »

Nevermind. I made the sound custom and it worked!

The strange thing is that "river" is a valid alias in the Ubersound.scr...

aliascache river sound/amb/Amb_River.wav soundparms 0.3 0.0 1.0 0.0 1200 10000 auto loaded maps "m4l3 dm moh obj train"

see? In yellow?

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

Post by jv_map »

Any centralized resource system like the ubersound system is doomed to become a mess and contain stranginess :wink:
Image
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

Post by Krane »

uuuuuh...creepy...

So, some alias may work or may not?

btw jv, a question about aliascache:

local.master = spawn ScriptMaster
local.master aliascache fountain sound/amb/Amb_River.wav soundparms 0.5 0.0 1.0 0.0 280 1000 auto loaded maps "dm obj romestreets"
local.master remove

It's working fine BUT if I take the green out it doesn't work anymore
If I take the yellow out, it doesn't matter...

My file: romestreets.bsp

why?
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

wait

Post by tltrude »

I have found that a short wait in the sound thread is needed before the ambient sound is started. I think it is because the ambient sounds are being loaded too fast and are overwritten by player sounds.

main:

level waittill prespawn

thread fountainsound

level waittill spawn

end

fountainsound:

wait 1
$speaker1 loopsound river

end

Another type of sound speaker you can use is a small script_object with nodraw texture and the notsolid flag set. Although any entity will work, so you could even make the fountian itself a script object with the speaker1 targetname.

Custom sounds are only needed if the "soundparms" need to be changed, or the sound does not work for your maps gametype. "river" works in all gametypes.
Tom Trude,

Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

It maybe that it does not work because the directory is part of the map name . If the map name is romestreets and it is in the dm directory then the map name is dm/romestreets which starts with dm so that is why when you remove dm the sound no longer works .
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

Post by Krane »

Ohh...we can use "/" there? Cool...That makes my sounds load only in this map.

Thanks for the tips. I haven't tryed tltrude's wait 1 but it makes sense....
Post Reply