Version 1 of my AI for pixel fencing. I'm going to share a new project every time I make an improvement to the AI, so that you can play your way through varying levels of difficulty and predictability. This very early version can fight back but is very easy to beat. In case you're wondering, the computer is not cheating. It uses exactly the same script as you do, just with variables instead of "if key pressed?" booleans. I have a separate script in the computer player sprite that toggles on and off the variables, as if keys were being pressed. If you haven't played the 2 player version of my game, I suggest that you do: https://scratch.mit.edu/projects/48281242/ The controls are the same, you are the blue player. Use the [Arrow Keys] to move and jump, [O] to parry, [P] to lunge. Press [Space] to pause. You can lunge in midair. What's physics?
All art and coding done by me.