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;
}
}
}
that really helped. I didn't knew prims could get corrupted. Thanks for the quick answer.