add on_sound example

This commit is contained in:
tenplus1 2024-08-03 11:35:57 +01:00
parent b70e7d81b5
commit 9f272940f6

View File

@ -222,7 +222,15 @@ mobs:register_mob("mob_horse:horse", {
if self.saddle and self.owner == player_name then
mobs.attach(self, clicker)
end
end,
--[[
on_sound = function(self, def)
if def.loudness > 0.2 then -- if loud enough make horse jump with fright
self.object:set_velocity({x=0, y=5, z=0})
end
end
]]
})