Advertisement
Guest User

My erroring blue and orange bone wave

a guest
Apr 27th, 2020
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.40 KB | None | 0 0
  1.  -- A blue and orange bone wave. this is the fist time i actually my own made a unitale/cyf wave. you can use it without credit! just i'd rather like credit. does not matter. i could never have made this if UTPlays did not have a tutorial for it!
  2. spawntimer = 0
  3. bullets = {}
  4. sprite2 = "cyan2"
  5. sprite3 = "orange2"
  6. sprite4 = "orange3"
  7. sprite5 = "orange4"
  8. sprite6 = "orange5"
  9. sprite7 = "orange6"
  10.  
  11. function Update()
  12. -- this is how we make the wave work in action!
  13. spawntimer = spawntimer + 1
  14. if spawntimer%40 == 0 then
  15.    local number = math.random(1,2)
  16.    local posx = 80
  17.    local.posy = 0
  18.    if number == 1 then
  19.        local bullet = Createprojectile(sprite2, posx, posy)
  20.        bullet.SetVar('type', "cyan2")
  21.        bullet.SetVar('xspeed', 1.3)
  22.        bullet.SetVar('yspeed', 0)
  23.        table.insert(bullets, bullet)
  24.    elesif number == 2 then
  25.        local bullet = Createprojectile(sprite3, posx, posy)
  26.        bullet.SetVar('type', "orange2")
  27.        bullet.SetVar('xspeed', 1)
  28.        bullet.SetVar('yspeed', 0)
  29.        table.insert(bullets, bullet)
  30.     end
  31. end
  32.     for i=1 #bullets do
  33.     local bullet = bullets[1]
  34.         local xdifference = Player.x - bullet.x
  35.         local ydifference = Player.y - bullet.y
  36.         local xpos = bullet.GetVar('xpos')
  37.         local ypos = bullet.GetVar('ypos')
  38.         local xspeed = bullet.GetVar('xspeed')
  39.         local yspeed = bullet.GetVar('yspeed')
  40.     end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement