Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

[BUG-230934] Add event bit flag CHANGED_REGION_COMPLETE to "changed" script event #8497

Open
sl-service-account opened this issue Jul 6, 2021 · 1 comment

Comments

@sl-service-account
Copy link

How would you like the feature to work?

The proposal is to have a new CHANGED_REGION_COMPLETE bit sent to scripts via the "changed" event. Proposed behavior:

  • When an object changes regions, CHANGED_REGION is sent, as at present.

  • When an object with seated avatars (usually a vehicle) changes regions, its scripts receive CHANGED_REGION when the object crosses, and the new CHANGED_REGION_COMPLETE only when all seated avatars have arrived, are fully operational in the new sim, and are ready to accept animation, sound, and take controls requests.

  • CHANGED_REGION and CHANGED_REGION_COMPLETE bits can both be set in one event message. This is the normal case for ordinary object crossings not involving sitters.

  • Avatars sitting on vehicles should receive CHANGED_REGION when the avatar crosses, and CHANGED_REGION_COMPLETE when the vehicle and all avatars have completed the crossing. That's the same time the vehicle receives it.

  • If CHANGED_REGION_COMPLETE does not follow CHANGED_REGION within a few seconds, a region crossing problem has occurred.

Why is this feature important to you? How would it benefit the community?

Region crossings are not instantaneous. Vehicle scripts need to be aware of that to do a good job. Especially since cloud uplift to AWS, which sped up object crossings. Vehicles now usually arrive before avatar passengers. That change broke some vehicle scripts.

This has caused problems with scripts asking for animations (which produces an error popup) or falsely detecting that an avatar is missing (which causes the script to shut down the vehicle. There are workarounds, ways to detect that a region crossing is in progress, but they are complicated, involve fast timers, and are not widely used. This provides a simple way for scripts to cope with that delay.

Discussed at Server User Group on July 6, 2021.

Original Jira Fields
Field Value
Issue BUG-230934
Summary Add event bit flag CHANGED_REGION_COMPLETE to "changed" script event
Type New Feature Request
Priority Unset
Status Accepted
Resolution Accepted
Reporter animats (animats)
Created at 2021-07-06T19:57:16Z
Updated at 2021-07-07T17:49:42Z
{
  'Build Id': 'unset',
  'Business Unit': ['Platform'],
  'Date of First Response': '2021-07-06T21:01:07.461-0500',
  'How would you like the feature to work?': 'The proposal is to have a new CHANGED_REGION_COMPLETE bit sent to scripts via the "changed" event. Proposed behavior:\r\n\r\n- When an object changes regions, CHANGED_REGION is sent, as at present.\r\n\r\n- When an object with seated avatars (usually a vehicle) changes regions, its scripts receive CHANGED_REGION when the object crosses, and the new CHANGED_REGION_COMPLETE only when all seated avatars have arrived, are fully operational in the new sim, and are ready to accept animation, sound, and take controls requests.\r\n\r\n- CHANGED_REGION and CHANGED_REGION_COMPLETE bits can both be set in one event message. This is the normal case for ordinary object crossings not involving sitters.\r\n\r\n- Avatars sitting on vehicles should receive CHANGED_REGION when the avatar crosses, and CHANGED_REGION_COMPLETE when the vehicle and all avatars have completed the crossing. That\'s the same time the vehicle receives it.\r\n\r\n- If CHANGED_REGION_COMPLETE does not follow CHANGED_REGION within a few seconds, a region crossing problem has occurred.',
  'ReOpened Count': 0.0,
  'Severity': 'Unset',
  'Target Viewer Version': 'viewer-development',
  'Why is this feature important to you? How would it benefit the community?': 'Region crossings are not instantaneous. Vehicle scripts need to be aware of that to do a good job. Especially since cloud uplift to AWS, which sped up object crossings. Vehicles now usually arrive before avatar passengers. That change broke some vehicle scripts.\r\n\r\nThis has caused problems with scripts asking for animations (which produces an error popup) or falsely detecting that an avatar is missing (which causes the script to shut down the vehicle. There are workarounds, ways to detect that a region crossing is in progress, but they are complicated, involve fast timers,  and are not widely used. This provides a simple way for scripts to cope with that delay. \r\n\r\nDiscussed at Server User Group on July 6, 2021.',
}
@sl-service-account
Copy link
Author

ariesviper.barbecue commented at 2021-07-07T02:01:07Z

This is a much better option than my current workaround of adding in a short sleep, was having some issues with multi-crew vehicles, and peoples link numbers being jumbled, and CHANGED_REGION triggering too early, and mixing up who was what link number. As stated, currently i am using llSleep(0.5); as a work around, but that adds a delay in functionality that could be shorter, or may need to be longer depending on how quickly people go between regions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant