[MUD-Dev] Re: atomic functions

Chris Gray cg at ami-cg.GraySage.Edmonton.AB.CA
Wed May 6 22:59:33 New Zealand Standard Time 1998


[J C Lawrence:]

:What if this event daisy chain didn't start from a user command, but
:was generated by a mobile attempting its normal business of wandering
:the land?  If the event chain dies with that failed event the mobile
:itself "dies" -- there are no more events to "animate" it.

Why must it die? From a naive point of view, you want it to stop digging
the canal because something prevented it from continuing. The digging
event chain doesn't have to be the only event chain that exists for the
NPC. It could have a normal chain, that, because it is currently digging,
doesn't do things like wandering away, but can still do things like poses,
simple interactions with PC's, etc. The question then becomes that of how
the main chain knows that the dig chain has terminated.

Alternatively, and perhaps simpler, would be to not have a specific chain
of events for digging, but have a "current background activity" function
reference attached to the NPC. In its normal (and hopefully never failing)
chain of activity events, it calls that function periodically, and if the
function indicates failure, can cancel the function by removing the reference
to it. Didn't we talk about this a while back, including things like
having various priorities attached to such automated activities?

--
Chris Gray   cg at ami-cg.GraySage.Edmonton.AB.CA


--
MUD-Dev: Advancing an unrealised future.



More information about the MUD-Dev mailing list