UPDATE: I HAVE NOW REMOVED MY PROJECT FROM MY DOWNLOAD PAGE. IF YOU WOULD LIKE TO HELP ME BY USING MY CODE PLEASE CONTACT ME ON RYAN@GROMFROG.COM.
I have been Corona for around 3 months and have already created my first game ready for launch. But I have hit a brick wall. I have been using tutorials from around the net to help me with this game and some of the code is from a Mobile Tuts+. The game i am working on is a falling game like “Fall down” this is one game in a collection of games I am working on. Now to my issue.
I am using physics, storyboard api.
I have got the main.lua file file directing you to the fall.lua which is the game. then i have got the game working how i want it but at the end of the file I have the following code:
-- Check for Game Over
if(lives \< 0) then
showAlert()
end
-- Levels
if(score \> 500 and score \< 502) then
moveSpeed = 3
end
end
function collisionHandler(e)
-- Grab Lives
if(e.other.name == 'live') then
display.remove(e.other)
e.other = nil
lives = lives + 1
livesTF.text = 'x' .. lives
end
-- Bad Blocks
if(e.other.name == 'bad') then
lives = lives - 1
livesTF.text = 'x' .. lives
end
end
function showAlert()
gameListeners('rmv')
local alert = display.newImage('alertBg.png', 70, 190)
alertScore = display.newText(scoreTF.text .. '!', 134, 240, native.systemFontBold, 30)
livesTF.text = ''
transition.from(alert, {time = 200, xScale = 0.8})
end
I want to not use the function showAlert() and in it’s place direct the user when the lives hit less than 0 to a file called score.lua.
I want to do this because I want to have more space to show score, where the user is on the leader board, and allow the user to share to facebook and twitter.
Is there a way to replace the function showAlert () with a piece of code to send the user to the score.lua folder. I would like to use the storyboard api and I think I have got everything right as it is working.
If you would like to see my code/project please leave a reply and I will post it on my site for download.
I really need some help.
Thanks
Ryan [import]uid: 111430 topic_id: 23185 reply_id: 323185[/import]
