cancel
Showing results for 
Search instead for 
Did you mean: 

Scripting - Adding + and - buttons

Zbornox
Retired Support

I'd like to add buttons that add and subtract. Is there a script that would allow me to do this? 

1 REPLY 1

teerez83
Protege

This shouldn't be a problem at all but you may need to store the value of the string elsewhere as well to make it easier. What that means is, let's say you are displaying text on textA. TextA has 5 stored. Technically that 5 isn't a number, it's a string. But you may have stored that value in a number variable called NumDisplay.
NumDisplay = NumDisplay + number (1)
Now display text on textA (Convert value (NumDisplay) to string)

Some of this may happen automatically. I'd have to hop into game to confirm, I'd probably still recommend this method just in case something happens with automatic conversions and it removes some ambiguity.