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

Documentation Area

Document Path: /doc/object/monster_died


Lfun:	monster_died - the lfun called in the object set by set_dead_ob

Synopsis:
	void monster_died(object monster, object corpse)

Description:
	This refers to obj/monster - see 'man monster/'.

	If dead_ob is set via set_dead_ob (see 'man monster/set_dead_ob')
	and a monster dies, the function monster_died is called in the
	dead_ob. If you inherit obj/monster use second_life - see
	'man second_life'.

Return value:
	If monster_died returns 0, the monster is destructed, else not.

Examples:
	// Monster will die but there won't be any corpse:
	monster_died(monst, corpse) {
		if (monst == monster) destruct(corpse);
	}

Note:
	Set the dead_ob to a loaded object (a blueprint) and not to a
	cloned object, as clones are lost definitely when destructed.
	A room - the room creating the monster - is a good choice.
	Since July 11th 2016 the set dead_ob is stored as a string if it
	is a loaded object. So a set dead_ob even can be reloaded and it
	still will work.

See also:


This page was generated in LPC

Imprint / Impressum