From 12e6d718cbaa06ef16d7cd7b6824aaacbbea5684 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sun, 4 Aug 2024 08:27:28 +0100 Subject: [PATCH] edit on_sound example to use new loudness scale --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 51fae16..6f28389 100644 --- a/init.lua +++ b/init.lua @@ -225,8 +225,8 @@ mobs:register_mob("mob_horse:horse", { end, --[[ on_sound = function(self, def) - - if def.loudness > 0.2 then -- if loud enough make horse jump with fright + -- loudness ranges from (0.0 = cannot hear, to 1.0 = next to sound) + if def.loudness > 0.8 then -- if loud enough startle horse into jumping self.object:set_velocity({x=0, y=5, z=0}) end end