How does it work in AGS scripts? I have to add relative value of +1 to Globalint and can't get the code right.
SetGlobalInt(100)++; won't work.
How to code this right?
SetGlobalInt (100, GetGlobalInt(100)+1);
Oh, It goes the long way. Thanks.
QuoteOh, It goes the long way.
You can write a function to make life easier:
function AddGlobalInt(int GINumber, int valueToAdd) {
SetGlobalInt(GINumber, GetGlobalInt(GINumber) + valueToAdd)
}
So:
AddGlobalInt(100, 1); // will increase GI100 by 1