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
Script Help Is this possible? (NEW question)
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: Is this possible?

I'm unsure how you plan on changing the music this freaquently, but let's see.

PHP Code: (Select All)
void OnStart()
{
    
PlayMusic(music 1 etc);
    
SetLocalVarInt("Music"1);
}

void SomeCallback()
{
    
PlayMusic(change to music 2);
    
SetLocalVarInt("Music"2); 
}

void CheckMusic()
{
    if(
GetLocalVarInt("Music") == 1) {
        
//Music track number 1.
    
}
    if(
GetLocalVarInt("Music") == 2) {
        
//Music track number 2.
    
}
    if(
GetLocalVarInt("Music") == 0) {
        
//No music.
    
}
}

void NoMusic()
{
    
StopMusic(whatever music);
    
SetLocalVarInt("Music"0);


This is a very basic example. I'm sure you'll figure out where to place these things. As I said, I'm unsure what you need this for so I can't really tell you exactly what to put, but it should be fairly similar.

06-11-2014, 05:24 PM
Find


Messages In This Thread
Is this possible? (NEW question) - by Neelke - 06-11-2014, 12:49 PM
RE: Is this possible? - by Mudbill - 06-11-2014, 01:27 PM
RE: Is this possible? - by Neelke - 06-11-2014, 04:18 PM
RE: Is this possible? - by Mudbill - 06-11-2014, 05:24 PM
RE: Is this possible? (NEW question) - by Neelke - 06-11-2014, 05:35 PM



Users browsing this thread: 1 Guest(s)