Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: padilin127 on Sun 28/07/2019 00:26:41

Title: How to skip an introduction room on mouse click
Post by: padilin127 on Sun 28/07/2019 00:26:41
I have an introduction room, that one it has loaded, it plays some music and displays the name of the game and plays the credits. The issue is I want it so that if you left-click during the title sequence, you will be able to skip it.
I have my code like this
Code (ags) Select

function room_AfterFadeIn()
{
 
  disable_gui();
 

  aMusic1.Play(eAudioPriorityVeryHigh);
  Wait(100);
 
//line 1
  FadeIn(ShowTextCentered("(game name)"));
 
  Wait(400);
 
  FadeOut(ShowTextCentered("(game name)"));
  Wait(50);
}
  function on_mouse_click(MouseButton button) {
    cChar1.ChangeRoom(3,150, 160);
   
   
  }


the code as is does allow you to exit the introduction room but only once the credits and all that have played, and I would like it that you would be able to skip the credits at anytime
Title: Re: How to skip an introduction room on mouse click
Post by: Mandle on Sun 28/07/2019 02:10:17
There's a function to do this.

Check out the "Cutscene" functions.