|
help > hooks > pre move player --- Hook Name : pre_move_player Called From : /obj/living/movement.c Resolution Method : HOOK_OR Sample Header : int my_pre_move_player(string tag, object ob, string dir, object dest, int test) Arguments : tag - "pre_move_player" ob - The living object that's 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 that living thing. 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_exit_room, post_move_player, post_enter_room, post_exit_room --- Last modified : 2-5-01, Megaboz |
|