I really need some help with my first game

Hi guys, Im new hear

I’ve been doing a course through ITOnlineLearn called Games Dev 101. I’m having a bit of a nightmare with it and I don’t have a lot of time before this last module is due. I’ve become stuck with a few things with my characters.

In unity, this is what the screen looks like:

For starters.

  1. Ive followed the course through the lessons to make a player and an enemy. The player has an attack but its not registering with the enemies capsule collider 2D to get the effect. Ive gone through the code I dont know how many times but its not working.

  2. I moved onward to get the game going since I need to finish, but now I have encountered a compiler error which I dont understand. The enemy is supposed to move towards the player (Red) and attack him. The enemy wont move and I can’t add an attack function in the animation timeline, it keeps asking me to resolve compiler errors and when I try to add an animation event, attack isnt listed. Thing is, the scripting software I have isnt indicating there is a problem so I dont know where to look.

  3. lastly, and a minor one, my player character is doing the attack animation twice for one input. I cant seem to fix it without putting a big delay at the end, but thats not to good for gameplay.

I’ve attached a copy of the scripts for both the hero and enemy character below, if anyone can see what’s wrong and where it needs fixing i will be super grateful. I know its a lot but Im really new to this.

I know this is probably a lot but if anyone can see something up, it would mean a lot to me

Well, your compile error is the second error. TakeDamage requires an int being passed to it. So you need to pass in the amount of damage you are dealing to the enemy.