Difference between revisions of "Dispenser (Programming)"

From Hellmoo Wiki Archive
Jump to navigation Jump to search
(New page: ---+++Generic Dispenser (#880) $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 cigar...)
 
imported>Spunky
m
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
---+++Generic Dispenser (#880)
$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.


$dispenser is an object that can be used as a container for like-typed
*.spawn -- the object this dispenser will create or junk
  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


*.holds* -- how many of .spawn this dispenser can hold
*.remaining -- host many of .spawn are left in the dispenser


*.remaining* -- host many of .spawn are left in the dispenser
Please remember to describe and alias your dispensers properly.


Also, please remember to describe and alias your dispensers properly.
[[Category:Programming]]
 
-- Main.SpunKy - 03 May 2004

Latest revision as of 09:21, 4 January 2009

$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.