Intro Skip with Click and Keyboard press

Started by sqpp, Tue 09/02/2016 14:46:41

Previous topic - Next topic

sqpp

Hello, i have a simple cutscene/intro when i starts the game, tried to make a simple function, but its doesn't work. I haven't got any error.

The character called cSalad

i tried the next in the Intro Room Script:

Code: ags

function on_key_press(eKeyCode keycode) 
{
  if (IsGamePaused()) keycode = 0; // game paused, so don't react to keypresses
  
  if (keycode == eKeyEscape) player.ChangeRoom(2, 100, 50); 
}


So if i would press ESC should be change the room to 2.

Any idea?

Danvzare

There's already cutscene functions.
StartCutscene() and EndCutscene().

You put StartCutscene() where you want the cutscene to start, and EndCutscene() where you want the game to skip to when you press a skip button.
It really is that simple.

sqpp

Thanks so much, you solved it :)

Next time, i should think before post :|

SMF spam blocked by CleanTalk