Pressing OK Activates Picture and Text?

Hi,

I have an event where I want to have a full picture on screen and when you click OK text appears, and when you click OK again, the picture and text disappear. I've basically accomplished this, but there's one problem: when I initiate the event (by pressing the OK button) both the picture and text come up at the same time, rather than picture first then text. What am I doing wrong?

See screenshot for the event.

Thank you.
Untitled.jpg
the conditional branch "button pressed" checks if the button is pressed the moment the command is executed.
it does not count how often the button is pressed, and no player can release the button fast enough to not count for the entire sequence.

you need to use other mechanism, for example an invisible show text to wait for the next button and similar options
the conditional branch "button pressed" checks if the button is pressed the moment the command is executed.
it does not count how often the button is pressed, and no player can release the button fast enough to not count for the entire sequence.

you need to use other mechanism, for example an invisible show text to wait for the next button and similar options
Could you show me or walk me through how to do that please?
Hi there!
I think this is better handled by a parallel or autorun event. Because you need to check if the player will presss the button.
I would do this way:
Page 1 → Show the picture, set a wait 30 frames, so when switching pages the engine will not process the press ok button to fast. Activate self switch A and change to another page. (If the Priority of the event is Belo Characters, maybe you should consider setting it's trigger to Player Touch instead of Action Button)
1759441454519.png


Page 2 → We start with a 10 frames wait, just to hold the even in case the player hits the OK button too fast. The self switch B will start as OFF, so the else branch will be executed first when the player presses the OK button. Then, we set the self switch B to on, so next time the player presses the OK button, it will erase the picture.
1759441577876.png


Now, it's important for you to find a way to stop your parallel event. Eiter by erasing the event or activating another self switch to a blank page or setting Self switch A to OFF to return to the first page.

The Wait frames command are also important so you can have more control over the pressing button from the player. That values I put there, may not be the best. You will have to play with it to find the value that works for you.

Hope it helps.
Hello! An alternative way of doing this would be to use an empty text box with transparent background just before the actual text box. Since there's no text in the first box with no background, nothing will appear except the text cursor which gives the player indication that he can hit ok as the picture is displayed.
Then the second text box with text will appear and the erase command comes after; like this:
Capture d’écran, le 2025-10-02 à 19.13.08.png

Of course, Eli's method would work too, just showing another way.

Regards!
Hi there!
I think this is better handled by a parallel or autorun event. Because you need to check if the player will presss the button.
I would do this way:
Page 1 → Show the picture, set a wait 30 frames, so when switching pages the engine will not process the press ok button to fast. Activate self switch A and change to another page. (If the Priority of the event is Belo Characters, maybe you should consider setting it's trigger to Player Touch instead of Action Button)
View attachment 350521

Page 2 → We start with a 10 frames wait, just to hold the even in case the player hits the OK button too fast. The self switch B will start as OFF, so the else branch will be executed first when the player presses the OK button. Then, we set the self switch B to on, so next time the player presses the OK button, it will erase the picture.
View attachment 350522

Now, it's important for you to find a way to stop your parallel event. Eiter by erasing the event or activating another self switch to a blank page or setting Self switch A to OFF to return to the first page.

The Wait frames command are also important so you can have more control over the pressing button from the player. That values I put there, may not be the best. You will have to play with it to find the value that works for you.

Hope it helps.
Hi! I'm so sorry for the delay in response! Thank you for the help, though your method didn't quite work in the way I wanted to.

What I eventually figured out is the method suggested by TSR and Andar though slightly different: I created the event with a conditional branch of 'if press OK' that leads to a self switch (instead of an invisible text box as I couldn't figure out how to make a text box transparent though I'm sure that's possible to do); then on the next page I have another OK branch that shows text and ends with another self switch; last page has the last OK branch that erases picture and ends the self switches. This way the player has to initiate the event with the action button and can be repeated ad infinitum.

Thank you again!
Hello! An alternative way of doing this would be to use an empty text box with transparent background just before the actual text box. Since there's no text in the first box with no background, nothing will appear except the text cursor which gives the player indication that he can hit ok as the picture is displayed.
Then the second text box with text will appear and the erase command comes after; like this:
View attachment 350538
Of course, Eli's method would work too, just showing another way.

Regards!
Thanks! My eventual solution was close to your suggestion, see my response to
Eliaquim above!

the conditional branch "button pressed" checks if the button is pressed the moment the command is executed.
it does not count how often the button is pressed, and no player can release the button fast enough to not count for the entire sequence.

you need to use other mechanism, for example an invisible show text to wait for the next button and similar options
Thanks! See my response to Eliaquim below!

Original thread: https://forums.rpgmakerweb.com/threads/pressing-ok-activates-picture-and-text.180388/