Have Widget Text change When I have an Item

I have a widget and I want the text to change when I have an item collected vs not collected. This is depending on the Boolean variable I have. How can I hide one text and show the other when the Boolean is checked?


^The two different messages having Boolean checked vs not

Hey @Villager-13

you can create a custom event which you execute whenever the boolean gets changed:

Would I set this as a bind to the text, use it in the widget graph, or something else?
I’m messing around with it right now, but my plank widget doesn’t come from here, rather it’s from the Player BP.
If I want it from the player BP, it has to look like this, though it doesn’t work.

Hey @Villager-13

EventBeginPlay inside your character:

Custom event in your character:

Widget:

Inside your item where you change the boolean:
image

I’m in UE4 27, I don’t seem to have some of the same stuff you do. I, as far as I know, am unable to add the “target” to the text set, and cannot add a “Change text” node.

Just to clarify my overall vision,
I am looking for when I overlap a box (the plank’s), pick up the item (the plank) the text changes (in the area the plank is required) from “Need plank” to “Use Plank”. So I don’t need the custom event constantly to appear then change in my character BP, just when I’m in the overlap zones of the boxes.

One text changing when you have the plank or do not have the plank
One text changing when you are overlapping the plank

427PickUp.zip (1.4 MB)

Thank you very much. I understand you didn’t have to help me, but you did. Thank you.

1 Like