Manual:DIL Manual/master

From DikuMUD Wiki
Jump to navigation Jump to search

master

Field (unitptr, read-only; units: characters).

ch.master : unitptr

The character that ch follows, or null when it follows no one.

Notes

  • On an object, a room or null the field fails.
  • It can't be assigned (vmc: "Illegal lvalue"). Start or stop following with follow().
  • The other way round, follower, getfollower() and followercount give a character's followers.

Example

dilbegin follow_note();
code
{
   if (self.master == null)
      quit;

   act("You now follow $3n.", A_ALWAYS, self, null, self.master, TO_CHAR);
   heartbeat := 1;

   :start:
   wait(SFB_DONE, TRUE);
   if (self.master == null)
      quit;
   goto start;
}
dilend

Tells a character whom it now follows and ends when it stops following, as in basemove.zon.

See also