add sound when rolling
This commit is contained in:
parent
be04e2c95c
commit
468154acb1
8
init.lua
8
init.lua
@ -68,6 +68,14 @@ local function roll_dice(pos, node)
|
||||
size = 4,
|
||||
}
|
||||
minetest.add_particle(particle_def)
|
||||
|
||||
local spec = "default_dig_cracky" --"yl_dice_roll"
|
||||
local parameters = {
|
||||
pos = pos,
|
||||
max_hear_distance = 32, -- default
|
||||
pitch = 1.0 + 0.1*math.random(),
|
||||
}
|
||||
minetest.sound_play(spec, parameters, true)
|
||||
end
|
||||
|
||||
minetest.register_node("yl_dice:dice", {
|
||||
|
Loading…
Reference in New Issue
Block a user