Im trying to move an image on the screen when clicked but I don’t want it to go off the screen at all or down more and 50pixels from the bottom because that is where my “ground” image is. what I have right now is:
[lua]function shoot(event)
if event.phase == “began” then
bullsEye.x = math.random(0, display.contentWidth)
bullsEye.y = math.random(0, display.contentHeight)
end
return true
end[/lua]
what do I need to add to make sure it doesn’t go off the screen or below my “ground” image?