I have created a marching line of invaders that move and animate left and right, dropping down a few rows each time they reach the opposite edge of the screen, It's working great!
So then I added a function that will fire a shot from one of the aliens but when I iterate through the table I always get the last one in the table for my x, y starting position of the invaders shot.
Is there a way to iterate through a table picking a random entry to generate some variables from? I have tried several things but can't seem to figure out how to do this as we only have: add, all, count, del, foreach and pairs.
Thanks,
Brian