Jump to content

Variable types


Recommended Posts

AREA: SetGlobal("XXXXXX", "AR0500", 1)


The above command sets the XXXXXX variable to 1 in an area scope (specifically AR0500). Area scope scripts can be seen by all other scripts (in the same way globals can) but each area can have its own copy of the variable (with its own number being tracked). Area variables are used when an action can be done a limited number of times in several areas. Area variables are a type of global variable, and are therefore stored in the GAM file.


NB. The string MYAREA can be specified as the variable scope, except in BG1. When running a script with this reference, the engine substitutes the current area for the MYAREA text.

NB. GLOBAL, LOCALS and MYAREA are case-sensitive.

They're stored in ARE files, archived within SAV.


And unless I miss something very obvious, they have always been case INsensitive, at least on Windows BG2 ToB.

Link to comment

I think he's saying that you shouldn't use instead "global" or "locals" or whatever (and in NI, our scope matching may even be case sensitive too). The variable name itself isn't sensitive, true, but that text is referring only to the scope string.

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...