View Full Version : Getting music running during the game
Kev_Hectic
12-13-2002, 09:37 AM
OK, I’m not trying to get my own music into the game, but I want to know is how do I get music to kick in at certain parts of a level?
For example in the game durring part two of the Subway level, as soon as you walk through the hole that leads into the bank vault, action music will start to play.
How would I be able to do something like this? do I have to build a cube or something and cover it with dummy textures? or is there another way?
Maddieman
12-13-2002, 10:27 AM
It's easy - all music and sound effects are controlled by fsm messages.
Create an fsm (usually a character trigger) and include the code:
</font><blockquote><font size="1" face="Verdana, Arial">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> maxpayne_gamemode->A_playmusic(mr_big); [/code]</blockquote><font size="2" face="Verdana, Arial">
Kev_Hectic
12-13-2002, 10:46 AM
Oh right, thanks images/icons/smile.gif Collision triggers. It's been a while since I used MaxED so I forgot about stuff like that. I guess I'll attach music to the triiger that opens the door to the room I want to play music in.
OK my next question is there any way to shut off music when exiting? I only want music to play in certain areas.
Maddieman
12-13-2002, 10:48 AM
It's easy - Turning off music and sound effects is controlled by fsm messages.
Create an fsm (usually a character trigger) and include the code:
</font><blockquote><font size="1" face="Verdana, Arial">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> maxpayne_gamemode->A_playmusic( \"\" ); [/code]</blockquote><font size="2" face="Verdana, Arial">images/icons/wink.gif
Co&Co
12-13-2002, 10:52 AM
.........mr_big is the name of the song. The songs which you can choose from are stored in (normally)....data/database/music.
When you place (for example) a character trigger don't forget to put "this->T_Enable(false)" at the end, so your song won't be replayed everytime you cross the trigger.
good luck
Kev_Hectic
12-13-2002, 11:33 AM
I already knew where the game music was stored, but thanks for the help anyway.
Now I have another problem though graemlins/doh.gif this one is sort of unrelated to the last two questions, but it is about game music...
I was going to add some original game music to the options/ title screen, I know how to add music (Add a .wav to database> sounds folder, then edit the menu text) but it won't play, I keep getting an error message.
I'm guessing it's not working because I'm recording the music in Windows sound recorder that came with Win98 (To PCM,44,100 Hz, 8 Bit, Mono). I probably need to use a different program, am I right about this?
Co&Co
12-13-2002, 11:52 AM
No,....windows sound recorder works just fine. Try to save your .wav as follow:
Microsoft ADPCM, 44.100Hz, 4bit, stereo
I think it will work now (it works for me), if not tell me and I will try to find a solution images/icons/wink.gif
good luck
Maddieman
12-13-2002, 08:43 PM
Seeing as we're on the subject of sound effects and music, does anyone know if there is there a way to enable echos in certain rooms?
Kev_Hectic
12-14-2002, 12:05 AM
OK cool, thanks for the help. I'll try that.
Co&Co
12-14-2002, 03:31 AM
I don't think this possible, what you could do is: edit the sound which you want to echo (so you have an echo sound on itself) and then trigger it when you cross a certain point.
I think this is the only way, I haven't tried myself though images/icons/wink.gif
good luck
Maddieman
12-14-2002, 07:59 AM
Thanks. images/icons/smile.gif
Mapping isn't really my field, so I was wondering if there was an option to make a room echo the sounds played in it. Well, maybe it's something Remedy could consider for MaxEd 2 (although it's probably a bit too late in development for additions).
I had considered the more deliberate, creating a custom echo sound idea; but ideally I want it for enemies and such like, who can move from room to room.
Nevermind, I think I can still achieve the effect I was after.
Maddieman
12-14-2002, 04:31 PM
Ok, I've just had one of those wacky programmer ideas. It just 'clicked' a few minutes ago, so I haven't tried it or thought it through yet. http://forums.3drealms.com/ubb/icons/icon115.gif
But, here goes.....
I copy the sound effect which I want to echo, and make an echo version of it with a sound editing program. I then make a special projectile called 'echo' and fire that when I want the character to shout (or whatever sound I want to echo). The projectile then richochets around the room/level x many times, and during each contact with a wall, it plays the echo sound effect. Crazy, but with the right parameters I might just be able to get it working the way I want it to.
- I'll try it out later. images/icons/smile.gif
Co&Co
12-15-2002, 04:12 AM
It sounds logical.......but I don't have the faintest idea if it could work yes or no.
I'm not a programmer myself ( I'm a MaxEd professional images/icons/wink.gif ), but it sounds like it could work.
good luck with it.
vBulletin® v3.8.0 Beta 3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.