self:set_max_distance
Client
Sets the maximum distance at which the audio-3d instance can be heard
Syntax
local status = self:set_max_distance(
value
)Parameters
| Type | Name | Description |
|---|---|---|
float | value | Maximum audible distance in meters Beyond this distance, the audio becomes completely inaudible |
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_distance(50.0)