Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Rezzing Temp stuff via Touch Menu

Numitor Allen
Registered User
Join date: 20 May 2007
Posts: 6
11-27-2007 05:23
Hi everybody,
i am looking for a Script that rezzes temporary Prims via a Menu that should appear once i click on a storage Prim.
I've found a Menu Script in which i could change the Channel i was talking in but that wasnt helpful at all -.-
Could anyone of you here help me out please?

Thanks in Advance :)
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
11-27-2007 06:40
From: Numitor Allen
Hi everybody,
i am looking for a Script that rezzes temporary Prims via a Menu that should appear once i click on a storage Prim.
I've found a Menu Script in which i could change the Channel i was talking in but that wasnt helpful at all -.-
Could anyone of you here help me out please?

Thanks in Advance :)

what about it wasn't helpful, how are you needing it to work, whom should it work for, how long does the temp object need to be rezzed... and where in relation to the storage prim.... ?

offhand my suggestions are to look into
llGetInventory* functions to build your list for the menu,
llDie or temp_on_rez for your rezzed objects...
llDialog for the menu (obviously)
and/or Products Wanted forum if you aren't wanting to build it yourself
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Numitor Allen
Registered User
Join date: 20 May 2007
Posts: 6
11-27-2007 09:01
I've tried this script - that worked like a charm.

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(), ZERO_VECTOR, llGetRot(), 0);
}
}
}
}

Does Anyone know a script which shows coordinates? I'd like to rezz the stuff from the storage prim next to it.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
11-27-2007 22:23
From: Numitor Allen
I've tried this script - that worked like a charm.

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(), ZERO_VECTOR, llGetRot(), 0);
}
}
}
}

Does Anyone know a script which shows coordinates? I'd like to rezz the stuff from the storage prim next to it.


change
llRezAtRoot(message, llGetPos(), ZERO_VECTOR, llGetRot(), 0);
to
llRezAtRoot(message, llGetPos() + offset, ZERO_VECTOR, llGetRot(), 0);
or, even better...
llRezAtRoot(message, llGetPos() + offset * llGetRot(), ZERO_VECTOR, llGetRot(), 0);


offset will be a vector, describing a distance from the storage box...
eg.
vector offset = <1.0, .0, .0>; //-- 1m object right using last example, or 1m east using middle example
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Numitor Allen
Registered User
Join date: 20 May 2007
Posts: 6
11-28-2007 00:55
thanks!
it worked perfectly and now i can choose with the Axes from SL where everything is rezzing. :)