Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


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

Posts: 1,155
Joined: Dec 2010
Reputation: 16
Post: #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!!! Confused

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 all posts by this user Quote this message in a reply
ThePaSch Offline
Member

Posts: 106
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
HumiliatioN Offline
Posting Freak

Posts: 1,155
Joined: Dec 2010
Reputation: 16
Post: #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 all posts by this user Quote this message in a reply
Russ Money Offline
Senior Member

Posts: 360
Joined: Dec 2010
Reputation: 4
Post: #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 all posts by this user Quote this message in a reply
rojkish Offline
Junior Member

Posts: 45
Joined: Jun 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
HumiliatioN Offline
Posting Freak

Posts: 1,155
Joined: Dec 2010
Reputation: 16
Post: #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 all posts by this user Quote this message in a reply
rojkish Offline
Junior Member

Posts: 45
Joined: Jun 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
HumiliatioN Offline
Posting Freak

Posts: 1,155
Joined: Dec 2010
Reputation: 16
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)