Is it possible to create a Quick Time Event game?
The title pretty much says it.
I am trying to make a Quick Time Event system in which the player has to press a certain key to move on. I already know it is possible with a mouse.
If possible, how can you let a key command in actions to only work in an individual scene? I have recently discovered when you press on an assigned key (E) correctly, it would go to the next but pressing or holding on the same key while it's on a different scene will cycle through the scenes. When I assign (F) to the next attack, both E and F would cycle through them. This leaves me to believe that the code I copied somewhere didn't have a command to stop it when it reaches the next scene. Extra notes - "a next scene command" was not added, it's just a go-to command assigned to the last frame of the scene. If you like, add something better besides gotoAndPlay(98);
Using the same Character is also a problem because for some reason it goes back to the layer I first assigned to.
My intention is
I want only a single key to work for each scene, is there a way to stop the script once the duration of the scene was reached? I also want the keys to be reusable later on.
Oh yeah, and also I want the assigned key to be no longer pressable when my animated timer runs out.
Thanks: by an inexperienced scripter ![]()
Please, give me your suggestions.
Scene 1
stage.addEventListener(KeyboardEvent.KEY_DOWN, KeyPressed);
function KeyPressed(evt:KeyboardEvent):void {
if (evt.keyCode==Keyboard.E){
gotoAndPlay(98);
}
}
Scene 2
stage.addEventListener(KeyboardEvent.KEY_DOWN, KeyPress);
function KeyPress(evt:KeyboardEvent):void {
if (evt.keyCode==Keyboard.F){
gotoAndPlay(71);
}
}
Image Problem Example

no seriously...
