To download this demo for your Linux/Mac installation, enter this on your command line:
DreamDownload byond://Spuzzum.GroupingSnippet##version=0 Emulator users, in the BYOND pager go to File | Open Location and enter this URL:byond://Spuzzum.GroupingSnippet##version=0 |
If you create objs of the type /obj/groupable, then you whenever you pick up those items, they will be grouped into groups of 'max_group' items.
If you don't specify a 'max_group' variable, then there will be an unlimited amount of items that can be grouped together. Note that when you want to delete a groupable item, subtract 1 from its 'num' var and then call PoolItems(). The format is described to you in the snippet. This snippet assumes you have a /obj/get() and a /obj/drop() verb, but it doesn't use them. If you don't have those verbs, just add "verb/" (without quotes) in front of each of the verbs inside the code. Remember, a snippet is focused more on giving a functional method of implementing something. If you don't understand how it works, then you shouldn't be using it yet. =) |
Please support BYOND through Membership or a donation!
|
There are no suggestions for related demos. |
|||||||||||||||
More Demos by Spuzzum
|
Copyright © 2024 BYOND Software.
All rights reserved.