Really get/set Global Variable (from the right panel or from the global script) via its number?
For ex., globvar DoorOpened (boolean). And for ex, it has number 2 in the globvar list. Can I work with this globvar via its number? Smth like Global[2]=true;
Display( Global[2].Name );
("Really x?" => "Is there x?" / "Does AGS have x?" ;))
AGS has this:
void SetGlobalInt(number, value)
int GetGlobalInt(number)
They are obsolete, but you can still use them; named global variables and pointers are much more readable though, right?
You can create them in the editor's Global variables pane.
If you want index numbers, AGS supports global arrays:
// global header
import int health[10];
// global script
int health[10];
export health;
// in any script:
health[3] = 20;
Display("HP: %d", health[2]);