self:get_attenuation

Client

Retrieves the attenuation curve factor of the audio-2d instance


Syntax

local result = self:get_attenuation()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
floatresultCurrent attenuation curve factor

Examples

Get the attenuation of an audio-2d instance
local entity = core.audio_2d.create("sounds/ambient.ogg")

core.engine.print("info", "Attenuation:", entity:get_attenuation())

On this page