diff options
| author | Ribbon <ambiguousmachine@gmail.com> | 2022-02-10 23:45:45 -0800 |
|---|---|---|
| committer | Ribbon <ambiguousmachine@gmail.com> | 2022-02-10 23:45:45 -0800 |
| commit | 2debf09efb92513ef69bfdcf6120bf2d1a9725a7 (patch) | |
| tree | 512ae3a2b876d10eadd8b1f557443949609b9586 /players.lua | |
| parent | 7337bd189638c36f4c49f82c0833ef6afed998b5 (diff) | |
added laser kill sfx, arranged sfx into specific channels, and made the player kill sfx fire in co-op
now sounds shouldn't overlap, yay!
Diffstat (limited to 'players.lua')
| -rw-r--r-- | players.lua | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/players.lua b/players.lua index d395b83..cd56cb4 100644 --- a/players.lua +++ b/players.lua @@ -43,10 +43,10 @@ function addplayer(x, y, sprite, bulletsprite) player.shootspeed = 0.25 player.shoot3 = false shake = 9 - sfx(10) + sfx(10, 0) explosion(player.x, player.y) if isgameover() then --FUCK, GAME OVER YOU DIED! - sfx(11) + sfx(11, 0) gameover = true -- gameover set to true respawntimer = 5 --respawns all players in 5 seconds player.inv = 20 @@ -55,6 +55,8 @@ function addplayer(x, y, sprite, bulletsprite) end sfx(29, 1) elseif player.health <= 0 then + --kill sfx for co-op + sfx(11, 0) player.inv = 5 end end @@ -65,10 +67,11 @@ function addplayer(x, y, sprite, bulletsprite) for i = 1, 8, 1 do addcircle(player.x+4, player.y+4, sin(i/8), cos(i/8), 2, 0.6, 7, 0) end + --normal and light respawn sfx for co-op if playercount == 1 then - sfx(27) + sfx(27, 1) else - sfx(28) + sfx(28, 1) end end @@ -121,9 +124,9 @@ function addplayer(x, y, sprite, bulletsprite) if player.shoot3 then addbullet(player.x+3, player.y+3, 2, 0.25, false, player.bulletsprite) addbullet(player.x+3, player.y-3, 2, -0.25, false, player.bulletsprite) - sfx(12) + sfx(12, 2) else - sfx(9) + sfx(9, 2) end player.shootcooldown = player.shootspeed end |
