Page 1 of 1

Problem with door scripts

Posted: Sun Jul 26, 2020 5:43 pm
by Kenneth Tait
I have tried maybe half dozen door scripts. Ones which I have downloaded from online and a few that I have collected from Kitely. In all cases for most of the time the door will open and close just fine, but a fairly high percentage of the time the door prim will shift to another position. It will carry on working but again given enough opening and closing it will shift again, I really do not fancy spending my life repositioning the doors :)

So far I have been using a door and a prim hinge. I have not tried the one prim door scripts yet.

Re: Problem with door scripts

Posted: Mon Jul 27, 2020 11:28 am
by Kenneth Tait
I seem to have sorted the problem out. If I position the door and then reset the script before I start using it, all seems to be well. Maybe it has been bad practice of mine not to do this, but its not mattered in previous grids. All that matters is that the problem seems to be solved. As is my sanity! :D

Re: Problem with door scripts

Posted: Thu Oct 01, 2020 11:43 pm
by Krull Kitty
If the script is modable place the following code - " llResetScript(); " inside the "State_Entry()" block;

State Entry occurs when the script starts.

Code: Select all

state_entry()
{
 llResetScript();
}
Another option is to reset the script whenever a new iteration of the object is rezzed in world;

On-Rez occurs once the object with the script is rezzed from inventory.

Code: Select all

    on_rez(integer startParam)
    {
        llResetScript();
    }