Disable "ESC" key during cutscenes

  • #1, by smac96Monday, 13. May 2013, 17:41 11 years ago
    Hi,

    I love using cutscenes. As someone already wrote in the forum, It is the best way to prevent players from being able to move the main character around the screen or perform actions while whatever actions are listed inside of the cutscene are being performed!

    But I have a problem: if the player press the ESC key during a cutscene in order to skip it (good!), all the actions inside it are skipped too (not good!). I mean, ALL. If for example some game variables have to be set to TRUE only during the cutscene, the ESC key disable this changes too!. I partially solved the problem moving some variables before or after a cutscene. But the problem remains because some variables have to change only during the cutscene.

    I think a good solution could be to disable the ESC key and prevent players to skip important cutscenes. So, is there any easy way to disable the ESC key during cutscenes? Or is there another solution?

    Thank you!

    Newbie

    97 Posts


  • #2, by afrlmeMonday, 13. May 2013, 18:13 11 years ago
    conditions & values should be set correctly afterwards providing you are setting them inside of the begin/end cut-scene action parts provided they are not being set via a called by other action part.

    to disable all key input & mouse then use the "hide cursor" action part under miscellaneous then un-hide it after the cut-scene has ended.

    Imperator

    7278 Posts

  • #3, by smac96Monday, 13. May 2013, 18:48 11 years ago
    Thank you for the answer.

    The "Hide cursor" action part doesn't work. If I press the ESC key the cutscene is skipped as usual. Should I change other settings to let the "Hide cursor" works correctly in order to disable the ESC key?

    I was hoping not to re-code all the cutscenes :-)

    Newbie

    97 Posts

  • #4, by BigStansMonday, 13. May 2013, 20:05 11 years ago
    Hi,

    if there is a cutscene running, no key is being accepted, except the ESC key, which skips the cutscene.
    We are sure, that the player who hits it, known what he does, it simply was the Escape key.

    Great Poster

    361 Posts

  • #5, by afrlmeTuesday, 14. May 2013, 01:08 11 years ago
    yeah using the hide/show cursor action parts will work if you don't want to allow player to be able to skip a cut-scene - I guess it's the same thing as a cut-scene really; minus the ability to use key-input.

    Imperator

    7278 Posts

  • #6, by smac96Tuesday, 14. May 2013, 11:50 11 years ago
    Do you mean I have to use the "hide/show cursor" action instead of using "begin/end cutscene"? This could work smile Let me try smile

    Newbie

    97 Posts

  • #7, by smac96Tuesday, 14. May 2013, 11:55 11 years ago
    Yes. It works fine! I have to figure out if there are some issues about this change but it works. Thank you again!!!

    By the way:
    - is there anyway a command or a code (execute a script) or something to disable the ESC key?
    - what is the "Disable interaction during character animations" option under the game settings?

    Newbie

    97 Posts

  • #8, by afrlmeTuesday, 14. May 2013, 13:54 11 years ago
    disable interaction during character animations is to prevent the player from clicking a new destination or action while the current character is performing an action which is usually using the "character animations" - I guess.

    there is no control/commands for the key input using Lua at the minute.
    best method when you want to create cut-scenes the player can't skip would be to use the hide/show cursor as previously mentioned.

    Imperator

    7278 Posts

  • #9, by BigStansTuesday, 14. May 2013, 21:14 11 years ago
    Hide cursor ? Was not needed.

    Simply turn off: Always allow to skip active text in the Game options (like the screen).Then the player can not skip Cutscenes with mouse interactions.

    Use "Begin of Cutscene" and "End of Cutscene" like in the Demogame. Cutscenes are already hide the cursor. If "Always allow to skip active text" was deactivated, then the player can not skip it.

    You can not prevent the ESC key will all options. ESCcape was simply escape.

    Great Poster

    361 Posts

  • #10, by afrlmeTuesday, 14. May 2013, 21:37 11 years ago
    David, he means to prevent the user from skipping cut-scenes in general.

    hide cursor works same way as the cut-scene action parts except it completely kills all user key/mouse input from being registered.

    I use hide cursor for instance when I'm saving configuration settings in my options menu to prevent the user from clicking on anything or using any of the keys while the config.ini is being updated & after x pause time I show the cursor again. (simple & effective)

    Imperator

    7278 Posts