[DGD] Skills
Chad Kinsey
lanthus at alaweb.com
Sun Mar 16 04:38:36 CET 2003
Also unless your skills code is in the player object, which is unlikely,
you need to pass this_player() as an argument on the first callout and
repass the object on subsequent callouts. Otherwise when it executes
you'll have no way of knowing which player originally started the
process.
Chad
-----Original Message-----
From: dgd-admin at list.imaginary.com [mailto:dgd-admin at list.imaginary.com]
On Behalf Of Stephen Schmidt
Sent: Saturday, March 15, 2003 7:20 PM
To: dgd at list.imaginary.com
Subject: Re: [DGD] Skills
On Sat, 15 Mar 2003, Ben Chambers wrote:
> Say that you had a multipart skill or spell... What would be the best
> way of storing the current state of execution (skill/state of skill)
> for each user and making sure that each round it steps through to the
> next phase of each skill? Callouts? Some sort of global stack that
> keeps all the information of what is going on?
Callouts -is- a global stack, so all else equal, I would use
callouts rather than duplicate the function in the mudlib.
You can pass arguments through the call_out function, which
will handle the problem of storing state, and you can use
remove_call_out to manage the stack if you need to (if you
need to alter the args or something, remove the existing
call_out and insert a new one with the changed args and the
remaining time).
A side note based on my experience doing such things: Be sure
you block the user from executing other commands during the
casting of the spell (such as movement) and from making combat
attacks, if that is desired.
Steve
It appears to me that we developed and sustained a two-war military to
only have it run by an administration with a one-war attention span.
- Sen. Ted Kennedy, 2-26-03
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list