Display data from another HUD

Greetings everyone!

I wanted to know how I could get the value from a variable in a widget to display it in another widget.

For instance, a widget is counting the score. Now that the game is over, I want to display the final score to the player.

How could I do this?

Thank you for your time!
alt text

Hi Aztecco, I did some capture to help you understand my setup in case you want more information. I will try what you have just said above this afternoon. Thank you for your help!

First you need to bind a function to the widget you want to copy a value to it. Then do the following;

  1. Go to the created widget function where you want to use a value form the second widget function.

  2. Cast to the second widget and type ‘call’ to see all available variables.

  3. Now choose your variable and use its value.

Regards,

Inside the final score widget graph create a score variable if you haven’t created yet. Compile.

In the level BP:
1_ from the return node of the create final score widget drag off and type " set score variable name"…

2_To Supply the input of the set node… click and drag the scoreHUD variable at the bottom of your variable list inside the graph. select get.
3_from the node created drag off and type “get scorepointshud”, wire the return to the input of the set node you created first.

Off the set node wire the out execution pin to the add to viewport.
And also the target.

Compile

Now inside the designer of your final score widget select the text widget, in the detail near the text select bind and you’ll see a list whit your score variable… Let me know if you don’t see it, and how it was.

Okay, I created a score variable called FinalScorePointsHUD. But I can’t supply the returns. It is incompatible. Am I using the wrong variable?

I have trouble figuring out how to use cast nodes. Could you provide a screen cap of your instructions please? I want to use ScoreHUD widget value in FInalScoreHUD widget, to avoid confusions. Thank you for your reply!

Ok, its a little complicated to cast to a widget from another widget (because first you must cast to game HUD and it takes me more than 5 pictures to teach you how to do it. And since I have seen many have almost the same problem of how to cast to a widget or how to call a widget variable from another one or …, I’m going to record a video tutorial to go through this for once and for all. I hope I will record the video in the upcoming week. By the way I will bring the link here as soon as I could record it.

Regards,

It won’t let me do it, it says that these reference are not compatible together :confused:

Ok… Plug score hud into target of score points hud.
Plug the Return value of create final score widget into target of set and add to vewport

Where did you created score hud widget?

How did you created the two green nodes marked in red?

Thank you!