Stock sound

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
Caboom
Corporal
Posts: 49
Joined: Sat Jun 17, 2006 7:36 am
Location: California

Stock sound

Post 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!
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post by ViPER »

Be sure to exec that after prespawn. Also verify your script is running.
Caboom
Corporal
Posts: 49
Joined: Sat Jun 17, 2006 7:36 am
Location: California

Post by Caboom »

I have it after the prespawn and as far as I know the script is running. I'll try it again.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

script

Post 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!"
Tom Trude,

Image
Caboom
Corporal
Posts: 49
Joined: Sat Jun 17, 2006 7:36 am
Location: California

Post 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
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

allinone

Post 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
Tom Trude,

Image
Caboom
Corporal
Posts: 49
Joined: Sat Jun 17, 2006 7:36 am
Location: California

Post by Caboom »

They are both named the same and in the correct place... Hmmm, well ambient shmambient I guess. lol
neillomax
Lieutenant General
Posts: 880
Joined: Thu Jun 23, 2005 6:57 am

Post 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 ?
Caboom
Corporal
Posts: 49
Joined: Sat Jun 17, 2006 7:36 am
Location: California

Post by Caboom »

I'll try mohdm5, my folders are completely stock through out the proccess, and no custom sounds. Thanks for the suggestions!
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Script

Post 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.
Tom Trude,

Image
Caboom
Corporal
Posts: 49
Joined: Sat Jun 17, 2006 7:36 am
Location: California

Post by Caboom »

Ok I'll try that, thanks T!
Post Reply