Hi guys,
I’m writing a word game. If the incorrect answer was given, I would like to use setSequence to highlight the correct answer and then pause for about 500ms. The problem is that the code keeps running, and the setSequence never seems to display.
Code is:
– FALSE
for x = 1, #answerBox do
if answerBox[x].correct == false then
answerBox[x]:setSequence( “selected” )
answerBox[x]:play()
end
end
for x = 1, #answerBox do
if answerBox[x].correct == false then
answerBox[x]:setSequence( “selected” )
answerBox[x]:play()
end
end
starsEarned = starsEarned -1
playAudio (audio.loadSound (“audio/wrong.wav”), true)
transition.to( lives[livesCount], {y=screenBottom + 30, time=2000, alpha=0} )
livesCount = livesCount -1
disposeAnswers()
if (livesCount <= 0) then
gameOver (“lost”)
else
playGame()
end
end