This is driving me batty. I'm not sure if i'm tired or just not seeing something horribly obvious, but here goes. This script's pupose is to get a list of an object's contents, then rez them, sequentially, one by one each time you click on it.
Anyways:
touch_start(integer f)
{
integer i;
integer len = llGetListLength(gInventoryList);
string whatobj = llList2String(gInventoryList,i);
llSay(0, whatobj);
llRezObject(whatobj, llGetPos() + <0, 0, 2>, ZERO_VECTOR, ZERO_ROTATION, 1);
llSay(0, (string)i);
i = i + 1;
}
Yeah, i know it's wrong right now. The result is that i get the same object and number and i is never touched. I think the reason for this is that i gets re-initialized every time that touch_start occurs (on the first line.) The thing i can't figure out is how to write this so that it works. I'm positive this is right under my nose... anyone care to clue me in?
**edit
Yup. Knew it was easy and that i'd figure it out after posting. Just needed to declare the variable globally instead of in the same codeblock. :/