Minigame help

Hi guys im trying to make a weight lifting mini game.
The basic idea would be that by pressing 'ENTER,' the character lifts the weight.
The position of the weight would be illustrated by different pictures. (To every points we earn by pressing ENTER belong 1 image.
There would be a resistance( force(Counterweight) that pulls the weight back.
Each time the player reaches 20 points (by pressing ENTER), he gets 1 StrengthPoint. (After 3 StrengthPoints the game ends.)
(It would be exactly like in GTA San Andreas, for those who have played it, they will know.)

The problem I'm facing is that everything works flawlessly until the player reaches the 3rd StrengthPoint, and then for some reason, the event starts repeating itself. As you can see in the images, the game displays the word "win," and I set it to switch to the next page with a Self Switch. However, it keeps repeating just the word "win." I've tried every possible solution that came to my mind, but I couldn't resolve it.

I didn't provide explanations for the 4th and 5th pages because I assume it's evident that they are responsible for switching between images.

Thank you in advance for your help!"
I wonder if because you are not exiting the loop when you "win" (screenshot 7), it just keeps repeating it over and over.

See if this logic works:

Code:
If StrengthPoints >=3
{
break loop
}
...
Repeat Above
Text: WIN
Control Self Switch A = ON.
I wonder if because you are not exiting the loop when you "win" (screenshot 7), it just keeps repeating it over and over.

See if this logic works:

Code:
If StrengthPoints >=3
{
break loop
}
...
Repeat Above
Text: WIN
Control Self Switch A = ON.
YES! That was working! I was a little confused cuz the "erase picture" order didnt make the picture disappear but i just realized that the other parralel event always brought it back that was the reason.
Thank you so much man, you saved my life!
Oh no, sorry it's still not good. Im not sure if i used well the code you wrote. I tried these 2 methodes.


At the first one it ends the event well but i press ENTER one time and the weight jump to the top immediately and get one StrengthPoint.. So there is something wrong with the Picture point counter.


At the second one after the counting back it writes out immediately "win" and ends the event.
Maybe instead of a self switch (which I’m not sure how you are turning it off to restart the mini game) you can use a normal switch and turn it off at the start of the mini game? turn off the GymMiniGame switch instead.
Maybe instead of a self switch (which I’m not sure how you are turning it off to restart the mini game) you can use a normal switch and turn it off at the start of the mini game? turn off the GymMiniGame switch instead.
I just realized i deleted the Wait 1 frame.. That was the reason :'D
With your method now it works perfectly fine thank you!

Original thread: https://forums.rpgmakerweb.com/threads/minigame-help.161502/