# Minigame help

#### Ryuka

##### Regular
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.

#### Attachments

• 1.png
268.7 KB · Views: 17
• 2.png
260.5 KB · Views: 19
• 3.png
124 KB · Views: 16
• 4.png
173.5 KB · Views: 14
• 5.png
160.9 KB · Views: 14
• 6.png
292.2 KB · Views: 22
• 7.png
141.9 KB · Views: 18

#### TESTOSTERONE

##### Nosey aren't ya?
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.``````

#### Ryuka

##### Regular
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!

#### Ryuka

##### Regular
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.

#### Attachments

• 9.png
135.7 KB · Views: 5
• 10.png
135.6 KB · Views: 5

#### TESTOSTERONE

##### Nosey aren't ya?
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.

Last edited:

#### Ryuka

##### Regular
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!

#### Attachments

• 11.png
134.5 KB · Views: 4

### Latest Profile Posts

Looooooonnnnggg maaaaannnnn
Yknow what? Im seriously considering recruiting a manager to oversee my games development.
Because I cannot focus or complete these tasks by myself. I need someone to give me orders, without having them be my boss.

Remember my latest plugin for rpg maker mz:

Acknowledgement Window is now available!

Take a look here:

Got my focus back, 9/59 maps have the door fix in place now.