Spending Attribute Points?

Hi, I currently have it set up so when you obtain attribute points you can spend them. However, you can spend them till it reaches 0, but if you wanted to change your mind and regain the attribute points before exiting the interface this does not work. I have to tried <=0, but then it will only add 1, and not the total. So I can spend attribute points, but I can’t regain them if I change my mind before exiting the interface. Any help will be greatly appreciated. I just can’t get my head around this…

I’ve never used a struct before, how would I set this up? Sorry if this is too much trouble :frowning:

Never mind, I figured it out. :slight_smile: I knew I had to track the points somehow, I just wasn’t sure how to do it. I have a lot of learning to do.

You have to Track what you spend it on to be able to revert the changes. A simple pair of SkillName & SkillPointCost (use a struct)

Right Click Content Browser → Blueprint → Struct

Add the Variables you want/need

Create a new Variable of your Struct Type in your Blueprint. Make it a Array.

Now everytime you use a Skillpoint add it to that Array. If you Abort now you have all Data you need to revert the Changes and give you the Skillpoints back.