[Package Index | Mudlib Index | Effect Index]

File /obj/handlers/wander_handler.c

Handles npcs wanderting randomly around the place and npcs following a route to a destination.

See also:
/obj/monster->move_me_to() and /std/effects/npc/goto_destination.c

Written by Wodan and Pinkfish

Includes

This class includes the following files /include/playtesters.h and /include/player.h

Class Index

Method index

Public Functions

These are functions that everyone can access.

delete_move_after
void delete_move_after(object monster)

Stops an npc wanderering aimlessly around the place.

Parameters:
monster - the npc to stop wandering


has_monsters
int has_monsters(class wander_group thing)
move_after
void move_after(int runaway)

Put an npc into the random movement group. This is called from the set_move_after code in the npc object. You should not need to call this function directrly.

Parameters:
runaway - is this a wimpy attempt?

See also:
/obj/monster->set_move_after()


move_me_please
int move_me_please(int delay,
                   string dest)

Called from the npc to start them mmoving. This should not need to be called inside your code. It is called from the function move_me_to in the npc code.

Parameters:
delay - the delay between each move
dest - the destination room for the npc

Returns:
0 if it failed and 1 on success

See also:
/obj/monster->move_me_to()


query_moving_monster
int query_moving_monster(object ob)

Is this npc a moving npc?

Parameters:
ob - the npc to check to see if it moves

Returns:
1 if it is moving, 0 if it is not.


Classes

These are nice data types for dealing with... Data!