Announcement

Collapse
No announcement yet.

Umg Help. [Skill Tree]

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

    Umg Help. [Skill Tree]

    Hello, I'm creating a skill tree in UMG.I have a basic system setup where you click a button and it activates what i want it to. But what i cannot seem to figure out is how can i get it to only be clicked once.I want the button to be clicked then it will be unable to be clicked again. How can i do this?.

    #2
    Use the node "Set Is Enabled" when clicking on the button.

    Comment


      #3
      I added that to the end and it is still letting me do it. I want to click it then have it have it be unable to be clicked again but still have my others work.
      Last edited by Firezown; 02-15-2015, 05:15 AM.

      Comment


        #4
        This may not be the best but you could set a bool

        After the first click, set a bool and a branch. Next time you click it will go to false and not fire.

        If need be, in the graph on event construct, you should be able to set the bool back for next time if you need to. Or somewhere else.

        Narg
        http://www.seven-mountains.eu/

        Comment


          #5
          Well there are several "Is Enabled" nodes one of them is a bool. I tried a branch and when i set it to false all my buttons locked so i'm not sure.

          Comment


            #6
            Is this in your Bindings?

            Narg
            http://www.seven-mountains.eu/

            Comment


              #7
              Its on event click is that whats messing it up.?

              Comment


                #8
                Can you share the blueprint? It is quite hard helping you without seeing your setup.

                Comment


                  #9
                  Hello,
                  Can't add a "doonce" ? And reset when new point available ?

                  Comment


                    #10
                    Here it is, Its inside the event graph.
                    Click image for larger version

Name:	7696760ad7cc00674cc9680c2a4a0f2c.png
Views:	1
Size:	91.0 KB
ID:	1066475

                    Comment


                      #11
                      Never mind i messed up and did not set a target on "Set Is Enabled" Sorry.

                      Comment


                        #12
                        You need to set the target of the "Set Is Enabled" to your button. The way it is now you enable/disable your whole widget. That is the reason why all your buttons were disabled.
                        Click image for larger version

Name:	enable.png
Views:	1
Size:	57.5 KB
ID:	1066476

                        Comment


                          #13
                          Yeah i figured that out above Sorry that was my mistake

                          Comment


                            #14
                            Ok, I'm not sure if i need to make a new thread about this but its under the same topic. Now i have multiple Buttons to choose from. And then if you press the "Accept" button it runs the nodes set to that talent button. But my problem now is. Since i have about 9 buttons and 1 accept button how do i connect them all to the accept button without all commands being run wether they clicked the talent or not?.

                            Click image for larger version

Name:	Talents.png
Views:	1
Size:	139.1 KB
ID:	1066479
                            Last edited by Firezown; 02-15-2015, 06:27 AM.

                            Comment


                              #15
                              Add a variable to the blueprint that represents the selected talent. When you click on a button you set that variable.
                              Then when you click apply you do different stuff depending on the value of the variable.

                              Some additional points:
                              - You could put the different talents into an enum
                              - Try not to modify your player state in the UMG widget. Add functions to your player that you call from your UMG widget. If you keep all your player related modifications in your player blueprint it will help you later on.

                              Here an example setup with enums. The buttons are generated automatically and you can add new talents by changing the Talent enum.
                              The player has a method "ApplyTalent" that you can modify to handle the changes.
                              https://github.com/mfpi/UETalentSelection

                              Comment

                              Working...
                              X