Welcome New User
Home
|
Forums
|
Register
|
Login
|
Larger Font
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
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 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
Rattlesnak...
[Tutor]
w0lv3r1n3
[Searc]
2 Members and 20 Guests
Chat MODSonline
Join Chat
0 People Now Chatting
MODSOnline TeamSpeak
download TeamSpeak
In-The-News
Friday, Jul. 4th
MODSonair Episode 134
Thursday, Jul. 3rd
Happy 4th of July
Monday, Jun. 30th
Major Retailer Confirms 360 Price-Cut
Sunday, Jun. 29th
MODSonair 134 Live
Friday, Jun. 27th
MODSonair Episode 133
Latest Poll
Want a MODSonline Wiki for various games?
I think a Wiki would be a great addition to MODSonline.
79.73%
I could see a benefit of a Wiki.
6.76%
I think it would take away from the community.
6.76%
Wiki sites are never good.
1.35%
Wiki... isn't that Buck Roger's robot slave?
5.41%
Read More...
7 comments
Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register
.
In The Forums
help ,for a good sentence.
CoD 2 Level Desi..
Posts:
(2)
Views:
(23)
by AnythingButt
Elevator model problem
CoD Level Design..
Posts:
(1)
Views:
(15)
by Tragic
Comiler Problem
CoD 2 Level Desi..
Posts:
(3)
Views:
(31)
by jmcke149
A Lunch / Bounce pad?
CoD 4 Level Desi..
Posts:
(1)
Views:
(19)
by sinner4
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.
Jump To:
Select Forum Category
Call of Duty: World at War
- CoD:WaW Level Design
- CoD:WaW Single Player
- CoD:WaW General Gaming
- Offsite Links and Information
- CoD:WaW Scripting
- CoD:WaW Custom Map Releases
Call of Duty 4
- CoD 4 Level Design
- CoD 4 Single Player
- CoD4 General Gaming
- Offsite Links and Information
- CoD 4 Scripting
- CoD4 Custom Map Releases
- MODSCON - ALL
Call of Duty 2
- CoD 2 Level Design
- CoD 2 Single Player
- CoD2 General Gaming
- CoD2 Custom Map Releases
- CoD2 Scripting
- Offsite Links and Information
Call of Duty
- CoD Level Design
- CoDUO Level Design
- CoD General Gaming
- CoD and CoDUO Custom Map Releases
- Offsite Links and Information
MODSonline
- MODSonline
- In The News
- News Around the Web
- General
- MODSon-air
- Teamspeak Servers
- MODSCON 06
- The Wiki
General Gaming Topics
- General Gaming
- General Machinima
- General Level Editing
- General Modeling
- Classic Raven Games
- Offsite Links and Information
Half Life 2
- HL2 Level Design
- HL2 General Gaming
- HL2 Custom Map Releases
- Garry's Mod
- Offsite Links and Information
Quake 4
- Q4 Level Design
- Q4 General Gaming
- Q4 Scripting
- Q4 Custom Map Releases
- Offsite Links and Information
DOOM III
- DOOM III Level Design
- DOOM III General Gaming
- DOOM III Custom Map Releases
Quake I, II, III
- Quake 1-3 Level Design
- Quake General Gaming
- Quake Scripting
- Quake Custom Map Releases
- Offsite Links and Information
Crysis
- General Crysis
- Crysis Level Design
- Crysis Custom Releases
- Offsite Links and Info
Unreal Tournament 2003
- UT2K3 General Gaming
- UT2K3 Level Design
- UT2K3 Custom Map Releases
Battlefield
- BF2 General Gaming
- Battlefield 2142 General Gaming
- BF2 Level Design
Soldier of Fortune
- SoF Editing, Gaming, and Design
- SoFII Editing, Gaming, and Design
- SoFI & II Custom Map Releases
- SoFII Coding
- SoFI General Gaming
- SoFII General Gaming
- SoFII Server Support
Jedi Knight
- Jedi Knight - Jedi Academy
- Jedi Knight II: Jedi Outcast
- Jedi Knight II: Jedi Outcast MOD Support
Star Trek Voyager: Elite Force
- Star Trek Voyager: Elite Force MOD Support
- Star Trek Voyager: Elite Force General
Forum:
All Forums
:
Call of Duty 4
Category:
CoD 4 Level Design
CoD 4 mapping and level design.
Moderators:
foyleman
,
rEdrUmMDK
,
Foxhound
,
Rasta
,
StrYdeR
,
The_Caretaker
,
batistablr
,
playername
Author
Topic: Indoor = (null) Outdoor = (ambience) SOLVED!
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 191
Last: Jun 30, 2008
[
view latest posts
]
Category: CoD 4 Level Design
Posted: Saturday, May. 17, 2008 06:43 am
Hey guys,
After many hours of testing and racking my brain, I've finally, and I say
FINALLY
figured out HOW to allow
no ambience indoors, while outdoors your ambience plays
, by use of a "Trigger_Multiple". I can say that I am now fully satisfied by the results.
Here is how I came to this conclusion. If this doesn't make sense to you now, it will by the time your done reading the Tutorial.
My map was set up to play "ambient_farm" as the ambientplay, but what I wanted was to have the rain sound only outside, while inside you could not hear the rain. The answer lies in the soundalias. My original line used the header
masterslave
and as the value of this header was this number:
0.00001
. I used this number because I knew that, whatever number was in the header "masterslave" was multiplied by that alias's header "vol_min" but only when a
master
sound was playing over it. Since my ambientplay had these values, when I played my
master
sound, "building_null" it would basically play at a volume of something near to "0.00001", which is too quiet for a player to hear and exactly what I want!
The problem I was having was knowing what values the alias of "building_null" needed to be, and I found this out by accident. I noticed that when I had my ambientplay set up in my alias as above, when I entered my map, the announcer said, "Team Deathmatch" ... "Let's do this Marines". I noticed that my ambientplay went quiet ONLY when the announcer spoke these lines, basically when it played those sounds. I knew right then, that if I only knew how those sounds were set up in an alias, I could reproduce it with my own sounds. So I did some digging in the code.csv. Found the values for those files, and whallah. The answer was right there. Now I'm going to explain how to do it...
For starters, this Tutorial is geared towards people who have some knowledge of scripts, sounds, and who already have a soundalias set up, because I'm not going to explain any of that in here.
First things first...
You need to find a valid sound to use for your null sound. I suggest using a .wav. This sound should be less than a second long but greater than a 6th of a second, and I believe this is because the script can only loop the sound at .01 of a second. I'm not 100% on that. But I do know that, after the player leaves the trigger, the sound continues to play until it finishes, then your ambience begins. So, basically the shorter this soundbite you can find the better. I also tried using the default
null.wav
but was unable to get that to work, and I think because it is too short of a sound file. Your welcome to try, but I don't think it will work. I suggest starting with a sound about 1 second long. Get the thing working and then cut your sound shorter later on.
Step 1:
Get/Create a valid sound.
Step 2:
Open your map and create a brush where you want your Null to be. Right click the brush in the 2D window and say: Trigger > multiple. Make sure only your trigger_multiple is selected. Press [N] to open your entity Editor, and give this trigger_multiple a
Key
of
targetname
and a
Value
of
null_sound
. We are going to use "null_sound" as the targetname in our script, but we haven't gotten to the scripting yet. Once this is done, you can save and close your map. Then Compile the BSP. Then Compile Reflections. Stop there.
Step 3:
Open your soundalias for your map, but open it with "notepad" or any text editor. Once you have that open, copy and paste the lines below underneath the last alias you've got in there. These are the default lines your going to need to get this working. You can edit them as we go along here to your map specifics.
Code:
ambient_farm,,ambient/amb_farm_rain_day0v3_lr.mp3,0.3,,ambience,,,,,ambient,streamed,,looping,0.00001,all_mp,,,,,,amb_front,nowetlevel fulldrylevel,, building_null,,amb_elements/amb_building_null.wav,0,0,,,,,,announcer,,,,master,all_mp,,,,,,radio,nowetlevel,,0.1
Now that you copied the two lines, save and close your alias. Then reopen it with MS Excel. You will notice the lines now show up correctly and you can read it.
Now, you will notice that I have defined my ambientplay here as an alias. I did that because I wanted some of the values changed from the default one the game uses when you just plug in
ambientPlay("ambient_farm");
in yourmap.gsc All I'm doing is redefining it, so it uses my values instead of the games values. So here my map plays ambient farm,
what does yours play?
. You need to define here what your ambient play is, and also the correct path to the file. If you don't know, open up the
multiplayer.csv
and locate which ambientplay your using, and define it properly.
- Give it an alias.
- Give it the right path.
- Give it a good
vol_min
somewhere between 0.2 and 0.5 is good.
- Give it a
masterslav
number. Remember, this number does not have to be so low as so the player can't hear it at all. It can be at something like 0.3, and there it will be very quiet but at least the player can hear it while in your trigger. Up to you, you can play with this value later. I suggest just leaving it at
0.00001
for now. Everything else in your ambient alias needs to say the same as what I've got.
Moving on to your
building_null
alias. The only thing you need to change here is your path, and the name of your sound file. Everything else stays as I have it. Hopefully you know where sounds belong, and where they need to be placed so the game can pack them in the .FF. raw/sound/yoursoundfolder. Once your building_null alias is done, your finished in the soundalias file. Save and close.
Step 4:
The Script. Funny, all along it was a simple sound script that would do the trick, and here I thought it needed to be a complicated script.
Create a new text document in
raw/maps/mp
and call it
mp_yourmapname_building_null.gsc
. Make sure you give it the file extension
.gsc
. Open the file and copy and paste the script below.
Code:
main() { thread ambient_null(); } ambient_null() { sound = getentarray("current", "targetname"); for (i=0; i < sound.size; i++) { sound[i] playloopsound("current"); } thread trigger_source(); } trigger_source() { trigger = getentarray ("null_sound", "targetname"); for (i=0; i
Step 5:
Open your
mp_yourmapname.gsc
. Add the following line:
maps\mp\mp_yourmapname_building_null::main();
Also, while you have this file open, make sure your calling your ambientplay here too. Mine is
ambientPlay("ambient_farm");
Make sure yours is correct. Make sure yours reflects the alias you gave it earlier, whether its the same as the default or not. Once that is done, your finished in this file. Save and close.
Step 6:
Updating Zone File. Make sure you have the following line in your zone file:
sound,mp_yourmapname,,all_mp
This line should only exist already if you have previous sounds in your map. Next add the following lines to your zone file:
rawfile,maps/mp/mp_yourmapname_building_null.gsc
rawfile,sound/amb_elements/amb_building_null.wav
Double check that the path to your sound file is correct. The line I'm showing above reflects
MY path!
, not yours, so change the path and the name of your sound file to the correct names. Once this is complete you should be ready to test this. Save your zone file. Build your .FF. Run your map.
If you followed close enough, you should now have a working Building Null !
If not, double check for spelling errors and filenames that are referenced. Goodluck.
I hope everything is clear enough and I didn't miss anything. If someone sees something I missed or messed up please correct me. If I find an error I will post to correct it.
I want to thank everyone who gave me any feedback on this subject, it helped me to persist on finding an answer, even when I saw that some people said it could never be done.
edited on May. 21, 2008 04:12 pm by Rasta
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 191
Last: Jun 30, 2008
[
view latest posts
]
Category: CoD 4 Level Design
Posted: Wednesday, May. 21, 2008 03:10 pm
Found a problem with the Script I posted above. Please use the following script instead of the one posted above:
Code:
main() { thread ambient_null(); } ambient_null() { sound = getentarray("current", "targetname"); for (i=0; i < sound.size; i++) { sound[i] playloopsound("current"); } thread trigger_source(); } trigger_source() { trigger = getentarray ("null_sound", "targetname"); for (i=0; i
If your curious why the script in the first Post doesn't work or what the problem with it was, view the thread below.
Thread Here
Rasta
Preferred Member
Since: Apr 10, 2004
Posts: 4025
Last: Jul 4, 2008
[
view latest posts
]
Category: CoD 4 Level Design
Posted: Wednesday, May. 21, 2008 04:12 pm
I edited your original post to include the new code.
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.
DeekCiti
General Member
Since: Mar 13, 2008
Posts: 191
Last: Jun 30, 2008
[
view latest posts
]
Category: CoD 4 Level Design
Posted: Wednesday, May. 21, 2008 09:54 pm
Thanks Rasta,
I want to add an Update to this Tutorial. For an Explanation on the update... there seems to be a conflict with Voiceovers that are defined in the raw\soundaliases folder.
The two files in Conflict are:
code.csv
multiplayer.csv
The conflict is as follows:
Because your maps soundalias defined your ambient play alias with the header
masterslave
which =
0.00001
, and all these voiceovers I'm referring to are defined as Master. Because they are Defined as Master, the Master alias will take all other alias's
masterslave
header and multiply it by the
min_vol
.
Meaning this:
if "master", this is a master sound. If a number, then this sound's volume will be multiplied by that number (a percentage between 0 and 1) any master sound is playing.
You will know if your having this conflict when any Voiceover, or Taunt (Enemy Spotted) will make Your Ambient Play drop its Volume to 0, when the Voiceover plays. And we don't want this happening when a player is outdoors, and a Voiceover plays, and cuts out the Ambient track right?! I know I don't so here is the fix for it.
The fix to this is simple. You need to include all the voiceovers from these two files that are Defined as
Master
. You need to put them in YOUR Soundalias, and change all the
Master
values to
0.5
. There are ALOT in the multiplayer.csv, and only 4 in the code.csv.
I would have included it, but there is a character limit of 20000 max, and posting all those alias's exceeds that max amount.
This whole process may seem complicated but really... its not. Once you understand what your doing here, its quite simple. I don't even know anyone else who is interested in doing this for their map, but it is a very cool effect for players. Unfortunately I'm refining it as I go along here and I'm also hoping that its understandable by all.
MODSonline.com Forums
: Call of Duty 4 :
CoD 4 Level Design
Myspace Layouts
|
Secured Loans
|
Life Insurance
|
Credit Cards
|
Mortgages
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.com can be found
News.php
.
Partners
Ask About
Advertising
Friends
Ask About
Advertising
Link to Us
468 x 60
468 x 60
468 x 60
150 x 400
140 x 40
Advertise
With Us
MODSonair
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
•
MODSonair Episode 134
•
MODSonair Episode 133
•
MODSonair Special CoD:WW Episode
•
MODSonair Episode 132
•
MODSonair Episode 131
Next Show
The next
MODSonair
show will air LIVE on:
07/06/2008 11:00 EDT
Time remaining:
Copyright
©
2008 MODSonline
Tresware Content Management System Copyright © 2008 Tresware
Website Designed and Hosted