Simultaneous movement not working *Resolved*

Link to the project or level:(Game Lab - Code.org)
What I expect to happen: In a 2 player game, one player is controlled by wasd and the other by arrows. Player 1 spins their bat by pressing e, player 2 spins by pressing L. Both people should be able to move all directions and spin their bats.
What actually happens: The players can move fine, except if they move to the right. If player 1 is spinning and moving right, player 2 can’t move or spin. If player 2 is spinning, player 1 can’t spin and move to the right.
What I’ve tried: i’ve gone over the code looking for discrepancies in x and y position, and < or > being in the wrong place. I can’t see any conflict.

movement seems fine to me couldn’t replicate your bug maybe you fixed it? the only bug i saw was the rotation being set to 0 rather than keeping the relative rotation

function fight() {
  if (keyDown ("e")) {
    bat1.rotationSpeed = 25;
    bat1.setAnimation("bat1hit");
  } else {
    bat1.rotationSpeed = 0;
  }
  
}
function fight1() {
    if (keyDown ("l")) {
    bat2.rotationSpeed = 25;
    bat2.setAnimation("bat2hit");
  } else {
    bat2.rotationSpeed = 0;
  }
  
}

Thanks for pointing out the bug. The code is from a student of mine, and hasn’t been fixed yet. If you push e, then l, then d, the first player should move right, but doesn’t.

Thanks for your help!

@obrienm,

As i am looking at it right now, the controls have changed to different keys and it appears that both players can move and swing the bat at the same time. Let us know if you still need someone to look at it.

Mike

Yeah, he made some changes in class today, and it works now. I’m not sure what the issue was. Thanks for looking.