Skip to content

AudioVolumeInfo

Celestial Body Schema / Definitions / AudioVolumeInfo
Schema Type: JSON Type: object

No Description Found

layer

Type: integer Default: 0

The layer of this volume.

Layers separate the priority system. The priority of volumes in one layer will not affect or override volumes in another. The highest priority volume in each layer will stack like normal.
The exception is layer 0. A higher-priority volume in layer 0 will override lower-priority volumes in ALL other layers. A lower-priority volume in layer 0 will stack with other layers like normal.

Ex: A player could be affected by the sun on layer 9 priority 0 and planet gravity on layer 3 priority 2. They would experience the gravity of both volumes since they are on different layers.
If there was a zero-g volume on layer 0 priority 1, since it is on layer 0 it will override the gravity from the sun (priority 0 which is less than 1) but they will still feel the
gravity of the planet (priority 2 is greater than 1). The zero-g volume will also still be applied because it is on a different layer.

Default value here is 0 which means this volume's priority will be evaluated against all other priority volumes regardless of their layer.


priority

Type: integer Default: 1

The priority of this volume.

Volumes of higher priority will override volumes of lower priority. Volumes of the same priority will stack like normal.
Ex: A player in a gravity volume with priority 0, and zero-gravity volume with priority 1, will feel zero gravity.

Default value here is 1 instead of 0 so it automatically overrides planet gravity, which is 0 by default.


radius

Type: number Default: 1

The radius of this volume.


position

Type: MVector3

Position of the object

See Definitions/MVector3

isRelativeToParent

Type: boolean

Whether the positional and rotational coordinates are relative to parent instead of the root planet object.


parentPath

Type: string

The relative path from the planet to the parent of this object. Optional (will default to the root sector).


rename

Type: string

An optional rename of this object


audio

Type: string

The audio to use. Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list.


clipSelection

Type: NHClipSelectionType Default: random

No Description Found

See Definitions/NHClipSelectionType

track

Type: NHAudioMixerTrackName Default: environment

The audio track of this audio volume.
Most of the time you'll use environment (the default) for sound effects and music for music.

See Definitions/NHAudioMixerTrackName

loop

Type: boolean Default: true

Whether to loop this audio while in this audio volume or just play it once


volume

Type: number Minimum: 0Maximum: 1Default: 1

The loudness of the audio


fadeSeconds

Type: number Default: 2

How long it will take to fade this sound in and out when entering/exiting this volume.


noFadeFromBeginning

Type: boolean

Play the sound instantly without any fading.


randomizePlayhead

Type: boolean

Randomize what time the audio starts at.


pauseOnFadeOut

Type: boolean

Pause the music when exiting the volume.