self:get_volume

Client

Retrieves the current linear volume of the audio-2d instance


Syntax

local result = self:get_volume()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
floatvolumeCurrent linear volume

Examples

Get the volume of an audio_2d instance
local entity = core.audio_2d.create("sounds/ambient.ogg")

core.engine.print("info", "Volume:", entity:get_volume())

On this page