logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
object data acessors and iterators

 
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
Lehel



Joined: 11 Apr 2007
Posts: 4

PostPosted: Sun Apr 15, 2007 5:27    Post subject: object data acessors and iterators Reply with quote

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
View user's profile Send private message
Lehel



Joined: 11 Apr 2007
Posts: 4

PostPosted: Sun Apr 15, 2007 5:31    Post subject: Reply with quote

forgot: string s = GetObjectVarName(o, 0) //returns "a"

actually, i guess all variables are stored as strings?
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sun Apr 15, 2007 14:42    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group