function init()
firesound = LoadLoop("MOD/snd/map/fireloop.ogg")
trash = FindBody("fire")
end
function rnd(mi, ma)
	return math.random()*(ma-mi)+mi
end
function update(dt)
trash_trans = GetBodyTransform(trash)
			
					for i=1, 2 do
						ParticleReset()
						ParticleType("smoke")
						ParticleCollide(0)
						ParticleRadius(0.3)
						ParticleDrag(0.5)
						ParticleEmissive(0, 0)
						ParticleColor(.2,.2,.2)
						ParticleGravity(rnd(2,6))
						ParticleAlpha(0.6, 0.9)
						SpawnParticle(VecAdd(trash_trans.pos, Vec(rnd(-0.3,0.3),rnd(-0.3,0.2),rnd(-0.3,0.3))), Vec(rnd(-2,2),rnd(0,1),rnd(-2,2)), 4)

						ParticleReset()
						ParticleTile(5)
						ParticleType("smoke")
						ParticleCollide(0)
						ParticleRadius(0.15, 0.3)
						ParticleDrag(0.5)
						ParticleEmissive(2, 0)
						ParticleColor(.9,.3,.15)
						ParticleGravity(rnd(4,9))
						ParticleAlpha(1, 0.5)
						SpawnParticle(VecAdd(trash_trans.pos, Vec(rnd(-0.3,0.3),rnd(-0.3,0.2),rnd(-0.3,0.3))), Vec(rnd(-2,2),rnd(0,1),rnd(-2,2)), 1)

						ParticleReset()
						ParticleTile(8)
						ParticleType("smoke")
						ParticleCollide(0)
						ParticleRadius(0.15, 0.4)
						ParticleDrag(1)
						ParticleEmissive(2, 0)
						ParticleColor(0.9,.6,.3)
						ParticleGravity(rnd(3,6))
						ParticleAlpha(1, 0.5)
						SpawnParticle(VecAdd(trash_trans.pos, Vec(rnd(-0.3,0.3),rnd(-0.3,0.2),rnd(-0.3,0.3))), Vec(rnd(-1,1),rnd(0,0.5),rnd(-1,1)), 2)

						ParticleReset()
						ParticleType("smoke")
						ParticleCollide(0)
						ParticleTile(5)
						ParticleRadius(0.15, 0.3)
						ParticleDrag(0.5)
						ParticleEmissive(2, 0)
						ParticleColor(1,.5,.3)
						ParticleGravity(rnd(4,9))
						ParticleAlpha(1, 0.5)
						SpawnParticle(VecAdd(trash_trans.pos, Vec(rnd(-0.3,0.3),rnd(-0.3,0.2),rnd(-0.3,0.3))), Vec(rnd(-2,2),rnd(0,1),rnd(-2,2)), 0.8)
					end
					PointLight(trash_trans.pos, 255, .20, .0130, 5)
					PlayLoop(firesound, trash_trans.pos, 5)
end			