Anyone have experience with these? My impression is that they are something Ronan coded, but I haven't come across their documentation anywhere yet, was hoping for some guidance, since they are used in several places in the spawn system code.
Thanks in advance.
LocalArrayObject Functions?
Moderators: ALFA Administrators, Staff - Technical
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
Maybe not relevant, but here are a couple of links:
http://nwn.bioware.com/forums/viewtopic ... m=63&sp=75
http://nwn.bioware.com/forums/viewcodep ... st=4557732
Mr. Figglesworth seems to have written some stuff on them, but maybe it's a different function. Not sure.
http://nwn.bioware.com/forums/viewtopic ... m=63&sp=75
http://nwn.bioware.com/forums/viewcodep ... st=4557732
Mr. Figglesworth seems to have written some stuff on them, but maybe it's a different function. Not sure.

- ç i p h é r
- Retired
- Posts: 2904
- Joined: Fri Oct 21, 2005 4:12 pm
- Location: US Central (GMT - 6)
Yeah Ronan did code them, but I'm not sure how useful they really are. They're simply abstractions of the basic Set* and Get* primitives, which you could just call directly. Either way, you still have to manage the indexes, counts, and whatever else you require to insert then extract the proper data record. A hash is usually much easier to work with than an array since lookups are done by keys, not indexes. But, it all depends on what you're trying to do. So what are you trying to do or what is your question?
I've got string based array handler functions somewhere on my PC, which store records on a single string using a delimiter. The advantage there is that pushing, popping, and computing array length can be handled by the array functions. The disadvantage is it requires more overhead than simple local data reads/writes. And you can't create arrays of objects.
I've got string based array handler functions somewhere on my PC, which store records on a single string using a delimiter. The advantage there is that pushing, popping, and computing array length can be handled by the array functions. The disadvantage is it requires more overhead than simple local data reads/writes. And you can't create arrays of objects.
- AcadiusLost
- Chosen of Forumamus, God of Forums
- Posts: 5061
- Joined: Tue Oct 19, 2004 8:38 am
- Location: Montara, CA [GMT -8]
- Contact:
In this case it's (as far as I could tell in my testing last night) generating an array of pointers on each spawn waypoint, which point at each spawned child. When the waypoint is ordered to despawn due to time, inactivity, or other conditionals, it queries the length of the array, and then iterates through it, using DestroyObject on each to phsyically despawn.
The arrays will always be reasonably short (one per spawn waypoint), so shouldn't need hashing or other higher-efficiency sorts. We'll be needing to remove members of such arrays as well though, to reflect spawn children being killed. I'm remembering a acr_storageobject_i.nss somewhere, I'll look into that to get started.
[edit: nevermind, found it in acr_array_i.nss, just wasn't in the #include.]
The arrays will always be reasonably short (one per spawn waypoint), so shouldn't need hashing or other higher-efficiency sorts. We'll be needing to remove members of such arrays as well though, to reflect spawn children being killed. I'm remembering a acr_storageobject_i.nss somewhere, I'll look into that to get started.
[edit: nevermind, found it in acr_array_i.nss, just wasn't in the #include.]
- ç i p h é r
- Retired
- Posts: 2904
- Joined: Fri Oct 21, 2005 4:12 pm
- Location: US Central (GMT - 6)
Yeah all of that is left to the application to deal with from what I could see, which is what really makes me question the value of using those functions at all. Do you see any benefits to them, AL?AcadiusLost wrote:We'll be needing to remove members of such arrays as well though, to reflect spawn children being killed.