Edited by Alestance, 01 August 2009 - 10:50 AM.
Subscreen sounds
Started by
Alestance
, Aug 01 2009 10:49 AM
2 replies to this topic
#1
Posted 01 August 2009 - 10:49 AM
Like in Link to the Past, I want the subscreen to play an opening sound when opened too, and a closing sound when closed to. Whats the possibility of this being possible?
#2
Posted 01 August 2009 - 11:12 AM
You can make it open by having a section in your global script, but you can't close it because scripts don't run while the subscreen is open.
Edited by Christian, 01 August 2009 - 11:16 AM.
#3
Posted 01 August 2009 - 05:04 PM
You can try something like this:
bool bStart;
//in global loop
if(Link->InputStart)
{
if(!bStart)
{
Link->InputStart = false;
Game->PlaySound(s);
bStart=true;
} else {
bStart = false;
Waitframe();
}
}
edit: Oh, you wan't it to play again when closing the subscreen...
..hmm...
bool bStart;
//in global loop
if(Link->InputStart)
{
if(!bStart)
{
Link->InputStart = false;
Game->PlaySound(s);
bStart=true;
} else {
bStart = false;
Waitframes(1); // you might have to mess with this number
Game->PlaySound(s); //the subscreen should be closed at this point.
}
}
CODE
bool bStart;
//in global loop
if(Link->InputStart)
{
if(!bStart)
{
Link->InputStart = false;
Game->PlaySound(s);
bStart=true;
} else {
bStart = false;
Waitframe();
}
}
edit: Oh, you wan't it to play again when closing the subscreen...
..hmm...
CODE
bool bStart;
//in global loop
if(Link->InputStart)
{
if(!bStart)
{
Link->InputStart = false;
Game->PlaySound(s);
bStart=true;
} else {
bStart = false;
Waitframes(1); // you might have to mess with this number
Game->PlaySound(s); //the subscreen should be closed at this point.
}
}
Edited by Gleeok, 01 August 2009 - 05:07 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users