MOVE_PLAYER(L) NAME move_player - move a living object to a new location SYNOPSIS varargs int move_player(string destdir, mixed optdest, int moveflags); LOCATION /obj/living_functions.c RETURN VALUE Gets a 1 if object moved is an NPC, or a 0 if object is a player (either way, almost completely useless). DESCRIPTION This is the standard method of moving monsters and players to new rooms. It may be referenced in the following ways: ob->move_player(string+"#"+string); where the first string is the direction ("north", "south", etc.) and the second string is the file name of the room to be moved to. ob->move_player(string, string) Like above, except the direction and the destination are passed as separate arguments instead of one separated by a "#" ob->move_player(string, object) The first argument is the direction, the second an object pointer to the destination. There is a special direction, "X", which means the living is leaving magically. In this case the 'magic' exit message is printed out (normally "leaves in a puff of smoke"). You can also supply three different flags to move_player as third argument. The flags are specified in /include/moveflags.h. If you wish to use more then one flag just '+' them together. NOTES This function is preferable to moving players with move_object(E) or transfer(E) as it handles automatically the printing of messages, the automatic 'look-around' a player does when entering a room, etc. SEE ALSO move_object(E)
Help topics available:
You are guest number 111 since November 2019.
This file was last modified: June 2000.