Hi again everybody. I need some help. I’ve been trying to figure how to display a high score when a game ends. I got the code for score.
[code]
local scoreText
local score = 0
scoreText = display.newText(score, 0, 0, “HelveticaNeue”, 35)
scoreText:setTextColor(255, 255, 255)
scoreText.x = 90
scoreText.y = 460
– This shows when Balloon pops score is added up
local spawnBall = function( event )
local t = event.target
local phase = event.phase
if touch == true then
if “began” == phase then
t:removeSelf() – destroy object
score = score + math.random( 100 )
scoreText.text = score
end
– Stop further propagation of touch event
return true
end
end
ball:addEventListener( “touch”, spawnBall )[/code]
What I’m trying to figure out is how would I put display a high score just only one high score. [import]uid: 17058 topic_id: 19288 reply_id: 319288[/import]
[import]uid: 17058 topic_id: 19288 reply_id: 74597[/import]