Lpc Manpages

SYNOPSIS
	void init()

DESCRIPTION
	The main purpose of this function is to set up the
	add_actions() of an object. Therefore init() will always be
	called when an object moves near another object and one or
	both of them are marked as living.
	
	The way init() will be invoked is determined in the following
	manner:
	
	If the object O that moves is marked as living then first call
	init() of the destination object D with this_player() set to O.
	
	Then apply the two following 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 D is marked as living then call O->init(), with
	this_player() set to D.

	With 3.2.1, the actual move handling is part of the object
	library, so a given installation may implement any other
	scheme of calling init(), therefore rendering the following
	example almost useless.

EXAMPLE
	Lets say we have a object structure of living (l1 and l2) and
	non living objects (n1 and n2) as the following:
	
	l1
	   n1
	   l2
	   n2
	
	If we now move another living object l3 into l1, the call
	suequence of the init() functions looks like this:
	
	l1->init()  first init() of the destination will be called
	n1->init()  now iterate throw the inventory of the destination
	l3->init()
	l2->init()
	n2->init()
	l3->init()  and finally call init() of the object that has
		    been moved 

SEE ALSO
	add_action(E), efun308(E), environment(E), move_object(E),
	hooks(C)