I am trying to print “Level Loaded” after a level is loaded, but it doesn’t wait for the level to load, it just prints it right away.
Inside loadLevel(1) there is a 5 second timer. My print statement shouldn’t print until after the 5 seconds. Why does it do this? It prints right when the level starts loading
[code]
function startGame(e)
if(e.phase == “ended”) then
loadLevel(1); --Load level, Wait 5 seconds, then print
print “Level Loaded”;
end
–spawnTimer = timer.performWithDelay(2000 - spawnRate * 100, spawnObjects, 1);
end
[code]
[import]uid: 39238 topic_id: 6877 reply_id: 306877[/import]