ButtonPicture Plugin - Wait until picture is selected?

Hello, everyone.

I have been working on this all day and although I have found several workarounds, I still haven't achieved the preferred result.

I have been experimenting with the ButtonPicture plugin that is included with MZ. I want to make it so the player has to click on one of the pictures presented on the screen and they can't move until they do so.

So imagine using Show Picture to place 5 images on the screen. Each one is set to be clickable using the ButtonPicture plugin. Everything works fine except that the player can move around freely.

I tried a bunch of things using Set Movement Route/Wait in a loop, but then I couldn't click any of the pictures.

The first workaround I found was to surround the player sprite with blank events that keep them from moving. Once an image is selected, a script turns on Self Switches for all of those blank events to make it so they are now under the player and the player can move freely again. But that isn't ideal.

I thought I had a good solution using this:

Click Script.png

Using TouchInput.isClicked() worked great, until I realized the player could just click the mouse anywhere and that let them move again, even though an image wasn't selected.

So I am trying to find a way to keep the player from moving until they select one of the pictures.

Does anyone know of a way to do that?

I did discover that the default ButtonPicture plugin was updated a few years back (which I haven't downloaded) but that was to make it so you didn't need to use multiple common events when you have multiple pictures, which is a nice update.

Honestly, I tried to figure out how to do this without a plugin at all, but that wasn't successful. And I know I could use the Show Choices command along with the Show Picture and that would be another way. I was just hoping to allow them to click the picture.

Because originally I started experimenting with this for visible, onscreen dice rolls. So it would be nice if I could prompt the player to click the onscreen dice to trigger the roll but make it so they can't walk around until they do that.

I noticed that the ButtonPicture plugin command doesn't wait for input or a response. It just proceeds with the remainder of the event while still allowing the picture to be clicked on to trigger a Common Event, even though the original event that made the pictures appear has ended.

I also saw old threads about using a blank text event, but once the player presses Enter, they can move again.

Ultimately, I can work around what I am trying to do within the game itself. But I was just hoping that there would be a simple way (without another plugin) to make the player wait until they actually select one of the pictures. But I couldn't figure out how to link the picture that the player clicks on to anything that would let me break the wait loop.

I could be missing something obvious or maybe there really isn't a way to do it. I started posting for help here multiple times today, but each time I was able to make progress. Now I think I am stuck.

I hope my explanation of what I am trying to do is clear.

Thanks for any assistance you can provide!
There may be an easier way, but couldn't you just use a switch with that loop you tried? I.e. turn the switch off, show the buttons, and loop until the switch is on. Turn on the switch in each button's event.

[Edit: also include a Wait command in the loop, otherwise it'll max your CPU and tank your framerate.]
There may be an easier way, but couldn't you just use a switch with that loop you tried? I.e. turn the switch off, show the buttons, and loop until the switch is on. Turn on the switch in each button's event.
Thanks for your response!

I tried a few things using a Switch, but I may have been doing something wrong with it.

I will try again when I get home.
Can't you stop the player from moving by giving the player an empty repeating move route. And then in the common event that the picture button launches just give the player an empty (not-repeating) move route and they can move again?
Can't you stop the player from moving by giving the player an empty repeating move route. And then in the common event that the picture button launches just give the player an empty (not-repeating) move route and they can move again?
Thanks for that suggestion! I haven’t tried that, but I will check it out when I get home.

Hopefully, one of these will work.
Hopefully you get it working! 👋
@rpgLord69 Thanks again! I just tried your suggestion and it works perfectly! Very simple solution.

@caethyril Thanks again, but I must be doing something wrong. I tried your suggestion and I just couldn't get it to work.

I tried having the event set a switch to OFF, then I did the Show Pictures and Plugin Commands for the buttons, then the Loop with Wait (60) and Break Loop if the Switch is ON otherwise Repeat. I put the Switch ON command in the Common Events that are called by the button push. But it wouldn't recognize when I tried to click a picture so the Common Event would never get called. So I tried putting the Show Pictures and Plugin Commands in the loop, but the same result. I clicked the a picture, but nothing happened. I also tried the Set Movement Route with Wait like I had in my earlier screenshot, but that didn't work either.

I am probably missing something very simple and doing something wrong with the loop or Wait. But rather than post a bunch of screenshots of things I tried, but couldn't get to work, it looks like the suggestion from @rpgLord69 works and I didn't even need to use a Loop.

Thanks again for both of your help!

EDIT: Here are the screenshots of the Event and then one of the Common Events that is called.
Click Solution.png
Click CE Sample.png

Original thread: https://forums.rpgmakerweb.com/threads/buttonpicture-plugin-wait-until-picture-is-selected.153457/