# Problem level interception....help!

**URL:** <https://discourse.codecombat.com/t/problem-level-interception-help/8387>\
**Category:** Uncategorized\
**Created:** [July 13, 2016, 6:36am UTC](https://discourse.codecombat.com/t/problem-level-interception-help/8387 "2016-07-13T06:36:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![izac](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@izac](https://discourse.codecombat.com/u/izac)\
**Post date:** [July 13, 2016, 6:36am UTC](https://discourse.codecombat.com/t/problem-level-interception-help/8387/1 "2016-07-13T06:36:02Z")

</div>

my code

while(true) {  
var enemy = hero.findNearest(hero.findEnemies());  
var friend = hero.findFriends();  
// Find the point between the enemy’s position and your friend’s position.  
// Check the guide if you need more help!  
if(enemy && friend){  
var x = (enemy.x + friend.x)/2;  
var y = (enemy.y + friend.y)/2;  
hero.move({x: x, y: y});  
}  
}

---

<div class="post-metadata">

**Author:** ![Bryukh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bryukh/32/19597_2.png) [@Bryukh](https://discourse.codecombat.com/u/Bryukh)\
**Post date:** [July 13, 2016, 9:19am UTC](https://discourse.codecombat.com/t/problem-level-interception-help/8387/2 "2016-07-13T09:19:07Z")

</div>

> [@izac](#):
>
> var friend = hero.findFriends();

So `friend` is an array of friends here. Even there is only one friend, it will be the array with one friend.
