MODSonline
  Welcome Guest to MODSonline Home | Forums | Register | Login
Main-Menu
Home
Login
Register
Add Download
Add News
Add Tutorial *
Forums

Advertise
Affiliate Store US *
Affiliate Store UK *
Affiliate Store CA *
Angry Letter Generator
Avatar Upload
Calendar of Games
Contact
Downloads
FAQs
Forums
Member List
Member Projects
News
News Grabber *
Policy
Polls
Private Messages
Reviews
Screenshot Gallery
Search
Servers - Game
Store - Shirts *
Subscribe
Topics
Tutorials
Weblinks
Wiki *
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 Mapping
CoDWW Mapping
CoD FAQs
HL2 Mapping
HL2 FAQs
SOF1 Mapping
Crysis Mapping
Q4 Mapping
Doom 3 Mapping
Doom 3 FAQs
UT2K3 Mapping
SOF2 Mapping
SOF2 FAQs

Lightray Modeling
General Modeling
General Modding
Adobe Photoshop
Common Mapping Errors

Readme.txt Generator
Members-Online
corrie [Forum]
SPIDYpiet [Forum]
Welshy [Forum]
Smithy [Forum]
Strid3r [Today]
FiremanPaul [Forum]
kjohn175 [Forum]
TSH [Forum]
Hercules [Downl]
h3spawn [Forum]
cz_squishy [Revie]
Rainbowsix [Forum]

12 Members and 25 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Saturday, Nov. 22nd
CoD:WW Video Tutorial is up!
Friday, Nov. 21st
MODSonair Episode 154
Thursday, Nov. 20th
Call Of Duty World At War - Mod Tools
Wednesday, Nov. 19th
Half-Life 1 $0.98
Sunday, Nov. 16th
MODSonair 154 Live
Latest Poll
Would you pay for mod tools?
I would pay a one time fee for mod tools for my favorite title 8.42%
I would pay a monthly/yearly subsrciption fee for mod tools for my favorite title 0.5%
I already paid for the game - Tools should come bundled because I am just fixing what the developers broke 67.82%
100% definitely NOT! 19.31%
I haven't seen a game yet that wasn't 100% perfect when the developers released it 2.48%
Games are the devil! 1.49%
Read More...
16 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
Plz Help Radiant Error
CoD:WW Level Des.. Posts: (2) Views: (28) by TSH
Simple Problem
CoD:WW General G.. Posts: (1) Views: (5) by h3spawn
Single PLayer Spawn Problem
CoD:WW Level Des.. Posts: (3) Views: (19) by Smithy
Script compile error
CoD2 Scripting.. Posts: (3) Views: (21) by Sniperdennis
Art of War Central Quake 4 Mods for Dummies
CoDWW Download
Forums
MODSonline.com 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: CoD 4 Single Player
Call of Duty 4 single player mapping, scripting and everything single player.
Moderators: foyleman, rEdrUmMDK, Foxhound, Rasta, StrYdeR, The_Caretaker, batistablr, playername, Welshy
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access
Page
Next Page
subscribe
Author Topic: How to play background music?
scillman
General Member
Since: Nov 23, 2006
Posts: 131
Last: Sep 21, 2008
[view latest posts]
Level 4
Category: CoD 4 Single Player
Posted: Saturday, Jun. 14, 2008 10:02 am
I can't get the background sound to work?

I want to play the music when the AI passes the triggers?
soulwax
General Member
Since: Nov 14, 2005
Posts: 255
Last: Jul 28, 2008
[view latest posts]
Level 5
Category: CoD 4 Single Player
Posted: Saturday, Jun. 14, 2008 10:40 am
music()
{
MusicPlay( "music" );
wait 60;
MusicStop( 5 );
}

you have to place the music sound in ur soundaliases folder ofcource

That musicstop line is not nessesary, it's only if you want to stop the stop after a certain time (here it is 1 min). 5 means the time that the music will fade out, so it won't just stop instantly
scillman
General Member
Since: Nov 23, 2006
Posts: 131
Last: Sep 21, 2008
[view latest posts]
Level 4
Category: CoD 4 Single Player
Posted: Saturday, Jun. 14, 2008 10:47 am

Code:

Done that and ad this to the assets file, but still doesn't work?
P.S. music is 'jeepride_rescue_music'
scillman
General Member
Since: Nov 23, 2006
Posts: 131
Last: Sep 21, 2008
[view latest posts]
Level 4
Category: CoD 4 Single Player
Posted: Tuesday, Jul. 8, 2008 05:16 am
I know why it didn't find the normal ones (the ! needs to be deleted).

But how to let it detect new ones?
Rasta
Preferred Member
Since: Apr 10, 2004
Posts: 4298
Last: Nov 22, 2008
[view latest posts]
Level 9
Forum Moderator
Category: CoD 4 Single Player
Posted: Tuesday, Jul. 8, 2008 07:31 am
You shouldn't remove the ! on every soundsalias, this will mean that every single sound is loaded and cause some strain on the memory. To create a new soundalias just start a new .txt doc in the same location as all the others and label it like you would any stock soundfile

sound,SOUNDALIASNAME,MAPNAME,all_sp

Your actual soundalias should look something like;
ALIASNAME,,music/SOUNDNAME.mp3,0.95,,max,,,,,music,streamed,,,master,MAPNAME,,,,,,music,nowetlevel fulldrylevel,,,

See if that helps.


Go ahead... You Play I Mod : MODSonline.com
Support Modsonline by becoming a PREFERRED MEMBER today
Have you heard the MODSonair Podcast?: www.modsonair.com
We are game enthusiasts from the MODSonline.com community bringing you news, updates and opinions of the week's current events. Tune in every Friday for a new episode.
scillman
General Member
Since: Nov 23, 2006
Posts: 131
Last: Sep 21, 2008
[view latest posts]
Level 4
Category: CoD 4 Single Player
Posted: Wednesday, Jul. 9, 2008 03:23 am
Still doesn't work.
Maybe it's a fault somewhere in the code?

Part of the sp_wctrevo.gsc:

Code:


My soundaliases:

Code:


and ofcourse the part of my zone file:

Code:


Thanks for helping me.
camo1018
General Member
Since: Jul 18, 2007
Posts: 38
Last: Aug 4, 2008
[view latest posts]
Level 2
Category: CoD 4 Single Player
Posted: Monday, Jul. 14, 2008 02:18 am
I'm assuming the music won't play and no error is returned, am I correct?

If so, try doing this:

Add the following flicktion to your mapname_code.gsc.


Code:


If, by chance, if you do not know how to activate _code.gsc, then include your main script into the _code script, then do the reverse (include _code into your main script).

Afterwards, replace your MusicPlay flicktions with this.


Code:


I understand if you think I'm trying to change your script to... well, my style, but this has worked for me efficiently, so why don't you give this a try?

As a final note, is the BackMusic() function called properly?
scillman
General Member
Since: Nov 23, 2006
Posts: 131
Last: Sep 21, 2008
[view latest posts]
Level 4
Category: CoD 4 Single Player
Posted: Friday, Jul. 18, 2008 01:56 pm
Still won't work, but I think it is because the sounds don't get loaded to the game? (problem with the csv or something)
camo1018
General Member
Since: Jul 18, 2007
Posts: 38
Last: Aug 4, 2008
[view latest posts]
Level 2
Category: CoD 4 Single Player
Posted: Friday, Jul. 18, 2008 10:13 pm
If the musics are custom, I would tag them to be 'loaded' not streamed. This method had fixed a bit of a headache for me not too long ago. :)

Try it and let me know what you come up with.
KD
General Member
Since: Jul 12, 2008
Posts: 29
Last: Jul 24, 2008
[view latest posts]
Level 2
Category: CoD 4 Single Player
Posted: Friday, Jul. 18, 2008 10:26 pm
mp3 files MUST be streamed

try this:

soundaliases:


Code:


zone:


Code:


edited on Jul. 18, 2008 10:26 pm by KD
Restricted Access Restricted Access
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD 4 Single Player
All logos and trademarks and information in this site are property of MODSonline LLC © 2008.
The comments are property of their posters.
RSS news feeds for MODSonline can be found News.php.
Intergi
Partners
Call of Duty Headquarters
XoXide
CODAddicts - Call of Duty News & Downloads
Battle for Europe COD2
The Firing Box
Frag Universe
modbase.be
Ask About
Advertising
Friends
Great Gamer
Volcano
ModTheater
Ask About
Advertising
Link to Us
MODSonair
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
MODSonair Episode 154
MODSonair Episode 153
MODSonair Episode 152
MODSonair Episode 151
Video server move
Next Show
The next MODSonair show will air LIVE on:
11/23/2008 12:00 EST

Time remaining:
Copyright © 2008 MODSonline
Tresware Content Management System Copyright © 2008 Tresware
Website Designed and Hosted   Tresware