I am working on a Psychology Quiz Game where each question has 4 options to chose from. All the answers are correct as it’s a Psychology model.
I somehow created a game and it works nicely, the only thing remain is to display all the selected answers of 40 questions on the result widget.
Created an Array based String variable. And a result widget. How do I implement it.
Please, assist me.
There is : 1 Game Mode, 1 HUD, 1 Quiz Widget, 1 Result Widget, 1 Interface.
These images are from Quiz Widget.
the pattern that works for this: make the array hold a struct instead of raw strings, one entry per question with QuestionText, ChosenOptionIndex and the four option strings. each answer click stores the index into that struct array at the current question index, and the result widget then rebuilds itself from the saved array.
in the result widget, use a ScrollBox with a vertical box inside, and for each saved struct entry create a small entry widget: the entry exposes a struct variable and an event called from the creator right after CreateWidget, passing the row in and setting the text blocks before it goes on screen. CreateWidget nodes return the instance, so you can push data in immediately without needing references floating around.
if you would rather not build that plumbing yourself, the Multiplayer Quiz Trivia Ultimate Game Template Kit does exactly this flow, it keeps questions and answers in a datatable and has the result widget build from stored per-question answers, and since it is all commented Blueprint you can open it and copy the result-list wiring straight into your project: Multiplayer Quiz Trivia Ultimate Game Template Kit | Fab