mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add pickup sound
This commit is contained in:
parent
42ea88501d
commit
89afcd15db
3 changed files with 3 additions and 1 deletions
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"sounds": [
|
||||
"blocks/door_open",
|
||||
"blocks/door_close"
|
||||
"blocks/door_close",
|
||||
"events/pickup"
|
||||
],
|
||||
"models": [
|
||||
"cube",
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ function on_trigger_enter(index, oid)
|
|||
if ready and oid == 0 then
|
||||
entity:despawn()
|
||||
inventory.add(player.get_inventory(oid), item.index("base:stone.item"), 1)
|
||||
audio.play_sound_2d("events/pickup", 0.5, 0.8+math.random()*0.4, "regular")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
BIN
res/content/base/sounds/events/pickup.ogg
Normal file
BIN
res/content/base/sounds/events/pickup.ogg
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue