Hey,
so I'm pretty much stuck at an event I'm trying to do. I want to have a little dance minigame. Basically arrow or spacebar pictures will be shown and if the player presses the corresponding key correctly, the player moves and you get 1 point. The big problem I have now, is that the button input doesn't work correctly, very unreliable. Sometimes when I press the right button, it registers it, but most of the time, it doesn't and I don't know why.
I have two variables that control the difficulty. One is Button Difficulty which is set at the beginning of the dance. It basically says how many buttons will be asked to press in total. So, every time a picture is shown, the variable counts down until it is at zero and then the game stops. The other variable is Fast Buttons. It can also be set at the beginning of the dance. It is responsible for how long the player has time to press a button until the next picture shows up. Basically I have a Button Timer variable that counts up and if it hits the same count of the Fast Button, your time is up.
Both work, I think.
Then I have a Press Button, which randomize between 5 settings: down, left, right, up, spacebar ©. So, the idea is that I have a loop in the minigame event. It loops through the Dancing common times as many times as the Button Difficulty. Every time it loops, it chooses one of the 5 settings at random. If the player presses the right button before the time runs out, the sprite should move a bit and the variable good dancemove counts up.
BUT - as I said, the input triggers only once every 10 times or something like that. I don't know why. Do I have too many things going on that the event has to cycle through?
Is the setting of my minigame event a problem (action button since it is an npc that starts the game). Should I switch the actual minigame over to a parallel processing?
If you want to help me out and tinker a bit with the problem, I have uploaded the game file.
https://dl.dropboxusercontent.com/u/1576581/Mini%20Games.exe
Little problem.. the thing is currently in german. I mean, the dialogues. Talk to the green-clothed guy in front of the stairs, choose the second option ("Tanzen"). It should transport you to the dancing area. Talk to the woman with the bunny ears to start the dancing. Every dance costs 5 gold. Talk to the old woman behind the counter to get 50 gold every time. You should start with 200 gold.
Thanks to everyone helping me out.
so I'm pretty much stuck at an event I'm trying to do. I want to have a little dance minigame. Basically arrow or spacebar pictures will be shown and if the player presses the corresponding key correctly, the player moves and you get 1 point. The big problem I have now, is that the button input doesn't work correctly, very unreliable. Sometimes when I press the right button, it registers it, but most of the time, it doesn't and I don't know why.
I have two variables that control the difficulty. One is Button Difficulty which is set at the beginning of the dance. It basically says how many buttons will be asked to press in total. So, every time a picture is shown, the variable counts down until it is at zero and then the game stops. The other variable is Fast Buttons. It can also be set at the beginning of the dance. It is responsible for how long the player has time to press a button until the next picture shows up. Basically I have a Button Timer variable that counts up and if it hits the same count of the Fast Button, your time is up.
Both work, I think.
Then I have a Press Button, which randomize between 5 settings: down, left, right, up, spacebar ©. So, the idea is that I have a loop in the minigame event. It loops through the Dancing common times as many times as the Button Difficulty. Every time it loops, it chooses one of the 5 settings at random. If the player presses the right button before the time runs out, the sprite should move a bit and the variable good dancemove counts up.
BUT - as I said, the input triggers only once every 10 times or something like that. I don't know why. Do I have too many things going on that the event has to cycle through?
Is the setting of my minigame event a problem (action button since it is an npc that starts the game). Should I switch the actual minigame over to a parallel processing?
If you want to help me out and tinker a bit with the problem, I have uploaded the game file.
https://dl.dropboxusercontent.com/u/1576581/Mini%20Games.exe
Little problem.. the thing is currently in german. I mean, the dialogues. Talk to the green-clothed guy in front of the stairs, choose the second option ("Tanzen"). It should transport you to the dancing area. Talk to the woman with the bunny ears to start the dancing. Every dance costs 5 gold. Talk to the old woman behind the counter to get 50 gold every time. You should start with 200 gold.
Thanks to everyone helping me out.

