While playing screeps I can't figure out how to attack an enemy. Here's what I tried.
I created my attacker creep:
Game.spawns.Spawn1.createCreep(['attack','move'],'Attacker1');
Then when the first enemy came on the screen I tried running this command and it fails.
Game.creeps.Attacker1.attack("Player 3");
What is the correct syntax for the enemies?
Edit: Adding the link for the documentation for accessing objects in the game. http://screeps.com/docs/Creep.php
"Player 3" is the name of the enemies. I need to some how target the enemy and fight them.