Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Linking Scripts

Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
03-06-2007 17:45
Have a texture changing script- touch to change- want to change the textures accross a few prims at the same time, tried linking and placing the script in the prime(?) prim (yellow)... no good. Not sure how to post the script here...cut and paste?

integer choice ;

integer number;
default
{
state_entry()
{
llSetTimerEvent(30);
number = llGetInventoryNumber(INVENTORY_TEXTURE);
choice = 1;
}
on_rez(integer param)
{
llResetScript();
}
touch_start(integer numbert)
{
if (choice>=number)
{
choice =0;
}
string name = llGetInventoryName(INVENTORY_TEXTURE, choice);
if (name != "";)
{
llSetTexture(name, ALL_SIDES);
choice+=1;
}
}
}
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
03-06-2007 19:04
From: Dragger Lok
want to change the textures accross a few prims at the same time, tried linking and placing the script in the prime(?) prim (yellow)... no good.
With the current release, all you can do is have a script in the root (yellow) prim send link messages to scripts in the child prims when touched, with a command to change their textures. An upcoming release (as well as the current beta) will include the llSetLinkTexture function, which will allow setting textures of other prims directly, as we can already do with llSetLinkColor and llSetLinkAlpha (for, obviously, color and transparency, respectively).


From: someone
Not sure how to post the script here...cut and paste?
It's also best to put
CODE
 tags around it, makes it much easier to read.