Join us in Outworldz at http://www.outworldz.com:9000 or follow us:

[Table of Contents]

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Description: Creator:
NPC When a simulator is restarted, any NPCs on that sim's regions will not automatically reappear. // Much like dynamic textures, NPCs are a transient and non-persistant asset that is not stored in any database. // So any scripts that controls an NPC will need to have a mechanism in place to detect wether an NPC is currently instantiated, and recreate it if it is not.
OpenSim NPC from http://opensimulator.org/wiki/OSSL_Script_Library/Persist_NPC // // NPC Persistance Example created by Marcus Llewellyn. // This script is in the Public Domain. // //When a simulator is restarted, any NPCs on that sim's regions will not automatically reappear. Much like dynamic textures, NPCs are a transient and non-persistant asset that is not stored in any database. So any scripts that controls an NPC will need to have a mechanism in place to detect wether an NPC is currently instantiated, and recreate it if it is not. //Implementing NPC Persistence: //The llKey2Name function placed in a timer event is the tool I use to check whether an NPC is still present in-world. If this function returns an empty string, it can be assumed that the NPC is no longer rezzed, and must be recreated. //The following script is an example of the mechanism I make use of to accomplish this task. It has been kept to the bare minimum necessary to demonstrate the concept, and to manage the NPC it creates.

Back to the Best Free Tools in Second Life and OpenSim.