okay so i have this image in my game, I want it to trigger a function i have named “gameover()” whenever the image hits the bottom of the screen, how can i do this? i was thinking this would work but it didnt, any help? thanks!
local scroll = display.newImage( "scroll.png" )
scroll.x = 165
scroll.y = 230
localGroup:insert(scroll)
if (scroll.y \> 480) then
gameover()
end
all my game over function is only an image, thanks for those links, all i want to know is how can i make it load a function or change to another scene or anythingg, once it hits the bottom of the screen?
That “if” statement only runs once but you need to check the position over and over. Use the “enterFrame” event. [import]uid: 12108 topic_id: 6764 reply_id: 23705[/import]