self:stop

Client

Stops playback of the audio-2d instance


Syntax

local status = self:stop()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

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

entity:play()
entity:stop()

On this page