Jump to content

Photo

Subscreen sounds


  • Please log in to reply
2 replies to this topic

#1 Alestance

Alestance

    Saint Alestance - Eliminator of the ZGP format

  • Members
  • Real Name:Lonk
  • Location:Pennsylvania

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?

Edited by Alestance, 01 August 2009 - 10:50 AM.


#2 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

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 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

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

Posted 01 August 2009 - 05:04 PM

You can try something like this:

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.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users