From the NannyMUD documentation

LAST CHANGE

2001-01-06

FUNCTION


NAME

        init - call when living object comes nearby

LOCATION

	Can occur in any object.

SYNTAX

void init();

DESCRIPTION

	The primary purpose of the init function is to set up the
	add_action()'s of an object.  To this purpose, init() will be
	called whenever a living object approaches or enters another
	object.  this_player() will return the living object.

	The way init() is invoked is determined in the following manner:

	If the object O that moves is marked as living then the first
	call of init() is in the destination object D with this_player()
	set to O.

	Then apply the following two rules for each object C inside D:
	
		If C is marked as living then call O->init() with 
		this_player() set to C.

		If O is marked as living then call C->init() with 
		this_player() set to O.

	Finally, if O is marked as living, then call O->init, with
        this_player() set to D.

NOTE

	init() in monsters are not called with the monster as
	this_player().

SEE ALSO

        add_action in efun/object_related/add_action

SEE ALSO

        move_object in efun/object_related/move_object