Sound

From Virtual Paradise Wiki
Jump to navigation Jump to search
Sound
Build required 1
Version required 0.3.54


The sound and noise commands play sounds. The sound command uses 3D positioning of the sound.

Usage

3D positioned sound:

   sound url [loop | noloop] [global] [radius=] [volume=] [leftspk=name] [rightspk=name]

2D sound:

   noise url [loop | noloop] [global] [volume=]

Arguments

url
The name of a sound in the /sounds folder on the world's object path, or a URL on a remote server. Supported formats are Opus, Ogg Vorbis, PCM WAV files (Mono, Stereo, 8 and 16-bit).
loop | noloop
Enables or disables looping of the sound. For sound looping is disabled by default, for noise looping is disabled by default.
global
This will cause the sound to be played for all users within view of the object, otherwise it will play only for the user who initiated the event. Global is per command, not per trigger.
radius
Changes the radius that the sound will play in, the default is 50 meters.
Prerequisites: version 0.3.60
Values: Decimal numbers greater than 0.0
Default: 50
volume
Changes the volume at which the sound will play.
Prerequisites: version 0.3.55
Values: Decimal numbers between 0.0 and 1.0
Default: 1.0
leftspk
positions the left channel of a stereo sound at a named object
Prerequisites: version 0.3.58
rightspk
positions the right channel of a stereo sound at a named object
Prerequisites: version 0.3.58

Examples

create sound sound.wav loop
The file sound.wav is retrieved from the object path sounds folder, and played over and over, though loop is superfluous
activate sound sound.wav global, sound music.wav
User who clicked hears music.wav, others hear sound.wav
create sound waterf1;
activate sound volume=0.1
A looped waterfall sound starts playing when object loads. When the object is clicked the volume of the playing sound is lowered to 10%.
activate noise deport1
When the object is clicked a teleport sound is played once, no 3D positioning will be used for this sound.
Object Scripting

Triggers:

ActivateAdoneBumpBumpendCreate

Commands:

AnimateAnimationAmbientCameraColorDiffuseFrameFramerateGroupLightMoveNameNoiseNormalmapOpacityPathPictureRotateSayShearScaleSignSolidSoundSpecularSpecularmapTeleportTeleportxTeleportxyzTextureUrlVisibleWeb