Page 1 of 1

Stock sound

Posted: Fri Jan 12, 2007 12:48 am
by Caboom
I want the stock ambient sounds for my custom map so I added this to my scr:

exec global/ambient.scr mohdm2

However, it remains silent. Any suggestions? I'm looking for the outdoor sound. Thanks!

Posted: Fri Jan 12, 2007 1:48 am
by ViPER
Be sure to exec that after prespawn. Also verify your script is running.

Posted: Fri Jan 12, 2007 4:49 am
by Caboom
I have it after the prespawn and as far as I know the script is running. I'll try it again.

script

Posted: Fri Jan 12, 2007 6:33 am
by tltrude
Just to make sure, the script must have the same name as the bsp file and be in the same folder. If you want, you can copy and paste your script here and someone will look it over for you.

One way to tell if it is running would be to have it print something on the screen.

iprintlnbold_noloc "The script is running!"

Posted: Fri Jan 12, 2007 8:21 am
by Caboom
Ok I tried and got nadda, here is my scr (not to mention a non-working scoreboard/messages):

// Allinone
// ARCHITECTURE: Caboom
// SCRIPTING: Caboom
main:

// set scoreboard messages
setcvar "g_obj_alliedtext1" "Allinone By Caboom"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "Download At"
setcvar "g_obj_axistext2" "www.5307thrangers.com"
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "none"


level waitTill prespawn

//*** Precache Dm Stuff
exec global/DMprecache.scr

level.script = maps/dm/allinone.scr
exec global/ambient.scr mohdm2


level waittill spawn

end

allinone

Posted: Fri Jan 12, 2007 8:39 am
by tltrude
I can't see anything wrong with it. So, it must be the name of the file or its location. Remember, the .bsp and the .scr files both have to be named "allinone" and located in main/maps/dm. Here is something else you can add to your script.

Code: Select all

// Allinone 
// ARCHITECTURE: Caboom 
// SCRIPTING: Caboom 


main:

// set scoreboard messages 
setcvar "g_obj_alliedtext1" "Allinone By Caboom" 
setcvar "g_obj_alliedtext2" "" 
setcvar "g_obj_alliedtext3" "" 
setcvar "g_obj_axistext1" "Download At" 
setcvar "g_obj_axistext2" "5307thrangers.com" 
setcvar "g_obj_axistext3" "" 

setcvar "g_scoreboardpic" "none"

	// 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/allinone.scr
	exec global/ambient.scr mohdm2
	
	level waittill spawn

end

//-----------------------------------------------------------------------------

roundbasedthread:

	// Can specify different scoreboard messages for round based 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

Posted: Fri Jan 12, 2007 8:39 pm
by Caboom
They are both named the same and in the correct place... Hmmm, well ambient shmambient I guess. lol

Posted: Sat Jan 13, 2007 12:08 am
by neillomax
Have you tried using sound from another map ? mohdm5 has distinctive sound, whereas mohdm2 doesn't have much of anything from what I can remember.

Also, try removing any sound mods, or any non-stock maps, or any weapons mods, as they may be causing a conflict.

Have a sound folder in main or mainta ? Whats in it ?..... custom sounds ?

Posted: Sat Jan 13, 2007 12:30 am
by Caboom
I'll try mohdm5, my folders are completely stock through out the proccess, and no custom sounds. Thanks for the suggestions!

Script

Posted: Sat Jan 13, 2007 2:25 am
by tltrude
If the script is not running, changing to mohdm5 wont do anything. If the script is not loading, there should be an error message in the console.

There is a way to make a log of the console. Just before you load the map in the game, type "logfile 2" in the console. After you leave the game there will be a file named qconsole.log in main. It can be opened with Notepad. If you copy/paste the text here, we might get a clue.

Posted: Sun Jan 14, 2007 1:27 am
by Caboom
Ok I'll try that, thanks T!