I tried a bunch of stuff to try and manipulate the Text Block of a User Widget, some of them were close and ended up a failure, ive hit so many dead ends and the deadlines getting near, i need help
so i have this Trigger Box that has an FString named Help Text, and On Overlap Begin the variable will have a value ex.)
OnOverlapBegin()
{
HelpText = "Press C to Crouch ";
}
and
OnOverlapEnd()
{
HelpText = "";
}
and on the UserWidget i binded GetText_0 to my TextBlock and the bp of GetText_0 is
soo ummm im having problem with referencing the Cast to MyTriggerBox1
people said that i need to cast something, but i am new to ue4 and i dont have any clue where and what to cast.
///
What im trying to do is Manipulate the Textblock on my UserWidget named “PlayerHUD”, using The TriggerBox, named “MyTriggerBox1”. so if there is a more efficient or easier way or if my way will not work plss tell me.
I did it earlier, i ended up, making a function in my character to update the text block, and then casted it to my trigger box to update the text block when onoverlapbegin and end. Anyways thanks for aswering!
You will either need to use the BeginOverlap event in the trigger box, then get your widget from there (Not sure where you widget is kept currently?). Or, in your widget, get the trigger box (Not sure where you trigger box is either?), and then hook up to the event: