lua:sharedtable
This is an old revision of the document!
'shared' table
Any prog/script runs inside a script environment. See script environemnts for more details. This means that even "global" variables or functions declared in a script are only global to its environment.
The 'shared' table is a table that is common to all environments associated with game objects in a certain area. This means that each mob/room/object in a given area will point to the same 'shared' table in scripts (as well as the area itself).
Using the 'shared' table is as simple as using a typical lua table:
<code> shared.message="Hello world!"
lua/sharedtable.1443414836.txt.gz · Last modified: 2015/09/28 04:33 by vodur