Page 3 of 3

Re: Moving the enemies

Posted: Sun Nov 06, 2011 2:47 pm
by cvirus
Thank you, this is working great.

Just to clear out things, this could be done also in the end of each level, like clear all table when it reaches the end right?

Code: Select all

if level end then
         table.remove(shot)
end

Re: Moving the enemies

Posted: Sun Nov 06, 2011 6:47 pm
by Robin
cvirus wrote:Just to clear out things, this could be done also in the end of each level, like clear all table when it reaches the end right?

Code: Select all

if level end then
         table.remove(shot)
end
No, that would only remove the last value. Now, what you want is this:
if level_end then
shot = {}
end
Lua takes care of the rest.

Re: Moving the enemies

Posted: Sun Nov 06, 2011 8:13 pm
by cvirus
Ok i see, thanks.