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?.
Use the node “Set Is Enabled” when clicking on the button.
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.
This may not be the best but you could set a bool
After the first click, set a bool and a branch. Next 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 if you need to. Or somewhere else.
Well there are several “Is Enabled” nodes one of them is a bool. I tried a branch and when i set it to false my buttons locked so i’m not sure.
Is this in your Bindings?
Its on event click is that whats messing it up.?
Can you share the blueprint? It is quite hard helping you without seeing your setup.
Hello,
Can’t add a “doonce” ? And reset when new point available ?
Never mind i messed up and did not set a target on “Set Is Enabled” Sorry.
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 your buttons were disabled.
Yeah i figured that out above Sorry that was my mistake
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 to the accept button without commands being run wether they clicked the talent or not?.
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 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.
I don’t really understand your example. What makes the buttons get placed into the Verticle Box?. Also is there a way to make them be placed in a certain way other then just verticle. Something like this is my end goal.
Would it be easier to make a seperate widget just for this system?. Because i have spent hours trying to place these how i want the to be placed inside of a “Grid Panel” But i’m doing something wrong or its buggy because sometimes i cannot even move the buttons. And when i do move the buttons they end up resetting or jumping ending up somewhere i did not place them.
The grid is buggy in 4.6, should be fixed in 4.7.
Is it fixed in the preview build?. Becuase it still seems buggy. :eek:
I have a couple different working skill working with a grid in 4.7p7 so I can confirm they are working well.