Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 95 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 4
Category: CoD4 MP Mapping
CoD 4 mapping and level design for multiplayer.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page
subscribe
Author Topic: cod4 ambient music with trigger use
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Thursday, May. 1, 2014 09:51 pm
You don't need a blank mp3, just comment out the line if you don't want to play a sound, or remove it. And remove it from your soundalias.

Just do this:

Code:

musicOffTrigger()
{
	trigger = getEnt("musicstop", "targetname");

	for(;;wait 0.05)
	{
		trigger waittill("trigger", player);

		if(player.music1Playing || player.music2Playing || player.music3Playing || player.music4Playing)

		{
		
		player stopLocalSound("song1");
		player stopLocalSound("song2");
		player stopLocalSound("song3");
		player stopLocalSound("song4");
		
//		player playLocalSound("stop");
		player iPrintLn("^3Music ^1Stoped");

		player.music1Playing = false;
		player.music2Playing = false;
		player.music3Playing = false;
		player.music4Playing = false;
		}
	}
}


With it commented out, it won't read that line anymore.

I still don't understand your ambient thing, but I think you mean what I said previously. You have your songs set to master, which means, when any master sound plays, all other sounds in the same column are quieted using the number in that position. So, for an example ambient track, you could have this instead.

Say in your maps main .gsc file you have this line (EXAMPLE) :

Code:
ambientPlay("amb_map_track");


Your soundalias looks this way (EXAMPLE) :

Code:

song1,,ambient/song1.mp3,1,,ambience,,,,,ambient,streamed,,,master,all_mp,,,,,,,,,,,,,

song2,,ambient/song2.mp3,1,,ambience,,,,,ambient,streamed,,,master,all_mp,,,,,,,,,,,,,

song3,,ambient/song3.mp3,1,,ambience,,,,,ambient,streamed,,,master,all_mp,,,,,,,,,,,,,

song4,,ambient/song4.mp3,1,,ambience,,,,,ambient,streamed,,,master,all_mp,,,,,,,,,,,,,

amb_map_track,,ambient/amb_mountain_cold_day0v1_lr.mp3,0.5,0.7,ambience,,,,,ambient,streamed,,looping,0.1,all_mp,,,,,,,,,,,,,


Your music plays as a Master sound, which means, if it is a number instead, which your ambient track is, for this example, the number is 0.1. It means the ambient tracks volume will be dropped to about 0.1 ingame, or nearly no sound. 0.5 would cut the sound in half. You may have to play with this value. This is how I would do it.

For combining that script, you have missing variables, I have no idea what that is supposed to do. What is .mod? I don't see it defined anywhere. What does the script do? What do you want it to do?
Share |
BUSH1DO
General Member
Since: Apr 2, 2014
Posts: 40
Last: Sep 9, 2016
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Thursday, May. 1, 2014 10:18 pm
so you want to say that need to add
ambientPlay("amb_map_track"); in my gsc
and after in soundaliases put this track and instead of master put 0.1?
for lever - handle (left-right or up-down) - trigger is
trigger from another map
what i want this trigger to stop sound
just need to combine with music stop script. i tried but got messy.
this (mod.player) same (player.musicplaying) need to change
i am not good with scripts
Share |
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 1293
Last: Jul 9, 2016
[view latest posts]
Level 8
Category: CoD4 MP Mapping
Posted: Thursday, May. 1, 2014 11:27 pm
Honestly, I don't understand what you want to do with ambient. I only guessed. I guess I don't understand.

For your other two scripts you want combined, since they don't belong in this thread, I suggest starting a new thread, and post both scripts, complete, that you want to combine. Just my suggestion.
Share |
BUSH1DO
General Member
Since: Apr 2, 2014
Posts: 40
Last: Sep 9, 2016
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Friday, May. 2, 2014 07:38 am
thanks for no blank.mp3 tip - its working, agree with you no neeed to mess up with lever (no need to put all eggs in one busket) wiil try to make separate thread , by ambient i mean that i have 2 ambient playing (mine and from game) so which one is from game need to reduce volume , no poossible to get rid of it complitely. that what you said if my ambient music is master , 2nd game ambient should be 0.1 in sounaliases.
will try more futher, but i think we can mark topic solved
thanks again man
[rocking]
Share |
BUSH1DO
General Member
Since: Apr 2, 2014
Posts: 40
Last: Sep 9, 2016
[view latest posts]
Level 2
Category: CoD4 MP Mapping
Posted: Friday, May. 2, 2014 03:09 pm
ok find the way to get rid od background ambient
_killmusic.gsc
Code:
main()
{
	wait 1;

	if(isDefined(game) && isDefined(game["music"]) && isDefined(game["music"]["suspense"]))
		for(i = 0;i < game["music"]["suspense"].size;i++)
			game["music"]["suspense"][i] = "null";
}

put this file in raw/maps/mp/
in mp_mymap add line
maps\mp\_killmusic::main();
in zone
rawfile,maps/mp/_killmusic.gsc

That make the trick
Share |
Restricted Access Topic is Locked
Page
Previous Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 MP Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»