Hey guys. So i already set up an inventory system but im only able to open with a keyboard button. Any help how could i open it with a widget button?
You should read up on referencing and blueprint communication. Your other question revolves around the same topic.
To answer directly:
Bind the widget button to the appropriate event using a dispatcher, or call the appropriate event in the widget using a direct reference. There’s also interfaces but probably an overkill for this.
Other than that, the question cannot be really answered as we don’t know how you set things up. Who owns the widget and so on…
Yeah, i have a lot to learn. But could you please show an example how could i solve this problem? For a widget i cant add my inventory component directly. I can only make variables of that kind. Im checking videos and comments from everywhere but havent find anything useful. It would be a great help.
Yeah, i have a lot to learn. But could you please show an example how could i solve this problem? For a widget i cant add my inventory component directly. I can only make variables of that kind. Im checking videos and comments from everywhere but havent find anything useful. It would be a great help.
For a widget i cant add my inventory
component directly.
You cannot, but you have can have a reference. You did something similar in your other thread by exposing a variable. And here it seems you already have a variable read, we just need to tell this widget which component you want (because you may have more than 1).
Select this variable and flag it as exposed on spawn and instance editable. When you create the widget, feed it the component that makes your inventory:

That’s direct communication.
