[Opensim-users] Inquiry about OpenSim NPC
Justin Clark-Casey
jjustincc at googlemail.com
Wed Dec 7 22:59:23 UTC 2011
Hi Tan Lu,
Unfortunately, the Second Life viewer doesn't (yet!) recognize NPCs - as far as its concerned they're users like
everybody else.
Therefore, scripting NPCs in OpenSimulator is subject to a number of workarounds. For instance, you can't place scripts
in an NPC directly, as you would with a prim. As Garmin said for (1), a standard idiom for controlling NPCs is to
attach an object to them which contains the control script.
And as Garmin also said for (2), being able to actually select them is not an expected behaviour. If your viewer allows
this then things are going to go wrong pretty quickly.
I'd like to add that I'm happy to listen to suggestions for further NPC functions if there's (1) a demonstrable need,
(2) it's impossible via other script functions or extremely difficult and (3) it's not incredibly complicated to do :).
However, I'm not likely to get to them quickly due to the press of other work and the fact there are still other
outstanding NPC issues that I haven't yet had time to address (e.g. problems if an NPC is pushed outside its region,
issues with movements not being exact).
Of course, I'm also very happy to look at code patches for NPC functions :-)
On 07/12/11 08:30, TanLu wrote:
>
> Hi, OpenSim users and Justin
>
> I’m a PhD student and my research focus on agent-based simulation of crowd evacuation in fire emergency. Now I’m trying
> to implement such a simulation in OpenSim and I found the NPCs are really useful which can be used to mimic the
> pedestrian behavior. So far I am able to create NPCs using the script-based approach and make them moving around
> according to some designed rules, but I still have some problems.
>
>
> (1) I wander if the NPCs can be treated like an object, which can be scripted? Now, I can only use a NPC List in the
> main script to control several NPCs at once, and this leads to a lot of “for-loop”. Is it possible to make each NPC to
> have its own script, so that I can use the llRezObject function in the main script to generate NPCs with script?
>
>
> (2) When I click the NPC under the building mode, the three axes appear as usual. But when I try to move the NPC by
> dragging it along the axis, the NPC disappears once I release the mouse button. Moreover, through the osGetAvatarList()
> function, I find the NPC is still in the region! I wander is this a bug on the current NPC function, or did I do
> something wrong?
>
>
> Could you please kindly help to solve my problems? Any comments or suggestions would be highly appreciated.
>
>
> Many thanks for your attention and look forward to your reply.
>
> Best regards,
>
> Tan Lu
>
> *****************************************************
> Tan Lu
> Institute of Space and Earth Information Science
> Fok Ying Tung Remote Sensing Science Building
> The Chinese University of Hong Kong
> Shatin, Hong Kong
> Tel: 852-2609 7257
> Fax: 852- 2603 7470
> Email: tanlu_0912 at hotmail.com <mailto:tanlu_0912 at hotmail.com>
>
>
>
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-users
--
Justin Clark-Casey (justincc)
http://justincc.org/blog
http://twitter.com/justincc
More information about the Opensim-users
mailing list