HumiliatioN
Posting Freak
Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation:
18
|
Explain the simplest way to use "different musics, different areas"
Yep how to use musics like "Big maps" different areas" I want this play to this area and stop and it plays different music like different area
Quick help needed!
EDIT: Somebody help im confused!!! :S
Cheers.
“Life is a game, play it”
(This post was last modified: 06-21-2011, 01:16 PM by HumiliatioN.)
|
|
06-21-2011, 12:29 PM |
|
ThePaSch
Member
Posts: 108
Threads: 11
Joined: Sep 2010
Reputation:
0
|
RE: Explain the simplest way to use "different musics, different areas"
Uh, sorry, but I seem to have no idea what you mean. Could you please rephrase?
|
|
06-21-2011, 02:37 PM |
|
HumiliatioN
Posting Freak
Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation:
18
|
RE: Explain the simplest way to use "different musics, different areas"
(06-21-2011, 02:37 PM)ThePaSch Wrote: Uh, sorry, but I seem to have no idea what you mean. Could you please rephrase?
I mean like how to use "Background sounds several areas" and NOT "Playing them same time if i wanna play 3 different sounds some areas"
Understand now?
“Life is a game, play it”
|
|
06-21-2011, 02:53 PM |
|
Russ Money
Senior Member
Posts: 360
Threads: 25
Joined: Dec 2010
Reputation:
4
|
RE: Explain the simplest way to use "different musics, different areas"
(06-21-2011, 02:53 PM)HumiliatioN Wrote: (06-21-2011, 02:37 PM)ThePaSch Wrote: Uh, sorry, but I seem to have no idea what you mean. Could you please rephrase?
I mean like how to use "Background sounds several areas" and NOT "Playing them same time if i wanna play 3 different sounds some areas"
Understand now?
Are you looking to change the music for different areas? Or have different sounds in the same area play at different times?
|
|
06-21-2011, 03:21 PM |
|
rojkish
Junior Member
Posts: 45
Threads: 0
Joined: Jun 2011
Reputation:
0
|
RE: Explain the simplest way to use "different musics, different areas"
You're meaning that you want to use different music in different areas?
In that case, just do a scriptarea and make the function;
PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);
Otherwise if you wanna do it like Russ Money said you could use local variables. i.e;
Spoiler below!
DifferentMusic();
void Differentmusic()
{
PlayMusic("", true, 1.0, 4.0, 0, true);
AddTimer("Music", 10, "Music");
}
void Music(string &in asTimer)
{
SetLocalVarInt("music", 1);
AddLocalVarInt("music", RandInt(10, 15));
if(GetLocalVarInt("music") == 1)
{
PlayMusic("", true, 1.0, 4.0, 0, true);
}
else
{
PlayMusic("", true, 1.0, 4.0, 0, true);
}
}
(This post was last modified: 06-21-2011, 03:30 PM by rojkish.)
|
|
06-21-2011, 03:23 PM |
|
HumiliatioN
Posting Freak
Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation:
18
|
RE: Explain the simplest way to use "different musics, different areas"
(06-21-2011, 03:23 PM)rojkish Wrote: You're meaning that you want to use different music in different areas?
In that case, just do a scriptarea and make the function;
PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);
Otherwise if you wanna do it like Russ Money said you could use local variables. i.e;
Spoiler below!
DifferentMusic();
void Differentmusic()
{
PlayMusic("", true, 1.0, 4.0, 0, true);
AddTimer("Music", 10, "Music");
}
void Music(string &in asTimer)
{
SetLocalVarInt("music", 1);
AddLocalVarInt("music", RandInt(10, 15));
if(GetLocalVarInt("music") == 1)
{
PlayMusic("", true, 1.0, 4.0, 0, true);
}
else
{
PlayMusic("", true, 1.0, 4.0, 0, true);
}
}
Thanks a thousand! Works like a dream.
“Life is a game, play it”
|
|
06-21-2011, 03:46 PM |
|
rojkish
Junior Member
Posts: 45
Threads: 0
Joined: Jun 2011
Reputation:
0
|
RE: Explain the simplest way to use "different musics, different areas"
If you like you could add the first function so it plays itself over and over again, I'll just post it all here;
Spoiler below!
DifferentMusic();
void Differentmusic()
{
PlayMusic("", true, 1.0, 4.0, 0, true);
AddTimer("Music", 10, "Music");
}
void Music(string &in asTimer)
{
SetLocalVarInt("music", 1);
AddLocalVarInt("music", RandInt(10, 15));
if(GetLocalVarInt("music") == 1)
{
PlayMusic("", true, 1.0, 4.0, 0, true);
}
else
{
PlayMusic("", true, 1.0, 4.0, 0, true);
DifferentMusic();
}
}
|
|
06-21-2011, 07:36 PM |
|
HumiliatioN
Posting Freak
Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation:
18
|
RE: Explain the simplest way to use "different musics, different areas"
(06-21-2011, 07:36 PM)rojkish Wrote: If you like you could add the first function so it plays itself over and over again, I'll just post it all here;
Spoiler below!
DifferentMusic();
void Differentmusic()
{
PlayMusic("", true, 1.0, 4.0, 0, true);
AddTimer("Music", 10, "Music");
}
void Music(string &in asTimer)
{
SetLocalVarInt("music", 1);
AddLocalVarInt("music", RandInt(10, 15));
if(GetLocalVarInt("music") == 1)
{
PlayMusic("", true, 1.0, 4.0, 0, true);
}
else
{
PlayMusic("", true, 1.0, 4.0, 0, true);
DifferentMusic();
}
}
Cool.
“Life is a game, play it”
|
|
06-21-2011, 11:58 PM |
|
|