Heather Moonwing
-
Posts
3 -
Joined
-
Last visited
Content Type
Forums
Blogs
Knowledge Base
Posts posted by Heather Moonwing
-
-
Thank you very much. However, I'm a bit confused on how to add this into my script, so that I can have it do what it does now, which is look at the items in the inventory, generate a list, and then when I click on the button, it rezzes the object .5 meters above the container. I keep getting syntax errors, or in one case, the script compilied, but then wouldn't run at all. I'm VERY new to scripting, so a lot of what you said went over my head, to be honest. I'll keep plugging away at it, but if you could perhaps "dumb it down" a bit for me? I'm still learning.
If not, I still greatly appriecate the time you did take. Numbered buttons won't work for what I'm doing, but I did bookmark that link for further reading.
-
Hey, been working on a frankenscript to generate a menu, read the objects, and then rez the selected object right above. Problem I'm running into is I have some items that arent mod, so I can't reduce their names to less than 24 characters. I would be greatly appreciative if someone could help me with the llgetsubstring, or how to truncate the names so I can use this script.
list MENU1 = [];
list MENU2 = [];
integer listener;
integer MENU_CHANNEL = 1000;
Dialog(key id, list menu)
{
llListenRemove(listener);
listener = llListen(MENU_CHANNEL, "", NULL_KEY, "");
llDialog(id, "Select one object below: ", menu, MENU_CHANNEL);
}
default
{
on_rez(integer num)
{
llResetScript();
}
touch_start(integer total_number)
{
integer i = 0;
MENU1 = [];
MENU2 = [];
integer c = llGetInventoryNumber(INVENTORY_OBJECT);
if (c <= 12)
{
for (; i < c; ++i)
MENU1 += llGetInventoryName(INVENTORY_OBJECT, i);
}
else
{
for (; i < 11; ++i)
MENU1 += llGetInventoryName(INVENTORY_OBJECT, i);
if(c > 22)
c = 22;
for (; i < c; ++i)
MENU2 += llGetInventoryName(INVENTORY_OBJECT, i);
MENU1 += ">>";
MENU2 += "<<";
}
Dialog(llDetectedKey(0), MENU1);
}
listen(integer channel, string name, key id, string message)
{
if (channel == MENU_CHANNEL)
{
llListenRemove(listener);
if (message == ">>")
{
Dialog(id, MENU2);
}
else if (message == "<<")
{
Dialog(id, MENU1);
}
else
{
// todo add offsets so box sites perfect on rezzer
llRezAtRoot(message, llGetPos() + <0.0, 0.0, 0.5> , ZERO_VECTOR, llGetRot(), 0);
}
}
}
}The script itself works fine now, but anytime I try to add something so I can truncate the buttons, I get all flustered trying to figure this out. If you can help, Id be appreciative.
LLDialog error. Buttons cannot be more than 24 characters long.
in LSL Scripting
Posted
Ok, thank you very much for your help. Getting a syntax error at the
if (~idx) part, but I think I'm beginning to understand. Thank you so much for your help.