LogoPixi’VN

Sounds and music

The ink + Pixi’VN integration introduces a "# script" that allows you to use the sounds and music. To do this, you need to use the following syntax:

file_type_ink
ink
# {operation} {component type} {alias} {parameters}
  • #: is the hashtag symbol to identify a hashtag command.
  • operation: the operation to perform. Currently supported:
    • play: Play a sound. (Read more here)
    • pause: Pause a sound. (Read more here)
    • resume: Resume a sound. (Read more here)
    • stop: Stop a sound. (Read more here)
    • edit: Edit a sound. (Read more here)
  • alias: The alias to identify the sound. Use double quotes if the alias contains spaces.
  • parameters (Optional): a space-separated list of property/value pairs. If a value contains spaces, wrap it in double quotes. If a value is a object, pass valid JSON and escape the braces for ink (e.g. \{ "placeholder": "Enter your name", "maxLength": 20 \}).

Play

You can use the play to play a sound in ink. To do this, you need to use the following syntax:

file_type_ink
ink
# play sound {alias} {source} {parameters}
  • [parameters] (Optional): In the parameters you must include the properties of SoundPlayOptions that you want to set. The parameters must be set as follows: parameterName + SPACE + value. If the value is a string and includes spaces, you must use double quotes.
# play sound bird
Now the bird is singing.
# play sound bird volume 100
Now the bird is singing louder.

Pause and resume

To pause a sound in ink, you can use the pause operation. To do this, you need to use the following syntax:

file_type_ink
ink
# pause sound {alias}

To resume a sound in ink, you can use the resume operation. To do this, you need to use the following syntax:

file_type_ink
ink
# resume sound {alias}

Stop

To remove a sound in ink, you can use the stop operation. To do this, you need to use the following syntax:

file_type_ink
ink
# stop sound {alias}

Edit

To edit a sound in ink, you can use the edit operation. To do this, you need to use the following syntax:

file_type_ink
ink
# edit sound {alias} {parameters}
file_type_ink
ink
# edit sound bird volume 50
# edit sound bird loop true