SPAM THE FLAG A LI'L BIT you are the green square, there is an enemy red square, you can move and attack with space. if you go in its vision range (basicly if you go close to it) it will chase you, once it starts it wont stop until you defeat it or stop the project, touching the the red sqaure will damage you, and change the player health variable by -1 pressing space will make you attack, making a swipe apear in front of whatever direction you are facing, if the enemy touches this, it will get damaged, there is a 1 second cooldown for attacking. if the enemy square's health is at 0 it will be defeated, hide and play a sound effect, if the player is killed the project will stop. all of this is easily changable. so you can change the enemy vision range, attack duration, health of player or enemy, speed of player or enemy, etc
I also made this project specificly for @JAWstudios you can use this with credit (but if you are @JAWstudios credit is optional) -------------------------------CREDITS-------------------------- song: Big giant circles - chip zeal