A
/ \ _ Play Now Nemesis on
| | | | _______ _ _ _______ _______ _ _______
| |\ | | | ____| | \ / | | ____| / ____| | | / ____|
/-------/-------------------------------------------------------------------,
O= Home <=XX| About News Pics Adventurers Wizards Download Connect >
\-------\-------------------------------------------------------------------'
| | \ | | |____ | | | | | |____ ___ \ \ | | ___ \ \
| | \_| |_______| |_| |_| |_______| |_______/ |_| |_______/
\ /
V
Documentation Area
Document Path: /doc/living/move_player
Lfun: move_player - moves a living being around
Synopsis:
void move_player(string dir, string dest)
void move_player(string dir+"#"+dest)
Description:
Calling move_player in a living is the proper way to move it. It
is used by the room system, whenever a player tries to move in a
direction, specified in the exits array. If you want to make some
extra moves, you should call move_player.
The naming is a bit illogical for you can not only move players
around, but every living being in the game, also monsters!
Syntax 1: move_player(string dir, string dest)
This is the normal and recommended syntax!
The first argument is the direction and the second argument
is the filename of the room (or an object) you wish to move
the being in. The direction string is displayed to everyone
in the room after the outmsg of the being.
Syntax 2: move_player(string dir+"#"+dest)
This is the OLD syntax! It's kept and just supported for
compatibility! DON'T USE it any longer!
The single argument is a string containing the direction
and the filename separated by a '#'.
Example: "out#room/workroom".
The special direction "X" characterizes a teleport operation (with
different msgout and msgin resp. mmsgout and mmsgin).
ALWAYS use move_player to move players from a room to another!
Move_player does much more than just move_object (or transfer)!
And this applys also to monsters: Use move_player!
Return value:
none
Examples:
this_player()->move_player("into the castle", "d/nowhere/cas/entr");
this_player()->move_player("south", "d/nowhere/cas/hall");
this_player()->move_plauer("X", "guild/mages/master");
Note:
In former times it was stated that move_player would return 1 on
success and 0 if the living being cannot flee from enemies. This
is not true. The return value has to be ignored.
See also:
This page was generated in LPC
Imprint / Impressum