LogoPixi’VN

Sounds and music

The ink + Pixi’VN integration introduces a "# script" that allows you to use the sounds and music. Per fare ciò, è necessario utilizzare la seguente sintassi:

file_type_ink
ink
# {operation} {component type} {alias} {parameters}
  • #: è il simbolo hashtag per identificare uno comando hashtag.
  • operation: l'operazione da eseguire. Attualmente supportati:
    • 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. (Per saperne di più qui)
  • component type: il tipo di componente. Tipi disponibili:
    • sound: to play, pause, resume, stop or edit a sound.
    • channel: to run an operation on a channel.
  • alias: The alias to identify the sound. Utilizza le doppie virgolette se l'alias contiene spazi.
  • parameters (Opzionale): un elenco di coppie proprietà/valore separate da spazi. Se un valore contiene spazi, racchiuderlo tra virgolette doppie. Se un valore è un oggetto, passa un JSON valido ed esegui l'escape delle parentesi graffe per ink (ad esempio \{ "placeholder": "Enter your name", "maxLength": 20 \}).
# play sound sfx_whoosh delay 0.1
# play sound bgm_cheerful loop true channel bgm
Hello, I'm a cheerful background music that will loop forever until you stop me.
# pause sound bgm_cheerful
I'm paused, but I can be resumed.
# resume sound bgm_cheerful
I'm back!

Play

You can use the play to play a sound in ink. Per fare ciò, è necessario utilizzare la seguente sintassi:

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 sfx_whoosh
Now the sfx_whoosh is singing.
# play sound sfx_whoosh volume 100
Now the sfx_whoosh is singing louder.

Pause and resume

To pause a sound or a channel in ink, you can use the pause operation. Per fare ciò, è necessario utilizzare la seguente sintassi:

file_type_ink
ink
# pause {component type} {alias}

To resume a sound or a channel in ink, you can use the resume operation. Per fare ciò, è necessario utilizzare la seguente sintassi:

file_type_ink
ink
# resume {component type} {alias}

To pause or resume all sounds, you can use the following syntax:

file_type_ink
ink
# pause all sounds
# resume all sounds

Modifica

To edit a sound in ink, you can use the edit operation. Per fare ciò, è necessario utilizzare la seguente sintassi:

file_type_ink
ink
# edit sound {alias} {parameters}
file_type_ink
ink
# edit sound bgm_cheerful volume 50
# edit sound bgm_cheerful loop false

Stop

To stop a sound in ink, you can use the stop operation. Per fare ciò, è necessario utilizzare la seguente sintassi:

file_type_ink
ink
# stop sound {alias}
file_type_ink
ink
# stop sound bgm_cheerful

To stop all sounds, you can use the following syntax:

file_type_ink
ink
# stop all sounds

On this page