[Opensim-users] Inquiry about OpenSim NPC
Justin Clark-Casey
jjustincc at googlemail.com
Tue Dec 13 22:01:54 UTC 2011
On 13/12/11 13:21, Bob Wellman wrote:
> Justincc said "I'm happy to listen to suggestions for further NPC functions"
>
> As I am currently working on writing some NPC scripts in PMgrid, I would like to suggest a few things whilst they are on
> my mind.
>
> I realise they will be low priority for some time to come, but if they could just be added to a futures wish list that
> would be great.
>
> 1) Adding OS_NPC_RUN and OS_NPC_NO_RUN options to osNpcMoveToTarget. Default should be OS_NPC_NO_RUN which would work as
> now. The option OS_NPC_RUN would move the NPC at running speed and use a run animation rather than a walk animation.
Sounds good to me. A little difficult to do but not enormously so.
>
> 2) Adding osNpcShout and osNpcWhisper functions. Each identical to osNpcSay but shouts or whispers the message rather
> than says it. Hopefully the shout animation would be used on the NPC if he shouts. Alternatively these could be options
> added to osNpcSay to control at what volume something is said, the deafult being Say as now.
Both good suggestions, I think. I prefer separate functions since this parallels llShout() and llWhisper(). Would be
pretty simple to do.
>
> 3) Adding an osNpcTouch(key npc, key target).This would allow NPCs to do things like touch doors to open them before
> trying to walk through them and to interact with existing scripts in object such as light switches, machinery etc.
I think this is also an interesting idea. More difficult than 2 as events are involved.
Unfortunately, the chance to me doing them soon is quite small since there are many other issues to address (e.g. npc
boundary problems, issues with npcs and groups). Naturally. patches are welcome.
>
>
> > Date: Wed, 7 Dec 2011 22:59:23 +0000
> > From: jjustincc at googlemail.com
> > To: opensim-users at lists.berlios.de
> > Subject: Re: [Opensim-users] Inquiry about OpenSim NPC
> >
> > 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
> > _______________________________________________
> > Opensim-users mailing list
> > Opensim-users at lists.berlios.de
> > https://lists.berlios.de/mailman/listinfo/opensim-users
>
>
>
> _______________________________________________
> 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