NAME inherit - inherit the functions and variables of another object SYNOPSIS inherit "filename"; DESCRIPTION his is not a function in the normal matter, but merely a way to make all functions and variables from an object available to your object without copying it entirely. The filename counts from the root and not, like the include statement, from the current directory. If you wish to make a function with the same name as one in the inherited object you can still access the inherited one using two colons in front of the function name: reset(arg) { ::reset(arg); which will call reset(arg) in the inherited object. If you inherit more than one file you reach the functions in them by prepending the filename before '::' : inherit "/std/simple_monster"; inherit "/players/test/file"; reset(arg) { simple_monster::reset(arg); etc. which will call reset(arg) in /std/simple_monster. SEE ALSO /doc/LPC/inheritance
Help topics available:
You are guest number 141 since November 2019.
This file was last modified: June 2000.