minetest.sound_stop

From Minetest Developer Wiki
Jump to: navigation, search

Syntax

Description

Stops a sound that is started with minetest.sound_play(). handle is returned by minetest.sound_play()

Example

local handle = minetest.sound_play("testmod_song", {
	object = minetest.get_player_by_name("singleplayer"),
	loop = true,
})
 
minetest.after(60, function(handle)
	minetest.sound_stop(handle)
end, handle)
Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox