Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

holodeck texture changer.

Tabris Daxter
Snake oil Salesman
Join date: 22 Feb 2009
Posts: 61
11-26-2009 22:23
Hi all,
OK here are a few questions all related to the same build.

1. can a vector Variable contain anything? Eg. string, float, integer, other.

2. what is the easiest way to build a list of notecards in a prim?
(code please. i know it's on here but i just can't be bothered looking for it.)

3. can a Variable contain a Variable? Eg.
vector Var1;
vector Var2;
Var2 = Var1.x;

4. can scripts be turned on and off by name throughout a linkset via chat message?
_____________________
DANCE WITH KIRBY

(^'-')^ (^'-')> (>'-')> <;('-'^) ^('-'^) (^'-')^ (^'-')> (>'-')> <;('-'^) ^('-'^)
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
11-26-2009 23:50
From: Tabris Daxter
Hi all,
OK here are a few questions all related to the same build.

1. can a vector Variable contain anything? Eg. string, float, integer, other.

a vector is three floats... period.

From: someone
2. what is the easiest way to build a list of notecards in a prim?
(code please. i know it's on here but i just can't be bothered looking for it.)

then why should we be bothered to tell you?

From: someone
3. can a Variable contain a Variable? Eg.
vector Var1;
vector Var2;
Var2 = Var1.x;

not in the litteral sense, there are no pointers in LSL so what you are doing there is copying the contents of one into the other

From: someone
4. can scripts be turned on and off by name throughout a linkset via chat message?

sort of... a script can turn itself off regardless, but a script can only be turned on/off by another script if it's in the same prim.

CODE

list vLstNC;
integer vIntNCC = llGetInventoryNumber( INVENTORY_NOTECARD );
while (vIntNCC){
vLstNC += (list)llGetInventoryName( INVENTORY_NOTECARD, --vIntNCC );
}
_____________________
|
| . "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...
| -
Hooten Haller
Wonder and Joy
Join date: 5 Feb 2007
Posts: 45
11-27-2009 02:43
See the inventory section of an LSL wiki.
Tabris Daxter
Snake oil Salesman
Join date: 22 Feb 2009
Posts: 61
Lists
11-28-2009 17:14
this is related some what,
the following is a script to get the texture information for the prims in a linkset and following that is the results.

CODE

string gChan0;
string gChan1;
string gChan2;
string gChan3;
integer gChan4;
integer gChan5;

default
{
state_entry()
{
//this is used if parts ar too far apart.
gChan0 = llGetOwner();
gChan1 = llGetSubString(gChan0, -8,-1);
gChan2 = llKey2Name(llGetOwner());
gChan3 = llSHA1String (gChan1 + gChan2);
gChan4 = (integer) gChan3;
gChan5 = (gChan4 * gChan4) * gChan4;
llSay(0,(string)gChan5);
//llListen(gChan5,"","","");
}
//listen(integer Channel, string Name, key Id, string Message)

link_message(integer sender_num, integer num, string Message, key id)
{
if (Message == "get tex")
{
list tex_params = llGetPrimitiveParams([PRIM_TEXTURE,ALL_SIDES]);
llSay(0,(string)llGetLinkNumber() + "|" + llDumpList2String(tex_params,"|"));


}
}
}


//results

1|3a8df9d1-a8c8-3395-ca97-814a5f75d74d|<1.000000, 1.000000, 0.000000>|<0.000000, 0.000000, 0.000000>|0.000000|3a8df9d1-a8c8-3395-ca97-814a5f75d74d|<1.000000, 1.000000, 0.000000>|<0.000000, 0.000000, 0.000000>|0.000000|3a8df9d1-a8c8-3395-ca97-814a5f75d74d|<1.000000, 1.000000, 0.000000>|<0.000000, 0.000000, 0.000000>|0.000000|3a8df9d1-a8c8-3395-ca97-814a5f75d74d|<1.000000, 1.000000, 0.000000>|<0.000000, 0.000000, 0.000000>|0.000000|3a8df9d1-a8c8-3395-ca97-814a5f75d74d|<1.000000, 1.000000, 0.000000>|<0.000000, 0.000000, 0.000000>|0.000000|3a8df9d1-a8c8-3395-ca97-814a5f75d74d|<1.000000, 1.000000, 0.000000>|<0.000000, 0.000000, 0.000000>|0.000000

//end results

the output is in the form of: "link number | texture key | repeats | offset | rotation" (repeat for number of sides)

by looking at how it is outputted each param is a separate entry in the list.
how do i make it so each side is a single entry?
_____________________
DANCE WITH KIRBY

(^'-')^ (^'-')> (>'-')> <;('-'^) ^('-'^) (^'-')^ (^'-')> (>'-')> <;('-'^) ^('-'^)