I require some help with Challenge: Story Teller
Hi! Listen, I'm a new one at making games and visualizations. When I put in my code, I always see; "The only variable you should need to use is currentScene". I've been stuck on this first step for three days now! Here is the code I'm using:
fill(0, 0, 0);
textSize(20);
textAlign(CENTER);
//images of Leafers
var seed= getImage("avatars/leafers-seed");
var seedling= getImage("avatars/leafers-seedling");
var sapling= getImage("avatars/leafers-sapling");
var tree= getImage("avatars/leafers-tree");
var ultimate = getImage("avatars/leafers-ultimate");
var currentScene;
var drawScene1 =function(){
currentScene = 1;
background(200, 175, 175);
image(seed, 50,200);
text("Leafers started out as a seed",200,50);
};
var drawScene5 =function(){
currentScene = 5;
background(150, 150, 175);
image(ultimate, 200,200);
text("In the end, Leafers became Ultimate Leafers",200,50);
};
drawScene1();
mouseClicked=function() {
if (mouseIsPressed === currentScene) {
drawScene1();
}
else if (mouseIsPressed === currentScene) {
drawScene5();
}
};

Log ind for at efterlade en kommentar.