so, I'm making a game lab thing and for some reason, the code has STOPPED WORKING BEYOND THE NORMAL GLITCH THING
it says that it's working but it really isn't
the drawSprites(); command is broken or something plz help!
also here is the code as of this message:
var player = createSprite(200, 300);
player.setAnimation("player_idle");
var ground = createGroup();
ground.add(createSprite(200,50));
ground.setAnimationEach("ground_grass_1");
var END = createGroup();
ground.setScaleEach(0.4);
drawSprites();
function draw() {
background("white");
move();
}
function move() {
if (keyDown("right")) {
player.x = player.x+2;
player.setAnimation("player_walk");
player.mirrorX(+1);
} else if ((keyDown("left"))) {
player.x = player.x-1;
player.setAnimation("player_walk");
player.mirrorX(-1);
} else {
player.setAnimation("player_idle");
}
if (keyDown("up")){
player.y = player.y + 3 ;
if (player.isTouching(ground)) {
player.y = player.y - 10;
player.velocityY = -20 ;
} else {
player.y = player.y - 3 ;
}
}
}
function draw() {
player.collide(ground);
while ((player.isTouching(ground))) {
player.velocityY = 0 ;
player.y = player. y - 0.1 ;
}
}
!<