[Opensim-users] NPC Persistence over server restarts

Marcus Llewellyn marcus.llewellyn at gmail.com
Sat Oct 15 07:34:44 UTC 2011


On Fri, Oct 14, 2011 at 2:26 PM, Ai Austin <ai.ai.austin at gmail.com> wrote:

>
>  Recreating the avatars as required in scripts, as Marcus discussed, is far
>> easier.
>>
>
>
> Marcus Llewellyn <marcus.llewellyn at gmail.com>
>
>> As far as sitting goes, the best I've been able to do is to attach a chair
>> to the NPC, and use osAvatarPlayAnimation to perform a sit animation
>> tailored to fit the situation. Not ideal, but it works.
>>
>
> Marcus.. do you have the scripts for this? Add them and a few lines of
> instruction maybe to the wiki at:
> http://opensimulator.org/wiki/**OSSLNPC<http://opensimulator.org/wiki/OSSLNPC>
>
>
There really isn't anything to demonstrate where sitting is concerned. The
NPC I used this with never moves or walks around, so I simply attached the
chair to myself, and the chair gets copied over to the NPC's appearance. The
NPC doesn't dynamically attach or reattach the chair on it's own. Its script
simply creates the NPC with the chair already attached as part of its
appearance, and then immediately has it play a sit animation.

The main problem I have with this is that the NPC's collision box can
interfere with positioning, such as if you have the NPC sitting at a desk.
The easiest thing to do is to simply phantom any obstacles the NPC might
encounter.

I have provided a simple example of how I maintain NPC persistence across
sim restarts on the wiki, though. You can find it at:
http://opensimulator.org/wiki/User:Marcus_Llewellyn/NPC_Scripts

I have other scripts I'm slowly working on, but I feel that they are too
incomplete to share at this point. I'd be happy to contribute them to the
wiki's script library eventually, though.

Marcus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-users/attachments/20111015/f4844423/attachment.html>


More information about the Opensim-users mailing list