addEventListner question

I have a function that shoots bullets

--shoot bullets  
local shootBullets = function(event)  
  
 local bullet = display.newImage("bullet.png")  
 bullet.x = 0  
 bullet.y = display.contentCenterY  
 physics.addBody( bullet, { density=3.0, friction=0.5, bounce=0.05 } )  
 bullet.isBullet = true  
 bullet.rotation = false  
  
 bullet:setLinearVelocity( event.x, event.y-180 )  
 print(event.y)  
  
end  

When you click on the sky background

sky:addEventListener( "touch", shootBullets )

This would be cool if I needed repetitive shooting like a galaga game. However, I just want to shoot one bullet on press and as soon as it shots it. You have to let go and touch again to shoot it. Any help on this logic is appreciated.

Lua noob. :slight_smile: [import]uid: 6500 topic_id: 9823 reply_id: 309823[/import]

ignore this post. I didn’t know there was a tap event.

I changed “touch” to “tap” and now I got what I want. Thank you! :slight_smile:
By the way LUA is very very easy and my lines of codes are 1/3 of what they would be vs. when I was developing this game in AS3 [import]uid: 6500 topic_id: 9823 reply_id: 35791[/import]