Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default link numbers causing inter-link comms failure on script reset #230

Closed
Medea-Destiny opened this issue Jul 22, 2019 · 1 comment

Comments

@Medea-Destiny
Copy link
Collaborator

@Medea-Destiny Medea-Destiny commented Jul 22, 2019

I believe I have found the cause of an problem with scripts occasionally failing to respond to menus on script reset / update.

To reproduce: edit a 7.2 collar, go to the animator prim, edit the oc_anim script by adding a comment line ( //blah ) and save. Click the collar , select animations menu, and see if anything happens. If it does not, do a menu fix or rewear the collar and see it working.

Explanation:
The link numbers for animator, settings, dialog, RLVsys etc are hard coded, and then updated on a LINK_UPDATE message, sent by OC_SYS. If a script is reset, or starts running after the LINK_UPDATE response, it will fall back to these hard coded settings. For a collar with a different arrangement of prims, this will fail. Thus for example in oc_anim we have:

integer LINK_DIALOG = 3;
integer LINK_RLV = 4;
integer LINK_SAVE = 5;

If the dialog link is not link number three, the menu will not open.

SOLUTION:

Set these values to -3 (LINK_ALL_CHILDREN) for every script. This will work but be marginally less efficient until the next time the collar is attached, when the correct values will be set.

zontreck (Aria) is doing a bulk change for us already 'cos she's a wiz with that kind of stuff and generally awesome, but I'm opening this as an issue to explain the change, and in case someone has a better idea or spots a problem with this.

Oh, and also to comment on if this hasn't fixed every instance of the problem, but be prepared to have my shake my fist at you. ;)

Long term note: this entire multi-prim set up is an incoherent mess and needs rethinking. FACT. :P

@zontreck

This comment has been minimized.

Copy link
Collaborator

@zontreck zontreck commented Jul 22, 2019

Fixed in #231

@zontreck zontreck closed this Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.