Is it possible to make a script that plays a MIDI everytime the subscreen is viewed by the player?
Music when the inventory is oepn?
Started by
/M/
, Feb 24 2008 10:10 AM
2 replies to this topic
#1
Posted 24 February 2008 - 10:10 AM
#2
Posted 24 February 2008 - 10:16 AM
Actually it might be.
You could try something like this:
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.
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();
}
}
}
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
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();
}
}
}
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.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users