Skip to content

Play/Stop Item

PlayStopItem_1

Overview

PlayItem will play audio, particle, or an object's animation.

The designated object needs to have either of the following components:

*For playing avatar animation, see the Motion page.

If a VKC Item Object component is designated, its Index will be also available for designation. The Index will be referred to play the Object's motion.

If the designated Item also has a BeginActions, this will also be played.

Reference for object animations

For further explanation about object animations, see the World Making Guide / How to Animate Objects page.

About StopItem

StopItem will stop the playing audio and particle. If a BeginActions is running, this will be stopped as well.

While StopItem seems to stop a playing object animation at first look, this is used to stop BeginActions, which playing object animations are not considered as BeginActions.
StopItem can used for stopping particle and audio.

Therefore, to stop object animations, the animation's Loop must be turned off to end animation, or the following instructions can be used to create/play a Motion for stopping animation using PlayItem.

Creating a Motion for stopping animations

  1. Following the instructions of How to add animation to VKC Item Object on "World Making Guide / How to Animate Objects", create a default pose-animation for VKC Item Object and export as hem file. As an example, this animation is named as Idle.

    PlayStopItem_2

  2. Place the Idle animation in VKC Item Object as 1st Motion, and the animation to be played as 2nd and later Motions. The 1st Motion will be the default Motion on world entry, which will be later used to stop playing animations. PlayStopItem_3

  3. As an example for stopping animation, the VKC Item AreaCollider component will be used.
    When the player enters the area collider's range, the PlayItem action will call the Cube's 2nd Motion (Index 1), and 1st Motion (Index 0) on leaving the area.

    PlayStopItem_4

  4. Entering the world, the animations will act as below:

    PlayStopItem_Result