I have a skill tree with three buttons that when enabled, increase the player health by a certain amount. I have the T key designated now to open the skill tree, and a “close” button in the UI that closes the tree. The functionality for the skills works perfectly - when I click the skill, the designated amount of skill points are removed and the skill is enabled.
The issue that I am having is that when I close the skill tree and reopen it, the buttons are reset and are active again. My goal is to make them a one-time use so when they are pressed once, the skill is acquired and the button is no longer active no matter how many times the skill tree is opened/closed.
I have tried a branch that checks if the skill is activated or not. When the button is pressed, the IsSkillAcquired bool is set to true. That did not work.
I guess the best option would be to add some functionality that saved the actions made in the skill tree so that when it is closed and reopened, the active buttons are still active and cannot be clicked again.
I would appreciate any help or tips on this. Thanks!