|
help > hooks > pre enter room --- Hook Name : pre_enter_room Called From : /obj/living/movement.c Resolution Method : HOOK_OR Sample Header : int my_pre_enter_room(string tag, object ob, object who, string dir, object src, int test) Arguments : tag - "pre_enter_room" ob - The room being entered who - The living object moving dir - The direction being moved ("north" for example) src - The room object being moved from 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 trying to move to. 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_exit_room, pre_move_player, post_move_player, post_enter_room, post_exit_room --- Last modified : 2-5-01, Megaboz |
|