Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local displayParticle = tfm.exec.displayParticle
- local random = math.random
- local ids = {0,1,2,9,11,13,21,22,23,24,29,32,33}
- local timeExplosion = 0
- local id = 0
- local x = 0
- local y = 0
- function aleatorio(a)
- local d = a
- r = random(1,2)
- if r == 1 then
- d = -d
- end
- return d
- end
- function eventLoop(t,tr)
- timeExplosion =timeExplosion +1
- if timeExplosion == 2 then
- id = ids[random(#ids)]
- x= random(60,740)
- y = random(100,340)
- for i= 40,80 do
- displayParticle(id,x,y+i,0,-1.5)
- end
- end
- if timeExplosion == 4 then
- timeExplosion = 0
- for i = -10,10 do
- for o = 10,10 do
- displayParticle(id,x,y,i,aleatorio(i),0,0,nil)
- displayParticle(id,x,y,i,0,0,0,nil)
- displayParticle(id,x,y,0,i,0,0,nil)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment