Documentation Area

CHAPTER 1
Objects:
Now that we know about the basics of room coding we can take a step
further and create more complex rooms. First of all we'll learn how
to clone simple objects into our room.
The main thing that keeps Nemesis running are the reset cycles. Every
hour (or 2 to 3 hours) in every object in Nemesis the reset function
is called with argument 1. Only at creation time reset is called with
argument 0. Therefore we have the line
if (arg) return;
at the beginning of the reset function in our simple room.
If a room creates objects in a room that can be taken by players or
destructed (see 'help destruct') by a wizard (intendedly or not), those
objects should be re-created every reset, that means they have to be
cloned into our room if reset is called with arg 1 and if they are not
present any more.
So we only have to add the following lines before the "if (arg) return;"
line if we want a worldmap in our room:
if (!present("world map"))
move_object(clone_object("lib/obj/worldmap"), this_object());
Changed/modified in August 2016.
See also: