Looking in the AGS System limits. What is the Differents from interaction editor global variables and script GlobalInts.
500 script GlobalInts
100 interaction editor global variables
I use Global Int like Int PowerOn. What one would this be or is it allso totally different?
The most important thing to note about both of those limits is that for
both of them, the item the limit is referencing has already been obsoleted/deprecated.
"interaction editor global variables" were variable states created using the "Interaction Editor" which was removed in AGS 3.0
"script GlobalInts" refers to the SetGlobalInt and GetGlobalInt functions which were deprecated in AGS 3.* (something, I don't remember the exact version)
The supported methods for global variables currently includes just these two options:
- Use the "Global Variables" pane in the editor:
--Open the Global Variables pane.
--Right click in the window.
--Select "Add new variable.
--Fill in the variable type, name, and default value.
- Use the import/export route:
--In a script file (*.asc) define your variable as normal.
--In the script file, somewhere after the variable has been defined, declare your export.
--In the script header (*.ash) define your variable import.
Both methods access the variables the same way (just type the name of the variable into the script and use it as desired/applicable; i.e., like you're already doing). The only important difference to note is that if you use the Global Variables pane the import/export is automatic and applies to EVERY script (including user, global, room, and dialog scripts); the import/export route only applies to scripts which are after both the script header in which the import is defined and the script file in which the variable is defined (i.e., you can import the variable in a different header than the script file it's defined in, but you can't use it until it's defined and it's not available to other scripts until it's imported). It will still be available (after definition and import) to global, room, and dialog scripts, as well as user scripts following the definition and import.
However, the Global Variables pane is more limited than the import/export route. For example you can't use custom (struct) types with the Global Variables pane but you can with import/export.
So if you're working with int, float, String, Character*, or any of the other types available to the GV pane, using that pane is the easier/more flexible (in that if you create a new script you don't have to move variable definitions/imports around) method; but the import/export route is more powerful.
Confused? := If you are I'll try to clarify but I'm talking myself 'round in circles.
In short, both of those limits are irrelevant to the latest versions of the editor. ;)
Thank you for the post.
I'm sorry that I didn't mention I was using AGS 2.72
I allready have alot of import and export int variables. just wondering can i have up to 500 script GlobalInts with this.
I like using 2.72 right then 3.0 version. But I just need to make sure about global variables and what I can do.
Just wondering is there a plugin or mod for 2.72 that will let you have more global int.
If you're using import/export then the limits still don't apply to you. :=
The limits apply to the GetGlobalInt and SetGlobalInt functions which work like:
SetGlobalInt(5, 10); // set global int #5 to value 10
int i = GetGlobalInt(5); // sets i to value of global int #5, which is 10
However, it's these functions that have the limit you're referencing. Again, if you're using import/export you have nothing to worry about. ;)
Thank you for the post.