Help with sleep function
Posted: Wed Mar 13, 2013 1:34 am
I'm sorta new at lua so please don't hate. I'm trying to make an image stay visible for 10 seconds then disappear. Here are the functions I put in...
function love.draw()
love.graphics.setColor( 255, 255, 255, 255 )
love.graphics.draw( imageLevel1, 300, 60, 0, 0.7 ) while true do love.timer.sleep(10).love.graphics.draw( imageLevel1, 300, 60, 0, 0.7 ) while true do imageLevel1 = love.graphics.newImage( "textures/level1.png" )(bool) end end
function love.draw()
love.graphics.setColor( 255, 255, 255, 255 )
love.graphics.draw( imageLevel1, 300, 60, 0, 0.7 ) while true do love.timer.sleep(10).love.graphics.draw( imageLevel1, 300, 60, 0, 0.7 ) while true do imageLevel1 = love.graphics.newImage( "textures/level1.png" )(bool) end end