Player produce sound
Posted: Sun Mar 22, 2015 6:44 am
I have some idea, can u tell me is that possible: can we produce sound in game when certain event occured? For example:
Code: Select all
game.onevent(defines.events.ontick, function()
local pos = game.player.position
local ent = game.findentities{{pos.x-2, pos.y-2}, {pos.x+2, pos.y+2}}
for i, e in ipairs(ent) do
if e.name == "iron-ore" then
--need produce sound here
....