The "context" of a global variable took me forever to understand so I feel your pain. It's incredible simple, it's the terminology that's complex.
Setting the "context" is just setting the location of the variable table array. If you were doing this in c code it would look something like this:
Code:
global_variable_table[context] == variable
By setting the context to the "actor.id", we make sure to place the variables in a section of the array that will only be accessible by someone with that idnum.
If Vatiken's idnum is 6, and I do this:
Code:
context %actor.id%
set var 1
global var
then it will store the variable "var" in the global variable table in "6" or "global_variable_table[6]".
If I slap another trigger on the same mobile and do this:
Code:
context 6
if %var%
say Found VAR!
end
context %actor.id%
if %var%
say Found VAR!
end
Both "if"s will fire.