audio.seek

seek(sound_name: string, seek: number, id: number) → {number}

get/set the position of playback for a sound.

// return the current position of the background music
let current_pos = me.audio.seek("dst-gameforest");
// set back the position of the background music to the beginning
me.audio.seek("dst-gameforest", 0);
Parameters:
Name Type Attributes Description
sound_name string

audio clip name - case sensitive

seek number

<optional>

the position to move current playback to (in seconds).

id number

<optional>

the sound instance ID. If none is passed, all sounds in group will changed.

Returns:
Type Description
number

return the current seek position (if no extra parameters were given)

Powered by webdoc!