wind tree/crickets ambient sound

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
tuffstuff7
Captain
Posts: 265
Joined: Mon Jan 06, 2003 12:59 am
Contact:

wind tree/crickets ambient sound

Post 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
User avatar
Butch
Lieutenant Colonel
Posts: 398
Joined: Fri Jan 24, 2003 11:30 am

Post by Butch »

look in the ambient sound files? try using loopsound so that they go on and on...
PFC.Butch
B Company, 2nd Ranger Battalion
US Army
tuffstuff7
Captain
Posts: 265
Joined: Mon Jan 06, 2003 12:59 am
Contact:

Post 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 :roll: am lost
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

right then, i'll be yellow and you'll be white then i'll add the outcome in red :D

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 :P

// 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 :P
hope this helps, prob not cos it's all foreign 2 me :-/
tuffstuff7
Captain
Posts: 265
Joined: Mon Jan 06, 2003 12:59 am
Contact:

Post 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 !!!!!!!!!!!!!!!!!!!
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

not a problem ;)
hope this helps, prob not cos it's all foreign 2 me :-/
solar
Colour Sergeant
Posts: 99
Joined: Fri Mar 21, 2003 2:40 pm
Location: Toledo, OH

Post 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??
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post 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 :D
hope this helps, prob not cos it's all foreign 2 me :-/
solar
Colour Sergeant
Posts: 99
Joined: Fri Mar 21, 2003 2:40 pm
Location: Toledo, OH

Post 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.
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post 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 :P

u'll need to do the cyan part of the notes aswell :D

Yarik if you read this, no offense meant, i just know u like writing tut's 4 people :D
hope this helps, prob not cos it's all foreign 2 me :-/
Post Reply