Not sure what i didnt set right...

trying to do this thing... but.. i have default 816 x 624... lol i feel REALLY freakin dumb right now

https://forums.rpgmakerweb.com/index.php?threads/eventing-a-qte-time-hits-minigame.130698/

so.. as you can see.. the bar goes left and right .. just fine... you hit the goal.... and... WHERE IS THAT BAR GOING!??!?!?! Its yeeted itself right outta the window T.T


Event Code:
Spoiler
◆Comment:Sets variables for where pointer starts
◆Control Variables:#0021 QTE Pointer X = 204
◆Control Variables:#0022 QTE Pointer Y = 312
◆Comment:Sets variable for speed of pointer movement
◆Control Variables:#0023 QTE Pointer Speed = 1
◆Comment:Figures out where the goal will randomly be place
: :& sets variables for that
◆Control Variables:#0024 Goal Space Left = Random 204..408
◆Control Variables:#0025 Goal Space Right = $gameVariables.value(24) + 48
◆Control Variables:#0026 Goal Space Center = ($gameVariables.value(24) + $gameVariables.value(25))/2
◆Comment:Set switch so that pointer moves left at first
◆Comment:Set up Pictures
◆Control Switches:#0057 QTE Moving right? = ON
◆Show Picture:#61, bar, Center (408,312), (100%,100%), 255, Normal
◆Show Picture:#62, bargoul, Center ({Goal Space Center},{QTE Pointer Y}), (100%,100%), 255, Normal
◆Show Picture:#63, barpointer, Center ({QTE Pointer X},{QTE Pointer Y}), (100%,100%), 255, Normal
◆Loop
◆Wait:1 frame
◆Comment:Move the pointer
◆If:QTE Moving right? is ON
◆Control Variables:#0021 QTE Pointer X += QTE Pointer Speed
◆
:Else
◆Control Variables:#0021 QTE Pointer X -= QTE Pointer Speed
◆
:End
◆Show Picture:#63, barpointer, Center ({QTE Pointer X},{QTE Pointer Y}), (100%,100%), 255, Normal
◆Comment:Check if pointer is at end of the bar, & switches directions if so
◆If:QTE Pointer X ≤ 204
◆Control Switches:#0057 QTE Moving right? = ON
◆
:End
◆If:QTE Pointer X ≥ 612
◆Control Switches:#0057 QTE Moving right? = OFF
◆
:End
◆Comment:Check if player is hiting "ok"
: :
: :If they are, check if pointer is in the selection space.
◆If:Button [OK] is pressed down
◆If:Script:$gameVariables.value(21) >= $gameVariables.value(24) && $gameVariables.value(21) <= $gameVariables.value(25)
◆Comment:Pointer in goal
◆Play SE:Bell3 (50, 100, 0)
◆Comment:Speed up pointer & movesthe goal to a different spot
◆Control Variables:#0023 QTE Pointer Speed -= 1
◆If:QTE Pointer Speed = 2
◆Control Variables:#0024 Goal Space Left = Random 204..408
◆Control Variables:#0025 Goal Space Right = $gameVariables.value(24) + 48
◆Control Variables:#0026 Goal Space Center = ($gameVariables.value(24) + $gameVariables.value(25))/2
◆Show Picture:#62, bargoul, Center ({Goal Space Center},{QTE Pointer Y}), (100%,100%), 255, Normal
◆
:End
◆If:QTE Pointer Speed = 3
◆Comment:Successfully hit the goal enough times, so player wins the minigame
◆Text:Eurydice1(0), Window, Bottom
: :I knew you could do it
◆Control Switches:#0058 QTE Won the MiniGame = ON
◆Break Loop
◆
:End
◆
:Else
◆Comment:Pointer is NOT in the goal
◆Play SE:Buzzer2 (50, 100, 0)
◆Text:Hades1(1), Window, Bottom
: :Her soul is mine!
◆Break Loop
◆
:End
◆
:End
◆Comment:Exit Minigame if player hits "Cancel"
◆If:Button [Cancel] is pressed down
◆Break Loop
◆
:End
◆
:Repeat Above
◆Erase Picture:#61
◆Erase Picture:#62
◆Erase Picture:#63
◆If:QTE Won the MiniGame is ON
◆Text:Hades1(2), Window, Bottom
: :Ill get you next time...
: :and your little dog too@
◆Control Switches:#0058 QTE Won the MiniGame = OFF
◆
:End
>◆Control Variables:#0023 QTE Pointer Speed -= 1
Is this meant to be +1?
>◆Control Variables:#0023 QTE Pointer Speed -= 1
Is this meant to be +1?
Your right! Thank you!
That stopped the cursor from running away...



But i have a new issue now? O.O


so now what did i do wrong?! uggg, i sometimes dont understand and maybe im just looking at this stuff too long and need a break.. idk...
It's almost impossible to press a button for just a single frame. When the bar moves, it's still held down, triggering the loss condition.

Set If:Button [OK] is pressed down's condition to the script Input.isTriggered('ok');
Set If:Button [OK] is pressed down's condition to the script Input.isTriggered('ok');
Which...just to point out...is how it's done in the original tutorial 😉 Just that's based on MZ's event editor and MV doesn't have the option.

So it's a good little point for the OP, to notice that command looks different when entered and go for the question about that first.
It's almost impossible to press a button for just a single frame. When the bar moves, it's still held down, triggering the loss condition.

Set If:Button [OK] is pressed down's condition to the script Input.isTriggered('ok');
This worked like a charm THANK YOU!!
Which...just to point out...is how it's done in the original tutorial 😉 Just that's based on MZ's event editor and MV doesn't have the option.

So it's a good little point for the OP, to notice that command looks different when entered and go for the question about that first.
I missed that and i thank you for pointing that out... I forget that MZ has a different way of doing that stuff... like i have the desire to move all my projects over to MZ... but i get reminded that the way it works is ever so slightly different that its actually totally different when you compare it to what Im used to.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/not-sure-what-i-didnt-set-right.149949/