How to add +1 to a float value via widget

Hi, I want to add +1 to a value each time a button is clicked and it to be updated in real time in a widget, but I can’t get it to work, any help?

Hello Jay Korda,

First of all you need to know where the float variable is being stored. For the sake of simplicity and fast example let’s assume it’s inside the player character. Second thing you will need is the actual widget. Can you create one yourself and bring it up to viewport? You will need a button to click on and maybe a text to display the current value of the float. Select your button and create on clicked event for it where you get float from your player character add 1 to it and set it to new value. Then just bind your text to the variable, pretty much the same thing as above and you have it.

If you need some help setting this up let me know.

Sorry I did not give enough info! I’m not used to. I know how to bind and cast, but for some reason this is the only, thing not working. This is how my widget looks + the binding + the event:

In your getsavecount1.png, you’re creating a new save game object and not loading or saving so the text will always be 0

Is the variable you are adding to within your widget class or is it in another class?

Thank you so much!