how can i make the codes below spawn when the score equals 10?
[code]
local function spawnTen()
if( spawnTrue == true )then
local randomPos = math.random ( 0, 480 )
ten = display.newImage( “ten.png” )
ten.x = randomPos
ten.y = -100
ten.myName = “ten”
physics.addBody(ten , “dynamic”, {isSensor = true, radius = 15})
localGroup:insert( ten ) --PEACH: Adds new orbs to localGroup for use with Director
end
end
tenTimer = timer.performWithDelay( 1500, spawnTen, 0 )
----- My score codes are below
local function checkScore()
if score == 10 then
–What goes here?
end
end
Timer = timer.performWithDelay( 4000, checkScore, 4000 ) [import]uid: 132369 topic_id: 27344 reply_id: 327344[/import]
I hope that helps