Help with Spawning multiple objects and handling them individually with single event listener.

I am dabbling with a zombie game, I have a hero on the left side of the screen. On the right side I have a single zombie that spawns and changes its x position from right to left so it looks like its walking over to the hero. Users can touch the zombie and the hero goes through a shoot animation and the zombie dies.

How would I handle multiple zombies spawning randomly and then having them transition to the hero.

Is there a way I can use a single event listener to handle all zombies individually?

Does lua have a special word like other languages that use the word “this” or “self” to refer to the object that was interacted with?

Here is a little guide I wrote several years ago that can help you get started: https://coronalabs.com/blog/2011/09/14/how-to-spawn-objects-the-right-way/

Here is a little guide I wrote several years ago that can help you get started: https://coronalabs.com/blog/2011/09/14/how-to-spawn-objects-the-right-way/