Cyde042 Posted March 1, 2013 Share Posted March 1, 2013 (edited) I'm trying to lower the number of hounds spawned per wave and it doesn't seem to work.From what I understood in the following lineself.houndstorelease = 6 + math.random(6)6 hounds are spawned with a random addition up to 6 hounds? Correct me if I'm wrong. Well, I tried putting 5 + math.random(2), and I was beyond day 100, and it still spawned more than 7 hounds, it spawned 12-11 usually. What did I do wrong? Or is the source in another place?The function where I edited it.function Hounded:PlanNextHoundAttack() local day = GetClock().numcycles local min_hound_day = 6 if day < min_hound_day then local min_time = (min_hound_day - day)*TUNING.TOTAL_DAY_TIME self.timetoattack = min_time + math.random() * TUNING.TOTAL_DAY_TIME * 4 self.houndstorelease = 2 self.warnduration = 2*60 elseif day < 50 then self.timetoattack = TUNING.TOTAL_DAY_TIME * 3 + math.random() * TUNING.TOTAL_DAY_TIME * 10 self.houndstorelease = 2 + math.random(2) self.warnduration = 60 elseif day < 100 then self.timetoattack = TUNING.TOTAL_DAY_TIME * 3 + math.random() * TUNING.TOTAL_DAY_TIME * 8 self.houndstorelease = 3 + math.random(3) self.warnduration = 30 else self.timetoattack = TUNING.TOTAL_DAY_TIME * 3 + math.random() * TUNING.TOTAL_DAY_TIME * 5 self.houndstorelease = 6 + math.random(6) self.warnduration = 30 end end Edited March 2, 2013 by Cyde042 Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now