This is a carryover from: Velocity is borked for models
Also this topic: https://readme.highfidelity.com/docs/scripts-digging-deeper
I am a tad confused about the run-time model for scripts, so let’s run through a few scenarios:
I could make a scripted entity creature that when an avatar sees it (not touching, just seeing), will cause the script to load and run in his client. Then the creature can respond even use the physics engine (bullet).
Q. Is the act of an avatar viewing a scripted entity enough to make the script in the entity load and run in the avatar’s client?
Q. Is the script loaded and run on all clients that have viewed the creature?
Q. Is the simulation owner the first avatar to have viewed the entity?
Q. Which events constitute switching simulation ownership?
Q. Does switching simulation owners do anything to the run state of the entity script in each client?
The avatar might sit on the creature (let’s not worry yet about that complicated process for now), and they fly together. The script runs in avatar’s client. Now the avatar logs out or crashes. I would have the script detect that event and make the creature fly to a roost spot or maybe fly to another avatar. But, what happens next and how can that be made to work seamlessly?
Q. If multiple avatars are in the scene observing another avatar flying around in an entity and that avatar logs off or crashes, are they running a copy of the creature’s script?
Q. If so, how can they know to take over creature behaviors?
Q. If not, then does this imply some funky arrangement where an AC script needs to monitor those kinds of events and somehow shove a script up the posterior of a nearby avatar’s client?