[DGD] Hooks

alderamin at jippii.fi alderamin at jippii.fi
Mon Sep 15 19:36:21 CEST 2003


>   However, that's something you could set up for
> yourself quickly enough (I've done the same thing in C
> before several times, it's quite useful).  It adds no
> genuinely new capabilities to DGD, it's just a nice
> abstraction.
> 
>   What sort of events were you hoping to handle?  What
> is it that DGD doesn't seem to do for you currently
> that you wanted to do?


Okay here's an example of the problem I've been trying to solve: say, we 
have a "living" class which has a method "receive_damage". Then a wizard 
wants to make a guild power or an item which does something funky to the 
damage. Or the player can "wield" or "wear" stuff and some special items 
want to know when they're wielded or worn so they can do something. 
Anyway, things which were done with shadows in the dark ages.. =)

I thought there could be some kind of message system, like when a player 
wields a weapon it would send a message like "Moomin, wield, 
evil_sword", now this evil_sword could be listening to messages where 
it's involved and see that Moomin wields it and do something evil :P ..

One of the possible problems is that if every single thing the player 
does, sends a message and there are lots and lots of things listening to 
these messages it gets cumbersome, at least if the whole thing is 
implemented in LPC, I just thought if there was some internal support 
for such things it might be faster.

Sampo

__
Ota itsellesi luotettava kotimainen email http://www.jippii.fi/
Tutustu samalla netin parhaaseen pelipaikkaan JIPPIIGAMESIIN.

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list