ID:165153
Feb 16 2007, 12:22 am
|
|
okay, so i've finally figured out how to make my inventory and i can put things in it, but how could i "stack" the objects, so if there's more than one of the same thing, they collect in one pile in the inventory?
|
In response to Elation
|
|
obj i gave gold coins a count=1 but they didn't stack. that doesn't work. i'll try the other two. Ah! that third one seems to work, thanks, i'll just play around with that and see what happens. :) |
In response to Adam753
|
|
obj/var I find this way to be far less complicated :| ------------EDIT------------ I forgot to include the CheckAmount proc.. but I've been told im typecasting wrong. I dont know what that means o_O So yeah... @_@ |
In response to CuriousNeptune
|
|
Young Padawan, comes a time in your life where you must decide between what is easy and what is right!
|
In response to CuriousNeptune
|
|
Problem is I wouldn't recommend someone to use that code snippet until you sort out stuff like this:
var/O = new /obj/feather(usr.loc) If <code>O</code> is obviously going to be of type <codee>obj/feather</code> then it should be typecasted as such. Not only were you using : when you shouldn't but the solution was staring you straight in the face (as you've typecasted correctly elsewhere!). |
In response to Adam753
|
|
Lummox' code works just fine; As the article mentions, you need to make sure to call the procs in the right places.
|
http://www.byondscape.com/ascape.dmb/LummoxJR.2005-0506/
(near the end of the article Lummox gives an example of item stacking)
http://developer.byond.com/hub/YMIHere/ItemStacking
http://developer.byond.com/hub/Buzzyboy/ItemStacking