Demondays1
Member
Posts: 57
Threads: 7
Joined: Jun 2012
Reputation:
0
|
how to add music when I start my CS?
I was wondering, I tried looking at the scripts but I am just not doing it correctly?
This is what I have:
void OnStart()
{
StopMusic(60, 1);
PlayMusic("brandon2.ogg", false, 1, 0, 10, false);
}
And yes, I do have my brandon2.ogg in the music folder.
What StopMusic does:
afFadeTime - time in seconds until music stops
alPrio - the priority of the music that should stop
What PlayMusic does:
asMusicFile - the music to play + extension .ogg
abLoop - determines whether a music track should loop
afVolume - volume of the music
afFadeTime - time in seconds until music reaches full volume
alPrio - priority of the music. Note that only the music with the highest priority can be heard! 0 - highest, 1 - lower, etc
Intel HD Lag fix: tiny.cc/pyv1gw
(This post was last modified: 06-14-2012, 04:20 AM by Demondays1.)
|
|
06-14-2012, 04:19 AM |
|
Adny
Posting Freak
Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation:
173
|
RE: how to add music when I start my CS?
Int alPrio is so way too high. try replacing the 10 with a 0 or 1. The lower the number, the higher the priority, meaning it has a higher priority to be played (ie if you have other sounds with a higher priority, they will play instead of your music.)
Hope that helps
I rate it 3 memes.
|
|
06-14-2012, 04:25 AM |
|
Demondays1
Member
Posts: 57
Threads: 7
Joined: Jun 2012
Reputation:
0
|
RE: how to add music when I start my CS?
(06-14-2012, 04:25 AM)andyrockin123 Wrote: Int alPrio is so way too high. try replacing the 10 with a 0 or 1. The lower the number, the higher the priority, meaning it has a higher priority to be played (ie if you have other sounds with a higher priority, they will play instead of your music.)
Hope that helps Changed it a bit, here is how it is:
void OnStart()
{
PlayMusic("brandon2.ogg", false, 0.5f, 0.5f, 0, false);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
StopMusic(5.0f, 0);
}
I have the .ogg and .snt still not working.
Intel HD Lag fix: tiny.cc/pyv1gw
(This post was last modified: 06-14-2012, 04:33 AM by Demondays1.)
|
|
06-14-2012, 04:29 AM |
|
Adny
Posting Freak
Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation:
173
|
RE: how to add music when I start my CS?
hmm, what software did you use to make/convert your .ogg? (also, .snt is not necessary for the playmusic function)
I rate it 3 memes.
|
|
06-14-2012, 05:01 AM |
|
Demondays1
Member
Posts: 57
Threads: 7
Joined: Jun 2012
Reputation:
0
|
RE: how to add music when I start my CS?
(06-14-2012, 05:01 AM)andyrockin123 Wrote: hmm, what software did you use to make/convert your .ogg? (also, .snt is not necessary for the playmusic function) I didnt convert it, I just changed the .Mp3 extension to .Ogg
Intel HD Lag fix: tiny.cc/pyv1gw
|
|
06-14-2012, 06:56 AM |
|
Adny
Posting Freak
Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation:
173
|
RE: how to add music when I start my CS?
As in renaming it? That seems to be the problem right there. Sadly, simply renaming it won't work; personally, I use Audacity, a free sound editor:
http://audacity.sourceforge.net/
Simply open the program then drag & drop your original mp3 file into it. Next, click file > export. Before choosing where to save it, make sure you have "Save as type:" set to "Ogg Vorbis Files". After letting it export properly, you will have a fully functional .ogg to use in Amnesia. If you have any further questions, feel free to ask or pm me.
Hope that helped
I rate it 3 memes.
|
|
06-14-2012, 07:55 AM |
|
|