View previous topic :: View next topic |
Author |
Message |
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Mon Jul 12, 2010 21:51 Post subject: Limbo properties |
|
|
Im trying to clean up my NPC when last player exit area. I was thinking what would be better, send them into Limbo or set them nonexisting scripts (guess there is issue with no script at alll right) into all events?
Cos I worry if there isn't some limit for number of objects in Limbo, does anybody know? _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Tue Jul 13, 2010 21:20 Post subject: What I do |
|
|
What I do instead, is use an on enter, and on exit script for the area in question.
When a player exits the area, and no other players are inside the area, it loops through all npcs, saves their resrefs, locations etc to local variables on the area, with incrementing unique id's.
eg
Creature_01
Creature_02
and so on
and the locations are stored with the same number as the creatures resref etc.
Then, when values are stored, they are also destroyed at the same time.
When a player enters the area, the creatures, are restored via their ResRef, basically as new objects, in their predesessers original locations.
So far, I use this in Taverns etc.
Works fine.
Objects existing in the module, no matter where, cost a small amount of memory, it makes sense to reclaim this memory, when not needed. |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Tue Jul 13, 2010 23:34 Post subject: |
|
|
Im destroying them already, but I would like to avoid Destroy/Create object if its not necessary so Im thinking about new way. Limbo/EventScripts are two ideas, wonder what would be better. _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Wed Jul 14, 2010 2:04 Post subject: |
|
|
dont know if there is limits on the amount of npcs that can go into limbo, but I do know that it would be a hell of a mess for any dm's trying to use limbo for any RP'ing.
But as far as event scripts go.
You will actually need to make a script that does
Code: |
void main()
{
return;
}
|
Blank events, tell nwn to run the default script for that event.
But if you make a script which does the minimum, such as a simple return, then this will be acceptable, and will effectivly minimize the drain from that particular creature. |
|
Back to top |
|
|
|
|
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
|