self:is_looped
Client
Checks whether the audio-2d instance is set to loop playback
Syntax
local result = self:is_looped()Parameters
| No parameters are accepted by this function |
|---|
Returns
| Type | Name | Description |
|---|---|---|
bool | result | true if playback loops once it reaches the end, false otherwise |
Examples
local entity = core.audio_2d.create("sounds/ambient.ogg")
entity:set_looped(true)
if entity:is_looped() then
core.engine.print("info", "This sound will loop")
end