Quick time events?

● ARCHIVED · READ-ONLY
Started by Lyseth 5 posts View original ↗
  1. So is there a way to make a quick time event, in other words, where the player has to press a certain key over and over to try and break out of an obstacle. (like in mad father when you go into the bathroom)
  2. *bump*
  3. Hi!


    There's a lot of ways to do this, but here is the way I usually do it:

    • Set a variable to 0.
    • Make a loop.
    • In this loop check for a player button press via a conditionnal branch.
    • Each time the button is pressed add 1 to the variable and do whatever, play sound, shake the screen...
    • Then, with another conditional branch, check if the variable is >= to the number of times you want the player to press that button. If it is break loop.
    • Don't forget to add a small wait of 1 or 2 frames inside that loop.
  4. Astfgl66 said:
    Hi!


    There's a lot of ways to do this, but here is the way I usually do it:

    • Set a variable to 0.
    • Make a loop.
    • In this loop check for a player button press via a conditionnal branch.
    • Each time the button is pressed add 1 to the variable and do whatever, play sound, shake the screen...
    • Then, with another conditional branch, check if the variable is >= to the number of times you want the player to press that button. If it is break loop.
    • Don't forget to add a small wait of 1 or 2 frames inside that loop.



    Okay, also is there a way to make it that the player faces game over if they're too slow?
    • Set another variable to 0 before the loop.
    • Inside the loop add 1 to the variable.
    • Check if that variable has reached a suitable number that would be too log. The number itself depends on how much the wait inside the loop is. If you have a 1 frame wait, 60 would be one second.
    • If it has reached that number it means the player didn't complete the QTE in time so do whatever you want (trigger game over in your case).