New sound type for climbable nodes like ladders
Okay, here is a very simple suggestion:
I suggest to add a new sound type for nodes, and it shall be called “climb”.
This sound is played when a player climbs up or down (using space bar or shift, for example) a node which is marked as climbable=true. In other words, a ladder (for example).
For nodes which are not climbable, the assignment to the climb variable shall be simply ignored.
Currently there is no sound played at all when climbing a climbable node.
Example:
This node shall produce the sound “metal_ladder_climb.ogg” when climbed (upwards or downwards).
I suggest to add a new sound type for nodes, and it shall be called “climb”.
This sound is played when a player climbs up or down (using space bar or shift, for example) a node which is marked as climbable=true. In other words, a ladder (for example).
For nodes which are not climbable, the assignment to the climb variable shall be simply ignored.
Currently there is no sound played at all when climbing a climbable node.
Example:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
node_definition = {
description = "metal ladder",
climbable = true,
sounds = { climb = { name = "metal_ladder_climb", gain = 1 } },
--[[ pretend here are other parts of the node definition which are crucial for the node definition itself, but not important for this suggestion ]]
}
This node shall produce the sound “metal_ladder_climb.ogg” when climbed (upwards or downwards).