Guest User

cyf pls

a guest
Mar 26th, 2017
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.45 KB | None | 0 0
  1. Arena.Resize(200, 198)
  2. Encounter.SetVar("wavetimer", 8.5)
  3.  
  4. timer = 0
  5. tornado = false
  6. rains = {}
  7.  
  8. tornadospawn = math.random(0,1)
  9. tornadoactive = false
  10.  
  11. CreateProjectileLayer("black", relatedTag = "", before = false)
  12.  
  13. function Update()
  14.     timer = timer + 1
  15.    
  16.     if timer % 10 == 0 then
  17.         rain = CreateProjectile("rain", math.random(-(Arena.width/2)+7, (Arena.width/2)-7), Arena.height/2)
  18.         table.insert(rains, rain)
  19.     end
  20.    
  21.     for i=1,#rains do
  22.         rain = rains[i]
  23.         if rain.isactive == true then
  24.             rain.MoveTo(rain.x, rain.y-2)
  25.         end
  26.         if rain.y <= -Arena.height/2 then
  27.             rain.Remove()
  28.         end
  29.     end
  30.    
  31.     if timer % 150 == 0 then
  32.         if tornadospawn == 0 then --0 starts from left
  33.             tornadotop = CreateProjectile("tornadowidetop1", -(Arena.width/2)-40, (Arena.height/2)-33
  34.             tornadomid = CreateProjectile("tornadowidemid1", -(Arena.width/2)-40, (Arena.height/2)-99
  35.             tornadobottom = CreateProjectile("tornadowidebottom1", -(Arena.width/2)-40, -(Arena.height/2)+33
  36.             tornadoactive = true
  37.            
  38.             black = CreateProjectile("black", -(Arena.width/2)-40, 0, "black")
  39.         else
  40.             tornadotop = CreateProjectile("tornadowidetop1", (Arena.width/2)+40, (Arena.height/2)-33
  41.             tornadomid = CreateProjectile("tornadowidemid1", (Arena.width/2)+40, 0
  42.             tornadobottom = CreateProjectile("tornadowidebottom1", (Arena.width/2)+40, -(Arena.height/2)+33
  43.             tornadoactive = true
  44.            
  45.             black = CreateProjectile("black", (Arena.width/2)+40, 0, "black")
  46.         end
  47.     end
  48. end
Advertisement
Add Comment
Please, Sign In to add comment