OwnerIDSelfDidChange
Does realtimeView Have this event as well or only RealtimeTransform?
5 Replies
Hi @cryptomax. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Yes, the 
RealtimeView class does have the ownerIDSelfDidChange event. This event is dispatched when the ownerIDSelf value changes. 
Here is the relevant extract from the documentation:
You can find more details in the RealtimeView documentation (https://normcore.io/documentation/reference/classes/Normal.Realtime.RealtimeView).
Please note that the RealtimeComponent<TModel> and RealtimeModel classes also have the ownerIDSelfDidChange event.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@401986039964631060> kapa.ai is still learning and improving, please let us know how it did by reacting below
@Normcore Assistant does the player who requests ownership of the view still receive the ownerIDchange event?
Let me check the knowledge base for you. One moment! :books:
----------------------
Yes, the player who requests ownership of the view will still receive the 
ownerIDSelfDidChange event. This event is dispatched whenever the ownerIDSelf value changes, regardless of who initiated the change. 
When a player requests ownership using RequestOwnership(), and the request is successful, the ownerIDSelf value will change to the client ID of the requesting player. This change will trigger the ownerIDSelfDidChange event.
Here is a code example of requesting ownership:
And here is how you might listen for the ownerIDSelfDidChange event:
Remember that the RequestOwnership() and ClearOwnership() methods take effect immediately, but if the server blocks the request—say, because preventOwnershipTakeover is true or because the view's parent is owned by another client—then ownership and all changes that required ownership will be rolled back. 
You can find more details in the RealtimeView documentation (https://normcore.io/documentation/reference/classes/Normal.Realtime.RealtimeView).
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@401986039964631060> kapa.ai is still learning and improving, please let us know how it did by reacting below