View previous topic :: View next topic |
Author |
Message |
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Sat Jan 23, 2010 13:49 Post subject: ObjectToString. What about StringToObject |
|
|
ObjectTostring gets a unique hex reference to the object in nwnserver process right? Surely it might be useful if there was a method that could directly get objects based of their unique object to string.
Eg. GetObjectByString("00ffead");
or something like that.
It would eliminate the need for some of my systems to do lengthy loops just to get a single object. |
|
Back to top |
|
|
Fireboar
Joined: 17 Feb 2008 Posts: 323
|
Posted: Sat Jan 23, 2010 15:06 Post subject: |
|
|
Code: | string _ObjectToString(object oObj)
{
string sObj = ObjectToString(oObj);
SetLocalObject(GetModule(), "OBJ_" + sObj, oObj);
return sObj;
}
object GetObjectByString(string sObj)
{
return GetLocalObject(GetModule(), "OBJ_" + sObj);
} |
Done! |
|
Back to top |
|
|
|