|
help > hooks > pre exit room --- Hook Name : pre_exit_room Called From : /obj/living/movement.c Resolution Method : HOOK_OR Sample Header : int my_pre_exit_room(string tag, object ob, object who, string dir, object dest, int test) Arguments : tag - "pre_exit_room" ob - The room being exited who - The living object moving dir - The direction being moved ("north" for example) dest - The room object being moved to test - If 1, just check the validity of the move, don't print any errors or cause any other side effects Return Value : 1 to intercept the move, 0 to allow it Description : When a living thing attempts to move (either on its own, or being forced by a spell or something else), this hook is called in the room they're in before they actually move. If 1 is returned, the move is disallowed, and no messages are displayed, so you should take care of that yourself. If 0 is returned, the move is allowed (unless someone else had a give hook that returns 1). Note also that if "test" is 1, no mesages should be displayed or side effects carried out; simply return 0 or 1 like you otherwise would. See also: pre_enter_room, pre_move_player, post_move_player, post_enter_room, post_exit_room --- Last modified : 2-5-01, Megaboz |
|