I’m not sure how to phrase this in a better way and I’m sure I sound dumb, but I am trying to educate myself on how to implement that thing you sometimes see in tutorials and the like where a prompt appears that tells you how to do something and pauses the game until you press something to exit.
RDR2 does this. Usually it’s just a way to provide gameplay information. It says “Press R1 to run” or whatever and “Press X to Resume.” What is this general kind of thing called so I can know what specifically to be looking for before I teach myself about this? Thank you.
Widget, I think is the word the OP is looking for
Almost that but not exactly. It functions like a pause screen but the player doesn’t press anything to make it appear. The game automatically makes it appear at a certain point or as triggered by something and the player has no say in the matter. They can only then press a button to exit
Almost this video exactly, but with the thing I am talking about, the game automatically makes it appear with text or a diagram or something to convey information. The only option is then “Press [WHATEVER] to Exit.” This video has a pause menu where the player can control when it appears and when they exit and it has options choose from. I am just talking about a basic screen that you can only exit out of. Would that still be called a widget? I suppose it might be.
It’s exactly the same principle, just don’t cover the whole screen.
It is pause menu functionality, you’re just not waiting for player permission.
If you’re thinking of ‘localized’ menu above objects, then take a look at widget components
Like mentioned, if you can make a pause menu, you can make what I call a “dialogue box” or a “decision prompt box.”
I don’t think there is an official name. But basically you are just toggling on some widget, and also pausing the game and showing mouse cursor, etc.
A pause menu would get called probably from input, but a dialogue box would get called from some event.
Heres an example how I do it in my project:
I’ve made the Create Decision Dialogue function take in a few text parameters. That way I can reuse the code in lots of places and just change the text that appears on the widget for whatever the situation is.
Inside that function:
My decision dialogue just lives on the main HUD, so all I need to do is make it visible. I also use a Name variable to record if its a certain type, that way when I click the positive or negative buttons I know how to handle it.
Here it is, just part of the main hud:
So if the dialog asked, “do you want to quit the game?” I might name that “quitGame” and then based on that name I can exit the game after the positive button was pressed.
Thank you so much for this. This is very helpful and I appreciate you taking the time to go through it at such depth. That’s why I love the Unreal Forums. There’s always genuinely helpful responses and feedback in here.
Thank you very much for this. I asked for very specific information and, lo and behold, I got very specific and helpful replies. This will do me a lot of good. All the best to you.