Background music prob

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
hogleg
General
Posts: 1577
Joined: Tue Sep 09, 2003 5:23 pm
Location: Down South Hillbilly Country

Background music prob

Post by hogleg »

My maps a MP_DM
OK, Im trying to add some background sound. I like,
sound\amb_stereo\amb_m6_woodsext_01.mp3

Now I noticed on the Nem's tut,
http://users.1st.net/kimberly/Tutorial/music.htm

He does'nt mention having "Test" before his game name???
He's putting it in main\maps\dm.....so its not SP.

I put these to thingys in my script for my SP map and it works.

exec global/ambient.scr m611c
$player stufftext "tmstart sound/music/mus_15a_mystery.mp3"

Is there an easy way to just have that file I like to loop constantly.
My map does NOT have "test" in its name yet.

PS. what ar these for " m611c"???Wat #'s do I use??

And if I add Test to the name should I still follow the Nem's instruction?
"all the governments in the world are corrupt and in the hands of the Illuminati"
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

i haven't got a friggin clue about using test for DM, but you should be able to loop the sound with exec global/ambience.scr liek you're doing, and loop the song with a while loop that never ends.

while(1)
{
//music
}
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

script

Post by tltrude »

Post your main script and your .mus file.

This line should end with the name of your .mus file.

exec global/ambient.scr m611c
Tom Trude,

Image
User avatar
hogleg
General
Posts: 1577
Joined: Tue Sep 09, 2003 5:23 pm
Location: Down South Hillbilly Country

Post by hogleg »

OK here's my snipercastle.mus

Code: Select all

path sound/amb_stereo

normal Amb_M6_woodsext_01.mp3//Plays over entire level

!normal volume 1
!normal loop

//Music Recommendation
//mus_09a_action.mp3

//Just in case we can get multiple ambiences working...
//normal Amb_M5_BridgeInt.mp3 // Player Start
//!normal volume 1
//!normal loop
Thats in my pk3 in music folder

And the script

Code: Select all

main:

// set scoreboard messages
setcvar "g_obj_alliedtext1" ""
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "none"

level waittill prespawn

exec global/DMprecache.scr

exec global/ambient.scr snipercastle

level.script=maps/dm/snipercastle.scr



level waittill spawn


end
and thats in maps\dm
my folder structure looks just like the Nim's on that music tut.
"all the governments in the world are corrupt and in the hands of the Illuminati"
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

test

Post by tltrude »

Using "test_snipercastle.bsp" as your singleplayer map name will turn on the footstep and weapons sounds which would not normally work without it.

So, what is the problem? Your mus file should be playing that background sound now. Is your map singleplayer or multiplayer?

You can force players to hear music with a line like this in your script.

forcemusic aux1 aux1

But "aux1" must be listed in your .mus file. Forcing the music will make it play even if the player has music turned off in his game. But, when you use that stufftext line, the player will only hear it if he has music turned on.

You can use a trigger_multiple with a setthread to trigger the music at whatever location you want it to start playing. And, you can have as many of those "aux" channels as you like in your .mus file.
Tom Trude,

Image
User avatar
hogleg
General
Posts: 1577
Joined: Tue Sep 09, 2003 5:23 pm
Location: Down South Hillbilly Country

Re: Background music prob

Post by hogleg »

hogleg wrote:My maps a MP_DM
I get footsteps and gun sounds without using "Test" in MP & SP.
And how do u turn the music on & off?
"all the governments in the world are corrupt and in the hands of the Illuminati"
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

forcemusic

Post by tltrude »

forcemusic aux1 aux1
forcemusic normal normal
Tom Trude,

Image
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

Post by Krane »

yeah, forcemusic...

check the containerz mus file and script. There's a thread called soundtrack down on the bottom. Link on my sig.
Image
Post Reply