So I wanted to add pictures to each of my questions does anyone know how to do that?
If the “Question Struct” does not already contain an entry for texture references, you will need to add that. Once you do, you can then extend the arrows next to their respective array index and select a texture there. On top of that you can select a default value when you edit the struct itself.
Okay that makes sense but i am fairly new to unreal, do you know how i would make an entry for texture references. My guess is to go back to the BPI-quiz and add it there am i right?
No worries, we were all new at some point
Click “New Variable” in that window, then click on the drop-down menu where you select the type. Search “Texture” and select “Texture” (you might have to scroll down a bit, there are lots of things with texture in their name). I recommend setting a default value here before heading back to the quiz BP. That way you can avoid potential errors if the texture is not set in the array, and you’ll be able to see that you forgot to set a texture right away.
Yes, one of those. Depends on where you store the values. Although I would recommend storing the questions in a Data Table and getting the data from that as needed.
For reference: WTF Is? Data Table in Unreal Engine 4 ( UE4 ) - YouTube
okay so i did all of that but for some reason the picture/background doesnt show instead it just shows white with all the questions
You will also need to apply the texture to the image widget by using “Set Brush From Texture” inside the question widget blueprint.
I am a little confused on what this means exactly. so from my understanding I will need to go to the WDG_quiz and select quiz and use the set brush from texture to do it? problem is i do not see the set brush from texture
First you will have to drag the image into the designer. That image widget should be turned into a variable by default iirc. It will then be accessible when you have a reference to your widget. (I believe you called it WdgQuestion) You can the drag a pin off of that reference, type in “image”, select the image widget reference, then drag another pin off and search for “set brush from texture”, there you can then plug in the data you have in your array.
Okay so i drage the image into the designer and then it should be turned into a variable, but then this is where you lose me. you said "It will then be accessible when you have a reference to your widget. (I believe you called it WdgQuestion) " but i dont see it. am i supposed to still be looking on the designer page or do i go back to my hud_quiz or do i go to the graph of the wdg quiz
Yes, if that’s where you have the data, that’s where you should go. EDIT: Actually, since you call a function/event on the widget, you can go to the widget graph as well.
The blue node that says “Wdg Question” is your reference to the widget as far as I can tell.
Don’t hesitate to watch a few tutorials on how to use Unreal’s Blueprint system, there is tons of things to learn that I can’t really get into in a few posts.
Double clicking the “Init Question” node should bring you to the graph where you break the question struct and set the text for the UI (I presume), plug it in there, you should be able to get the “Image 2” variable there as well.
I don’t know either. You sent the wrong screenshot, haha.
Looks like all that’s left to do for you is to plug the “Picture” pin from the “Set Question” node into the “Texture” pin of the “Set Brush from Texture” node, then connect the execute pin to the graph behind Init Question. (You don’t need the second “Set Question” node)