A
/ \ _ Play Now Nemesis on
| | | | _______ _ _ _______ _______ _ _______
| |\ | | | ____| | \ / | | ____| / ____| | | / ____|
/-------/-------------------------------------------------------------------,
O= Home <=XX| About News Pics Adventurers Wizards Download Connect >
\-------\-------------------------------------------------------------------'
| | \ | | |____ | | | | | |____ ___ \ \ | | ___ \ \
| | \_| |_______| |_| |_| |_______| |_______/ |_| |_______/
\ /
V
Documentation Area
Document Path: /doc/object/monster_init
Lfun: monster_init - the lfun called in the object set by set_init_ob
Synopsis:
void monster_init(object monster)
Description:
This refers to obj/monster - see 'man monster/'.
If init_ob is set via set_init_ob (see 'man monster/set_init_ob')
and the init (see 'man object/init') of the monster is called,
the function monster_init is called in the init_ob.
Return value:
If monster_init returns 1, the monster doesn't get an init call.
That means the normal init of the monster is terminated and it is
not notified about a player enterint the room.
Examples:
// Monster is greeting :-)
monster_init(monster) {
if (monster == mymonster)
tell_room(this_object(),
capitalize(mymonster->query_name()+" says: Hello!\n"));
}
Note:
Set the init_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 December 28th 2016 the set init_ob is stored as a string if
it is a loaded object. So a set init_ob even can be reloaded and
it still will work.
See also:
This page was generated in LPC
Imprint / Impressum