I am trying to fix the annoying, walking in water issue... (if sand is underwater, walking in water gives sand sounds, etc)
I read a little last night on abms but as I have stated in the past, unfortunately I have great difficulty retaining information I read... and then end up confusing myself from frustration...
So, while it would be ideal (in my mind) to have someone who is fluent with coding, to whip up some quick code to test this... I am trying to see if I can do it myself.
It is very embarrassing for me to have this learning curve : /
I know what I want to do..., which is to set nodes which are under a water node, to switch to using the default.node_sound_water_defaults
I think I have the first step ok? (probably not)
but I also know that I have to create a situation where the nodes below water are being checked?
I need help please..., I feel like a complete idiot if things get beyond copy & paste for the most part : /
It's frustrating personally, and it sucks
I am not even sure if abm can be used to substitute the audio of a node only?
Code: Select all
--
-- Convert default sounds for nodes under water
--
minetest.register_abm({
nodenames = {"default:water_source"},
neighbors = {
"group:grass",
"group:dry_grass",
"default:sand",
"default:dirt",
"group:stone",
},
interval = 1,
chance = 100,
catch_up = false,
action = function(sounds)
minetest.set_node(sounds, {name = "default:water_source"})
return
end,
})