blob: 1056e134b7b7736f9c856c9fe09e669b90d0382f [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001SYNOPSIS
2 void create()
3
4DESCRIPTION
5 The H_CREATE_SUPER/_OB/_CLONE hooks define the function or closure
6 to be called when the driver creates a new object. In older
7 drivers this was hardwired to the lfun create(), and a lot of
8 hook implementations still follow this tradition.
9
10 This function will be called only once on creation of the
11 object (this is when the object will be loaded or cloned).
12 Inside this function all major initialization can be done. The
13 current user and the previous object are defined but the
14 object has no environment.
15
16EXAMPLE
17 object cloner;
18 void create() {
19 cloner=this_player();
20 }
21
22 Initialize the global variable to hold the one who
23 created/cloned the object.
24
25 For 3.2.1, the mudlib may be programmed to call other lfuns
26 than create() on an objects creation.
27
28SEE ALSO
29 reset(A), init(A), __INIT(A), initialisation(LPC), hooks(C), native(C)