QTE : Fail System
Hello masters!
How do you add a fail system to the game? The breakdown code can only fail if the timer runs out meaning you can button mash the keys without a care in the world. A straightforward fraud.
My intention is if the player presses any key besides E for example, it will instantly go to the fail scene. I am very sure it can be done. Because it's technically still scene navigation.
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
function keyDownHandler(e:KeyboardEvent):void
{
if (currentScene.name == "Scene 1")
{
if (e.keyCode == Keyboard.E)
gotoAndPlay(1, "Scene 2 transfer");
}
}
stage.focus = stage;
if (!stage.hasEventListener(KeyboardEvent.KEY_DOWN))
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);

I hope you'll understand! Thanks!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
