How to skip an introduction room on mouse click

Started by padilin127, Sun 28/07/2019 00:26:41

Previous topic - Next topic

padilin127

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

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

Mandle

There's a function to do this.

Check out the "Cutscene" functions.

SMF spam blocked by CleanTalk