Sigh. Stacking.

I can't believe I have to ask about this...but I want a single item in my game to stack but maybe the logic is escaping me.

I'm using the "Stackables Library" but I believe it's either broken, or I'm not understanding how it works/using it correctly.

I want items to stack. For instance, I have a "Green Hair Dye" item. I want that item, when it appears not to eat one in the player's inventory if the player happens to be carrying one of the same type/color, but to instead, move into the inventory and appear like this...

Green Hair Dye (2) or Green Hair Dye: 2

Or SOMETHING.

I know logically if I have a Green Hair Dye item, and the player finds another and takes it, Quest is just going to replace it with the same item. But how do I prevent it from doing that? How can I STACK items when they are collected cause this one aspect has been driving me crazy ever since I started programming with it.

Can anyone help?


Hi there, Im not sure on how to use the 'Stackable Library' but I have made my own stacking inventory here https://www.youtube.com/watch?v=HD1Gj88KeQE&index=3&list=PLVDq5KtDCqnZzUqLZ8v-3L7icnvyV6n_d
basically I add to the objects volume then you can add a 'lookat' script that prints an 'expression' of the objects volume representing the number of said objects you have. Pretty simple setup and works quite well.

Hope it helps
Mikes


Sora's Stackable Library is code-outdated, as Sora hasn't been seen since, sighs (he/she was a good programmer), and no one has yet updated his/her library to the new/current syntax (I said I would do it over summer... HK was/is lazy, as this and many other things didn't get done by HK over summer).

I may be able to understand it now... but just barely, as it's probably still a bit beyond my ability even now, despite having improved/learned more, since then.


so, it' not a problem with you, Anonynn, trying to correctly implement it to your game. It's code needs to be updated to the current syntax used. Mainly, it's just the List/Dictionary syntax that has been changed from v5.3 to v5.4+, and thus needs to be switched over to the new syntax, see here for the details:

http://docs.textadventures.co.uk/quest/upgrade_notes.html


hopefully, that's all that is needed to get Sora's Stackable Library's code working...


What is the problem with the library? I downloaded it and the demo, and the demo works fine on the most recent version.


really? hmm... I thought the its code still used the old syntax (for lists/dictionaries) and that's why a lot of people couldn't use it... maybe with the most recent version of quest, Alex slipped in it being able to recognize the old syntax, maybe ???

well, if that's the case, it's a matter of "just" getting it implemented correctly for Anonynn's game ... as implementing for specific game is usually not easy, at least for me anyways.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums