Announcement

Collapse
No announcement yet.

Beginner Score UI help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.
    https://forums.unrealengine.com/atta...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.
    Attached Files

    #2
    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.

    Comment


      #3
      @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.

      Comment


        #4
        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/show...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.

        Comment


          #5
          I can't seem to get cast to x working. Any advice?
          Click image for larger version

Name:	warning.PNG
Views:	1
Size:	223.8 KB
ID:	1095014

          Comment


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

            Comment


              #7
              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.
              Click image for larger version

Name:	RedBox.PNG
Views:	1
Size:	203.8 KB
ID:	1097048
              Here the Cube Blueprint is casting to the MousePlayerComponent and then the Addpoint function attached to it.

              Click image for larger version

Name:	MousePayerComp.PNG
Views:	1
Size:	86.0 KB
ID:	1097049
              Here is a closer look at the MousePlayerComponents ,Addpoint function.

              Click image for larger version

Name:	ConveyerHUD.PNG
Views:	1
Size:	136.6 KB
ID:	1097050
              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.

              Comment

              Working...
              X