Jump to content

Photo

Music when the inventory is oepn?


  • Please log in to reply
2 replies to this topic

#1 /M/

/M/

    6♣7♠8♥9♥10♥

  • Members
  • Location:Gotham City

Posted 24 February 2008 - 10:10 AM

Is it possible to make a script that plays a MIDI everytime the subscreen is viewed by the player?

#2 Joe123

Joe123

    Retired

  • Members

Posted 24 February 2008 - 10:16 AM

Actually it might be.

You could try something like this:
CODE
ffc script subscreen{
    void run(int mid){
    int orig;
        while(true){
            if(Link->InputStart){
                orig = Game->PlayMIDI();
                Game->PlayMIDI(mid);
                Waitframe();
                Game->PlayMIDI(orig);
            }
        Waitframe();
        }
    }
}


Where D0 is the midi to be played while the subscreen is open.
It would depend on being able to read what midi is currently playing though.
Which I think you can't.

#3 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 25 February 2008 - 09:23 PM



CODE
ffc script subscreen{
    void run(int mid,int dmap_midi){
    bool orig;
while(true){
        while(!orig){
            if(Link->InputStart){
                Game->PlayMIDI(mid);
                Waitframes(12);orig=true;
            }
        Waitframe();
        }
        while(orig){
            if(Link->InputStart){
                Game->PlayMIDI(dmap_midi);
                Waitframes(12);orig=false;
            }
        Waitframe();
        }
Waitframe();
}
    }
}


The music will restart every time you open your subscreen.....probably more annoying than cool.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users