View previous topic :: View next topic |
Author |
Message |
Lehel
Joined: 11 Apr 2007 Posts: 4
|
Posted: Sun Apr 15, 2007 5:27 Post subject: object data acessors and iterators |
|
|
was wondering if anything like this exists already in a plugin or, if not, how much time would it take to implement:
say, object X has two variables assigned to it: "a" and "b". "a" has a string value and b has an int value.
a function to get the number of variables stored in it's personal array:
count = GetObjectVarCount(object o); //returns 2
int = GetObjectVarType(object o, 0) //returns a const VAR_TYPE_STRING
string GetObjectVarString(object, 0) //returns the value of variable "a"
etc. |
|
Back to top |
|
|
Lehel
Joined: 11 Apr 2007 Posts: 4
|
Posted: Sun Apr 15, 2007 5:31 Post subject: |
|
|
forgot: string s = GetObjectVarName(o, 0) //returns "a"
actually, i guess all variables are stored as strings? |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Sun Apr 15, 2007 14:42 Post subject: |
|
|
I do not think something like this already exists, but it should be doable within some 2-3 days of debugging work (rough estimate).
The question is, why do you need this functionality ? There are plugins like the NWNX4 Hashset plugin that might offer a more elegant solution to working with sets of data on NWNX objects. It depends on what you want to do, really. _________________ Papillon |
|
Back to top |
|
|
|