Moving the enemies

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
cvirus
Prole
Posts: 24
Joined: Mon Sep 26, 2011 1:48 pm

Re: Moving the enemies

Post 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
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Moving the enemies

Post 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.
Help us help you: attach a .love.
cvirus
Prole
Posts: 24
Joined: Mon Sep 26, 2011 1:48 pm

Re: Moving the enemies

Post by cvirus »

Ok i see, thanks.
Post Reply

Who is online

Users browsing this forum: Amazon [Bot], Google [Bot] and 8 guests