How to make a connection from a widget to a BP object?

I’m starting to use the engine to create a simple game. I have a widget with a game interface. There is a field with the text Text_Block 1, in which the goal of the quest to pick up the item is written. In the game I pick up an object and the inscription should disappear. In the BP object, I prescribed the object to make a sound when picked up. How can I make a connection between Text_Block1 and the BP object?


  • the player walks around and picks it up? How? By clicking it? By walking into it? Which actor is responsible for “picking up” the item?
  • where is the widget created, in which BP and how?

Essentially, you need to know where the object is and where the widget is.


Or, perhaps:

Is the widget you’re looking for?

The player simply points at the object and presses E.

The widget was created separately. Attached a screenshot.

I wish I could remember how to make the connection so I could use it for other situations

Again, how, when and by whom?

The player simply points at the object and presses E.

Does this mean this takes place inside the player’s blueprint? Or in the player controller? Or elsewhere?

We need details.

I created the widget and that’s it. Separately in the form of an interface. It’s called V_HUD

How and where do you add it to the viewport? We’re walking in circles. :innocent:

is this how you do it?

If so, where? In which blueprint?

Included it in BP_CHARACTER

Got it.

  • promote it to variable, and give it a useful name:

Now the player can reference it, and any other blueprint can access it like so:

Thank you, it’s become more clear, but I don’t understand how to interact with the text. I will think))

1 Like
  • in the widget:

image

  • and then:

it could go here:


There are more nuanced ways of handling this, ofc. But that’s more of a scope / scenario question.

Good luck!

1 Like

Thank you very much!!!

1 Like

Help me please. I did everything, the print of the string goes through, but the text does not disappear.

is there anything here, because there should not be:

image

Is there anything else that tries to set text visibility?


Could you also show how this part looks like now:

After the modifications.

no
q0kXWWzt1

Are you sure this:

Is the text block?

yes

I did the opposite. The text was hidden and showed when picking up the item. Everything worked. For some reason the text is not hidden

How many players do you have? What are the chances there’s more than one HUD? What number do you get when you:

You should be seeing 1.

2 )