ZeldariaLvl 41
Here is the link, feel free to remix/view the code
https://studio.code.org/projects/gamelab/_6h6g48BXjvO_oi1Y9zb9iStjOYvAadFCQCEwQtH2wk
Here is the link, feel free to remix/view the code
https://studio.code.org/projects/gamelab/_6h6g48BXjvO_oi1Y9zb9iStjOYvAadFCQCEwQtH2wk
You should only use function draw()
one time. Try replacing both functions with this code:
function draw() {
background("white");
if (keyDown("left")) {
ghost.setAnimation("ghost_walking");
ghost.mirrorX(+1);
ghost.x = ghost.x - 1;
} else if (keyDown("right")) {
ghost.setAnimation("ghost_walking");
ghost.mirrorX(-1);
ghost.x = ghost.x + 1;
} else {
ghost.setAnimation("ghost");
}
drawSprites();
}
k thx!
it worked! :)
again, thx for helping!
um when I tried to add a function called 'scare' to my game featuring the ghost, the 'walk' function (the one u helped me fix before) stopped working. I ran multiple tests and even removed the scare function, but it still doesn't work...
oof i think ill be able to remix that and then help you out. sound good?
cuz that happened to one of my projects one time
ok
I put the 'scare' function back in so yeah, maybe u can fix it
wait now I did it (put the function back in)
ok