Hello. I’m figuring out Casting for the first time and not doing something right.
When my game ends a timer stops and I’m setting variable FinalTime inside of BP FinishTriggerBox.
On my EndScreen Widget I put down a text box, hit bind, and made this:
The only thing that happens is Cast Failed and I can see the PrintScreen. I’m guessing it has something to do with the open Object pin but I really don’t understand how this works.
Ah, I see what you are doing now. Well, you’re kind of doing it backwards. You are using a getter function on your widget when you need a setter (that or just go right to the widget from your actor without a function at all. You can turn the textbox into a variable with the checkbox on the top right when it is selected.)
I went the route of making Text a variable and setting it directly. Thank you so much for your help, with two minor tweaks to what you had above it’s working:
For some reason doing Set Text Block 240 and then pulling off of it to Set Text (Text) wouldn’t do anything. It just said “Text Block” on the menu screen because that’s the default value. I killed Set Text Block 240 and connect the Cast directly to Set Text (Text). When I did this, the Blueprint system added the Text Block 240 target in between. I straight up have no idea how it knew to do this, or what would have happened if I had two variables existing in EndScreen.
You said you don’t use UMG much, but you must add “Add To Viewport” for the menu to actually appear on-screen after the Create Widget.