Hi, i’m using naflar and i’m wondering in order to move my character I would normally type “this.moveXY” But however, i’m working on using “findFriends()” and so would I type “this.follow(friends)” or "hero.follow(friends)
// Remember that enemies may not yet exist.
while (true) {
var enemy = hero.findNearestEnemy();
var friends = hero.findFriends();
// If there is an enemy, attack it!
if (enemy){
this.attack(enemy);
this.devour(enemy);
} for (var i = 0; i < friends.length; ++i){
var friend = friends[i];
// Do something with each friend here
this.follow(friends);
}
}// end of while loop`Preformatted text`