Download

Beginner Score UI help

Hi, I’m trying to create UI for a personal project.

I’ve got a fixed camera looking down at the world and the score HUD in position.

&stc=1&d=1449896984

The scene spawns cubes – when I click one it gets destroyed, here I want to update the score with an integer.
I’m looking for some direction, should I use dispatchers to speak from the cube to the hub text? What nodes should I use?

Any help/links to similar tutorials are appreciated.

Just create a variable and have it so when you click the cube you add so many numbers to the variable then have the text read the variable to print on the screen.

@Echosyp Hey thanks for reaching out! I created a variable in the Event Graph of the RedCube and had it print “1” when clicked on. There was some simple blueprint adding 1 to the variable.
Problem was that once the cube was destroyed and I clicked on the next one it would print “1” again.

Go to this thread and look at how I set my coin pickup BP up and you should be able to get the similar thing u want for your score. Every time you click the cube you will ADD + however many points u want to set to a variable, then you will have your score widget call from that variable to display the total score.

Here is my reply to a guy with my BPs: https://forums.unrealengine.com/showthread.php?94011-Set-number-of-item-on-screen

If you still can’t figure it out let me know and download teamviewer and I’ll come over and help you out.

I can’t seem to get cast to x working. Any advice?
facd4077ae9ad87930326d3e506220f2fa89d6f0.png

Use the node "Cast to " and whatever your playable character is

Thanks Echosyp for helping me out! I finally got the thing working after getting additional help from a workmate.

Just wanted to post these images if anyone else in my situation happens to encounter the same problem.
8ae3603ca21bcacd7e5bce5b5da033b02196897e.png
Here the **Cube **Blueprint is casting to the **MousePlayerComponent **and then the Addpoint function attached to it.

11a3a4cd6ce71e807ef3301c988dd38f14cbf5b1.png
Here is a closer look at the **MousePlayerComponents **,**Addpoint **function.

3e704887b0ad0764fc3505ff8f9e35bece2f48a1.png
And finally, here is a look at the HUD widget, The **Get Player Score ** node is bound to text placed in the Widget.
Here the ‘Cast’ is getting the score element and returning it as the value displayed in the hud.