Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: rockthe on Sun 14/04/2019 06:57:17

Title: Change room if you do click or not
Post by: rockthe on Sun 14/04/2019 06:57:17
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: Slasher on Sun 14/04/2019 08:15:36
This was asked exactly like pakolmo in NOV 2016

answer was

Code (ags) Select

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.