Hi, everyone! My first question here. It might sound like I’m having a problem with th widget switcher, but I guess it is more about bluepring communication.
So here’s my setup:
I Have an inventory-like menu. For my game’s purposes I call it a Wooflog. There are 3 separate submenus Clues, Trails and Memories. The culprit so far is the Memories thing. It is basically an inventory, to wich the player collects items (memories). All of these menus are inside a main WoofLog widget and are switched through Widget Switcher.
- Item, a Memory returns a string on pickup. This works.
- Inventory Blueprint receives a string and stores it into the array. It has a function AddMemory. This works, until it comes to a custom event AddMemoryTo to WoofLog, which should add a child (a separate widget) to a Memories widget. It doesn’t add anything.
- Player character picks up the Memory throught Blueprint interface, this seems to work too.
- What does not work, as far as I understand, is that player character creates a Parent Widget (Wooflog), and in time of picking up the Memory, none of the widget children (Memories widget in particluar) exist. So the execution on the custom event (creating an item in a memory widget) doesn’t work. As I understand, that reference to a widget returns nothing (contains nothing) because it does not exist yet.
I know that asking what I’m doing wrong is way too vague. So I’ll put it this way. How to add an item to a menu that is inside a widget switcher. Referencing it didn’t work as it doesn’t exist and returns no data, or I am doing this wrong.
Here are a couple of screenshots of the blueprint setup:
The widget look.
Tabs/Widget switcher setup
Inventory Blueprint setup
Pickup function
Adding a child to MemoriesWidget event
Third Person Controller Pickup Setup
Inventory Widget initialization Setup
I will appreciate a feedback and any practical advice, thanks in advance