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"
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


Messages In This Thread
RE: Explain the simplest way to use "different musics, different areas" - by rojkish - 06-21-2011, 03:23 PM



Users browsing this thread: 1 Guest(s)