self:set_max_volume
Client
Sets the maximum linear volume ceiling of the audio-3d instance
Syntax
local status = self:set_max_volume(
value
)Parameters
| Type | Name | Description |
|---|---|---|
float | value | Maximum linear volume ceiling to apply, where 1.0 is the source's natural full-volume levelClamps the volume so it never exceeds this level regardless of distance |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local entity = core.audio_3d.create("sounds/ambient.ogg")
entity:set_max_volume(1.5)