Dispenser (Programming)

From Hellmoo Wiki Archive
Revision as of 09:21, 4 January 2009 by imported>Spunky
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

$dispenser is an object that can be used as a container for like-typed objects. For example, a pack of cigarettes which contains twenty identical cigarettes. Instead of populating your pack with 20 objects ahead of time, this device will allow you to create them on the fly as players remove them from the container. It also allows you to put an object of that type back into the container, at which time the object is junked, but the number of things the container contains is incremented.

  • .spawn -- the object this dispenser will create or junk
  • .holds -- how many of .spawn this dispenser can hold
  • .remaining -- host many of .spawn are left in the dispenser

Please remember to describe and alias your dispensers properly.