Sound

Post your scripting questions / solutions here

Moderator: Moderators

chrisjbooth2001
Colour Sergeant
Posts: 77
Joined: Thu Dec 18, 2003 12:57 am

Sound

Post by chrisjbooth2001 »

$axissource playsound thesound

How would I define how far people can hear this? It is being heard all the way across the map...

Simple answer with an example say comparing it to radiant.

(IF I wanted it to be heard 200 units away, would the value be 200?)
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

thesound

Post by tltrude »

I will assume you have an alias named "thesound" for this. The min and max ranges are set in the ubersound workaroud line. As is the volume.

local.master aliascache train_eng sound/train/train1.wav soundparms 1 0.0 0.8 0.0 1500 6000 auto loaded maps "m dm moh obj "
Tom Trude,

Image
chrisjbooth2001
Colour Sergeant
Posts: 77
Joined: Thu Dec 18, 2003 12:57 am

Post by chrisjbooth2001 »

Ok thanks for that, could you give me a scale as to how far that could be heard?

Why do you need a minimum? Wouldnt that be 0?

Volume does what exactly?
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

Post by Krane »

Gee, volume does what? Volume (do you have a stereo)?

The numbers are in radiant units, the 1st the how far the sound will play w/o fade and the other number is when the sound completly stops. In the between is a fading sound.
Image
chrisjbooth2001
Colour Sergeant
Posts: 77
Joined: Thu Dec 18, 2003 12:57 am

Post by chrisjbooth2001 »

lol, it was early ok! :P

Thanks for your help guys :)
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

i have a Q about sound... i took a sound file and converted it to .WAV and put it in my mohaa/main/sounds folder and then i went into radiant and put in a Sound > Speaker and gave it Targetname: Sound and made it have the .WAV using the "sound" button in the properties window, then i made a Trigger and simply told it to Target Sound. I put the Toggle on for the speaker also. Should this work becuase it dosnt? did I make a small error or is this totally wrong?
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Post by tltrude »

Try addinf these lines to your map's script, above "level waittill prespawn".

local.master = spawn ScriptMaster
local.master aliascache sound sound/sound.wav soundparms 1.0 0.0 1.0 0.0 160 1600 auto loaded maps "m dm moh obj "

As you can see, it gets a little confusing when you name everything "sound". So this might be better.

local.master = spawn ScriptMaster
local.master aliascache mysound sound/my_snd.wav soundparms 1.0 0.0 1.0 0.0 160 1600 auto loaded maps "m dm moh obj "

So, now the new wav sound will have the alias name "mysound", but only if the wave file is named "my_snd.wav". You can change those names if you like.
Tom Trude,

Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

so this makes it easy to add only a few things to ubersound only for that map isntead of workaronding every sound file you make/convert? if so that'd be extremely nice
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

yes

Post by tltrude »

Yes, you can add as many local.master aliascache lines as you need. Mostly they are used to make sounds work in a different game type from the ones listed for them in the ubersound script.
Tom Trude,

Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

ill give it a shot but... us there anyway around that local.master stuff? cant i do

Sound_Ops:
$Trigger waittill trigger
$Speaker loopsound The_Sound
$Trigger waittill trigger
$Speaker stoploopsound

goto Sound_Ops
end

Ill still try that local.master and all that but plz, is there an easier way?
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

The_sound

Post by tltrude »

The game has to know which wave file to play when it is told to play, or loop, the alias name "The_Sound". Normally it would look in the main/ubersound/ubersound.scr script for the answer and, of course, it would not find that name. So, adding the local.master workaround gives it the answer it needs. It also tells it what volume/pitch to use, how far the sound should travel, what channel to use, and for which map/game types it should be loaded.

Your thread will work fine, as long as the game can find that alias name.
Tom Trude,

Image
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Post by Grassy »

G'day Tom,
So, adding the local.master workaround
Funny thing is that in SH it dosnt work the first time up, but on a round or map restart it does.. Got me beat why that is..

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

SH

Post by tltrude »

For spearhead the work around is a bit different. Read this thread.

/forum/viewtopic.php?t=7402&highlight=spearhead+ubersound
Tom Trude,

Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post by HDL_CinC_Dragon »

thnx Tom!

heh heh... wow... that ubersound.scr is uhhh... kinda... large...
Image
shift9999
Private
Posts: 3
Joined: Tue Sep 28, 2004 9:02 pm
Contact:

Post by shift9999 »

Deos MOHAA have the *_ubersound.scr capability as SH deos? if so, can't you just make a new, seperate, ubersound .scr for the map , I.E. : "mohdm1_ubersound.scr"...or am i thinking of the *_precahce? sorry it's late if i am.*sighs*. I hope i'm not repeating something.
Post Reply