Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Squinky on Fri 04/07/2003 06:39:51

Title: incrementing global variables...
Post by: Squinky on Fri 04/07/2003 06:39:51
I can't remember how to do this, but I want to just add a ++ to my global variable, not set it....

Anybody wanna drop me a line on this one, because sadly I've forgotten...
Title: Re:incrementing global variables...
Post by: Gilbert on Fri 04/07/2003 06:46:40
If you're using a global variable, just do something like:

blah++;
or
blah=blah+1;

But if you're talking about global INT (which I think IS the case ;D ), just use:

SetGlobalInt(3, GetGlobalInt(3)+1);

Title: Re:incrementing global variables...
Post by: Squinky on Fri 04/07/2003 21:50:16
Thanks Gil, your right...Heh