Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

List the contents of the prim

Thorne Kaiser
Nice Guy
Join date: 29 Nov 2005
Posts: 132
04-17-2006 13:44
How can I list the contents/objects in a prim and output them 1 per line?
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
04-17-2006 13:51
What you want to do is run a do...while loop using llGetInventoryName, starting from object 0 in the inventory and terminating when the name is an empty string.

e.g.
CODE

integer f = 0;
string name = "";
do {
name = llGetInventoryName(INVENTORY_ALL, f++);
if (name != "") llOwnerSay(name);
} while (name != "");


There are other ways to construct the loop I'm sure but the basic principle is the same.