Original Post
Hi, I have objects in my game defined by lua scripts. Each Character for example has it's own script file with a definition of a table called "Character", which owns certain properties of this character (Name, Type, Experience, etc.). Each object also has some functions declared in the script that are triggered on events like when the character is upgraded. What I want is, that each character can read/write the propertiers of another character from within the script. Let's assume I want to change the experience of a Character when another is upgraded, I want something like this: function onUpgrade ( ) OtherCharacter = GetCharacter("Name", "Type"); OtherCharacter.experience = 0; end From inside my game C++ code I can search for an object by it's name and type, so I could supply a function like "GetCharacter(name, type)", which could return me a handle to the object and thus to it's lua script and state. But I have no idea how I can get a pointer to a table from one lua script into another lua script. Is that possible? Any other ideas? TIA, ZMaster