Hi,
I'm trying to find a way to spot the errors if you click outside the differences; if you do it 5 times, game is over.
i tried this code in both the pictures, but numErrorsFound increases even if you click a difference.
can you help me with this?
thank you
Code :
if (wade.app.numErrorsFound < wade.app.totalErrors)
{
var err = wade.getSceneObject('err ' + wade.app.numErrorsFound);
err.getSprite(1).setVisible(true);
wade.app.numErrorsFound++;
if (wade.app.numErrorsFound == wade.app.totalErrors)
{
alert('you lost!');
wade.clearScene();
wade.loadScene('home.wsc', true, function()
{
});
}
}