Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

need a little help for only owner can...

77 Allstar
Registered User
Join date: 18 Nov 2006
Posts: 24
02-05-2010 07:10
I am not much into Scripting, i have tryed a few things with this one, but i have no clue what i have to do that the textures only change when the owner of the object click it, and not enyone else. so far i always disable all the scripts so no one can click and change them.
could anyone help me pls?
greedings, 77

// Bromley College
// Linden Script Exhibition

// Code for Step 30 Poster

integer counter = 0;

default
{
state_entry()
{

llAllowInventoryDrop(FALSE);
//stop users from dropping their own textures onto the object
}

touch_start(integer total_number) //when user touches object
{
llSay ( 0, "Texture identifier is: " + (string)counter);
//Output the contents of the counter on ch0

string texture = llGetInventoryName(INVENTORY_TEXTURE, counter);
//Get name of indexed texture

llSay ( 0, "Texture name is: " + (string)texture);
//Output the name of the texture on ch0

llSetTexture(texture,3);
// Display the texture on the front (side 3) of the object

counter = counter + 1;
// Point to the next texture in the object's inventory

if (counter >= llGetInventoryNumber(INVENTORY_TEXTURE))
// If all textures have been displayed
{
counter = 0;
// reset counter index and restart loop
}
}
}

// End of code;
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
02-05-2010 07:25
CODE
touch_start(integer num_detected)
{
if ( llDetectedKey(0) == llGetOwner())
{
// all what you want done when the toucher is the owner goes here
}
}
_____________________
From Studio Dora