Trying to make a loading screen, the code should display the OS Logo for a second and a half before making it invisible. The visibility variable in my monitor shows it as false, but it does not disappear on the screen. I’m not sure why because it uses the same code as my previous projects for invisibility but just doesn’t work
//Screen variable controls what is being shown on the screen
var Screen = “Startup”;
//Startup screen sprites
background(“Black”);
var LOGO = createSprite(200, 200);
LOGO.setAnimation(“LOGOGREEN”);
LOGO.visible = false;
if (Screen == “Startup”) {
Startup();
}
function draw() {
drawSprites();
}
function Startup() {
textAlign(CENTER, CENTER);
textSize(50);
text(“Loading OS”, 200, 100);
setTimeout(function() {
LOGO.visible = true;
setTimeout(function() {
LOGO.visible = false;
Screen = “Login”;
}, 1500);
}, 1000);
}