Advertisement
TurretBot

shmup.lua

Dec 31st, 2015
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. --YELLOW SOUL BY TURRETBOT! EVEN THOUGH SOMEONE ELSE (ian) WILL DO IT BETTER PROBABLY
  2. Playerbullets = {}
  3. Fakesoul = CreateProjectile('yellowsoul', Player.x, Player.y)
  4.  
  5. function Update()
  6.     if Input.Confirm == 1 then
  7.         Playerbullets[#Playerbullets+1] = CreateProjectile('bulletanim1', Player.x, Player.y)
  8.         Audio.PlaySound('shoot')
  9.     end
  10.     for i = 1, #Playerbullets do
  11.         Playerbullets[i].Move(0, 4)
  12.         if Playerbullets[i].absy > 300 then
  13.             Playerbullets[i].Remove()
  14.         end
  15.     end
  16.     Fakesoul.MoveTo(Player.x, Player.y)
  17. end
  18.  
  19. function OnHit()
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement