Page 1 of 1

Let me understand...

Posted: Thu Apr 05, 2007 5:09 pm
by Liberator
Im indeed not a scripter, but I wish I could....

To add a sound I just learned to put the sound of fire into the script:
$fire_speaker loopsound fire_large
If I understand right...
The "$fire_speaker" name is up to me and the "fire_large" is the name of the sound the script retrieve?

Another Q is..

In the Ubersound.scr file there is a fine list of sounds. One of them is :

alias wind_trees4 sound/amb/Amb_WindTrees4.wav soundparms 0.2 0.0 0.9 0.2 500 6000 auto streamed maps "t1 dm obj "

How do I make this work, what do I need to write in the script to make it retreive this sound?

Liberator

Posted: Thu Apr 05, 2007 8:36 pm
by lizardkid
any ubersound alias can be called just like you did with the fire. you did

Code: Select all

$fire_speaker loopsound fire_large
so for the wind, just do this.

Code: Select all

$speaker loopsound wind_trees4
any uberalias can be called like that. you can even make your own soundcache (useful for multiplayer sounds), but that's a bit more work.

Posted: Thu Apr 05, 2007 8:36 pm
by lizardkid
any ubersound alias can be called just like you did with the fire. you did

Code: Select all

$fire_speaker loopsound fire_large
so for the wind, just do this.

Code: Select all

$speaker loopsound wind_trees4
any uberalias can be called like that. you can even make your own soundcache (useful for multiplayer sounds), but that's a bit more work.

Posted: Thu Apr 05, 2007 8:42 pm
by Marlboro88
if you like to use the wind you'll have to copy the aliascache line, and the line above (local.spawn scriptmaster or something with scriptmaster)

then when creating something like a loop

wind:
{
loopsound windaliasname
waitframe
}
end

well maybe it's something else in the loop (waitframe is probably wrong) but i think you know what i mean, you could look up alienxweather or a simple elivator script....oh wait i just remeber i have this:

Code: Select all

//Elavator 1

run:

local.lift1 = spawn script_model
local.lift1 model "static/nazi_crate.tik"
local.lift1 targetname elevator
local.lift1.origin = ( 666.25 294.13 48.13 )
local.lift1.angle = 0.00 
local.lift1 time 3
local.lift1 light 0 0 0 30
while (1) {

wait 5
local.lift1 speed 150
local.lift1 moveUp 750
local.lift1 loopsound elevator_run 
local.lift1 waitmove
local.lift1 stoploopsound
wait 5
local.lift1 moveDown 750
local.lift1 loopsound elevator_run 
local.lift1 waitmove
local.lift1 stoploopsound
}
end
that is for an elevator

if you dont get this, sorry, i'm not good at english.

sound alias

Posted: Thu Apr 05, 2007 9:14 pm
by tltrude
aliascache wind_trees4 sound/amb/Amb_WindTrees4.wav soundparms 0.25 0.0 1.0 0.0 600 10000 auto loaded maps "dm moh obj train"


The end of each alias line tells you which map, or type of map, the sound alias name will work in. In the above example, it will work in both types of multiplayer maps, (dm and obj). The "train" is for training maps, and "moh" is for all the stock maps. So, that sound name can be used in every map type.

By the way, the "600 10000" is the radius (in units) of the sound. That sound is normally used as the background sound for the entire map. Like this:

exec global/ambient.scr mohdm7

The map named "mohdm7" uses that wind sound. Adding that line to prespawn means you don't need a speaker, but either way will work.