Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Trouble with llSetTexture....

Nyles Nestler
Registered User
Join date: 5 Jan 2008
Posts: 72
02-01-2008 20:41
I successfully wrote a script that when placed inside an object, will change the object's texture when touched.

I tried modifying the script so that when touched, it would change the texture a few times. I figured I would put a delay in between each call, not really knowing how fast the script was capable of changing the textures.

The script is seemingly either loading in the first texture quickly and the timer is not working so I don't end up seeing it - only the final texture is rendered, or, it's not loading in the first one at all and skipping to the last one.

Here is the code:
CODE


default
{
touch_start(integer t)
{
llSetTexture("be_back2", ALL_SIDES);
llMinEventDelay(9.5);
llSetTexture("NO_SELLING", ALL_SIDES);

}
}
CODE


I'm new to LSL, not completely new to scripting in general. I've looked at several other scripts that use llSetTexture but I've not found anything applicable.

Hopefully someone can point out my error(s).

Thanks in advance
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
02-01-2008 21:02
llMinEventDelay acts as it's name suggests, it delays the action BETWEEN events. Since you are inside just a single event, it has no affect.

Try using llSleep instead as in:

CODE
default {
touch_start(integer t) {
llSetTexture("be_back2", ALL_SIDES);
llSleep(9.5);
llSetTexture("NO_SELLING", ALL_SIDES);

}
}
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Nyles Nestler
Registered User
Join date: 5 Jan 2008
Posts: 72
02-01-2008 21:25
Thanks Jesse, I really appreciate your help.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
02-01-2008 21:48
From: Nyles Nestler
Thanks Jesse, I really appreciate your help.

No problem, love to see new people expressing an interest in learning.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum