[DGD]Overlapping functions?

John West McKenna john at ucc.gu.uwa.edu.au
Mon Jul 2 12:57:32 CEST 2001


Brandon Rush writes:

>I've got a problem where I have a function named move() in both player.c and
>object.c
>I'm trying to call the "move" from object.c but since I'm using a player
>object it's using player.c's move() function instead.

You want the magical named inherit.  It goes something like this:

inherit object "/lib/object";
inherit player "/lib/player";

void a_function() {
  object::move();
}

John

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



More information about the DGD mailing list