Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Script fails when linked?

Kornscope Komachi
Transitional human
Join date: 30 Aug 2006
Posts: 1,041
08-27-2007 19:55
I have made my own alpha change window script, among others and they seems to work fine in all other builds except this one and maybe derivitives of it. It's nothing fancy. A rez at height and a "open a hatch in floor" script are only other scripts and Ive taken them out.
I put the scripts in seven prims around a floor area as walls/windows. All is good. I link up the build and the four at one end will not set the first option chosen or display the second menu chosen. Broken. Copy prims in/out,add new ones. I had door problems too. This build is jinxed.

Unlink any of broken ones and they work, identical scripts and many versions including with and without LLlistenRemove, Owner, NULL, and the barest bones that would work.
Finally today I gave up and purchased NDE windows (I had the doors already). So only nde scripts are in it but that doesnt seem to matter. They break too. I get timeout messages in the dialogs.


I have not a clue whats causing this to happen and can't fix it.
Got any similar things happen. And how did you fix it?
I'll just rebuild it from new but It would be nice to know if it happens again.

Regards...Stumped.
_____________________
SCOPE Homes, Bangu
-----------------------------------------------------------------
Boss Spectre
Registered User
Join date: 5 Sep 2005
Posts: 229
08-27-2007 22:48
Hard to say without seeing the script or the object, I'd suggest checking if the script uses the narrower LINK_ALL_CHILDREN instead of the global LINK_SET? Link order can affect the operation of such a scheme.
Kornscope Komachi
Transitional human
Join date: 30 Aug 2006
Posts: 1,041
08-27-2007 23:31
Thanks to Boss Spectre inworld diagnosing that the root (floor) prim was too far from the wall prim. Over 20m. I did not know this and vow to never get caught again.
Thanks BS.
_____________________
SCOPE Homes, Bangu
-----------------------------------------------------------------
Boss Spectre
Registered User
Join date: 5 Sep 2005
Posts: 229
Solution
08-27-2007 23:36
Quite right, the problem was cured by re-linking the build to use a more centered root prim. There was nothing wrong with the script. Here's a more detailed explanation, as it may serve to help others who encounter a similar obstacle.

The problem was that the prims in question were not "hearing" their dialog responses. This was caused a disparity in the way dialog responses are implemented versus how listens are implemented. In dialogs, the selected button's text is "spoken" by the avatar on the dialog's channel, a la "/channel buttontext", and the coordinate origin of the chat is centered at the origin of the root prim of the object which sent the dialog, even if the dialog originated in a child prim task.

However the coordinates of the "listen" for the dialog is centered on the actual prim whose script sent the dialog.
The root prim in this case was more than 20m away from the dialog prim, and therefore the dialog task could not "hear" the response due to the chat range limitation of 20m.

Each prim worked fine while unlinked because in that case the dialog response was spoken at the center of the unlinked prim.