Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: pakolmo on Mon 28/11/2016 03:10:02

Title: Change room if you do click or not
Post by: pakolmo on Mon 28/11/2016 03:10:02
I have a  StartCutscene(eSkipAnyKeyOrMouseClick); with EndCutscene();

I want go to different room if I did mouse click or I was waiting the cutscene.
For click: Room 3
Without click: Room4
Title: Re: Change room if you do click or not
Post by: Gurok on Mon 28/11/2016 03:19:40
You can check to see whether the cutscene is being skipped before it ends:

bool skipped;

StartCutscene(eSkipAnyKeyOrMouseClick);
/*
.
. Your cutscene code
.
*/
if(Game.SkippingCutscene)
    skipped = true;
EndCutscene();
/* ... */
if(skipped)
    player.ChangeRoom(3);
else
    player.ChangeRoom(4);


Note: This will also take the player to room 3 if the player pressed a key to skip the cutscene. You didn't mention key presses, so I'm not sure if that was what you were after.
Title: Re: Change room if you do click or not
Post by: pakolmo on Mon 28/11/2016 05:05:02
Thank you! It worked!