From 531734dc2de04741ce1c9c8442718614c47bffd4 Mon Sep 17 00:00:00 2001 From: Chris Bradley <1029chris@gmail.com> Date: Sun, 20 Feb 2022 20:32:04 -0800 Subject: I think I got some tokens here --- waves.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'waves.lua') diff --git a/waves.lua b/waves.lua index aff66e2..ad33f7c 100644 --- a/waves.lua +++ b/waves.lua @@ -308,11 +308,12 @@ function updatewaves() end end if wave[currentwave].conditions() then - if wave[currentwave+1].song and currentwave ~= 19 then --dont want the final wave to play the next song for dramatic effect - playsong(wave[currentwave+1].song) + local nextwave = wave[currentwave+1] + if nextwave.song and currentwave ~= 19 then --dont want the final wave to play the next song for dramatic effect + playsong(nextwave.song) end delaytimer += ft - if delaytimer > wave[currentwave+1].delay then + if delaytimer > nextwave.delay then setwave(currentwave+1) end end -- cgit