A
          / \      _             Play Now                         Nemesis on fb
          | |     | |  _______   _        _   _______    _______   _    _______
          | |\    | | |   ____| |  \    /  | |   ____|  /   ____| | |  /   ____|
 /-------/-------------------------------------------------------------------,
O= Home <=XX|  About  News  Pics  Adventurers  Wizards  Download  Connect     >
 \-------\-------------------------------------------------------------------'
          | |   \   | |  |____  | |      | | |  |____   ___ \  \  | |  ___ \  \
          | |     \_| |_______| |_|      |_| |_______| |_______/  |_| |_______/
          \ /
           V  

Documentation Area

Document Path: /doc/monster/second_life


Lfun:	second_life - get a monster a second life

Synopsis:
	int second_life(object corpse)

Description:
	The second_life function is called when a monster dies. The argument
	is the previously cloned und set up corpse.
	If you you inherit obj/monster, just override second_life.
	If you simply cloned obj/monster, second_life of obj/monster calls
	monster_died in the dead_ob, if it is set with set_dead_ob.

Return value:
	If it returns 0, the monster destructs itself, else not.

Examples:
	// Monster dies but - well - is still there and even gets healed.
	// There will be a corpse of the monster:
	second_life() {
		heal_self(1000);
		return 1;
	}

	// Monster will die but there won't be any corpse:
	second_life(corpse) {
		destruct(corpse);
	}

Note:
	No matter what second_life returns, there will be a corpse!
	If there shouldn't be any corpse, see above ;-)

See also:


This page was generated in LPC

Imprint / Impressum