Hello! Sorry for the amateur question, but we are trying to figure out how to switch levels in our game. In the first level, there are three stars to catch, and we have successfully created a variable and text to track how many stars have been caught. We cannot, however, figure out how to change the scene once all three stars have been caught. Here is what we tried:
function nextLevel( event )
if starsCaught == “3” then
director:changeScene( “loadlevel2” )
end
end
Runtime:addEventListener( “enterFrame”, nextLevel )
This doesn’t seem to do anything… What should we do? Any help would be greatly appreciated!
Thanks a lot!
MP Games Inc. [import]uid: 37588 topic_id: 6813 reply_id: 306813[/import]