There are two types of ownership in VCI: ownership for entire VCI and ownership for individual SubItems. This page describes the following:
There are two types of ownership: ownership for entire VCI and ownership for individual SubItems in VCI.
The ownership used to judge the condition for event functions varies for each event function.
|Event||VCI ownership: Yes||VCI ownership: No|
The ownership of a SubItem will not affect the script,
however, you need to have the ownership of the SubItem you want to move the transform of, using update function.
(This is because the client with the ownership of the SubItem will overwrite the transform of the SubItem)
|Event||Ownership: Yes||Ownership: No|
|onGrab||Run when grabbed||After being grabbed, run when the grabber acquired the ownership (*1)|
|onUngrab||Run when ungrabbed||Run when lost the ownership (even when grabbed)|
|onUse||Run when the Use button is pressed||Won't run|
|onUnuse||Run when the Use button is released||Run when lost the ownership (* 2)|
|onTriggerEnter/Exit||Run||Won't run (*3)|
|onCollisionEnter/Exit||Run||Won't run (*3)|
There is network delay.
Sensitive control such as “grabbing for a split second” might not be registered.
onUnuse is triggered by loosing of the ownership. Which means onUnuse is run without the ownership.
Also, even if the Use button is pressed, onUnuse will be run if the user lost the ownership for the SubItem.
* A SubItem without the ownership will have its Kinematic=true.
As for “transform”, the result in the client with the ownership of the SubItem will be synchronized to other clients.
Therefore, even if you changed the transform using Lua script or collision,
the transform will be overwritten by the client with the ownership of the SubItem. As a result, the transform will not change.
For details, refer to About VCI items and SubItems.
The ownership will be transferred to the person who grabbed the SubItem “when they grabbed the SubItem”
Therefore,you could lose the ownership while you a grabbing the SubItem (by another person grabbing the same SubItem).
|When to receive the ownership||Who receives the ownership|
|User with the ownership leaves the studio||The person who entered the current studio the earliest|
|At the time of VCI spawn||The person who spawned the VCI (even before grabbing)|
|Entering an empty public studio||The person who entered the studio receives ownerships for abandoned SubItems|
|When to lose the ownership||Who loses the ownership|
|When leaving a studio (the same goes for public studios)||The person who left the studio|
|When a person without the ownership of a SubItem grabs the SubItem||The person who had the ownership of the SubItem being grabbed|
There should be no instance of SubItems that are not owned by anyone, in principle.
(except for empty public studio)
If there is a way to make a SubItem orphaned, that is a bug.
If you find such behavior, please report the situation and the steps to reproduce such state.
SubItems have what's called GroupIDs, which allows a user to acquire ownerships of all SubItems with the same GroupID as the one they grabbed.
However, if the SubItems have their GroupIDs set to 0 (default), they are recognized as separate GroupIDs.
This feature is implemented as some VCI requires multiple ownerships at once.
For detailed information, refer to About GroupID.
For functions with _ALL_, refer to vci.assets(ExportAssets)