Phantasmal Site > Phantasmal API > API Listing > teleport
API Function: teleport
- Summary:
- instruct the mobile to teleport somewhere
- Defined In LPC Object:
- /usr/common/lib/mobile.c
- Prototype:
- nomask string teleport(object destination, int force)
- Can Be Called By:
- System, Common, Game
- Description:
-
Cause the mobile to attempt to teleport to the specified
destination. If 'force' is true, the teleport is automatically
successful if the destination is valid. If the mobile cannot,
a reason why is returned as a string.
The 'force' parameter is primarily to allow admins to teleport
wherever they please without directly setting internal MUD
structures.
When the mobile changes rooms, the 'hook_leave' hook is invoked
in the old location, and the 'hook_enter' hook is invoked in
the new location.
You should access-protect your version of this and all other
inherited functions, including upgraded() and destructed().
- Return Value:
-
The reason as a string, or nil for success.
- Errors:
- Usually none.
- See Also:
- move ,
hook_enter ,
hook_leave
|