So I set up a fallout new vegas style location discovery system using a custom trigger box blueprint and a UMG blueprint widget and set it up like this (screenshots at bottom of post).
I don’t see why this is not working so any help would be appreciated as I seemingly tried all options to make this work.
(I have the text that is empty on the widget binded to find the name of the variable “LocationName” as shown in the screen shots)
On screen 1, you not getting trigger box at all you got complitly disconnected cast to trigger box node
As you do this way, i think better way will be if you make text varbale in widget and set it in other blueprint and use that text varable to display location name.
So inside of the widget it would be easier to have a custom event on the event graph that takes a parameter for what you want the text to be. Then inside of the Location_Discovery object after it creates the widgets call that event and pass the appropriate data. You could do this for both widgets that you are creating. Here is an example of a widget I created for something else.
So I tried connecting the set text to the new NumNotes variable and it doesn’t work, I might have set up NumNotes wrong maybe (i put it as a reference to Location_Discovered Triggerbox blueprint)
(Also side note I know the compile fails because there is no object for the cast to blueprint, I cant figure out what to use as an object as self does not work and the incomplete cast to triggerbox worked but does not work when properly set up)
Ok well for starters you see in my second picture, that is the player. see how on begin play I create the widget and save it as a variable within the class called HudRef? When you create the widget pull the return pin off and click promote to variable and call it what you want, this will be your Widget ref to use later for calling the function, you won’t have to do any casts.
Second what kind of component are you using in you widget to put the text into? I’m using a Text, Text Block is fine too, not a text render component, I don’t even think that is an option for widgets… you might want to keep Context Sensitive on, its there for a reason lol.
When doing stuff like this it tends to be easier to work forward not backwards, unless there is a specific situation try to start with what you are working with and pull a pin from it with Context Sensitive on that way you will only see stuff you can actually do with it.
Third, why do you have a reference to a Trigger Box Reference? You won’t need that in your widget. You will need to go into your Designer, select the text or text box you are using to display the name of the area, then on the top right select the check box IsVariable so you can use that in the widget event graph.
I had a reference to a Trigger Box because that is what I was trying to get as I had set up my variable in the Trigger Box so (what I was trying to do) when I put a custom Trigger Box Blueprint in the world it would have the public variable LocationName so it could be a new LocationName for each Location_Discovery (the Trigger Box Blueprint) and it would set the text in the widget to what LocationName the Location_Discovery the player overlapped.
The component I was using to show the text in the Widget was just a plain text
Also as a side note I was trying to make this Widget a temporary popup not a part of the HUD, as I have is removed from parent after 5 seconds.
(If you have played Fallout New Vegas I am trying to make a system that shows you what “Location” you have discovered on the screen for a few seconds)