# Eagle eye is IMPOSSIBLE!

**URL:** https://discourse.codecombat.com/t/eagle-eye-is-impossible/8808
**Category:** Uncategorized
**Created:** [August 30, 2016, 5:38pm UTC](https://discourse.codecombat.com/t/eagle-eye-is-impossible/8808 "2016-08-30T17:38:56Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![sonicrosebeam](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/sonicrosebeam/32/4594_2.png) [@sonicrosebeam](https://discourse.codecombat.com/u/sonicrosebeam)
#### Post date: [August 30, 2016, 5:38pm UTC](https://discourse.codecombat.com/t/eagle-eye-is-impossible/8808/1 "2016-08-30T17:38:56Z")

</div>

i am STRUGGLING with this level… ive been stuck on it for days 😅 i use python btw. please post your solution!

---

<div class="post-metadata">

### Author: ![sonicrosebeam](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/sonicrosebeam/32/4594_2.png) [@sonicrosebeam](https://discourse.codecombat.com/u/sonicrosebeam)
#### Post date: [August 30, 2016, 5:42pm UTC](https://discourse.codecombat.com/t/eagle-eye-is-impossible/8808/2 "2016-08-30T17:42:20Z")

</div>

my code

# You shouldn’t attack the burls, only the ogres!

while True:  
target = hero.findNearestEnemy()  
# Some of the targets will be Burls. You don’t want to attack them!  
# Use this to tell if you should attack: hero.shouldAttack(target)  
“ogre” = target # ∆ Change this to use shouldAttack()  
if doAttack:  
hero.shouldAttack(target)

---

<div class="post-metadata">

### Author: ![sonicrosebeam](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/sonicrosebeam/32/4594_2.png) [@sonicrosebeam](https://discourse.codecombat.com/u/sonicrosebeam)
#### Post date: [August 30, 2016, 5:49pm UTC](https://discourse.codecombat.com/t/eagle-eye-is-impossible/8808/3 "2016-08-30T17:49:49Z")

</div>

![](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/a/a2231b576da113d3c102c9b84f5016f3d19ae4b1.jpg)

---

<div class="post-metadata">

### Author: ![BadFoxProgrammer](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/badfoxprogrammer/32/4585_2.png) [@BadFoxProgrammer](https://discourse.codecombat.com/u/BadFoxProgrammer)
#### Post date: [August 30, 2016, 6:39pm UTC](https://discourse.codecombat.com/t/eagle-eye-is-impossible/8808/4 "2016-08-30T18:39:08Z")

</div>

Well, we cant post solution, I recommend you tu look the hints.  
(I work with lua, that’s why i can’t help you a lot)  
I also was stucked in this level, google your problem, that’s how i solve it and a little effort and use music for concentration for programmers, that kinda helps (at least for me)  
[https://www.youtube.com/playlist?list=PL\_0cQDizDoi6gMaLWqkpD9ti6Q1h0RBua](https://www.youtube.com/playlist?list=PL_0cQDizDoi6gMaLWqkpD9ti6Q1h0RBua)"

---

<div class="post-metadata">

### Author: ![Alexbrand](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@Alexbrand](https://discourse.codecombat.com/u/Alexbrand)
#### Post date: [August 30, 2016, 7:52pm UTC](https://discourse.codecombat.com/t/eagle-eye-is-impossible/8808/5 "2016-08-30T19:52:27Z")

</div>

Hi! You have problem in 7th line. In default code it looks like  
`doAttack = target # ∆ Change this to use shouldAttack()`  
so you must turn ^shouldAttack()^ into hero’s function and assign ^doAttack^ to this function. This is the only one step that you should make to modify example code and make it work.  
Besides, often forum already have topics with answers to our questions about code difficulties we meet while trying to beat levels) F.e. here [Eagle Eye (Backwoods Forest) Problem](https://discourse.codecombat.com/t/eagle-eye-backwoods-forest-problem/8059/31) ) Well, forum searching demands time and efforts, but gives an opportunity not waste time on waiting for answer)  
Good luck in coding!

---

<div class="post-metadata">

### Author: ![sonicrosebeam](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/sonicrosebeam/32/4594_2.png) [@sonicrosebeam](https://discourse.codecombat.com/u/sonicrosebeam)
#### Post date: [August 31, 2016, 4:31pm UTC](https://discourse.codecombat.com/t/eagle-eye-is-impossible/8808/6 "2016-08-31T16:31:00Z")

</div>

thanks! im still having a little bit of trouble. its telling me “cannot read property, start undefined”  
again thank you! a little bit more help would be appreciated

.

 ![](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/8/809a8df718be2b1badc4bf9ec2b273ae4d9186bc.jpg)

---

<div class="post-metadata">

### Author: ![Alexbrand](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@Alexbrand](https://discourse.codecombat.com/u/Alexbrand)
#### Post date: [August 31, 2016, 6:39pm UTC](https://discourse.codecombat.com/t/eagle-eye-is-impossible/8808/7 "2016-08-31T18:39:32Z")

</div>

No-no-no!) Don’t touch munchkins, ogres or anybody else in the code) Just Restart level code, copy function from 6th line and paste it into right place in 7th line. Ippon!)

---

<div class="post-metadata">

### Author: ![Alexbrand](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@Alexbrand](https://discourse.codecombat.com/u/Alexbrand)
#### Post date: [August 31, 2016, 6:43pm UTC](https://discourse.codecombat.com/t/eagle-eye-is-impossible/8808/8 "2016-08-31T18:43:12Z")

</div>

And keep this part

```python
7 doAttack = 

```

as it is in given by default code. Only copypaste.

---

<div class="post-metadata">

### Author: ![sonicrosebeam](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/sonicrosebeam/32/4594_2.png) [@sonicrosebeam](https://discourse.codecombat.com/u/sonicrosebeam)
#### Post date: [September 1, 2016, 1:59pm UTC](https://discourse.codecombat.com/t/eagle-eye-is-impossible/8808/9 "2016-09-01T13:59:14Z")

</div>

WOAH!!! i found a other way to beat the level! i recently bought obsidian armor, so when i reset the code, i attacked munchkins and burls, and i won cuz i survived!

 ![](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/c/c40404cba139f0507f63bbc09163bd5a7ba80e39.jpg)

 ![](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/e/ec4d1de78ba0b17d9cc0194963da251e51a472b1.jpg)

 ![](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/f/f8feff6bbc799e0fc4fe84eca9587b0a8b8c9924.jpg)

---

<div class="post-metadata">

### Author: ![sonicrosebeam](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/sonicrosebeam/32/4594_2.png) [@sonicrosebeam](https://discourse.codecombat.com/u/sonicrosebeam)
#### Post date: [September 1, 2016, 2:01pm UTC](https://discourse.codecombat.com/t/eagle-eye-is-impossible/8808/10 "2016-09-01T14:01:53Z")

</div>

oh darn i forgot the levels randomize! WHOOPS!

---

<div class="post-metadata">

### Author: ![Alexbrand](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@Alexbrand](https://discourse.codecombat.com/u/Alexbrand)
#### Post date: [September 1, 2016, 2:03pm UTC](https://discourse.codecombat.com/t/eagle-eye-is-impossible/8808/11 "2016-09-01T14:03:00Z")

</div>

Hi!) Ehm, I believe, If you would manage to stay alive and to kill burl, you’ll fail the second goal) Seems you are lucky today)

---

<div class="post-metadata">

### Author: ![Alexbrand](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@Alexbrand](https://discourse.codecombat.com/u/Alexbrand)
#### Post date: [September 1, 2016, 2:04pm UTC](https://discourse.codecombat.com/t/eagle-eye-is-impossible/8808/12 "2016-09-01T14:04:43Z")

</div>

> [@sonicrosebeam](#):
>
> levels randomize

That’s the point of many levels 😉 😆

---

<div class="post-metadata">

### Author: ![sonicrosebeam](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/sonicrosebeam/32/4594_2.png) [@sonicrosebeam](https://discourse.codecombat.com/u/sonicrosebeam)
#### Post date: [September 1, 2016, 2:07pm UTC](https://discourse.codecombat.com/t/eagle-eye-is-impossible/8808/13 "2016-09-01T14:07:20Z")

</div>

yah. now im just sitting here pressing “submit” until i get lucky 😂

---

<div class="post-metadata">

### Author: ![sonicrosebeam](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/sonicrosebeam/32/4594_2.png) [@sonicrosebeam](https://discourse.codecombat.com/u/sonicrosebeam)
#### Post date: [September 1, 2016, 2:12pm UTC](https://discourse.codecombat.com/t/eagle-eye-is-impossible/8808/14 "2016-09-01T14:12:27Z")

</div>

…

when you realize you had 1 CODE WRONG and you have been stuck for days 😁

 ![](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/e/e9e5daf2070ae7830efb6522b55e5d6acd2a123e.jpg)

thanks for the help 😀
