Zerveorus

HAPPY NEW YEAR

Feb 17th, 2017
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. local displayParticle = tfm.exec.displayParticle
  2. local random = math.random
  3. local ids = {0,1,2,9,11,13,21,22,23,24,29,32,33}
  4. local timeExplosion = 0
  5. local id = 0
  6. local x = 0
  7. local y = 0
  8.  
  9. function aleatorio(a)
  10. local d = a
  11. r = random(1,2)
  12.     if r == 1 then
  13.         d = -d
  14.     end
  15. return d
  16. end
  17.  
  18. function eventLoop(t,tr)
  19.  
  20. timeExplosion =timeExplosion +1
  21.  
  22. if timeExplosion == 2 then
  23.  
  24. id = ids[random(#ids)]
  25.  x= random(60,740)
  26.  y = random(100,340)
  27.     for i= 40,80 do
  28.             displayParticle(id,x,y+i,0,-1.5)
  29.     end
  30. end
  31. if timeExplosion == 4 then
  32. timeExplosion = 0
  33.  
  34.  
  35.     for i = -10,10 do
  36.         for o = 10,10 do
  37.             displayParticle(id,x,y,i,aleatorio(i),0,0,nil)
  38.             displayParticle(id,x,y,i,0,0,0,nil)
  39.             displayParticle(id,x,y,0,i,0,0,nil)
  40.         end
  41.     end
  42. end
  43.  
  44. end
Advertisement
Add Comment
Please, Sign In to add comment