Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Sort Inventory By Date

Douglas Callahan
Fresh Prince Of SL
Join date: 2 Jul 2004
Posts: 349
04-19-2005 16:07
Hello :)
Is there a way to sort inventory by date, and not by name so that in a script you can give the first object in an inventory by its date, like a new notecard, rather than what it is called.

ex:

llGiveInventory(person, OBJECT_NOTECARD)

But I would want it to be the most recent notecard put in, not the one that starts with A.
_____________________
Other than that, Mrs. Lincoln, how was the play?
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
04-19-2005 16:32
Hmm... well, you could keep a list of inventory via the CHANGED_INVENTORY constant in the changed event.
_____________________
---
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
04-20-2005 01:09
There's an ugly way - you write a list of the inventory objects, and every time you trigger CHANGED_INVENTORY you compare all the inventory names to the list and add the new ones to the list. You also need to do it in reverse, so if you take an item out you remove that from the list.