How to do set up a multiple-choice question at the end of my sidescroller level

No clue what to do

Do you want to select it by a menu like something they click with a mouse?

yeah that would be ideal, at a stretch I’d like the questions to be random each time from a pre-created pool, but ill settle for one thing at a time

Sounds like you don’t know about Unreal’s UMG system yet. Have you checked out any of the tutorials about it? Mathew Wadstein has a lot of great ones on YouTube.

If I were the person making this system, I would create two Widget classes, one for the dialog box that holds the question and possible answers, and put a Text widget inside that one’s canvas, and a Vertical Box widget under that.

Then I’d make an Answer widget class that is nothing but a button with a text widget inside of it. Then when I construct the dialog box widget. I have a function programmed on that dialog box class which takes in that pool of questions and/or answers as a parameter. I call that function right after creating the dialog box widget, and the function creates Answer widgets, setting their text elements to the answers in the pool which is an array of Strings or Texts.

You can call Shuffle on Array variables to randomly re-order them before calling this function.

Now the tricky part is how you’re going to decide what happens when someone clicks the answers.

Your Answer class’ button widget will have an OnClick event you can use to make stuff happen. You’ll need to decide how to structure that so each answer does something different. You’ll need to get rid of the dialog once an answer is chosen, I assume, as well.

THANK YOU!

You’re welcome. Now, you don’t have to do it my way, but I like making little sub-widgets so I can dynamically generate how the main widget is built, especially when it involves things like choosing random text or random arrangements of it. I think you’ll need to reference the Vertical Box and use the Add Child function on it to put the answer buttons in, during that function that populates it.

If blueprint constructor events could take in-parameters, I would do it that way, but they can’t so that’s why you make your own function for initializing the main widget.