Translations of this page:

Sidebar

en:vci:script:reference:eventfunction:tips1

Condition and timing of event function calls

Update

update()

  • The owner of VCI
  • Every frame

Remarks

  • The owner of VCI and the owner of SubItem are different
  • [Public studio only] The owner of the VCI is the first joiner to the room
  • [Public studio only] When the owner of the VCI leaves the room, the ownership will be transferred to another user (in order of room join)

updateAll()

  • All users
  • Frames

Trigger/Collision and Enter/Exit

onTriggerEnter(item, hit)

  • Owner of SubItem
  • When Trigger collides

Remarks

onTriggerExit(item, hit)

  • Owner of SubItem
  • When Trigger was disengaged

Remarks

onCollisionEnter(item, hit)

  • Owner of SubItem
  • When Collier collides

Remarks

onCollisionExit(item, hit)

  • Owner of SubItem
  • When collision was disengaged

Remarks

Grab and Use

  • In Virtual Cast, an action of grabbing is used as a trigger to transfer an ownership

This means the following states could occur:

  • Grabbing
  • Not having ownership (Other user grabbed the item you own. Requesting the ownership)
  • The grab event doesn't happen
  • Grabbing
  • Not having ownership (Ownership of the item you are grabbing has been transferred to another user who grabbed the item)
  • The ungrab event that is supposed to happen after this does not happen.

To counter this, Virtual Cast judges the conditions for Grab and Use events as shown below.

onGrab(target)

  • Owner of SubItem
  • Have ownership before grabbing
    • When grabbed
  • Received ownership after grabbing
    • When received ownership

Remarks

  • The event might fire a few moments later after being grabbed

onUngrab(target)

  • When ungrabbed
  • Or when lost ownership (Won't have ownership during the script run)

Remarks

  • The event might fire when you lost the ownership, even while you are holding the item

onUse(use)

  • Owner of SubItem
  • When you pressed the Use button

onUnuse(use)

  • When you released the Use button
  • Or when lost ownership (Won't have ownership during the script run)

Remarks

  • The event could fire when you lost the ownership even while you are holding the button
en/vci/script/reference/eventfunction/tips1.txt · Last modified: 2021/06/29 19:37 by t-daihisa

Page Tools