ok so i have the basic fundamentals of blueprints down, but when it comes to making something work or finding the right function, im lost. im trying to create an, interactive fiction game (but more of a choice game; similar to RPG dialogue), its very basic it involves a short paragraph of text explaining the situation, and then 4 options to resolve the situation. i plan on having diffeent endings, and each answer obviously has a different outcome and can redirect to a different question.
what im stuck on is i cant figure out how to or if its even possible to have a button load another widget blueprint into the viewport, much like opening a new level for say a menu button.
i have a background template set up( with a placeholder skyrim backdrop)
each smaller box in the bottom half will have the options, and a button somewhere. would it help more to keep an image like this as the background, and just load text and new buttons?? or set up each question with the background and borders like slides, save them as a blueprint, and load them once the button is pressed? how could i go about properly loading each question into the next, seemlessly and so on, any tips and references would be appreciated. feel free to message the facebook account, its not my personal.
Hope I’m following correctly, but here is how I’d structure this.
Widget_Scenario
- Widget is responsible for displaying the “meat” of the current stage of the game
- Layout: Canvas Panel, with a Text Box (variable)
- Add the “border” / background you’ve designed at the top of the design you’ve shown
Widget_Option
- Widget is responsible for displaying an option that the player can select
- Layout: Canvas Panel, with a Button (variable) with a Text item inside of it (variable)
- Add the “border” / background you’ve designed at the bottom
Widget_Fiction
- Widget is responsible for managing the layout
- Layout: Widget_Scenario (variable) at the top, 4 Widget_Options (variables) laid out inside of a Horizontal Box
- Add the background landscape on this Widget
When Widget_Fiction loads, that’s when you’ll reach into your data source to grab your current scenario. With the “meat” of the active scenario loading into your Widget_Scenario (which you’ll have access to since it’s a variable), and the available options loaded into your 1-4 Widget_Options variables. If you’re only providing 2 options, then you can hide the other two.
Let’s start with that. Let me know if that makes sense and/or if you have further questions.
In short, yes. You can connect an action with a button, create a new widget on press (based on a widget you’ve already designed), and add that widget to your current widget. I feel like it would just be fine to completely lay it out so you’re not worried about constantly creating/destroying widgets. It’s all there. Just customize the layout as you see fit (loading text, loading options, hiding things you’re not using)