self:get_max_distance

Client

Retrieves the maximum distance at which the audio-3d instance can be heard


Syntax

local result = self:get_max_distance()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
floatresultCurrent maximum audible distance in meters

Examples

Get the max distance of an audio-3d instance
local entity = core.audio_3d.create("sounds/ambient.ogg")

core.engine.print("info", "Max distance:", entity:get_max_distance())

On this page