Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Unexplainable prim behaviour

Ishtara Rothschild
Do not expose to sunlight
Join date: 21 Apr 2006
Posts: 569
06-29-2006 14:10
I wrote a script for a door, which basically works fine. The prim is resized and the position changed to slide it up and down on click.
Now, here's the weird part: the script works for approx. 20 clicks, then the doors stay in their current position. The script is still running; the integer values used to store door and material state still get their correct values, 0 or 1 (I tested that with llSay commands). The llSetPrimitiveParams command is still executed (at least I get a message when I replace it with a llSay command). Only the prims stop to resize and move.

I get no script errors. Resetting the script doesn't help. A copy of the same object also doesn't work. Only taking it up (into the inventory) and rezzing it again helps, and it works for another 20 or 25 clicks. Please, has anyone an explanation for this strange phenomenon? Many thanks in advance.

CODE
integer x=0;

default
{
touch_start(integer total_number)
{
if (x==1)
{
llSetPrimitiveParams([PRIM_SIZE, <0.482, 0.716, 0.01>, PRIM_POSITION, <0.3467, 0.0004, -0.4966>]);
x=0;
}
else
{
llSetPrimitiveParams([PRIM_SIZE, <0.482, 0.429196, 0.01>, PRIM_POSITION, <0.3467, 0.0004, -0.7985>]);
x=1;
}
}
}
Aodhan McDunnough
Gearhead
Join date: 29 Mar 2006
Posts: 1,518
06-29-2006 15:31
Nothing's wrong with the script. It worked fine for me. The object might have gotten corrupted. When that happens copy won't fix the problem.

Recreate the object. Click on new script then paste your code in from the old object.
Ishtara Rothschild
Do not expose to sunlight
Join date: 21 Apr 2006
Posts: 569
06-29-2006 15:49
Thanks alot :) that really helped. I didn't knew prims could get corrupted. Thanks for the quick answer.