
I've done some testing, and it seems that they do, but I just want to know if I'm missing anything.
I want to know if the value assigned to a global variable will persist as an object is taken into and back out of inventory.
I know that a state is preserved. What I need to know is whether or not variables are. For example, say I define a global "counter" variable. I set it to zero at the beginning of my script. Then, in the "state_entry" event of every single state in my script, I have the statement:
counter++;
(A trivial example, I know, it just counts how many times the script changes to a different state)
It appears that a variable like this will continue to hold it's present value even as the object is taken in and out of inventory, correct?
So the variable will never get reset to zero unless I specifically set it to zero myself, or the script gets reset for some reason. I'm just hoping that someone can verify this for me.
And finally, can anyone tell me all the different ways that a script can get reset? (intentional or accidental?)
Thanks for much for the help everyone - now I'll be good on my promise and not start anymore threads tonight!