Page 1 of 1
wind tree/crickets ambient sound
Posted: Mon Apr 21, 2003 4:07 pm
by tuffstuff7
hi guys i wnat to put in my map the sound of the wind int he trees form remagen and the cricket sounds crom mohaa i looked in the gane and found this scr
// REMAGEN
// ARCHITECTURE: STAGGER
// SCRIPTING: POWZER
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Remagen"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "mohdm3"
// call additional stuff for playing this map round based is needed
if(level.roundbased)
thread roundbasedthread
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
level.script = maps/dm/mohdm3.scr
exec global/ambient.scr mohdm3
thread global/door_locked.scr::lock
level waittill spawn
end
//-----------------------------------------------------------------------------
roundbasedthread:
// Can specify different scoreboard messages for round based games here.
level waitTill prespawn
level waittill spawn
// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw
level waittill roundstart
end
now the crickets are in one of the single player maps i think i looked in the ambience file ...the only plave i could find any reference and found this
//
// global ambience script
// used for easy placement of ambient sounds
ambience:
if(level.script == "maps/dm/mohdm1.scr")
{
thread sound ( -56 -840 16 ) cricket
thread sound ( 582 2551 420 ) cricket
}
if(level.script == "maps/dm/mohdm2.scr")
{
thread sound ( -3452 -2640 64 ) wind_trees3
}
if(level.script == "maps/dm/mohdm3.scr")
{
thread sound ( 2839 -618 -87 ) wind_trees4
}
can someone tell me how to add the cricket and tree wind sounds?
thank you
Posted: Mon Apr 21, 2003 9:28 pm
by Butch
look in the ambient sound files? try using loopsound so that they go on and on...
Posted: Mon Apr 21, 2003 11:11 pm
by tuffstuff7
man i am new to this all .......am learning but i am not a scripter my no means i have heard what you are talking about but

am lost
Posted: Tue Apr 22, 2003 12:13 am
by nuggets
right then, i'll be yellow and you'll be white
then i'll add the outcome in red
hi guys i wnat to put in my map the sound of the wind int he trees form remagen and the cricket sounds crom mohaa i looked in the gane and found this scr
// REMAGEN
just ignore these 3 lines, that's just crap, everything beginning with // means it's just a comment and also everything in between /* and */ are mulitline comments
// ARCHITECTURE: STAGGER
// SCRIPTING: POWZER
main:
//this is the only thread that will be played upon loading the scr file, (providing you have end on it
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Remagen" //
self explanitory
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "mohdm3"
// call additional stuff for playing this map round based is needed
if(level.roundbased)
//if this is the case load roundbasedthread part of the script*
thread roundbasedthread
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
level.script = maps/dm/mohdm3.scr
//change this to your script name
exec global/ambient.scr mohdm3
this is the whole background you will hear
thread global/door_locked.scr::lock
//makes the locked doors play their sounds
level waittill spawn
//only activates script after this when threads have been initialized and the player has spawned ( in spectator mode)
end 2
//should only be END
//-----------------------------------------------------------------------------
roundbasedthread:
//has been activated by the level being activated where the red star is[/colo]*
// Can specify different scoreboard messages for round based games here.
level waitTill prespawn
level waittill spawn
// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0 //turns off respawning, 1 will activate respawning[color]
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw
level waittill roundstart
end
now the crickets are in one of the single player maps i think i looked in the ambience file ...the only plave i could find any reference and found this
//
// global ambience script
// used for easy placement of ambient sounds
ambience:
if(level.script == "maps/dm/mohdm1.scr") //only use these positions if the certain map is loaded
{
thread sound ( -56 -840 16 ) cricket //play sound from that position
thread sound ( 582 2551 420 ) cricket
}
if(level.script == "maps/dm/mohdm2.scr")
{
thread sound ( -3452 -2640 64 ) wind_trees3
}
if(level.script == "maps/dm/mohdm3.scr")
{
thread sound ( 2839 -618 -87 ) wind_trees4
}
can someone tell me how to add the cricket and tree wind sounds?
thank you
//add this to your main thread
thread my_crickets
//then after all your main thread
my_crickets:
//the way they've done it
sound local.origin local.sound:
local.soundorigin = spawn script_model model "fx/dummy.tik"
local.soundorigin.origin = local.origin
local.soundorigin loopsound local.sound
local.soundorigin notsolid
end
//meaning that
thread sound ( 2839 -618 -87 ) wind_trees4
//will spawn a object that won't be seen (the dummy.tik) at the position given (using XYZ co-ordinates)
//then from that point playing and looping the sound
//the dummy is then made notsolid so it's passable
//or alternatively you could just,
/*
1. give your desired trees (the ones that'll play the wind sound
key: targetname
value: wind_tree_sound
2. insert a dummy model where you want to hear the cricket sounds from; or this can be a brush if you like, and make it a script object, and give it
key: targetname
value: cricket_sound
3. then the scripting...
*/
main:
thread my_tree_sounds
thread my_cricket_sounds
end
my_tree_sounds:
$wind_tree_sound loopsound wind_trees3
end
my_cricket_sounds:
$cricket_sound hide
$cricket_sound notsolid
$cricket_sound loopsound cricket
end
then hey presto, it might work 
Posted: Tue Apr 22, 2003 5:04 pm
by tuffstuff7
ahhhh ty nuggets i had someone help me online yesterday and explained it just theway you did ........go it lol ....bu ti must say your way of explaining this was great thank you !!!!!!!!!!!!!!!!!!!
Posted: Tue Apr 22, 2003 11:23 pm
by nuggets
not a problem

Posted: Thu Apr 24, 2003 4:16 pm
by solar
Hey nuggets, when you do the wind and cricket sound the second way you described, are they location specific or will they play through the entire map??
Posted: Fri Apr 25, 2003 12:38 am
by nuggets
the sounds won't play thro the entire map unless u put them in under ubersound
otherwise u can get them to play if you attach the second piece of script tp all the entities that need it,
sounds need a location 2 play from else they won't play at all, just place the souds onto entites that will be near where u want the sounds from

Posted: Fri Apr 25, 2003 2:47 pm
by solar
so let me see if I can get this straight. the red part of the scripting is all we need??? What is the range of these sounds??? This seems so easy I can't believe there isn't a tut out on this method.
Posted: Fri Apr 25, 2003 11:56 pm
by nuggets
range i'm not exactly sure about, i should really write some tut's but every1 else seems 2 b doing that at the moment,
yarik will probably read this and write it in a tutorial, most things with radiant are easy to do, it's just being able 2 understand the ways of doin it
u'll need to do the cyan part of the notes aswell
Yarik if you read this, no offense meant, i just know u like writing tut's 4 people
