forked from mtcontrib/mob_horse
		
	add on_sound example
This commit is contained in:
		
							
								
								
									
										8
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								init.lua
									
									
									
									
									
								
							| @@ -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 | ||||
| ]] | ||||
| }) | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user