can variables be incremented ?

This is the place to post your skins, and discuss skinning

can variables be incremented ?

Postby marcusw on Thu Jul 13, 2006 12:10 am

Is it possible to have a variable thats treated as a numeric value so that I can add and subtract from it ?

e.g. I have an "up" and Down" button, each time "up" is clicked I want to add 10 to a value and each time "Down" is clicked I want to subtract 10. However I try to do this in the event "set value" I end up with a concatenated string e.g. "+10 +10 +10 -10" rather than a value "20"
marcusw
 
Posts: 3
Joined: Wed Apr 06, 2005 5:59 pm
Location: UK

Re: can variables be incremented ?

Postby dalanik on Thu Jul 13, 2006 7:19 am

You have to use ScriptNT plugin. Then anything is possible :-) Just convert Xlobby text variable into integer, increase it, convert back to string and save to XLobby variable from script....

D.
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Re: can variables be incremented ?

Postby marcusw on Thu Jul 13, 2006 9:44 am

Thanks , was that XScriptNG rather than NT ?
I'll give it a go
marcusw
 
Posts: 3
Joined: Wed Apr 06, 2005 5:59 pm
Location: UK

Re: can variables be incremented ?

Postby dalanik on Thu Jul 13, 2006 12:50 pm

marcusw wrote:Thanks , was that XScriptNG rather than NT ?
I'll give it a go


Yes, NG, sorry :-)
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic