I am stuck on the level Hunting Party. Whenever I run my code, it sends the soldiers and archers forwards, but then they just stay there. It says their action is “move”, but I can’t figure out why and/or where thay are moving! Here is my code:
var friends = hero.findFriends();
for(var i = 0; i < friends.length; i++){
var friend = friends[i];
hero.command(friend, “move”, {x:friend.pos.x + 35, y:friend.pos.y});
}
var enemy = friend.findNearestEnemy();
for(var f = 0; f < friends.length; f++){
var friend = friends[f];
if(enemy) {
hero.command(friend, “attack”, enemy);
}
}