Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Explain the simplest way to use "different musics, different areas"
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#1
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 Smile

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
Find
ThePaSch Offline
Member

Posts: 108
Threads: 11
Joined: Sep 2010
Reputation: 0
#2
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
Find
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#3
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" Smile

Understand now?

“Life is a game, play it”
06-21-2011, 02:53 PM
Find
Russ Money Offline
Senior Member

Posts: 360
Threads: 25
Joined: Dec 2010
Reputation: 4
#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" Smile

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
Find
rojkish Offline
Junior Member

Posts: 45
Threads: 0
Joined: Jun 2011
Reputation: 0
#5
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
Find
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#6
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. Heart Big Grin

“Life is a game, play it”
06-21-2011, 03:46 PM
Find
rojkish Offline
Junior Member

Posts: 45
Threads: 0
Joined: Jun 2011
Reputation: 0
#7
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
Find
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#8
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. Big Grin


“Life is a game, play it”
06-21-2011, 11:58 PM
Find




Users browsing this thread: 1 Guest(s)