Creating new drops
#2
I think the last "else" branch is wrong:
amount = math.random(0,2)
if (amount ~= 0) then
  Pickups:Add(cItem(E_ITEM_POTATO, math.random(0,2)))
This checks the amount, but then uses a new random number for the amount anyway; if that results in a zero, it might misbehave.
Reply
Thanks given by:


Messages In This Thread
Creating new drops - by SamJBarney - 07-02-2015, 05:27 AM
RE: Creating new drops - by xoft - 07-02-2015, 07:27 AM
RE: Creating new drops - by SamJBarney - 07-02-2015, 07:40 AM
RE: Creating new drops - by xoft - 07-02-2015, 04:45 PM
RE: Creating new drops - by Seadragon91 - 07-03-2015, 04:43 AM
RE: Creating new drops - by SamJBarney - 07-08-2015, 02:43 PM



Users browsing this thread: 3 Guest(s)