Mittens 2018 will be in Boston this September. There are three spaces left, so check out the thread for details!

Author Topic: Custom Key for Skipping Cutscenes  (Read 169 times)

Custom Key for Skipping Cutscenes
« on: 19 Nov 2017, 04:40 »
Hello!  I'd like to use a custom key (specifically, spacebar*) for skipping cutscenes.  For dialog, there's Speech.SkipKey, but no such option exists for cutscenes.

To tackle this problem, my ideas are:

Idea #1: I can log a feature request for the equivalent of Speech.SkipKey for cutscenes (or, specific to my case, eSkipSpacebar for the StartCutscene() call). However, this is dependent on the Powers-that-Be agreeing it's a worthwhile feature and eventually putting it in a future release.

Idea #2: I can start cutscenes with StartCutscene(eSkipESCOnly), and then add a clause in repeatedly_execute_always() that, if spacebar is pressed, issues an Esc keypress.  However, while there's a way of issuing a click (e.g. Room.ProcessClick), I don't believe there's a way of issuing a keypress.

So my questions become:
* Beyond the ideas mapped out above, is there a way of using a custom key to skip cutscenes?
* Is there a way of issuing a keypress in the AGS scripting language?


* - Here's why I'd like to use a custom key:

AGS allows cutscenes to be skipped with Esc, Esc-or-rightclick, any key, any click, or any key-or-click.  I'd like to use Esc for opening the main menu (which seems a standard use of Esc, no?) and right-click for opening the inventory, and I'd like to minimize the chance of the user skipping the cutscene accidentally which using any key, any click, or any key-or-click would certainly trigger, as would using a key already mapped to another function (in this case, Esc or right-click).