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

Members Online

»
0 Active | 70 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 subscribe
Author Topic: Spawn Music Setup
Metroid
General Member
Since: Aug 24, 2010
Posts: 30
Last: Oct 8, 2010
[view latest posts]
Level 2
Im a fan of MODSonair
Category: CoD4 MP Mapping
Posted: Sunday, Oct. 3, 2010 03:01 am
Hello,
I have just made a mod. It is called ANRM, an acronym for:
A: A
N: No
R: Recoil
M: Mod

Pretty simple eh?
But a mod is not complete without music.
When someone spawns, I want some music to play. I already have the song in my mind, I just need some script to tell the game to play the music.
I need 3 things
  • 1: The script and what to name it
  • 2: Where to put the script
  • 3: What kind of sound file it needs to be.

    Thanks! Metroid
Share |
cskiller86
General Member
Since: Nov 23, 2009
Posts: 528
Last: Oct 25, 2011
[view latest posts]
Level 6
Category: CoD4 MP Mapping
Posted: Sunday, Oct. 3, 2010 08:08 am
1. The code:
Code:
main()
{
level waittill ("connected", player);
player thread startMusic();
}

startMusic()
{
level endon("disconnect");
self playSound("metroid_music");
}
This will play the song to that person only, when he spawns.

2. Put it in raw/maps/mp. Name it ANRM_music.gsc for example.
I haven't made a MOD yet, so I'm not sure how the GSCs are precached and loaded.
But I know that every MP map loads this GSC raw/maps/mp/_load.gsc. So you could open the _load.gsc, scroll down a bit until you find this code
Code:
    thread maps\mp\gametypes\_tweakables::init();
    thread maps\mp\_minefields::minefields();
    thread maps\mp\_shutter::main();
    thread maps\mp\_destructables::init();
    thread maps\mp\_destructible::init();
and add this after the last of those lines
Code:
    thread maps\mp\ANRM_music::main();

Don't forget to compile all the GSCs you modified or added.

3. Read DeekCiti's tutorial on adding sounds and making soundaliases READ HERE
Share |
Restricted Access Topic is Locked 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

»