Jibble

Author Topic: Change room if you do click or not  (Read 103 times)

Change room if you do click or not
« on: 14 Apr 2019, 06:57 »
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

Slasher

  • slasher
    • I can help with AGS tutoring
    • Lifetime Achievement Award Winner
    • I can help with scripting
    • I can help with story design
    • Slasher worked on a game that was nominated for an AGS Award!
Re: Change room if you do click or not
« Reply #1 on: 14 Apr 2019, 08:15 »
This was asked exactly like pakolmo in NOV 2016

answer was

Code: Adventure Game Studio
  1. bool skipped;
  2.  
  3. StartCutscene(eSkipAnyKeyOrMouseClick);
  4. /*
  5. .
  6. . Your cutscene code
  7. .
  8. */
  9. if(Game.SkippingCutscene)
  10.     skipped = true;
  11. EndCutscene();
  12. /* ... */
  13. if(skipped)
  14.     player.ChangeRoom(3);
  15. else
  16.     player.ChangeRoom(4);
  17.  
  18.  
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.
« Last Edit: 14 Apr 2019, 08:19 by Slasher »