Making a "fake" Pause screen?

Hello, been awhile since I've made anything with RPG Maker, but wanted to set myself a challenge. Things were progressing smoothly...Until they weren't.

WHAT AM I MAKING?
In short: I want to make a pause screen. Why not use the default menus? Cause I want to be unique and all I really want it to do is stop the the game. If you're wondering what's happening here: I have a parallel event that checks when the player presses the dedicated pause button and upon doing so changes said event to an autorun event which draws 2 pictures: the PAUSE! text and a low opacity black square across the screen to give it that effect. The idea being that when you "unpause" the event goes back to the first page.
1699363664359.png

WHAT IS THE PROBLEM?
I already know how to pause everything: I have a switch that stops all events in motion. My problem is I can't get the text to go away again afterwards. Below is the event that handles my fake pause screen. Can anyone please help me?
1699364279774.png

1699364295529.png

You might be wondering why a variable instead of a switch for a true/false statement? Truth is, I was desperate and hoped it might make a slight difference; it didn't. What I want is for the player to push the button (in this case shift) everything stops, the 2 images are drawn and when the player presses shift again, everything returns to normal.
Make a Third Event Page and use your Variable set at 100 as the Condition and then do the exact opposite.

The reason it isn't working is because it's seeing the If statement on your Conditional Branch but not running the Else option.

Edit: Reading it again, you don't even need a third event page. You just need the variable set at each one. Since this runs throughout the whole game, you might want this to be a Common Event.
Make a Third Event Page and use your Variable set at 100 as the Condition and then do the exact opposite.

The reason it isn't working is because it's seeing the If statement on your Conditional Branch but not running the Else option.

Edit: Reading it again, you don't even need a third event page. You just need the variable set at each one. Since this runs throughout the whole game, you might want this to be a Common Event.
Sorry, I feel really dense because it sounds straight forward. But I (think) i tried what you mean but still doesn't quite work. Here's what I have, even commented it this time to show what does what:
1699367801352.png
Can you specify what exactly happens when you press shift?
You mention that the images don't go away. Is this the only problem? As in:
When shift is first pressed, the game is paused and the images appear.
When shift is pressed again, the game is unpaused but images don't disappear?

You could put the erase command on the first page, if that is indeed the only problem.

EDIT: To clarify, I referred to the setup from your initial post, not after implementing Omnislash'es suggestions.
Can you specify what exactly happens when you press shift?
You mention that the images don't go away. Is this the only problem? As in:
When shift is first pressed, the game is paused and the images appear.
When shift is pressed again, the game is unpaused but images don't disappear?

You could put the erase command on the first page, if that is indeed the only problem.

EDIT: To clarify, I referred to the setup from your initial post, not after implementing Omnislash'es suggestions.
Pressing shift makes the fake pause screen appear and player can't move (makes sense; it's an autorun event) BUT pressing shift doesn't get rid of the fake pause screen and player can't move unless they hold shift while moving.
Pressing shift makes the fake pause screen appear and player can't move (makes sense; it's an autorun event) BUT pressing shift doesn't get rid of the fake pause screen and player can't move unless they hold shift while moving.
Ah, that makes more sense.
The main problem is that you're checking if the key is being held down, not if it was just pressed. So if you hold it down for a few frames it will switch to page 2, after a frame it will switch to page 1, and immediately back to page 2, after a frame switch to page 1 etc.

What you could check is a script Input.isPressed("ok") - this will check if the key has been pressed this frame, not if it's being held down. Though I'm not entirely sure if that's still going to work with passing controls between and autorun and parallel event.
Alternatively, set some switch when the key is not held down, and only allow unpausing when shift is held and that switch is on. Same for pausing later again.
I have a player/event lock in my new plugin shortly released for my other plugin.
without plugin, you can set the speed of the actor to 0 (so it cannot move),
probably turn around only, than reset the speed to normal to move again.
You don't even need a third event page.

What you do is set the Variable to 0, then you have the Condition. If Press Shift, then Control Variable = 1, Pause, Show Picture.

Now you Have The second event page. The Variable is already set to 1. In this case, that's the condition for the page. It's an Autorun then, so just put a Condition in that page where If Press Shift, Control Variable = 0, Un-Pause, Erase Picture.

Granted, I don't know if these would run in a Battle.
Sorry, I feel really dense because it sounds straight forward.
Even some "straightforward" stuff still takes some learning, so don't sweat it.
You don't even need a third event page.

What you do is set the Variable to 0, then you have the Condition. If Press Shift, then Control Variable = 1, Pause, Show Picture.

Now you Have The second event page. The Variable is already set to 1. In this case, that's the condition for the page. It's an Autorun then, so just put a Condition in that page where If Press Shift, Control Variable = 0, Un-Pause, Erase Picture.

Granted, I don't know if these would run in a Battle.
Doesn't seem to work; same problem where I can't remove the pictures of move the player character after unpausing. Unless I hold pause (shift). Also, my game won't have any use of the battle system.
Ah, that makes more sense.
The main problem is that you're checking if the key is being held down, not if it was just pressed. So if you hold it down for a few frames it will switch to page 2, after a frame it will switch to page 1, and immediately back to page 2, after a frame switch to page 1 etc.

What you could check is a script Input.isPressed("ok") - this will check if the key has been pressed this frame, not if it's being held down. Though I'm not entirely sure if that's still going to work with passing controls between and autorun and parallel event.
Alternatively, set some switch when the key is not held down, and only allow unpausing when shift is held and that switch is on. Same for pausing later again.
Could you tell me a little more about the scripting bit please? Like how to implement it. Perhaps if I could look for an instant shift was pressed instead of while held...I found this video which basically does what I want to do, but can't get it to work either; I expect the part with custom scripting is what I'm messing up.
Could you tell me a little more about the scripting bit please? Like how to implement it. Perhaps if I could look for an instant shift was pressed instead of while held...I found this video which basically does what I want to do, but can't get it to work either; I expect the part with custom scripting is what I'm messing up.
In a conditional branch, on page 4 you have a "script" option - select it and paste Input.isPressed("shift") there.

Though doing it by only unpausing when after shift is not held and then held would probably be more reliable.

And that video is from before MV, it won't be very relevant here.
And that video is from before MV, it won't be very relevant here.
He's right-I recognize that that video was for RPG Maker VX or VX Ace, because the assets in the video are from there.
I think the problem is as the game detects if the player is HOLDING shift as opposed to an instance of it being pressed. So it carries over and unintentionally creates a never ending loop with the first page. I have found a workaround in that I can assign it to a different button to unpause (Shift to pause and then X to unpause) it's a little unintuitive, but it works at least.
In a conditional branch, on page 4 you have a "script" option - select it and paste Input.isPressed("shift") there.

Though doing it by only unpausing when after shift is not held and then held would probably be more reliable.

And that video is from before MV, it won't be very relevant here.
So I understand how to do that, but how do I integrate that into the pause event? Like when I make a conditional branch, there's a pair of brackets that contain the code to perform in that moment, but I don't really know how to tell the game to use the script. Here's what I have:
1699391227730.png
So I understand how to do that, but how do I integrate that into the pause event?
I meant "in the conditional branch" rather literally. Click on the top line of that event. Press space. Select page 4. Select "script". Paste it.
I meant "in the conditional branch" rather literally. Click on the top line of that event. Press space. Select page 4. Select "script". Paste it.
Moved it to the top, but didn't seem to make a difference. I might just do "shift to pause and X to unpause" for the foreseeable future.
@jjbones123 no, access the conditional event (edit the conditional itself, not inside the conditional) and add the script to where the "script" option is.

By the way, what will make press-and hold more reliable is if you have a wait frame...or 6.
Any autorun/parallel event should have at least 1 wait frame to improve performance. Otherwise this information is getting checked wait too frequently by the cpu.
So at the end of both conditionals, go add an event command -> wait, 6 frames (more frames, more performance gain but, in context with waiting for button presses, less reliable execution of the players expected input.)
Moved it to the top, but didn't seem to make a difference. I might just do "shift to pause and X to unpause" for the foreseeable future.
I'm... not entirely sure how can I make these instructions clearer. So here's a visual aid on where to click 😛
rNLUNXG.png

1. Click within that green rectangle.
2. Press space.
3. Select page 4
4. Select "script".
5. Type Input.isPressed("shift")
I'm... not entirely sure how can I make these instructions clearer. So here's a visual aid on where to click 😛
rNLUNXG.png

1. Click within that green rectangle.
2. Press space.
3. Select page 4
4. Select "script".
5. Type Input.isPressed("shift")
Tried as described, doesn't work. I understand that you meant it literally as I overlooked the fact that you could use script in a conditional branch (sorry) but yeah, while you can pause, you can't unpause. And yes, I set both of them to use
Input.isPressed("shift")
Tried as described, doesn't work. I understand that you meant it literally as I overlooked the fact that you could use script in a conditional branch (sorry) but yeah, while you can pause, you can't unpause. And yes, I set both of them to use
Ah, so my guess earlier about passing the control this way happening on the same frame was probably correct. This should be fixable if you add a one frame wait command just before you set the switch (in both events).
Ah, so my guess earlier about passing the control this way happening on the same frame was probably correct. This should be fixable if you add a one frame wait command just before you set the switch (in both events).
Ehhh, it does kinda work. But it either happens too quickly or (If I up the wait time to prevent giving the player a seizure) too late. Think I'll stick with what I have, but what you suggested does work. Thank you very much; good to know for future uses.

Original thread: https://forums.rpgmakerweb.com/threads/making-a-fake-pause-screen.162729/