Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Gaster Blasters :D
- speed = 1
- moveDirection = 1
- bullets = {}
- warningSymbols = {}
- fireRate = 60 -- Note: Be sure to set this to an even number
- bulletSpeed = 7
- spawntimer = 0
- blasterPattern = math.random(1, 2)
- require "Libraries/blaster"
- flipFlop = false
- if GetGlobal('blasterPattern') == 3 then
- blasterPattern = 3
- end
- function Update()
- spawntimer = spawntimer + 1
- if blasterPattern < 3 then
- if spawntimer >= fireRate and spawntimer < fireRate*2 then
- CreateBlasters(blasterPattern, "gasterBlaster")
- elseif spawntimer >= fireRate*2 then
- FireBlasters(blasterPattern, "blast", "blastY", {"gasterBlasterFire1", "gasterBlasterFire2", "gasterBlasterFire3"}, 0.1, {"blast1", "blast2", "blast3"}, 0.07, {"blastY1", "blastY2", "blastY3"}, 0.07)
- end
- else
- if (spawntimer % 30 == 0) then
- if flipFlop == false then
- flipFlop = true
- else
- flipFlop = false
- end
- end
- if spawntimer >= 30 and spawntimer < 60 then
- CreateBlasters(blasterPattern, "gasterBlaster")
- elseif spawntimer >= 60 and spawntimer < 75 then
- FireBlasters(blasterPattern, "blast", "blastY", {"gasterBlasterFire1", "gasterBlasterFire2", "gasterBlasterFire3"}, 0.1, {"blast2", "blast3"}, 0.05, {"blastY1", "blastY2", "blastY3"}, 0.07)
- elseif spawntimer >= 75 and spawntimer < 80 then
- ClearBlasters()
- CreateBlasters(blasterPattern, "gasterBlaster")
- elseif spawntimer >= 80 and spawntimer < 95 then
- FireBlasters(blasterPattern, "blast", "blastY", {"gasterBlasterFire1", "gasterBlasterFire2", "gasterBlasterFire3"}, 0.1, {"blast2", "blast3"}, 0.05, {"blast2", "blastY3"}, 0.04)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement