SetLocalObject(object, string, object)
Store an object as a local variable within an object.
Target object to store local variable in.
Unique variable name.
Variable being stored in local object.
Stores oValue as a local object within oObject using the variable name sVarName. The parameter sVarName is a unique string identifying a single local variable. Using the same value for sVarName in subsequent calls will overwrite the original value.
Objects get assigned a unique reference in a list depending when they are created and what object type they are - for this reason, it is never persistant - see below. Even when a PC enters, each item is given its unique reference so the module knows it exsists.
No object cannot be stored using this. If it is destroyed or expires (if an AOE) it will obviously return an invalid object.
Note that the Campaign version actually copies information from the game to the database - this, however, stores a local objects "identifier". For this reason, because now local variables can be set on a PC's items and be persistant, any GetLocalObject() calls after the server has reset and it is retrieved from the item will return an odd, or totally invalid object reference (the default OBJECT_INVALID will be returned).
As with all locals, there seems to be no size limit to sVarName, however, anything over 50 characters is probably a bit extreme.
author: Daniel Beckman, editor: Jasperre, additional contributor(s): Xepherys, Graziano Lenzi, Jasperre