Lost + found

Post your scripting questions / solutions here

Moderator: Moderators

[D.o.G]FaDe2BlAcK
Sergeant
Posts: 55
Joined: Fri Dec 17, 2004 9:48 pm
Location: St. Cloud, MN
Contact:

Post by [D.o.G]FaDe2BlAcK »

So something very odd has happened. I tried making the exact directories you used and it worked, but not for my map lol. I'm going to keep messing around with it, I must have messed up somewhere down the line. Thanks!

EDIT: I got it to work! Turns out it was a conflicting problem between the names of my .bsp and .pk3. Now I know why we name them differently!

Thanks for all the help CPT. Duke!
punisher2202
Lance Corporal
Posts: 19
Joined: Thu Mar 17, 2011 5:01 pm

background music

Post by punisher2202 »

I have created a mod for background music in mp maps.

example:

musicbackgrount.pk3/music/mohdm1.mus

mohdm1.mus:

Code: Select all

path sound/music

normal mus_16a_mystery.mp3

!normal volume 1
!normal loop


what should add in the script to have and default sounds? Now I have only the sound of music .

I want to play both sounds simultaneously

example:

MOHAA\main\sound\music\mus_16a_mystery.mp3

and

MOHAA\main\sound\amb\Amb_M4_CountryExt_01.mp3 <----(default mohdm1)
punisher2202
Lance Corporal
Posts: 19
Joined: Thu Mar 17, 2011 5:01 pm

Post by punisher2202 »

sory for my bad English , help me please. :roll:
User avatar
Cpt. Duke
Sergeant
Posts: 72
Joined: Sun Feb 13, 2011 4:29 pm
Location: United States of America

Post by Cpt. Duke »

If all you want to do is add background music without changing the ambient noise, you don't have to edit the .mus file.

All you have to do it open the map's .scr file and add the following lines after "level waittill spawn"

wait 10

for(local.playernum = 1; local.playernum <= $player.size; local.playernum++)
{
$player[local.playernum] stufftext "tmstartloop sound\music\mus_16a_mystery.mp3"
}



"wait 10" controls how long to wait until the music starts playing.


Enjoy! :D
punisher2202
Lance Corporal
Posts: 19
Joined: Thu Mar 17, 2011 5:01 pm

Post by punisher2202 »

Thank you very much, I will try and tell you the results :D
punisher2202
Lance Corporal
Posts: 19
Joined: Thu Mar 17, 2011 5:01 pm

Post by punisher2202 »

Code: Select all

// SOUTHERN FRANCE
// ARCHITECTURE: SENN
// SCRIPTING: POWZER

main:

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

setcvar "g_scoreboardpic" "mohdm1"

	// 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/mohdm1.scr
	exec global/ambient.scr mohdm1

	//exec global/ambient.scr mohdm2

	//$world farplane 5000
	//$world farplane_color (.333 .333 .329)


	level waittill spawn
	$world farclipoverride -1

wait 10

for(local.playernum = 1; local.playernum <= $player.size; local.playernum++)
{
$player[local.playernum] stufftext "tmstartloop sound\music\mus_16a_mystery.mp3"
}

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
does not work. What I doing wrong?

work in spearhead?
User avatar
Cpt. Duke
Sergeant
Posts: 72
Joined: Sun Feb 13, 2011 4:29 pm
Location: United States of America

Post by Cpt. Duke »

Hmmm?I can't find anything wrong with your script. The game probably isn't overwriting the stock script with your script.

You can try creating a .pk3 file and place your .scr inside it.

If you don't know how to create a .pk3 file, visit the following link:

/t.php?id=19

Make sure the name of your .pk3 starts with "zzzz_"

For example: "zzzz_mohdm1.pk3"

Hope this helps at all. :o
punisher2202
Lance Corporal
Posts: 19
Joined: Thu Mar 17, 2011 5:01 pm

Post by punisher2202 »

Yes I did it but not work again :( :(
punisher2202
Lance Corporal
Posts: 19
Joined: Thu Mar 17, 2011 5:01 pm

Post by punisher2202 »

punisher2202
Lance Corporal
Posts: 19
Joined: Thu Mar 17, 2011 5:01 pm

Post by punisher2202 »

Now how can I lower the volume of music?
User avatar
Cpt. Duke
Sergeant
Posts: 72
Joined: Sun Feb 13, 2011 4:29 pm
Location: United States of America

Post by Cpt. Duke »

This is the command you can use to lower the music volume:

tmvolume .5

This is what you will write in your script.

wait 10

for(local.playernum = 1; local.playernum <= $player.size; local.playernum++)
{
$player[local.playernum] stufftext "tmvolume .5"
}


Remember, "tmvolume 1" is default.

:)
User avatar
Cpt. Duke
Sergeant
Posts: 72
Joined: Sun Feb 13, 2011 4:29 pm
Location: United States of America

Nice .pk3!

Post by Cpt. Duke »

I downloaded and tested your .pk3 this morning.

Works perfectly!


:D Nice work! :D
punisher2202
Lance Corporal
Posts: 19
Joined: Thu Mar 17, 2011 5:01 pm

Post by punisher2202 »

:lol: :lol: :lol: :lol:
punisher2202
Lance Corporal
Posts: 19
Joined: Thu Mar 17, 2011 5:01 pm

Re: Nice .pk3!

Post by punisher2202 »

Cpt. Duke wrote:I downloaded and tested your .pk3 this morning.

Works perfectly!


:D Nice work! :D
yes but i have one problem

When you connect to the server is not working. only works when the. PK3 has and the client :? :?
punisher2202
Lance Corporal
Posts: 19
Joined: Thu Mar 17, 2011 5:01 pm

Post by punisher2202 »

any help :cry:
Locked