Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
SpawnExplosion. The parameters will be the particle amount, and the center position of the explosion.Method SpawnExplosion:Int(c:Int, xp:Float, yp:Float)
1 to the amount of particles.For Local i:Int = 1 To c
Local explo:ftObject = eng.CreateImage(atlas, 0,112,16,16, xp, yp)
explo.SetScale(Rnd(3,15)/10) explo.SetAngle(Rnd(0,359))
explo.SetSpin(Rnd(-4,4)) explo.SetSpeed(Rnd(1,2))
layerFX and create an object timer with the ID tmObjRemove to remove the particle after a random time between 100 to 2000 milliseconds.explo.SetLayer(layerFX) eng.CreateObjTimer(explo, tmObjRemove, Rnd(100,2000))