Skip to main content
Version: 2024.3

Ownership

Regarding ownership, there are 3 function nodes and 3 event nodes, which can be called in the node graph.

VisualScripting

The function nodes are as follows:

  • "If Owned Locally" - makes a check that the user who is requesting the change on the object, has ownership on it. If so, it executes the next instruction, otherwise it calls the "Try Get Ownership" function

    VisualScripting

  • "Try Get Ownership" - is used to to gain ownership (based on the parameter configured in the editor). It doesn’t need to have an output node

    VisualScripting

  • "Release Ownership" - is used to release ownership of the object (except if the user is already the owner of the object, in which case nothing will happen). It’s not usually used, because instead the ownership check is done and then the request is made if it’s not.

    VisualScripting

The event nodes are as follows:

  • "On Owner Changed" - is called when the user becomes the owner of the object. In the example below, the event is only called when the ownership request is successful, in which case it can execute the "Set Local Position" instruction on the object

    VisualScripting

  • "On Owner Request Failed" - is called when the ownership request fails, due to external problems, such as at the server or roles

    VisualScripting

  • "On Owner Lost", is called when the user loses ownership, because it has been assigned to another user.

    VisualScripting